posts - 82, comments - 0, trackbacks - 0

My Links

News

Archives

Post Categories

C# Download

Facebook

Informativa cookie

Linkedin

Microsoft

Msdn Gallery

Twitter

VisualBasic

Wiki Tecknet

Articles C# in English

Send Email with WindowsPhone

This example shows how to send email using a device with WindowsPhone. To try this example and must have a telephone system operating WindowsPhone8, alternatively you can try it with VisualStudio and the emulator WWGA512 mb, but without the ability to send email. With WindowsPhone 7 and 8 and not only can send Email directly from the device, but also creating our application of any type, but with the need to send email to this Microsoft gives us the class EmailComposeTask. This class provides several properties to be implemented in its entirety in order to competare everything you need to successfully send...

posted @ lunedì 11 marzo 2013 21:37 | Feedback (0) | Filed Under [ Articles C# in English ]

Use the library ClosedXml for creating Excel files.

ClosedXml and a file with the extension. Dll thought to be able to easily create Excel files with just a few simple steps. You can find all the documentation and download ClosedXml from Codeplex, the link available below http://closedxml.codeplex.com/. ClosedXml you can create files with Excel 2007 and 2010 version, keep in mind that to use ClosedXml we also need to install Microsoft OpenXml available for download below http://www.microsoft.com/en-us/download/ details.aspx? id = 5124. In this example there is a DataBase created for simplicity SqlCompact, where you can enter data in a table called UserData so that they can then preview...

posted @ martedì 4 dicembre 2012 23:43 | Feedback (0) | Filed Under [ Articles VB.NET in English Articles C# in English ]

Search filters with dynamic LinqToSql

This example explains how to perform dynamic search filter with one or more conditions through the use of LinqToSql. To try this example and nacessario have on the pc and sdk net.framework4.0 PowerPacks available here .  Linq known as Language-Integrated Query and was introduced with the advent of VisualStudio 2008 and is an integral part in the NETFramework from version 3.5 to oggi.Linq and a technology with which it is possible to query in-memory objects, fields within the tables in a database, XML file, and much more simply and concisely, is divided into different DataProvider among which we LinqToObjects, LinqToXml, LinqToDataSet, ending with...

posted @ venerdì 24 agosto 2012 23:30 | Feedback (0) | Filed Under [ Articles C# in English ]

Set the default printer with WMI

Through this example will be shown how to use WMI (Windows management instrumentation) to select and set the default printer from those available on your operating system. To try this example requires the netFramework4.0 WMI (Windows Management Instrumentation) is a component of the operating system, therefore not be downloaded separately, being already included, that contains a set of tools for managing and configuring the operating system. Using WMI, you can view and change the default printer "like this", or see the information machine hardware from the motherboard to the processor to the CPU until the installed cards and more. One of the famous programs that interface with WMI...

posted @ domenica 17 giugno 2012 12:03 | Feedback (0) | Filed Under [ Articles C# in English ]

BingMap Sample with MetroStyle Application.

In this example we will see how to use the Map control in a Metro application. To try this example and request the release of ConsumerPreviwe Windows8, edit it for VisualStudio 11 Beta, at least the express version that includes templates for Metro Style and Aplications BingMap an account, you can activate this link . Metro and the new interface introduced by Microsoft with the new operating system still in Windows8 ConsumerPreview. One of the novelties of this interface and the introduction of WinRt. By WinRt (Windows Runtime) and can use and interact with the operating system in a considerably simpler and more...

posted @ mercoledì 25 aprile 2012 13:25 | Feedback (0) | Filed Under [ Articles C# in English ]

The DataGrid control in WPF.

In this example we will use this control in WPFDataGrid, and how to interact with a datasource through the use of DataBinding. Per poter testare sul proprio pc l'esempio e necessario che sia installato il Framework 4.0 ClientProfile , mentre per poter visualizzare il codice e necessaria la versione 2010 sp1 di VisualStudio. In most applicationsin circulation, and oftenneed to interact with data sources that can be databases, XML files,Web applications and altro.Per everything is availablein a wpfmarkup extension that performs the connection between the controlsand data source:the DataBinding.This markupextension contained in XAML allows us to display the data in atable in...

posted @ venerdì 20 aprile 2012 22:29 | Feedback (0) | Filed Under [ Articles C# in English ]

Monitor the idle time between user and application.

This article will explainhow to monitor the time in which the user interacts with the application using the Windows API function. To run this example and need to have the framework 4.0 installed on yourPC. The example that we're going toimplement it through the Visual Studio 2010, target framework 4.0.Tutto this is feasible as mentioned above using the library user32.dll present nativelyin the operating system MicrosoftWindows.Il following code usesthis library using the function GetLastInputInfo . GetLastInputInfo is a functiononly of the applicable software for Windows, (not on a website). GetLastInputInforeturns a Boolean value, if the function fails it returns zero orany value...

posted @ venerdì 20 aprile 2012 22:09 | Feedback (0) | Filed Under [ Articles C# in English ]

How to avoid running two processes of the same application

With this example, we demonstrated cone avoid running two processes of the same application. With vb.net and just flag the check box 'make-instance' single that found in the project properties to the Application section. This option is not available in an application running with C #, and here we find solace in the Class Mutex.Per more information about the Mutex class, I refer you to the following link. But now we see how to use it, in this example is performed in the Program.cs file verification by the Mutex class. using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Threading; namespace MutexClassExample {     static class Program     {         static Mutex m;        ...

posted @ venerdì 30 settembre 2011 00:26 | Feedback (0) | Filed Under [ Articles C# in English ]

Example application data with SQLserver 2008 Express

This example shows how to interact with commonly usedcommands in a data application using SQLSERVEREXPRESS. In order to run the samplemust be installed on the target computer. NETFramework 4.0 and SQLServer2008EXPRESS The example is based on the use ofcommonly used TRANSACT.SQL, Insert, Delete, andUpdate. Also included are some search queries by usingLinqToDataSet, queryascending, descending and search queries according to specific criteria. The example consists of a database named Example.mdf, inside there is a table with four fields, the table's primary key ID, a field called NAME nvchar type,a field called NAME nvchar and always ofa field called AGE also nvchar type.The execution...

posted @ venerdì 16 settembre 2011 22:47 | Feedback (0) | Filed Under [ Articles C# in English ]

Use Class Mail for sending e-mail

This application exampleuses the classMailthisnamespaceSystem.Net.Thisexample describeshow to implementall its methodsfor sendingemails.Formore informationonClassMail willreferto this link. In order totest the exampleon yourPCyou need to haveinstalled.NetFramework4.0 TheSystem.Net.Mail classcontainswithin itthe necessary classestosend e-mail,and throughthe SMTP serverwhich receivestheincomingmail message,and thenlatersend the messageto that recipient.There isalso the class ofattachment,with whichyoucan includethee-mailattachments.The example ofmore thanability to sende-mail messages,allows you to sendattachmentstogether,and moreovercan storeall email addresseswithin a variablein thesettingof typeStringCollectionSystem.Collection.Specializatedbelongto the namespace. Start the application andspecifyyoure-mail addressand passwordfor identificationand authenticationto yourmail servermustalso specify theSMTPmailserver,usingthe exampleSMTP.live.com.Forother serversneedto be awareof the server nameand portfor SMTP transactions. After that, themail recipientsortowhich to send theemail,then the objectthatthe message titlewill showthat thedeatinatariointheirmail box,and the bodyof themessage,...

posted @ domenica 17 luglio 2011 12:24 | Feedback (0) | Filed Under [ Articles C# in English ]

Find email addresses from a file

With this code example I want to share it for those who need it how to extract email addresses from a file, I recently left an example vb.net, and this example was done with C #. Remember to include the namespace as follows / / Import of components NETFramework using System; using System.Windows.Forms; using System.IO; using System.Text.RegularExpressions; This piece of code and open the file. / / Button Click Event CaricaFileToolStripMenuItem private void CaricaFileToolStripMenuItem_Click (object sender, EventArgs e) {     / / Declare a new OpenFileDialog     OpenFileDialog open = new OpenFileDialog ();     / / Set the Filter property so that it can only open text file     open.Filter = "Text files | *....

posted @ domenica 3 luglio 2011 16:57 | Feedback (0) | Filed Under [ Articles C# in English ]

Find links to a file

With this code example I want to share it for those who need it how to get links from a file present in it, I can say I'm stumbling the use of regular expressions, which even now after some time I do a lot of effort in understanding them, and why everything I can I share it freely with all who need years. This example was written in C # Remember to include the namespace System.Text.RegularExpression using System; using System.Windows.Forms; using System.IO; using System.Text.RegularExpressions; This is the part of the code to open the file. / / Button Click Event CaricaFileToolStripMenuItem private void CaricaFileToolStripMenuItem_Click (object sender, EventArgs e) {     / / Declare...

posted @ domenica 3 luglio 2011 16:52 | Feedback (0) | Filed Under [ Articles C# in English ]

Sorting Data Using DataContext LinqToSQL growing

This example reads information from a Customers table and insert into a RichTextBox find all occurrences. Using a SQL DataContext and LinqTo   using System; using System.Data; using System.Linq; using System.Data.Linq; using System.Data.Linq.Mapping; using System.Windows.Forms; namespace Linq_To_Sql {    public partial class Form1: Form    {      public Form1 ()      {        InitializeComponent ();      }   / / Create the Customer table initialized with the fields of    / / Customers table      [Table (Name = "Customers")] public class Customer      {        [Column] public string CustomerID;        [Column] public string CompanyName;        [Column] public string City;        [Column] public string State;        [Column] public string Country;      }     private void customersBindingNavigatorSaveItem_Click (object sender, EventArgs e)      {     / / This valoda instructions and...

posted @ domenica 3 luglio 2011 16:47 | Feedback (0) | Filed Under [ Articles C# in English ]

Using DataContext with data LinqToSQL descending order

This example reads information from a Customers table and insert into a RichTextBox find all occurrences. Using a SQL DataContext and LinqTo   using System; using System.Data; using System.Linq; using System.Data.Linq; using System.Data.Linq.Mapping; using System.Windows.Forms; namespace Linq_To_Sql {    public partial class Form1: Form    {      public Form1 ()      {        InitializeComponent ();      }   / / Create the Customer table initialized with the fields of    / / Customers table      [Table (Name = "Customers")] public class Customer      {        [Column] public string CustomerID;        [Column] public string CompanyName;        [Column] public string City;        [Column] public string State;        [Column] public string Country;      }     private void customersBindingNavigatorSaveItem_Click (object sender, EventArgs e)      {     / / This valoda instructions and...

posted @ domenica 3 luglio 2011 16:45 | Feedback (0) | Filed Under [ Articles C# in English ]

Using DataContext LinqToSQL compare data

This example reads information from a Customers table and insert into a RichTextBox find all occurrences. Using a SQL DataContext and LinqTo   using System; using System.Data; using System.Linq; using System.Data.Linq; using System.Data.Linq.Mapping; using System.Windows.Forms; namespace Linq_To_Sql {    public partial class Form1: Form    {      public Form1 ()      {        InitializeComponent ();      }   / / Create the Customer table initialized with the fields of    / / Customers table      [Table (Name = "Customers")] public class Customer      {        [Column] public string CustomerID;        [Column] public string CompanyName;        [Column] public string City;        [Column] public string State;        [Column] public string Country;      }     private void customersBindingNavigatorSaveItem_Click (object sender, EventArgs e)      {     / / This valoda instructions and...

posted @ domenica 3 luglio 2011 16:43 | Feedback (0) | Filed Under [ Articles C# in English ]

Create a library of sample classes

This simple code example will demonstrate how to create a class library with VisualStudio and then be able to import into another project. To use the example requires that the target computer is installed. NETFramework 4.0 First you create the VisualStudio using library classes, choosing from templates 'Class Library'. The example first creates a class library called ClassLibrary which contains within it a class called ClassLibrary.Ci within this class are four easy ways to make that type double the sum, subtraction, multiplication and division calcolo.Terminata returning the result of the creation of the code that you want to include in our library...

posted @ domenica 3 luglio 2011 16:38 | Feedback (0) | Filed Under [ Articles C# in English ]

Querying Data with LINQ to DataSet

This simple code example demonstrates how you can make the query a dataset by using LINQ.Linq and integral part of VisualStudio 2008 and as of version. NETFramework 3.5.Sebbene Linq is subdivided into different types, Linq to Objects, LINQ to adonet, Linq to Sql, Linq to Datset, Linq to Entities and LINQ to XML, this example focuses on using LINQ to DataSet. Will be shown how to perform search queries on the dataset, see the syntax used and we will also see how the query result is then displayed within the form. The example consists of a database called Rubrica.sdf with an...

posted @ domenica 3 luglio 2011 16:34 | Feedback (0) | Filed Under [ Articles C# in English ]

Example application data with SqlCompact

This example illustrates how to insert, update, and delete the data with sqlcompact, excellent database for use on a PC client locale.Anche if its context and a very simple example, I hope will be helpful to all that chlorine look out for the first time in the way of programming. In order to run the sample is necessary to have on your pc. NetFramework4 and sql compact 3.5 or higher. The sample consists of a DataBase sqlcompact Login.sdf called with an internal table called userdata. The table contains within it more than two fields of primary key field called String username and...

posted @ domenica 3 luglio 2011 16:30 | Feedback (0) | Filed Under [ Articles C# in English ]

Powered by:
Powered By Subtext Powered By ASP.NET