Exemplo n.º 1
0
        public HotKeyManager()
        {
            FullScreenShot FSS = new FullScreenShot();
            Hotkeys.Add(FSS);

            DragScreenShot DSS = new DragScreenShot();
            Hotkeys.Add(DSS);

            HotKeyScreenShot HKSS0 = new HotKeyScreenShot(0);
            Hotkeys.Add(HKSS0);

            HotKeyScreenShot HKSS1 = new HotKeyScreenShot(1, Keys.Alt | Keys.D2, Keys.D2 | Keys.Alt | Keys.Control);
            Hotkeys.Add(HKSS1);

            HotKeyScreenShot HKSS2 = new HotKeyScreenShot(2, Keys.Alt | Keys.D3, Keys.D3 | Keys.Alt | Keys.Control);
            Hotkeys.Add(HKSS2);

            HotKeyScreenShot HKSS3 = new HotKeyScreenShot(3, Keys.Alt | Keys.D4, Keys.D4 | Keys.Alt | Keys.Control);
            Hotkeys.Add(HKSS3);

            WindowScreenShot WSS = new WindowScreenShot();
            Hotkeys.Add(WSS);

            foreach (SShot s in Hotkeys)
            {
                if (s is HotKeyScreenShot)
                    SaveHotKeySet(s as HotKeyScreenShot);
                else if (s is WindowScreenShot)
                    SaveHandleKeySet((WindowScreenShot)s);
                else
                    SaveKeySet(s);
            }
        }
Exemplo n.º 2
0
 public static Keys[] GetHandleKeySet(WindowScreenShot s)
 {
     string[] str = MainForm.Setting.iniSave.GetSetting("HotKey", "handle").Split('|');
     Keys k = (Keys)Enum.Parse(typeof(Keys), str[0]);
     Keys setK = (Keys)Enum.Parse(typeof(Keys), str[1]);
     return new Keys[] { k, setK };
 }
Exemplo n.º 3
0
 public static void SaveHandleKeySet(WindowScreenShot s)
 {
     MainForm.Setting.iniSave.WriteSetting("HotKey", "handle", s.Key.ToString() + "|" + s.SetKey.ToString());
 }