public HistoryForm(ClipboardIndicator clipboardIndicator, MainForm mainForm) { _clipboardIndicator = clipboardIndicator; _mainForm = mainForm; _historyBox = new ListBox(); _historyBox.Text = "Notify on clipboard save"; _historyBox.Location = new Point(0, 0); _historyBox.Size = new Size(285, 190); foreach (var line in _clipboardIndicator.History) { _historyBox.Items.Add(line); } _historyBox.MouseDoubleClick += HandleHistory; Controls.Add(_historyBox); InitializeComponent(); }
public SettingsForm(ClipboardIndicator clipboardIndicator) { _clipboardIndicator = clipboardIndicator; _historySizeBox = new NumericUpDown(); _historySizeBox.Minimum = 10; _historySizeBox.Maximum = 150; _historySizeBox.Value = _clipboardIndicator.HistorySize; _historySizeBox.Location = new Point(15, 5); _historySizeBox.Size = new Size(45, 25); _historySizeBox.ValueChanged += HandleHistorySize; _historySizeInfoBox = new Label(); _historySizeInfoBox.Text = "History size"; _historySizeInfoBox.Location = new Point(62, 8); _historySizeInfoBox.AutoSize = true; _notifyBox = new CheckBox(); _notifyBox.Text = "Notify on clipboard save"; _notifyBox.Location = new Point(15, 29); _notifyBox.Size = new Size(145, 25); _notifyBox.Checked = _clipboardIndicator.Notify; _notifyBox.MouseClick += HandleNotify; _notifyDurationBox = new NumericUpDown(); _notifyDurationBox.Minimum = 100; _notifyDurationBox.Maximum = 10000; _notifyDurationBox.Value = _clipboardIndicator.NotifyDuration; _notifyDurationBox.Location = new Point(30, 55); _notifyDurationBox.Size = new Size(60, 25); _notifyDurationBox.Enabled = _clipboardIndicator.Notify; _notifyDurationBox.ValueChanged += HandleNotifyDuration; _notifyDurationInfoBox = new Label(); _notifyDurationInfoBox.Text = "Notify duration"; _notifyDurationInfoBox.Location = new Point(90, 58); _notifyDurationInfoBox.AutoSize = true; Controls.Add(_historySizeBox); Controls.Add(_historySizeInfoBox); Controls.Add(_notifyBox); Controls.Add(_notifyDurationBox); Controls.Add(_notifyDurationInfoBox); InitializeComponent(); }
public MainForm(ClipboardIndicator clipboardIndicator) { _clipboardIndicator = clipboardIndicator; InitializeComponent(); }