예제 #1
0
 public static KeyTimerPanel CreatePanel(KeyTimer Item)
 {
     KeyTimerPanel panel = new KeyTimerPanel();
     panel.Parent = Item.ParentPanel.Controls.Find("pnlAutoKeys", false)[0];
     panel.keyTimer = Item;
     return panel;
 }
예제 #2
0
        public static KeyTimerPanel CreatePanel(KeyTimer Item)
        {
            KeyTimerPanel panel = new KeyTimerPanel();

            panel.Parent   = Item.ParentPanel.Controls.Find("pnlAutoKeys", false)[0];
            panel.keyTimer = Item;
            return(panel);
        }
예제 #3
0
        public KeyTimer(Control parent, int index)
        {
            parentPanel = parent;
            panel       = KeyTimerPanel.CreatePanel(this);
            panel.Top   = index * (panel.Height + 2);
            panel.Width = parent.Width - 20;
            this.index  = index;
            // находим элементы
            tbKey       = panel.Controls.Find("tbKey", true).First() as TextBox;
            nudInterval = panel.Controls.Find("nudInterval", true).First() as NumericUpDown;
            cbActive    = panel.Controls.Find("cbActive", true).First() as CheckBox;

            Key      = (int)L2Key.KeyNameToCode(tbKey.Text);
            Interval = int.Parse(nudInterval.Value.ToString());
        }
예제 #4
0
        public KeyTimer(Control parent, int index)
        {
            parentPanel = parent;
            panel = KeyTimerPanel.CreatePanel(this);
            panel.Top = index * (panel.Height + 2);
            panel.Width = parent.Width - 20;
            this.index = index;
            // находим элементы
            tbKey = panel.Controls.Find("tbKey", true).First() as TextBox;
            nudInterval = panel.Controls.Find("nudInterval", true).First() as NumericUpDown;
            cbActive = panel.Controls.Find("cbActive", true).First() as CheckBox;

            Key = (int)L2Key.KeyNameToCode(tbKey.Text);
            Interval = int.Parse(nudInterval.Value.ToString());
        }