Beispiel #1
0
 public HotKey_Settings()
 {
     HotKeys = new SerializableDictionary <int, HotKeyInfo>();
     HotKeys.AddRange(new KeyValuePair <int, HotKeyInfo>[] {
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.Show, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.S)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.Hide, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.H)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.ShowConfig, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.O)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.OpenSelectItem, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.Enter)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.DeleteSelectItem, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.D)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.SelectNextItem, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.Right)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.SelectPrevItem, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.Left)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.SelectNextGroup, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.Down)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.SelectPrevGroup, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.Up)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.SelectGroupTile, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.M)),
         new KeyValuePair <int, HotKeyInfo>(GH_SHID.SelectGroupTile2, new HotKeyInfo(Keys.Alt | Keys.Shift, Keys.V))
     });
 }
Beispiel #2
0
        public void AddRangeTest()
        {
            SerializableDictionary <string, string> dict1 = new SerializableDictionary <string, string>();

            dict1.Add("Dict1Key1", "Dict1Value1");
            dict1.Add("Dict1Key2", "Dict1Value2");

            SerializableDictionary <string, string> dict2 = new SerializableDictionary <string, string>();

            dict2.Add("Dict2Key1", "Dict2Value1");
            dict2.Add("Dict1Key1", "Dict2Value1");

            dict1.AddRange(dict2);

            //Verify that the dictionary only has 3 entries since the second dictionary should
            //overwrite the value that was inserted originally into dict1
            Assert.AreEqual(dict1.Keys.Count, 3);
            //Verify that the value was overwritten
            Assert.AreEqual(dict1["Dict1Key1"], "Dict2Value1");
        }