public AlarmManagerMain(BasicDBServer svr) { m_svr = svr; InitializeComponent(); SoundFiles s = new SoundFiles(svr); this.tabPageSounds.Controls.Add(s); s.Dock = DockStyle.Fill; AlarmDataSet ds = AlarmDataSet.CreateInstance(svr); AlarmSetup s1 = new AlarmSetup(ds); this.tabPageSetup.Controls.Add(s1); s1.Dock = DockStyle.Fill; AlarmQueue q = new AlarmQueue(ds); this.tabPageAlarms.Controls.Add(q); q.Dock = DockStyle.Fill; AlarmDefinition def = new AlarmDefinition(ds); this.tabPageAlarmDef.Controls.Add(def); def.Dock = DockStyle.Fill; }
private void btnOk_Click(object sender, EventArgs e) { AlarmQueue queue = new AlarmQueue { From = tbFrom.Text + "@" + tbDomain.Text, Host = tbServer.Text, Port = int.Parse(tbPort.Text), Password = tbPass.Text, SSLEnable = checkBox_SSLEnable.Checked, MinimumInterval = int.Parse(numericUpDown1.Value.ToString("f0")) * 60, To = tbRecv.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), TrustfulUsers = tbTrust.Text, }; if (queue.IsValid) { this.Return = queue; } else { this.Return = null; } }