0

use part of a main menu for a context menu

   visual c# 2010 recipes (apress)

visual c# 2010 recipes (apress)

Kỹ thuật lập trình

... 7-12 Use Part of a Main Menu for a Context Menu 336 7-13 Make a Multilingual Form 338 7-14 Create a Form That Cannot Be Moved 341 7-15 Make a Borderless Form Movable ... portfolio management, strategic planning, and real-time search Allen is a partner at QuantumBlack, a design and technology studio that applies visual analytics to help organizations make faster decisions ... Application Domain 111 3-6 Execute an Assembly in a Different Application Domain 114 3-7 Instantiate a Type in a Different Application Domain 116 3-8 Pass Data Between Application...
  • 1,017
  • 3,697
  • 0
Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_1 pptx

Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_1 pptx

Hệ điều hành

... // A private class used to pass initialization data to a new thread private class ThreadStartData { public ThreadStartData(int iterations, string message, int delay) { this.iterations = iterations; ... each message for a specified duration private static void DisplayMessage(object config) { ThreadStartData data = config as ThreadStartData; if (data != null) { for (int count = 0; count < data.Iterations; ... a WaitSleepJoin state and wait for any one of the objects in a WaitHandle array to be signaled You can also specify a timeout value WaitAll 178 Description A static method that causes the calling...
  • 95
  • 1,043
  • 0
Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_2 potx

Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_2 potx

Hệ điều hành

... search an XML document for nodes using advanced search criteria For example, you might want to search a particular branch of an XML document for nodes that have certain attributes or contain a specific ... will indicate each error: Validating ProductCatalog_Invalid.xml Validation error: The 'expiryDate' element has an invalid value according to its data type [path information truncated] Validation ... functionality The separation of generated and manual code is particularly elegant in Visual Studio 2005 and later versions due to the extensive use of partial types 308 CHAPTER ■ WINDOWS FORMS 7-1 Add...
  • 95
  • 557
  • 0
Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_3 pptx

Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_3 pptx

Hệ điều hành

... class For example, you could store an array of image data, some content that should be used as a header or footer on each page, font information, or even the name of a file from which you want ... System.Drawing.Drawing2D; namespace Apress.VisualCSharpRecipes.Chapter08 { public partial class Recipe08_02 : Form { // Define the shapes used on this form private GraphicsPath path; private Rectangle ... allow users to navigate to a web page whose address is entered into a TextBox Buttons also allow users to move forward and backward through page history and navigate directly to their personal...
  • 95
  • 521
  • 0
Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_4 potx

Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_4 potx

Hệ điều hành

... Create the data set DataSet dataset = new DataSet(); 469 CHAPTER ■ DATABASE ACCESS // Create the SQL data adapter SqlDataAdapter adapter = new SqlDataAdapter(query, con); // Create the command ... to obtain an instance of DataRow that has the same schema as the DataTable The new row is not automatically added to the table 462 CHAPTER ■ DATABASE ACCESS when you call NewRow—call DataTable.Rows.Add ... System.String Data in table Data Eastern Data Western Data Northern Data Southern Data in (modified) table Data North Eastern Data Western Data Northern Data Southern Data Central Main method complete...
  • 95
  • 395
  • 0
Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_5 ppt

Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_5 ppt

Hệ điều hành

... current application domain AppDomain appDomain = System.AppDomain.CurrentDomain; // Configure the current application domain to use Windows-based principals appDomain.SetPrincipalPolicy( System.Security.Principal.PrincipalPolicy.WindowsPrincipal); ... maintain access to the original data To determine if data changes over time, you must generate and store the original data’s hash code Later, you can generate another hash code for the data and ... command-line argument HashAlgorithm hashAlg = null; if (args[0].CompareTo("SHA1Managed") == 0) { hashAlg = new SHA1Managed(); } else { hashAlg = HashAlgorithm.Create(args[0]); } using (hashAlg)...
  • 95
  • 1,389
  • 0
Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_6 doc

Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_6 doc

Hệ điều hành

... defines a type called MyDataType, which has a constructor and a method called sayHello The Main method called when the application starts creates an instance of MyDataType using eager initialization, ... event argument classes.) namespace Apress.VisualCSharpRecipes.Chapter13 { // An event argument class that contains information about a temperature // change event An instance of this class is passed ... finalizer can take the necessary steps to release any unmanaged resources Unfortunately, because the garbage collector uses a single thread to execute all finalizers, use of finalizers can have a detrimental...
  • 95
  • 530
  • 0
Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_8 doc

Apress-Visual CSharp 2010 Recipes A Problem Solution Approach_8 doc

Hệ điều hành

... scale the image at all If the image is smaller than the area of the shape, the rest of the area is left empty (transparent fill) If the image is larger than the shape, the image is cropped Uniform ... cvsSurface_Drop(object sender, DragEventArgs e) { // Create a new Label Label newLabel = new Label(); newLabel.Content = e.Data.GetData(DataFormats.Text); newLabel.FontSize = 14; // Add the Label ... coordinates of a pair with a comma and separate each coordinate pair with a space (for example, x1,y1 x2,y2 x3,y3, and so on) To configure the points of a Polygon programmatically, you need to add System.Windows.Point...
  • 95
  • 378
  • 0
Visual C# 2010 Recipes solution_3 potx

Visual C# 2010 Recipes solution_3 potx

Kỹ thuật lập trình

... class For example, you could store an array of image data, some content that should be used as a header or footer on each page, font information, or even the name of a file from which you want ... System.Drawing.Drawing2D; namespace Apress.VisualCSharpRecipes.Chapter08 { public partial class Recipe08_02 : Form { // Define the shapes used on this form private GraphicsPath path; private Rectangle ... allow users to navigate to a web page whose address is entered into a TextBox Buttons also allow users to move forward and backward through page history and navigate directly to their personal...
  • 95
  • 554
  • 0
Visual C# 2010 Recipes solution_4 doc

Visual C# 2010 Recipes solution_4 doc

Kỹ thuật lập trình

... Create the data set DataSet dataset = new DataSet(); 469 CHAPTER ■ DATABASE ACCESS // Create the SQL data adapter SqlDataAdapter adapter = new SqlDataAdapter(query, con); // Create the command ... to obtain an instance of DataRow that has the same schema as the DataTable The new row is not automatically added to the table 462 CHAPTER ■ DATABASE ACCESS when you call NewRow—call DataTable.Rows.Add ... System.String Data in table Data Eastern Data Western Data Northern Data Southern Data in (modified) table Data North Eastern Data Western Data Northern Data Southern Data Central Main method complete...
  • 95
  • 445
  • 0
Visual C# 2010 Recipes solution_5 pot

Visual C# 2010 Recipes solution_5 pot

Kỹ thuật lập trình

... current application domain AppDomain appDomain = System.AppDomain.CurrentDomain; // Configure the current application domain to use Windows-based principals appDomain.SetPrincipalPolicy( System.Security.Principal.PrincipalPolicy.WindowsPrincipal); ... maintain access to the original data To determine if data changes over time, you must generate and store the original data’s hash code Later, you can generate another hash code for the data and ... command-line argument HashAlgorithm hashAlg = null; if (args[0].CompareTo("SHA1Managed") == 0) { hashAlg = new SHA1Managed(); } else { hashAlg = HashAlgorithm.Create(args[0]); } using (hashAlg)...
  • 95
  • 638
  • 0
Visual C# 2010 Recipes solution_6 pdf

Visual C# 2010 Recipes solution_6 pdf

Kỹ thuật lập trình

... defines a type called MyDataType, which has a constructor and a method called sayHello The Main method called when the application starts creates an instance of MyDataType using eager initialization, ... event argument classes.) namespace Apress.VisualCSharpRecipes.Chapter13 { // An event argument class that contains information about a temperature // change event An instance of this class is passed ... finalizer can take the necessary steps to release any unmanaged resources Unfortunately, because the garbage collector uses a single thread to execute all finalizers, use of finalizers can have a detrimental...
  • 95
  • 561
  • 0
Visual C# 2010 Recipes solution_1 pptx

Visual C# 2010 Recipes solution_1 pptx

Kỹ thuật lập trình

... // A private class used to pass initialization data to a new thread private class ThreadStartData { public ThreadStartData(int iterations, string message, int delay) { this.iterations = iterations; ... each message for a specified duration private static void DisplayMessage(object config) { ThreadStartData data = config as ThreadStartData; if (data != null) { for (int count = 0; count < data.Iterations; ... a WaitSleepJoin state and wait for any one of the objects in a WaitHandle array to be signaled You can also specify a timeout value WaitAll 178 Description A static method that causes the calling...
  • 95
  • 568
  • 0
Localizing Client-Side Data in a Web Forms Application

Localizing Client-Side Data in a Web Forms Application

Kỹ thuật lập trình

... CultureInfo.CurrentCulture.NativeName; } // Sample data that might come from a database // displayed according to culture set by user dateLabel.Text = DateTime.Now.ToString("D"); shortDateLabel.Text = DateTime.Now.ToString("d"); ... classes which makes this relatively easy The System.Globalization namespace contains classes that specify culture-related information These classes are useful in writing globalized applications Within ... information for a user You can store it persistently on the client in a cookie Or you can store it in a database on the server and store it to a session variable when the client logs in or on an...
  • 4
  • 367
  • 0
Tài liệu Creating a Windows Forms Application docx

Tài liệu Creating a Windows Forms Application docx

Kỹ thuật lập trình

... classes o The namespace Visual Studio 2005 has used the name of the project as the name of the toplevel namespace: namespace WinFormHello { } o A class Visual Studio 2005 has written a class ... Windows Forms application, Visual Studio 2005 actually generates a potentially large amount of code This code performs operations such as creating and displaying the form when the application starts, ... previous example) For example: using System.Windows.Forms; The additional namespaces contain the classes and controls used when building graphical applications for example, the TextBox, Label, and Button...
  • 8
  • 351
  • 0
Windows forms application development training kit 70 505

Windows forms application development training kit 70 505

Chứng chỉ quốc tế

... Create DataAdapter Objects 384 Lesson 4: Working with Data in DataTable Objects 385 Adding Data to a DataTable 385 Editing Data in a DataTable 386 Deleting Data in a DataTable ... DataView 410 Searching Data in a DataView 410 Navigating Related Data in a DataView 411 Working with DataView Events 411 Setting the DataTable Object’s Default Table Views Using a DataViewManager ... represents a type of form and creating an instance of that form To add a form to your application at run time, declare and instantiate a variable that represents your form This example assumes that you...
  • 774
  • 495
  • 0
smart client deployment with clickonce deploying windows forms applications with clickonce

smart client deployment with clickonce deploying windows forms applications with clickonce

Đại cương

... pride and joy—his son, Nathan Brian is a fellow Microsoft Regional Director and Microsoft MVP Brian is a fantastic author and speaker and one heck of a great software architect There are only a few ... systems for more than sixteen years He speaks at many major software conferences around the world, and writes for a variety of software journals and magazines He lives in Alexandria, Virginia, but ... best kind of client application for most users is an application with a graphical user interface What Is a Smart Client Application? Smart clients are a subset of all the Windows applications running...
  • 335
  • 944
  • 2
Displaying an Image from a Database in a Web Forms Control

Displaying an Image from a Database in a Web Forms Control

Quản trị mạng

... containing the image from the database Create a SQL statement to retrieve the required image from the database and retrieve the image using a DataReader A DataTable or DataSet filled using a DataAdapter ... the image as a binary stream The BinaryWrite( ) method of the HttpResponse object writes a stream of binary characters to the HTTP output stream rather than a textual stream Response.BinaryWrite((byte[])dr["Photo"]); ... but not straightforward Fortunately, it is much simpler with ASP.NET than it was in ASP Two web pages are required: one that contains the user interface that the client sees and one that retrieves...
  • 3
  • 442
  • 0
Tài liệu Editing and Updating Data in a Web Forms DataGrid pdf

Tài liệu Editing and Updating Data in a Web Forms DataGrid pdf

Kỹ thuật lập trình

... if(!Page.IsPostBack) { dataGrid.DataSource = CreateDataSource( ); dataGrid.DataKeyField = "Id"; dataGrid.DataBind( ); } private DataTable CreateDataSource( ) { DataTable dt = new DataTable(TABLENAME); ... fills a DataTable with the TBL0705 table and stores the DataTable to a Session variable to cache the data source for the DataGrid UpdateDataSource( ) This method creates a DataAdapter and uses ... UpdateDataSource(DataTable dt) { // Create a DataAdapter for the update SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM " + TABLENAME + " ORDER BY Id", ConfigurationSettings.AppSettings["DataConnectString"]);...
  • 10
  • 387
  • 0
Creating Custom Columns in a Windows Forms DataGrid

Creating Custom Columns in a Windows Forms DataGrid

Kỹ thuật lập trình

... to the DataGrid The MappingName property of the DataGridTableStyle is set to the DataSource The MappingName of each DataGridColumnStyle object must be associated with the name of a DataColumn ... attributes, display format, and behavior of cells in a DataGrid column At runtime, each cell in the column hosts a DataGridTextBox control The DataGridBoolColumn inherits from the abstract DataGridColumnStyle ... DataGrid display column with the data column An exception will be thrown if duplicate mapping names are used The DataGridTextBoxColumn class inherits from the abstract DataGridColumnStyle class...
  • 4
  • 417
  • 0

Xem thêm