示例#1
0
 private void Button_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         if (Secretary.GetActiveProfile().profile_name == "Default")
         {
             removeToolStripMenuItem.Visible = false;
         }
         else
         {
             removeToolStripMenuItem.Visible = true;
         }
         ButtonRightClickMenu.Show(Button, e.Location);
     }
     else if (Control.ModifierKeys == Keys.Shift)
     {
     }
     else if (Control.ModifierKeys == Keys.Control)
     {
     }
     else
     {
         owner.DisplayRuleRoll(Button.Text);
     }
 }
示例#2
0
 private void RefreshRuleButtons()
 {
     RuleLayout.Controls.Clear();
     foreach (string rule_name in Secretary.GetActiveProfile().rule_names)
     {
         RuleLayout.Controls.Add(new RuleButton(this, rule_name, Secretary.GetRule(rule_name).colour));
     }
 }
示例#3
0
 private void DeleteProfile(string profile_name)
 {
     if (Secretary.GetActiveProfile().profile_name == profile_name)
     {
         ActivateProfile("Default");
     }
     Secretary.DeleteProfile(profile_name);
     ProfilesMenuItem.DropDownItems.Remove(ProfilesMenuItem.DropDownItems.Find(profile_name, false)[0]);
 }
示例#4
0
 private void SetupProfiles()
 {
     ProfilesMenuItem.DropDown.Closing += ProfilesDropDown_Closing;
     foreach (StructCollection.Profile profile in Secretary.GetProfiles())
     {
         if (profile.profile_name != "Default")
         {
             AddProfileToDropdown(profile.profile_name);
         }
     }
     ActivateProfile(Secretary.GetActiveProfile().profile_name);
 }
示例#5
0
 private void ruleToProfileToolStripMenuItem_Click(object sender, EventArgs e)
 {
     new ImportRules(Secretary.GetActiveProfile()).ShowDialog();
     RefreshRuleButtons();
 }