Esempio n. 1
0
        public void Dupes()
        {
            string         Storage = _TestSingleTon.TESTDATABASE;
            List <KeyData> Hotkeys = new List <KeyData>();

            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguida"));
            HotKeyConfig hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);

            hotKeyConfig.GetConfigPanel();
            Assert.AreEqual(0, hotKeyConfig.Duplicates, "1");

            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguidb"));
            hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
            hotKeyConfig.GetConfigPanel();
            Assert.AreEqual(1, hotKeyConfig.Duplicates, "2");


            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.X, Constants.BLANK, false, "dualscreenguidc"));
            hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
            hotKeyConfig.GetConfigPanel();
            Assert.AreEqual(1, hotKeyConfig.Duplicates, "2b");

            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.C, Constants.BLANK, false, "dualscreenguidd"));
            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.C, Constants.BLANK, false, "dualscreenguide"));

            hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
            hotKeyConfig.GetConfigPanel();
            Assert.AreEqual(2, hotKeyConfig.Duplicates, "3");
        }
Esempio n. 2
0
        public static void SaveHotkeyConfig(HotKeyConfig cfg)
        {
            var sw = new StreamWriter(new FileStream(AppDomain.CurrentDomain.BaseDirectory + "cfg", FileMode.Truncate));

            sw.WriteLine(cfg.enabled.ToString() + ";" + cfg.hotkeyIndex.ToString());
            sw.Close();
        }
Esempio n. 3
0
        public void BlankDatabase()
        {
            string         Storage = CoreUtilities.Constants.BLANK;
            List <KeyData> Hotkeys = new List <KeyData>();

            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguida"));
            HotKeyConfig hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
        }
Esempio n. 4
0
        public void AssureNoDamageDone()
        {
            // lame test but you never know. Makes sure that nothing is lost after creating the panel in the original hotkeys
            string Storage=_TestSingleTon.TESTDATABASE;
            List<KeyData> Hotkeys = new List<KeyData>();
            Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguida"));
            Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguidb"));
            Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguidc"));
            Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguidd"));

            int count = Hotkeys.Count;
            HotKeyConfig hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
            hotKeyConfig.GetConfigPanel();

            Assert.AreEqual(count, Hotkeys.Count);
        }
Esempio n. 5
0
        public void AssureNoDamageDone()
        {
            // lame test but you never know. Makes sure that nothing is lost after creating the panel in the original hotkeys
            string         Storage = _TestSingleTon.TESTDATABASE;
            List <KeyData> Hotkeys = new List <KeyData>();

            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguida"));
            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguidb"));
            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguidc"));
            Hotkeys.Add(new KeyData("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguidd"));

            int          count        = Hotkeys.Count;
            HotKeyConfig hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);

            hotKeyConfig.GetConfigPanel();

            Assert.AreEqual(count, Hotkeys.Count);
        }
Esempio n. 6
0
        public void Dupes()
        {
            string Storage=_TestSingleTon.TESTDATABASE;
            List<KeyData> Hotkeys = new List<KeyData>();
            Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguida"));
            HotKeyConfig hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
            hotKeyConfig.GetConfigPanel();
            Assert.AreEqual(0, hotKeyConfig.Duplicates,"1");

            Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguidb"));
            hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
            hotKeyConfig.GetConfigPanel();
            Assert.AreEqual(1, hotKeyConfig.Duplicates,"2");

            Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.X, Constants.BLANK, false, "dualscreenguidc"));
            hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
            hotKeyConfig.GetConfigPanel();
            Assert.AreEqual(1, hotKeyConfig.Duplicates,"2b");

            Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.C, Constants.BLANK, false, "dualscreenguidd"));
            Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.C, Constants.BLANK, false, "dualscreenguide"));

            hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
            hotKeyConfig.GetConfigPanel();
            Assert.AreEqual(2, hotKeyConfig.Duplicates,"3");
        }
Esempio n. 7
0
 public void BlankDatabase()
 {
     string Storage=CoreUtilities.Constants.BLANK;
     List<KeyData> Hotkeys = new List<KeyData>();
     Hotkeys.Add (new KeyData ("Dual Screen", null, Keys.Control, Keys.W, Constants.BLANK, false, "dualscreenguida"));
     HotKeyConfig hotKeyConfig = new HotKeyConfig(Storage, ref Hotkeys, Layout.MasterOfLayouts.GetDatabaseType);
 }