public frmMainRecordTester() { InitializeComponent(); __logger = LogManager.GetLogger("GatewayTester.Main"); __logger.Info("MOT Gateway Tester Starting Up"); // Start the fun __execute = new Execute(); __execute.__event_ui_handler += __update_event_pane; __execute.__error_ui_handler += __update_error_pane; txtTargetIP.Text = Properties.Settings.Default.GatewayIP; txtTargetPort.Text = Properties.Settings.Default.GatewayPort; txtTargetUname.Text = Properties.Settings.Default.GatewayUname; txtTargetPwd.Text = Properties.Settings.Default.GatewayPwd; txtSourceIP.Text = Properties.Settings.Default.ListenIP; txtSourcePort.Text = Properties.Settings.Default.ListenPort; txtSourceUname.Text = Properties.Settings.Default.ListenUname; txtSourcePwd.Text = Properties.Settings.Default.ListenPwd; cmbErrorLevel.SelectedIndex = (int)Properties.Settings.Default.ErrorLevel; __error_level = (motErrorlLevel)cmbErrorLevel.SelectedIndex; chkAutoTruncate.Checked = Properties.Settings.Default.AutoTruncate; __max_log_len = Properties.Settings.Default.MaxLogLines; txtMaxLogLen.Text = __max_log_len.ToString(); }
static public void __write_log(Logger __log, motErrorlLevel __current, motErrorlLevel __this, string __message) { try { if (__this >= __current) { switch (__this) { case motErrorlLevel.Error: __log.Error(__message); break; case motErrorlLevel.Warning: __log.Warn(__message); break; case motErrorlLevel.Info: __log.Info(__message); break; default: break; } } } catch { } }
private void cmbErrorLevel_SelectedIndexChanged(object sender, EventArgs e) { __error_level = (motErrorlLevel)cmbErrorLevel.SelectedIndex; Properties.Settings.Default.ErrorLevel = (motErrorlLevel)cmbErrorLevel.SelectedIndex; Properties.Settings.Default.Save(); if (__listening) { __execute.__error_level = __error_level; } }
public frmMain() { InitializeComponent(); __logger = LogManager.GetLogger("motDelimitedProxy.Main"); __logger.Info("MOT Delimited Proxy Starting Up"); // Start the fun __execute = new Execute(); __execute.__event_ui_handler += __update_event_pane; __execute.__error_ui_handler += __update_error_pane; txtTargetIP.Text = Properties.Settings.Default.GatewayIP; txtTargetPort.Text = Properties.Settings.Default.GatewayPort; txtTargetUname.Text = Properties.Settings.Default.GatewayUname; txtTargetPwd.Text = Properties.Settings.Default.GatewayPwd; txtSourceIP.Text = Properties.Settings.Default.ListenIP; txtSourcePort.Text = Properties.Settings.Default.ListenPort; txtSourceUname.Text = Properties.Settings.Default.ListenUname; txtSourcePwd.Text = Properties.Settings.Default.ListenPwd; cmbErrorLevel.SelectedIndex = Properties.Settings.Default.LogLevel; cmbFDOW_RxSys.Text = Properties.Settings.Default.FirstDayOfWeek_RxSys; cmbFDOW_MOT.Text = Properties.Settings.Default.FirstDayOfWeek_MOT; chkSendEOF.Checked = Properties.Settings.Default.SendEOF; chkDebugMode.Checked = Properties.Settings.Default.DebugMode; //__error_level = (motErrorlLevel)cmbErrorLevel.SelectedIndex; __error_level = motErrorlLevel.Info; chkAutoTruncate.Checked = Properties.Settings.Default.AutoTruncate; chkUseV1.Checked = Properties.Settings.Default.Use_v1; __max_log_len = Properties.Settings.Default.MaxLogLines; txtMaxLogLen.Text = __max_log_len.ToString(); // Find the right Radio Button foreach (RadioButton __radio in grpProtocol.Controls) { if (__radio.TabIndex > 0 && __radio.TabIndex == Properties.Settings.Default.ResponseProtocol) { __radio.Checked = true; break; } } btnStop.Enabled = false; btnStart.Enabled = true; }
public frmSqlServerMain() { InitializeComponent(); __logger = LogManager.GetLogger("motProxyUI.Main"); __logger.Info("MOT Proxy UI Starting Up"); // Start the fun __execute = new Execute(); __execute.__event_ui_handler += __update_event_pane; __execute.__error_ui_handler += __update_error_pane; txtTargetIP.Text = Properties.Settings.Default.GatewayIP; txtTargetPort.Text = Properties.Settings.Default.GatewayPort; txtTargetUname.Text = Properties.Settings.Default.GatewayUname; txtTargetPwd.Text = Properties.Settings.Default.GatewayPwd; txtSourceIP.Text = Properties.Settings.Default.ListenIP; txtSourcePort.Text = Properties.Settings.Default.ListenPort; txtSourceUname.Text = Properties.Settings.Default.ListenUname; txtSourcePwd.Text = Properties.Settings.Default.ListenPwd; tbHours.Text = Properties.Settings.Default.tmRefreshHours.ToString(); tbMinutes.Text = Properties.Settings.Default.tmRefreshMinutes.ToString(); tbSeconds.Text = Properties.Settings.Default.tmRefreshSeconds.ToString(); tbSourceDbServerName.Text = Properties.Settings.Default.DB_ServerName; tbSourceInstanceName.Text = Properties.Settings.Default.DB_InstanceName; tbSourceDbName.Text = Properties.Settings.Default.DB_Name; tbSourceDbAddress.Text = Properties.Settings.Default.DB_Address; tbSourceDbPort.Text = Properties.Settings.Default.DB_Port; tbSourceDbUname.Text = Properties.Settings.Default.DB_UserName; tbSourceDbPwd.Text = Properties.Settings.Default.DB_Password; txtPatientStartDate.Text = Properties.Settings.Default.vPatientLastTouch.ToString(); txtPrescriberStartDate.Text = Properties.Settings.Default.vPrescriberLastTouch.ToString(); txtPrescriptionStartDate.Text = Properties.Settings.Default.vRxLastTouch.ToString(); txtFacilityStartDate.Text = Properties.Settings.Default.vLocationLastTouch.ToString(); txtStoreStartDate.Text = Properties.Settings.Default.vStoreLastTouch.ToString(); txtDrugStartDate.Text = Properties.Settings.Default.vDrugLastTouch.ToString(); cmbErrorLevel.SelectedIndex = (int)Properties.Settings.Default.ErrorLevel; __error_level = (motErrorlLevel)cmbErrorLevel.SelectedIndex; chkAutoTruncate.Checked = Properties.Settings.Default.AutoTruncate; __max_log_len = Properties.Settings.Default.MaxLogLines; txtMaxLogLen.Text = __max_log_len.ToString(); }
public frmMainDefault() { InitializeComponent(); __logger = LogManager.GetLogger("motHL7Proxy.Main"); __logger.Info("MOT HL7 Proxy Starting Up"); // Start the fun __execute = new Execute(); __execute.__event_ui_handler += __update_event_pane; __execute.__error_ui_handler += __update_error_pane; txtTargetIP.Text = Properties.Settings.Default.GatewayIP; txtTargetPort.Text = Properties.Settings.Default.GatewayPort; txtTargetUname.Text = Properties.Settings.Default.GatewayUname; txtTargetPwd.Text = Properties.Settings.Default.GatewayPwd; txtSourceIP.Text = Properties.Settings.Default.ListenIP; txtSourcePort.Text = Properties.Settings.Default.ListenPort; txtSourceUname.Text = Properties.Settings.Default.ListenUname; txtSourcePwd.Text = Properties.Settings.Default.ListenPwd; cmbErrorLevel.SelectedIndex = (int)Properties.Settings.Default.ErrorLevel; __error_level = (motErrorlLevel)cmbErrorLevel.SelectedIndex; chkAutoTruncate.Checked = Properties.Settings.Default.AutoTruncate; chkSendEOF.Checked = Properties.Settings.Default.SendEOF; chkDebug.Checked = Properties.Settings.Default.DebugMode; cmbFDOW_RxSys.Text = Properties.Settings.Default.FirstDayOfWeek_RxSys; cmbFDOW_MOT.Text = Properties.Settings.Default.FirstDayOfWeek_MOT; txtOrganization.Text = Properties.Settings.Default.Organization; txtProcessor.Text = Properties.Settings.Default.Processor; txtRxSystem_HL7_ID.Text = Properties.Settings.Default.RxSystemHL7ID; cmbRxType.SelectedIndex = (int)Properties.Settings.Default.RxSystemType; __max_log_len = Properties.Settings.Default.MaxLogLines; txtMaxLogLen.Text = __max_log_len.ToString(); chkUseServerSSL.Checked = Properties.Settings.Default.UseServerSSL; txtSSLServerPort.Text = Properties.Settings.Default?.SSLServerPort; btnStop.Enabled = false; btnStart.Enabled = true; }
private void tabControl1_Click(object sender, EventArgs e) { if (tbcMain.SelectedIndex == 0) { Properties.Settings.Default.GatewayIP = txtTargetIP.Text; Properties.Settings.Default.GatewayPort = txtTargetPort.Text; Properties.Settings.Default.GatewayUname = txtTargetUname.Text; Properties.Settings.Default.GatewayPwd = txtTargetPwd.Text; Properties.Settings.Default.ListenIP = txtSourceIP.Text; Properties.Settings.Default.ListenPort = txtSourcePort.Text; Properties.Settings.Default.ListenUname = txtSourceUname.Text; Properties.Settings.Default.ListenPwd = txtSourcePwd.Text; Properties.Settings.Default.ErrorLevel = (motErrorlLevel)cmbErrorLevel.SelectedIndex; Properties.Settings.Default.MaxLogLines = Convert.ToInt32(txtMaxLogLen.Text); Properties.Settings.Default.AutoTruncate = chkAutoTruncate.Checked; Properties.Settings.Default.MaxLogLines = Convert.ToInt32(txtMaxLogLen.Text); Properties.Settings.Default.Save(); } else if (tbcMain.SelectedIndex == 1) { txtTargetIP.Text = Properties.Settings.Default.GatewayIP; txtTargetPort.Text = Properties.Settings.Default.GatewayPort; txtTargetUname.Text = Properties.Settings.Default.GatewayUname; txtTargetPwd.Text = Properties.Settings.Default.GatewayPwd; txtSourceIP.Text = Properties.Settings.Default.ListenIP; txtSourcePort.Text = Properties.Settings.Default.ListenPort; txtSourceUname.Text = Properties.Settings.Default.ListenUname; txtSourcePwd.Text = Properties.Settings.Default.ListenPwd; cmbErrorLevel.SelectedIndex = Properties.Settings.Default.LogLevel; __error_level = (motErrorlLevel)cmbErrorLevel.SelectedIndex; txtMaxLogLen.Text = Properties.Settings.Default.MaxLogLines.ToString(); chkAutoTruncate.Checked = Properties.Settings.Default.AutoTruncate; txtMaxLogLen.Text = Properties.Settings.Default.MaxLogLines.ToString(); } else // Reserved for future use { return; } }
private void tabControl1_Click(object sender, EventArgs e) { if (tbcMain.SelectedIndex == 0) { Properties.Settings.Default.GatewayIP = txtTargetIP.Text; Properties.Settings.Default.GatewayPort = txtTargetPort.Text; Properties.Settings.Default.GatewayUname = txtTargetUname.Text; Properties.Settings.Default.GatewayPwd = txtTargetPwd.Text; Properties.Settings.Default.ListenIP = txtSourceIP.Text; Properties.Settings.Default.ListenPort = txtSourcePort.Text; Properties.Settings.Default.ListenUname = txtSourceUname.Text; Properties.Settings.Default.ListenPwd = txtSourcePwd.Text; Properties.Settings.Default.ErrorLevel = (motErrorlLevel)cmbErrorLevel.SelectedIndex; Properties.Settings.Default.Organization = txtOrganization.Text; Properties.Settings.Default.Processor = txtProcessor.Text; Properties.Settings.Default.RxSystemHL7ID = txtRxSystem_HL7_ID.Text; Properties.Settings.Default.RxSystemType = (SendingApplication)cmbRxType.SelectedIndex; Properties.Settings.Default.MaxLogLines = Convert.ToInt32(txtMaxLogLen.Text); Properties.Settings.Default.AutoTruncate = chkAutoTruncate.Checked; Properties.Settings.Default.SendEOF = chkSendEOF.Checked; Properties.Settings.Default.DebugMode = chkDebug.Checked; Properties.Settings.Default.FirstDayOfWeek_RxSys = cmbFDOW_RxSys.Text; Properties.Settings.Default.FirstDayOfWeek_MOT = cmbFDOW_MOT.Text; Properties.Settings.Default.SSLServerPort = txtSSLServerPort.Text; Properties.Settings.Default.UseServerSSL = chkUseServerSSL.Checked; Properties.Settings.Default.SSLClientPort = txtClientSSLPort.Text; Properties.Settings.Default.UseClientSSL = chkUseClientSSL.Checked; Properties.Settings.Default.Save(); } else if (tbcMain.SelectedIndex == 1) { txtTargetIP.Text = Properties.Settings.Default.GatewayIP; txtTargetPort.Text = Properties.Settings.Default.GatewayPort; txtTargetUname.Text = Properties.Settings.Default.GatewayUname; txtTargetPwd.Text = Properties.Settings.Default.GatewayPwd; txtSourceIP.Text = Properties.Settings.Default.ListenIP; txtSourcePort.Text = Properties.Settings.Default.ListenPort; txtSourceUname.Text = Properties.Settings.Default.ListenUname; txtSourcePwd.Text = Properties.Settings.Default.ListenPwd; cmbErrorLevel.SelectedIndex = (int)Properties.Settings.Default.ErrorLevel; __error_level = (motErrorlLevel)cmbErrorLevel.SelectedIndex; txtOrganization.Text = Properties.Settings.Default.Organization; txtProcessor.Text = Properties.Settings.Default.Processor; txtRxSystem_HL7_ID.Text = Properties.Settings.Default.RxSystemHL7ID; cmbRxType.SelectedIndex = (int)Properties.Settings.Default.RxSystemType; txtMaxLogLen.Text = Properties.Settings.Default.MaxLogLines.ToString(); chkAutoTruncate.Checked = Properties.Settings.Default.AutoTruncate; chkSendEOF.Checked = Properties.Settings.Default.SendEOF; chkDebug.Checked = Properties.Settings.Default.DebugMode; cmbFDOW_RxSys.Text = Properties.Settings.Default.FirstDayOfWeek_RxSys; cmbFDOW_MOT.Text = Properties.Settings.Default.FirstDayOfWeek_MOT; chkUseServerSSL.Checked = Properties.Settings.Default.UseServerSSL; txtSSLServerPort.Text = Properties.Settings.Default.SSLServerPort; chkUseClientSSL.Checked = Properties.Settings.Default.UseClientSSL; txtClientSSLPort.Text = Properties.Settings.Default.SSLClientPort; } else // Reserved for future use { return; } }
private void tabControl1_Click(object sender, EventArgs e) { switch (tbcMain.SelectedIndex) { case 0: Properties.Settings.Default.GatewayIP = txtTargetIP.Text; Properties.Settings.Default.GatewayPort = txtTargetPort.Text; Properties.Settings.Default.GatewayUname = txtTargetUname.Text; Properties.Settings.Default.GatewayPwd = txtTargetPwd.Text; Properties.Settings.Default.ListenIP = tbSourceDbAddress.Text; Properties.Settings.Default.ListenPort = tbSourceDbPort.Text; Properties.Settings.Default.ListenUname = tbSourceDbUname.Text; Properties.Settings.Default.ListenPwd = tbSourceDbUname.Text; Properties.Settings.Default.DB_ServerName = tbSourceDbServerName.Text; Properties.Settings.Default.DB_Name = tbSourceDbName.Text; Properties.Settings.Default.ErrorLevel = (motErrorlLevel)cmbErrorLevel.SelectedIndex; Properties.Settings.Default.MaxLogLines = Convert.ToInt32(txtMaxLogLen.Text); Properties.Settings.Default.AutoTruncate = chkAutoTruncate.Checked; Properties.Settings.Default.MaxLogLines = Convert.ToInt32(txtMaxLogLen.Text); Properties.Settings.Default.Save(); break; case 1: txtTargetIP.Text = Properties.Settings.Default.GatewayIP; txtTargetPort.Text = Properties.Settings.Default.GatewayPort; txtTargetUname.Text = Properties.Settings.Default.GatewayUname; txtTargetPwd.Text = Properties.Settings.Default.GatewayPwd; tbSourceDbName.Text = Properties.Settings.Default.DB_Name; tbSourceDbServerName.Text = Properties.Settings.Default.DB_ServerName; txtSourceIP.Text = Properties.Settings.Default.ListenIP; txtSourcePort.Text = Properties.Settings.Default.ListenPort; txtSourceUname.Text = Properties.Settings.Default.ListenUname; txtSourcePwd.Text = Properties.Settings.Default.ListenPwd; cmbErrorLevel.SelectedIndex = Properties.Settings.Default.LogLevel; __error_level = (motErrorlLevel)cmbErrorLevel.SelectedIndex; txtMaxLogLen.Text = Properties.Settings.Default.MaxLogLines.ToString(); chkAutoTruncate.Checked = Properties.Settings.Default.AutoTruncate; txtMaxLogLen.Text = Properties.Settings.Default.MaxLogLines.ToString(); break; case 2: tbHours.Text = Properties.Settings.Default.tmRefreshHours.ToString(); tbMinutes.Text = Properties.Settings.Default.tmRefreshMinutes.ToString(); tbSeconds.Text = Properties.Settings.Default.tmRefreshSeconds.ToString(); tbSourceDbServerName.Text = Properties.Settings.Default.DB_ServerName; tbSourceInstanceName.Text = Properties.Settings.Default.DB_InstanceName; tbSourceDbName.Text = Properties.Settings.Default.DB_Name; tbSourceDbAddress.Text = Properties.Settings.Default.DB_Address; tbSourceDbPort.Text = Properties.Settings.Default.DB_Port; tbSourceDbUname.Text = Properties.Settings.Default.DB_UserName; tbSourceDbPwd.Text = Properties.Settings.Default.DB_Password; txtPatientStartDate.Text = Properties.Settings.Default.vPatientLastTouch.ToString(); txtPrescriberStartDate.Text = Properties.Settings.Default.vPrescriberLastTouch.ToString(); txtPrescriptionStartDate.Text = Properties.Settings.Default.vRxLastTouch.ToString(); txtFacilityStartDate.Text = Properties.Settings.Default.vLocationLastTouch.ToString(); txtStoreStartDate.Text = Properties.Settings.Default.vStoreLastTouch.ToString(); txtDrugStartDate.Text = Properties.Settings.Default.vDrugLastTouch.ToString(); break; default: break; } }