public static KeyTimerPanel CreatePanel(KeyTimer Item) { KeyTimerPanel panel = new KeyTimerPanel(); panel.Parent = Item.ParentPanel.Controls.Find("pnlAutoKeys", false)[0]; panel.keyTimer = Item; return panel; }
public static KeyTimerPanel CreatePanel(KeyTimer Item) { KeyTimerPanel panel = new KeyTimerPanel(); panel.Parent = Item.ParentPanel.Controls.Find("pnlAutoKeys", false)[0]; panel.keyTimer = Item; return(panel); }
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()); }