public async void __start_up(ExecuteArgs __args) { this.__target_address = __args.__gateway_address; this.__target_port = Convert.ToInt32(__args.__gateway_port); this.__sending_app = __args.__sending_application; this.__pharmacy_id = __args.__pharmacy_id; this.__recieving_facility = __args.__receiving_facility; this.__control_number = Convert.ToInt64(Properties.Settings.Default.ControlNumber); try { using (var p = new motSocket(__target_address, __target_port)) { __show_common_event("QuickMAR Proxy Starting Up"); __show_common_event(string.Format("Sending to: {0}:{1}", __args.__gateway_address, __args.__gateway_port)); } await Login("mot", "mot"); } catch (Exception e) { __show_error_event(string.Format("Failed to start on {0}:{1}, Error: {2}", __args.__gateway_address, __args.__gateway_port, e.Message)); __logger.Error("Failed to start on {0}:{1}, Error: {2}", __args.__gateway_address, __args.__gateway_port, e.Message); } }
//--------------------------------------------------------------- #endregion #region StartStop private void btnStart_Click(object sender, EventArgs e) { // Start Runtime var __args = new ExecuteArgs(); __args.__gateway_address = txtTargetIP.Text; __args.__gateway_port = txtTargetPort.Text; __args.__gateway_uname = txtTargetUname.Text; __args.__gateway_pwd = txtTargetPwd.Text; __args.__sending_application = txtSendingApplication.Text; __args.__pharmacy_id = txtPharmacyID.Text; __args.__receiving_facility = txtReceivingFacility.Text; __args.__control_number = txtControlNumber.Text; __args.__error_level = __error_level; __execute.__start_up(__args); btnStop.Enabled = true; btnStart.Enabled = false; __listening = true; }