public MainForm(RightToLeft RightToLeft = RightToLeft.Yes) : base(RightToLeft) { var culture = new CultureInfo("fa-IR"); CultureInfo.DefaultThreadCurrentCulture = culture; CultureInfo.DefaultThreadCurrentUICulture = culture; base.RightToLeft = RightToLeft.Yes; InitializeComponent(); // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.RightToLeft = RightToLeft; // Set this to false to disable backcolor enforcing on non-materialSkin components // This HAS to be set before the AddFormToManage() materialSkinManager.EnforceBackcolorOnAllComponents = true; // MaterialSkinManager properties materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo700, Primary.Indigo100, Accent.Pink200, TextShade.WHITE); // Add dummy data to the listview seedListView(); materialCheckedListBox1.Items.Add("آیتم ۱", false); materialCheckedListBox1.Items.Add("آیتم ۲", true); materialCheckedListBox1.Items.Add("آیتم ۳", true); materialCheckedListBox1.Items.Add("آیتم ۴", false); materialCheckedListBox1.Items.Add("آیتم ۵", true); materialCheckedListBox1.Items.Add("آیتم ۶", false); materialCheckedListBox1.Items.Add("آیتم ۷", false); materialListBoxFormStyle.Clear(); foreach (var FormStyleItem in Enum.GetNames(typeof(MaterialForm.FormStyles))) { materialListBoxFormStyle.AddItem(FormStyleItem); if (FormStyleItem == this.FormStyle.ToString()) { materialListBoxFormStyle.SelectedIndex = materialListBoxFormStyle.Items.Count - 1; } } materialListBoxFormStyle.SelectedIndexChanged += (sender, args) => { MaterialForm.FormStyles SelectedStyle = (MaterialForm.FormStyles)Enum.Parse(typeof(MaterialForm.FormStyles), args.Text); if (this.FormStyle != SelectedStyle) { this.FormStyle = SelectedStyle; } }; materialMaskedTextBox1.ValidatingType = typeof(System.Int16); }
public MainForm() { InitializeComponent(); // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; // Set this to false to disable backcolor enforcing on non-materialSkin components // This HAS to be set before the AddFormToManage() materialSkinManager.EnforceBackcolorOnAllComponents = true; // MaterialSkinManager properties materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo700, Primary.Indigo100, Accent.Pink200, TextShade.WHITE); // Add dummy data to the listview seedListView(); materialCheckedListBox1.Items.Add("Item1", false); materialCheckedListBox1.Items.Add("Item2", true); materialCheckedListBox1.Items.Add("Item3", true); materialCheckedListBox1.Items.Add("Item4", false); materialCheckedListBox1.Items.Add("Item5", true); materialCheckedListBox1.Items.Add("Item6", false); materialCheckedListBox1.Items.Add("Item7", false); materialComboBox6.SelectedIndex = 0; materialListBoxFormStyle.Clear(); foreach (var FormStyleItem in Enum.GetNames(typeof(MaterialForm.FormStyles))) { materialListBoxFormStyle.AddItem(FormStyleItem); if (FormStyleItem == this.FormStyle.ToString()) { materialListBoxFormStyle.SelectedIndex = materialListBoxFormStyle.Items.Count - 1; } } materialListBoxFormStyle.SelectedIndexChanged += (sender, args) => { MaterialForm.FormStyles SelectedStyle = (MaterialForm.FormStyles)Enum.Parse(typeof(MaterialForm.FormStyles), args.Text); if (this.FormStyle != SelectedStyle) { this.FormStyle = SelectedStyle; } }; materialMaskedTextBox1.ValidatingType = typeof(System.Int16); }