Example #1
0
 public KeybindForm(KeyBind bind, List<String> itemnames)
 {
     InitializeComponent();
     Bind = bind;
     ItemsEnabled = false;
     cmbItem.DataSource = itemnames;
     ShowInTaskbar = false;
 }
Example #2
0
 public static void Init(ListBox thebox, IniParser parser)
 {
     box = thebox;
     Items = new List<String>();
     ItemKeys = new Dictionary<String,String>();
     Assoc = new Dictionary<String, String>();
     Binds = new List<KeyBind>();
     for (int i = 0; i < ItemAssoc.Length; i += 2) AddKey(ItemAssoc[i], ItemAssoc[i+1]);
     Items.Sort();
     List<KeyValuePair<String,String>> keys=parser.EnumSection("Bindings");
     foreach (KeyValuePair<String, String> pair in keys)
     {
         KeyBind bind=new KeyBind();
         bind.Load(pair.Key, pair.Value);
         Binds.Add(bind);
     }
     foreach (KeyBind bind in Binds)
         box.Items.Add(bind.GetName());
 }
Example #3
0
 public static void AddPressed()
 {
     tempBind=new KeyBind();
     KeybindForm edit = new KeybindForm(tempBind, Items);
     index = -1;
     edit.ShowDialog();
 }