private void simpleButton5_Click(object sender, EventArgs e) { using (FormSignalSelect formSel = new FormSignalSelect()) { if (formSel.ShowDialog() == DialogResult.OK) { selChannel = formSel.Channel; textEdit1.Text = selChannel.ToString(); trackBarControl1.Properties.Maximum = selChannel.RecordSec; int days = (int)((selChannel.File.EndTime.Date - selChannel.File.BeginTime.Date).TotalDays) + 1; comboBoxEdit1.Properties.Items.Clear(); listTimes.Clear(); for (int i = 0; i < days; i++) { DateTime time = selChannel.File.BeginTime.Date.AddDays(i); comboBoxEdit1.Properties.Items.Add(time.ToString("yyyy/MM/dd")); listTimes.Add(time); } if (days > 0) { comboBoxEdit1.SelectedIndex = 0; } QueryData(); } } }
void bt_Click(object sender, EventArgs e) { Button bt=(Button)sender; using (FormSignalSelect form = new FormSignalSelect()) { if(form.ShowDialog()==DialogResult.OK) { TextBox txtBox = txtBoxes[(int)bt.Tag]; if (form.Channel != null) { selectChannels[(int)bt.Tag] = form.Channel; txtBox.Text = form.Channel.ToString(); if (comboBoxEdit2.Text != "") { wizardPage1.AllowNext = true; } } } } }
void bt_Click(object sender, EventArgs e) { Button bt = (Button)sender; using (FormSignalSelect form = new FormSignalSelect()) { if (form.ShowDialog() == DialogResult.OK) { TextBox txtBox = txtBoxes[(int)bt.Tag]; if (form.Channel != null) { selectChannels[(int)bt.Tag] = form.Channel; txtBox.Text = form.Channel.ToString(); if (comboBoxEdit2.Text != "") { wizardPage1.AllowNext = true; } } } } }