private void cmdCfgConDsp_Click(object sender, EventArgs e) { frmConnection frmconnect = new frmConnection(ref m_config.m_monitorconfig.m_displayconnection); frmconnect.ShowDialog(); UpdateDisplayConnection(); }
private void cmdCfgConMch_Click(object sender, EventArgs e) { frmConnection frmconnect = new frmConnection(ref m_config.m_driverconfig.m_connection, true); frmconnect.ShowDialog(); UpdateMainConnection(); }
//frmLogin m_FrmLogin = null; public void ReConnection() { MessageBoxEx.Show("Lỗi kết nối đến cơ sở dữ liệu! Xin vui lòng thiết lập lại kết nối...", "ERROR", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); //m_Connection = new frmConnection(); if (m_Connection == null || m_Connection.IsDisposed) { m_Connection = new frmConnection(); } if (m_Connection.ShowDialog() == DialogResult.OK) { MessageBoxEx.Show("Đã thiết lập kết nối cho lần chạy đầu tiên.\nHãy khởi động lại chương trình để thực thi kết nối!", "SUCCESSED", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Restart(); } else { return; } }
protected override void OnStart(string[] args) { try { Process theProc = Process.GetCurrentProcess(); string Config = theProc.MainModule.FileName; Config = Config + ".config"; #region "Connection Parameters" Utility clsUtil = new Utility(); constr = clsUtil.Decrypt(((NameValueCollection)ConfigurationSettings.GetConfig("appSettings"))["ConnectionString"]); if (constr.Trim() == "") { frmConnection frm = new frmConnection(); frm.ShowDialog(); constr = ((NameValueCollection)ConfigurationSettings.GetConfig("appSettings"))["ConnectionString"]; if (constr == "") { Environment.Exit(1); } } #endregion DoDelayedTasks(); RemotingConfiguration.Configure(Config); RemotingConfiguration.RegisterWellKnownServiceType(typeof(BusinessServerFactory), "BusinessProcess.rem", WellKnownObjectMode.Singleton); //theLog.WriteEntry(string.Format("{0} Started", theSRV_Name)); } catch (Exception err) { theLog.WriteEntry(err.Message); } }
private void buttonX1_Click(object sender, EventArgs e) { if (m_KN == null || m_KN.IsDisposed) { m_KN = new frmConnection(); m_KN.MdiParent = frmMain.ActiveForm; m_KN.Show(); } else { m_KN.Activate(); } }
private void cmdCfgConDsp_Click(object sender, EventArgs e) { int idx = lbConfigured.SelectedIndex; if (idx == -1) { return; } Configs.MonitorConfig mc = m_config.m_lstMonitorconfigs[idx]; frmConnection frmconnect = new frmConnection(ref mc.m_displayconnection); frmconnect.ShowDialog(); UpdateDisplayConnection(); }
private void cmdCfgConDsp_Click(object sender, EventArgs e) { int idx = cmbMachineProfiles.SelectedIndex; if (idx == -1) { return; } //Configs.MonitorConfig mc = m_config.m_lstMonitorconfigs[idx]; frmConnection frmconnect = new frmConnection(ref m_config.m_driverconfig.m_connection, true); //frmConnection frmconnect = new frmConnection(ref mc.m_displayconnection); frmconnect.ShowDialog(); UpdateDisplayConnection(); }
private void btnSave_Click(object sender, EventArgs e) { frmConnection con = new frmConnection(); con.ShowDialog(); con.GetPort(); //frmDemo demo = new frmDemo(); //demo.ShowDialog(); sendSMS sndsms = new sendSMS(); FineRecorddb db = new FineRecorddb(); string contact = db.GetGContact(txtRollNo.Text); string[] com = { "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8" }; //MessageBox.Show(contact); string comNum = "0"; //contact = "+923336374591"; for (int i = 0; i < 8; i++) { if (sndsms.SetCOMNum(com[i])) { comNum = com[i]; } } if (contact != "0") { string msg = "Fine Amount:" + txtFineAmount.Text; msg += "\nFine Detail:" + txtDetail; sndsms.SetCOMNum(comNum); sndsms.Sendsms(msg, contact); } else { MessageBox.Show("Error No Guardian Contact number or invalid!"); } }
public Control() { frmConnection = new frmConnection(this); frmConnection.ShowDialog(); }
private void connectionToolStripMenuItem_Click(object sender, EventArgs e) { frmConnection frmconnect = new frmConnection(); frmconnect.ShowDialog(); }
private void cmdCfgConMch_Click(object sender, EventArgs e) { frmConnection frmconnect = new frmConnection(ref m_config.m_driverconfig.m_connection); frmconnect.ShowDialog(); UpdateMainConnection(); }
private void cmdCfgConDsp_Click(object sender, EventArgs e) { frmConnection frmconnect = new frmConnection(ref m_config.m_monitorconfig.m_displayconnection); frmconnect.ShowDialog(); UpdateDisplayConnection(); }