示例#1
0
        void AddFixupItem(string text, string setting, ToolStripMenuItem parent)
        {
            var item = new ToolStripMenuItem(text);

            item.Tag    = setting;
            item.Click += delegate {
                GuiConfiguration.SetPracticeFixupSetting(setting, !GuiConfiguration.GetPracticeFixupSetting(setting));
            };
            parent.DropDownItems.Add(item);
        }
示例#2
0
 void OptionsItemDropDownOpening(object sender, EventArgs e)
 {
     swapItem.Checked = mode.Swap;
     foreach (ToolStripItem item in optionsItem.DropDownItems)
     {
         var menuItem = item as ToolStripMenuItem;
         if (menuItem != null && menuItem.Tag is string)
         {
             menuItem.Checked = GuiConfiguration.GetPracticeFixupSetting((string)menuItem.Tag);
         }
     }
 }