diff --git a/Form1.Designer.cs b/Form1.Designer.cs new file mode 100644 index 0000000..a4c4aca --- /dev/null +++ b/Form1.Designer.cs @@ -0,0 +1,84 @@ +using Syncfusion.WinForms.DataGrid; +using Syncfusion.WinForms.DataGrid.Enums; +using System.Windows.Forms; + +namespace GettingStarted +{ + /// + /// Summary description for Form1. + /// + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.sfDataGrid = new Syncfusion.WinForms.DataGrid.SfDataGrid(); + ((System.ComponentModel.ISupportInitialize)(this.sfDataGrid)).BeginInit(); + this.SuspendLayout(); + // + // sfDataGrid + // + this.sfDataGrid.AccessibleName = "Table"; + this.sfDataGrid.AllowDraggingColumns = true; + this.sfDataGrid.AllowFiltering = true; + this.sfDataGrid.AllowResizingColumns = true; + this.sfDataGrid.AllowResizingHiddenColumns = true; + this.sfDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.sfDataGrid.AutoSizeColumnsMode = Syncfusion.WinForms.DataGrid.Enums.AutoSizeColumnsMode.Fill; + this.sfDataGrid.BackColor = System.Drawing.SystemColors.Window; + this.sfDataGrid.Location = new System.Drawing.Point(10, 5); + this.sfDataGrid.Name = "sfDataGrid"; + this.sfDataGrid.ShowGroupDropArea = true; + this.sfDataGrid.Size = new System.Drawing.Size(990, 590); + this.sfDataGrid.TabIndex = 1; + // + // Form1 + // + this.BackColor = System.Drawing.SystemColors.Window; + this.ClientSize = new System.Drawing.Size(1006, 593); + this.Controls.Add(this.sfDataGrid); + this.Margin = new System.Windows.Forms.Padding(5); + this.MinimumSize = new System.Drawing.Size(500, 400); + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Getting Started"; + ((System.ComponentModel.ISupportInitialize)(this.sfDataGrid)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + #region API Definition + + private SfDataGrid sfDataGrid; + + #endregion + } +} + diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..6e48af2 --- /dev/null +++ b/Form1.cs @@ -0,0 +1,39 @@ +using Syncfusion.WinForms.Controls; +using Syncfusion.WinForms.DataGrid.Styles; +using System.Windows.Forms; +using Syncfusion.WinForms.DataGrid.Enums; + +namespace GettingStarted +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + var data = new OrderInfoCollection(); + sfDataGrid.DataSource = data.OrdersListDetails; + + this.sfDataGrid.AllowSorting = false; + this.sfDataGrid.SelectionUnit = SelectionUnit.Cell; + this.sfDataGrid.SelectionMode = GridSelectionMode.Extended; + this.sfDataGrid.CellClick += sfDataGrid_CellClick; + } + + void sfDataGrid_CellClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) + { + if (e.DataRow.RowType == RowType.HeaderRow && this.sfDataGrid.View.TopLevelGroup == null) + { + var firstRowDate = this.sfDataGrid.View.Records[0]; + var lastRowData = this.sfDataGrid.View.Records[this.sfDataGrid.View.Records.Count - 1]; + var column = e.DataColumn.GridColumn; + + if (firstRowDate != null && lastRowData != null) + { + this.sfDataGrid.ClearSelection(); + this.sfDataGrid.SelectCells(firstRowDate, column, lastRowData, column); + } + } + } + + } +} diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GettingStarted_2010.csproj b/GettingStarted_2010.csproj new file mode 100644 index 0000000..f8fb2dd --- /dev/null +++ b/GettingStarted_2010.csproj @@ -0,0 +1,102 @@ + + + + + Debug + AnyCPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434} + WinExe + Properties + GettingStarted + GettingStarted + v4.0 + 512 + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + \ No newline at end of file diff --git a/GettingStarted_2010.csproj.user b/GettingStarted_2010.csproj.user new file mode 100644 index 0000000..7d85f55 --- /dev/null +++ b/GettingStarted_2010.csproj.user @@ -0,0 +1,6 @@ + + + + D:\Assemblies\16.3.0.21\4.0\ + + \ No newline at end of file diff --git a/GettingStarted_2010.sln b/GettingStarted_2010.sln new file mode 100644 index 0000000..bac2cd2 --- /dev/null +++ b/GettingStarted_2010.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted_2010", "GettingStarted_2010.csproj", "{3839D384-FF5F-4FB9-B1D1-7918E512B434}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/GettingStarted_2012.csproj b/GettingStarted_2012.csproj new file mode 100644 index 0000000..51326e3 --- /dev/null +++ b/GettingStarted_2012.csproj @@ -0,0 +1,107 @@ + + + + + Debug + AnyCPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434} + WinExe + Properties + GettingStarted + GettingStarted + v4.6 + 512 + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {996468fc-d72e-4144-b113-3f3f0e16af90} + Syncfusion.DataGrid.WinForms_2015 + + + + + + + + + \ No newline at end of file diff --git a/GettingStarted_2012.sln b/GettingStarted_2012.sln new file mode 100644 index 0000000..d47cad6 --- /dev/null +++ b/GettingStarted_2012.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted_2012", "GettingStarted_2012.csproj", "{3839D384-FF5F-4FB9-B1D1-7918E512B434}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/GettingStarted_2013.csproj b/GettingStarted_2013.csproj new file mode 100644 index 0000000..b6deaed --- /dev/null +++ b/GettingStarted_2013.csproj @@ -0,0 +1,101 @@ + + + + + Debug + AnyCPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434} + WinExe + Properties + GettingStarted + GettingStarted + v4.5.1 + 512 + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + \ No newline at end of file diff --git a/GettingStarted_2013.sln b/GettingStarted_2013.sln new file mode 100644 index 0000000..00e1520 --- /dev/null +++ b/GettingStarted_2013.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted_2013", "GettingStarted_2013.csproj", "{3839D384-FF5F-4FB9-B1D1-7918E512B434}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/GettingStarted_2015.csproj b/GettingStarted_2015.csproj new file mode 100644 index 0000000..3f6d0ea --- /dev/null +++ b/GettingStarted_2015.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434} + WinExe + Properties + GettingStarted + GettingStarted + v4.6 + 512 + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + \ No newline at end of file diff --git a/GettingStarted_2015.sln b/GettingStarted_2015.sln new file mode 100644 index 0000000..c521d9e --- /dev/null +++ b/GettingStarted_2015.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted_2015", "GettingStarted_2015.csproj", "{3839D384-FF5F-4FB9-B1D1-7918E512B434}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/GettingStarted_2017.csproj b/GettingStarted_2017.csproj new file mode 100644 index 0000000..1d03124 --- /dev/null +++ b/GettingStarted_2017.csproj @@ -0,0 +1,100 @@ + + + + + Debug + AnyCPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434} + WinExe + Properties + GettingStarted + GettingStarted + v4.6 + 512 + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + \ No newline at end of file diff --git a/GettingStarted_2017.sln b/GettingStarted_2017.sln new file mode 100644 index 0000000..fefad52 --- /dev/null +++ b/GettingStarted_2017.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted_2017", "GettingStarted_2017.csproj", "{3839D384-FF5F-4FB9-B1D1-7918E512B434}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3839D384-FF5F-4FB9-B1D1-7918E512B434}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/OrderInfo.cs b/OrderInfo.cs new file mode 100644 index 0000000..caa424d --- /dev/null +++ b/OrderInfo.cs @@ -0,0 +1,182 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace GettingStarted +{ + public partial class OrderInfo : INotifyPropertyChanged + { + private int _OrderID; + + private DateTime _orderDate; + + private string _CustomerID; + + private double _unitPrice; + + private int _Quantity; + + private int _contactNumber; + + private string _product; + + private string _shipaddress; + + /// + /// Initializes a new instance of the class. + /// + public OrderInfo() + { + + } + + /// + /// Gets or sets the order ID. + /// + /// The order ID. + [Display(Name = "Order ID")] + public int OrderID + { + get + { + return this._OrderID; + } + set + { + this._OrderID = value; + this.OnPropertyChanged("OrderID"); + } + } + + /// + /// Gets or sets the customer ID. + /// + /// The customer ID. + [Display(Name = "Customer ID")] + public string CustomerID + { + get + { + return this._CustomerID; + } + set + { + this._CustomerID = value; + this.OnPropertyChanged("CustomerID"); + } + } + + /// + /// Gets or sets the Product. + /// + /// The Product. + [Display(Name = "Product Name")] + public string ProductName + { + get + { + return this._product; + } + set + { + this._product = value; + this.OnPropertyChanged("ProductName"); + } + } + + /// + /// Gets or Sets the OrderDate + /// + [Display(Name = "Order Date")] + public DateTime OrderDate + { + get + { + return _orderDate; + } + set + { + _orderDate = value; + } + } + + /// + /// Gets or sets quantity + /// + /// the quantity + public int Quantity + { + get + { + return this._Quantity; + } + set + { + _Quantity = value; + OnPropertyChanged("Quantity"); + } + } + + /// + /// Gets or sets the unit price. + /// + /// The unit price. + [DataType(DataType.Currency)] + [Display(Name = "Unit Price")] + public double UnitPrice + { + get + { + return _unitPrice; + } + set + { + _unitPrice = value; + OnPropertyChanged("UnitPrice"); + } + } + + /// + /// Gets or sets quantity + /// + /// the quantity + [Display(Name = "Contact Number")] + public int ContactNumber + { + get + { + return this._contactNumber; + } + set + { + _contactNumber = value; + OnPropertyChanged("ContactNumber"); + } + } + + /// + /// Gets or sets the ShipAddress. + /// + /// The ShipAddress. + [Display(Name = "Ship Address")] + public string ShipCountry + { + get + { + return this._shipaddress; + } + set + { + this._shipaddress = value; + this.OnPropertyChanged("ShipCountry"); + } + } + + public event PropertyChangedEventHandler PropertyChanged; + private void OnPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } +} diff --git a/OrderInfoCollection.cs b/OrderInfoCollection.cs new file mode 100644 index 0000000..45a5a9e --- /dev/null +++ b/OrderInfoCollection.cs @@ -0,0 +1,276 @@ +using System; +using System.Collections.Generic; + +namespace GettingStarted +{ + public class OrderInfoCollection : IDisposable + { + public OrderInfoCollection() + { + OrdersListDetails = new OrderInfoRepository().GetListOrdersDetails(2000); + } + + private List _ordersListDetails; + + /// + /// Gets or sets the orders details. + /// + /// The orders details. + public List OrdersListDetails + { + get { return _ordersListDetails; } + set { _ordersListDetails = value; } + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool isdisposable) + { + if (this.OrdersListDetails != null) + { + this.OrdersListDetails.Clear(); + } + } + } + + public class OrderInfoRepository + { + int customerIdCount = 0; + + /// + /// Initializes a new instance of the class. + /// + public OrderInfoRepository() + { + } + + /// + /// Gets the orders details. + /// + /// The count. + /// + public List GetListOrdersDetails(int count) + { + List ordersDetails = new List(); + if (ShipCity.Count == 0) + SetShipCity(); + for (int i = 10000; i < count + 10000; i++) + { + ordersDetails.Add(GetOrder(i)); + } + + return ordersDetails; + } + + Random r = new Random(1); + + /// + /// Gets the order. + /// + /// The i. + /// + private OrderInfo GetOrder(int i) + { + var shipcountry = ShipCountry[r.Next(5)]; + var shipcitycoll = ShipCity[shipcountry]; + var order = new OrderInfo(); + order.OrderID = i; + order.OrderDate = new DateTime(r.Next(2011, 2013), r.Next(1, 12), r.Next(1, 28)); + order.ProductName = productName[r.Next(5)]; + order.CustomerID = GetCustomerID(i); + order.UnitPrice = unitPrice[r.Next(35)]; + order.Quantity = r.Next(20, 60); + order.ShipCountry = shipcountry; + order.ContactNumber = 999111235 + i; + return order; + } + + string GetCustomerID(int i) + { + if (i % 4 != 0 || i == 0) + { + return CustomerID[customerIdCount]; + } + else + { + if (i % 4 == 0) + customerIdCount++; + + if (customerIdCount > 9) + customerIdCount = 0; + + return CustomerID[customerIdCount]; + } + } + + double[] unitPrice = new double[] { 28.5, 336.2, 88.3, 86, 512, 41, 253.3, 33, 87, 45.1, 78.3, 19, 56.7, 23.3, 59, 91, 32.8, 264.5, 63.7, 434.2, 15.9, 21.9, 45, 70.3, 42.5, 67.2, 34.9, 379.9, 0, 59.2, 412.6, 19.8, 42.7, 78, 26.8 }; + + string[] ShipCountry = new string[] + { + + "Argentina", + "Austria", + "Belgium", + "Brazil", + "Canada", + "Denmark", + "Finland", + "France", + "Germany", + "Ireland", + "Italy", + "Mexico", + "Norway", + "Poland", + "Portugal", + "Spain", + "Sweden", + "Switzerland", + "UK", + "USA", + "Venezuela" + }; + + /// + /// Collection of ProductNames + /// + string[] productName = new string[] + { + "Alice Mutton", + "NuNuCa Nuß-Nougat-Creme", + "Boston Crab Meat", + "Raclette Courdavault", + "Wimmers gute", + "Gorgonzola Telino", + "Chartreuse verte", + "Fløtemysost", + "Carnarvon Tigers", + "Thüringer", + "Vegie-spread", + "Tarte au sucre", + "Konbu", + "Valkoinen suklaa", + "Queso Manchego", + "Perth Pasties", + "Vegie-spread", + "Tofu", + "Sir Rodney's", + "Manjimup Dried Apples" + }; + + Dictionary ShipCity = new Dictionary(); + + /// + /// Sets the ship city. + /// + private void SetShipCity() + { + string[] argentina = new string[] { "Buenos Aires" }; + + string[] austria = new string[] { "Graz", "Salzburg" }; + + string[] belgium = new string[] { "Bruxelles", "Charleroi" }; + + string[] brazil = new string[] { "Campinas", "Resende", "Rio de Janeiro", "São Paulo" }; + + string[] canada = new string[] { "Montréal", "Tsawassen", "Vancouver" }; + + string[] denmark = new string[] { "Århus", "København" }; + + string[] finland = new string[] { "Helsinki", "Oulu" }; + + string[] france = new string[] { "Lille", "Lyon", "Marseille", "Nantes", "Paris", "Reims", "Strasbourg", "Toulouse", "Versailles" }; + + string[] germany = new string[] { "Aachen", "Berlin", "Brandenburg", "Cunewalde", "Frankfurt a.M.", "Köln", "Leipzig", "Mannheim", "München", "Münster", "Stuttgart" }; + + string[] ireland = new string[] { "Cork" }; + + string[] italy = new string[] { "Bergamo", "Reggio Emilia", "Torino" }; + + string[] mexico = new string[] { "México D.F." }; + + string[] norway = new string[] { "Stavern" }; + + string[] poland = new string[] { "Warszawa" }; + + string[] portugal = new string[] { "Lisboa" }; + + string[] spain = new string[] { "Barcelona", "Madrid", "Sevilla" }; + + string[] sweden = new string[] { "Bräcke", "Luleå" }; + + string[] switzerland = new string[] { "Bern", "Genève" }; + + string[] uk = new string[] { "Colchester", "Hedge End", "London" }; + + string[] usa = new string[] { "Albuquerque", "Anchorage", "Boise", "Butte", "Elgin", "Eugene", "Kirkland", "Lander", "Portland", "San Francisco", "Seattle", "Walla Walla" }; + + string[] venezuela = new string[] { "Barquisimeto", "Caracas", "I. de Margarita", "San Cristóbal" }; + + ShipCity.Add("Argentina", argentina); + ShipCity.Add("Austria", austria); + ShipCity.Add("Belgium", belgium); + ShipCity.Add("Brazil", brazil); + ShipCity.Add("Canada", canada); + ShipCity.Add("Denmark", denmark); + ShipCity.Add("Finland", finland); + ShipCity.Add("France", france); + ShipCity.Add("Germany", germany); + ShipCity.Add("Ireland", ireland); + ShipCity.Add("Italy", italy); + ShipCity.Add("Mexico", mexico); + ShipCity.Add("Norway", norway); + ShipCity.Add("Poland", poland); + ShipCity.Add("Portugal", portugal); + ShipCity.Add("Spain", spain); + ShipCity.Add("Sweden", sweden); + ShipCity.Add("Switzerland", switzerland); + ShipCity.Add("UK", uk); + ShipCity.Add("USA", usa); + ShipCity.Add("Venezuela", venezuela); + } + + string[] CustomerID = new string[] + { + "ALFKI", + "FRANS", + "MEREP", + "FOLKO", + "SIMOB", + "WARTH", + "VAFFE", + "FURIB", + "SEVES", + "LINOD", + "RISCU", + "PICCO", + "BLONP", + "WELLI", + "FOLIG", + "SHIWL", + "ASDFI", + "YIWOL", + "SIEPZ", + "UIKOC", + "BNUTQ", + "FDKIO", + "UJIKW", + "QOLPX", + "WJXKO", + "SXEWD", + "ZXSOL", + "KKMJU", + "QMICP", + "SJWII", + "WDOPO", + "SAIOP", + "SSOLE", + "CUEMC", + "HWIMQ" + }; + } +} diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..2e545cf --- /dev/null +++ b/Program.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace GettingStarted +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(DemoCommon.FindLicenseKey()); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } + + /// + /// Represents a class that is used to find the licensing file for Syncfusion controls. + /// + public class DemoCommon + { + /// + /// Finds the license key from the Common folder. + /// + /// Returns the license key. + public static string FindLicenseKey() + { + string licenseKeyFile = "..\\Common\\SyncfusionLicense.txt"; + for (int n = 0; n < 20; n++) + { + if (!System.IO.File.Exists(licenseKeyFile)) + { + licenseKeyFile = @"..\" + licenseKeyFile; + continue; + } + return System.IO.File.ReadAllText(licenseKeyFile); + } + return string.Empty; + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c87fbe7 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("GettingStarted")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("GettingStarted")] +[assembly: AssemblyCopyright("Copyright Syncfusion Inc. 2001 - 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2727adc4-282e-41ee-90df-f200f8a51580")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..7f72c35 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GettingStarted.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GettingStarted.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..0ca8b26 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GettingStarted.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app.config b/app.config new file mode 100644 index 0000000..c010e3b --- /dev/null +++ b/app.config @@ -0,0 +1,10 @@ + + + + + + + +