public frmGroup(frmClient client) { InitializeComponent(); Category = new Category { ShortcutList = new List <ProgramShortcut>() }; Client = client; IsNew = true; ucShortcutList = new List <ucProgramShortcut>(); LoadShortcuts(); }
public frmGroup(frmClient client, Category category) { InitializeComponent(); Category = category; Client = client; IsNew = false; ucShortcutList = new List <ucProgramShortcut>(); txtGroupName.Text = Category.Name; cmdAddGroupIcon.BackgroundImage = Category.LoadIconImage(); lblNum.Text = Category.Width.ToString(); LoadShortcuts(); }
// CTOR for editing an existing group public frmGroup(frmClient client, Category category) { // Setting form profile System.Runtime.ProfileOptimization.StartProfile("frmGroup.Profile"); InitializeComponent(); // Setting properties Category = category; Client = client; IsNew = false; // Setting control values from loaded group this.Text = "Edit group"; txtGroupName.Text = Regex.Replace(Category.Name, @"(_)+", " "); pnlAllowOpenAll.Checked = category.allowOpenAll; cmdAddGroupIcon.BackgroundImage = Category.LoadIconImage(); lblNum.Text = Category.Width.ToString(); lblOpacity.Text = Category.Opacity.ToString(); if (Category.ColorString == null) // Handles if groups is created from earlier releas w/o ColorString property { Category.ColorString = System.Drawing.ColorTranslator.ToHtml(Color.FromArgb(31, 31, 31)); } Color categoryColor = ImageFunctions.FromString(Category.ColorString); if (categoryColor == Color.FromArgb(31, 31, 31)) { radioDark.Checked = true; } else if (categoryColor == Color.FromArgb(230, 230, 230)) { radioLight.Checked = true; } else { radioCustom.Checked = true; pnlCustomColor.Visible = true; pnlCustomColor.BackColor = categoryColor; } // Loading existing shortcutpanels int position = 0; foreach (ProgramShortcut psc in category.ShortcutList) { LoadShortcut(psc, position); position++; } }
public frmGroup(frmClient client, Category category) { System.Runtime.ProfileOptimization.StartProfile("frmGroup.Profile"); InitializeComponent(); Category = category; Client = client; IsNew = false; ucShortcutList = new List <ucProgramShortcut>(); this.MaximumSize = new Size(605, Screen.PrimaryScreen.WorkingArea.Height); txtGroupName.Text = Regex.Replace(Category.Name, @"(_)+", " "); cmdAddGroupIcon.BackgroundImage = Category.LoadIconImage(); lblNum.Text = Category.Width.ToString(); LoadShortcuts(); }
public frmGroup(frmClient client) { System.Runtime.ProfileOptimization.StartProfile("frmGroup.Profile"); InitializeComponent(); newExt = imageExt.Concat(specialImageExt).ToArray(); Category = new Category { ShortcutList = new List <ProgramShortcut>() }; Client = client; cmdDelete.Visible = false; cmdSave.Left += 70; cmdExit.Left += 70; IsNew = true; ucShortcutList = new List <ucProgramShortcut>(); this.MaximumSize = new Size(605, Screen.PrimaryScreen.WorkingArea.Height); LoadShortcuts(); }
//-------------------------------------- // CTOR AND LOAD //-------------------------------------- // CTOR for creating a new group public frmGroup(frmClient client) { // Setting from profile System.Runtime.ProfileOptimization.StartProfile("frmGroup.Profile"); InitializeComponent(); // Setting default category properties newExt = imageExt.Concat(specialImageExt).ToArray(); Category = new Category { ShortcutList = new List <ProgramShortcut>() }; Client = client; IsNew = true; // Setting default control values cmdDelete.Visible = false; cmdSave.Left += 70; cmdExit.Left += 70; radioDark.Checked = true; }