public SerialProtocol(SerialPort serialport, AdmsForm admsform, DataForm df, bool isSend) { this.aform = admsform; this.mySerial = serialport; this.IsSend = isSend; this.cActiveForm = df; this.db = this.cActiveForm.GetDB(); this.db.Buffer.CopyTo((Array)this.DataArray, 0); this.IsComp = false; this.tmpCpuType = Settings.Instance.CpuType; this.tmpCountryType = Settings.Instance.CountryType; this.tmpExpType = Settings.Instance.ExpType; this.TIMEOUTERRMESSAGE = this.resources.GetString("TIMEOUTERROR"); this.CHECKSUMERRMESSAGE = this.resources.GetString("CHECKSUMERROR"); this.FORMATERRMESSAGE = this.resources.GetString("FORMATERROR"); this.COMPLETEDMESSAGE = this.resources.GetString("COMPLETED"); this.SENDMESSAGE = this.resources.GetString("SENDING"); this.RECVMESSAGE = this.resources.GetString("RECEIVING"); this.CPUTYPERRMESSAGE = this.resources.GetString("CPUTYPEERROR"); this.InitializeComponent(); if (isSend) { this.Text = this.SENDMESSAGE; } else { this.Text = this.RECVMESSAGE; this.lbl_percentage.Text = this.resources.GetString("RECVSTARTMESSAGE"); } this.myTimer = new System.Timers.Timer(); this.myTimer.Elapsed += new ElapsedEventHandler(this.OnTimerEvent); this.backgroundWorker1.WorkerSupportsCancellation = true; }
public SerialSendForm(SerialPort serialport, AdmsForm admsform, DataForm df) { this.InitializeComponent(); this.aform = admsform; this.serial = serialport; this.cActiveForm = df; }
public SerialRecvForm(SerialPort serialport, AdmsForm admsform, DataForm df, ComForm cf) { this.InitializeComponent(); this.aform = admsform; this.serial = serialport; this.cActiveForm = df; this.cform = cf; }
public SearchForm(AdmsForm aForm, DataForm dForm) { this.cDataForm = dForm; this.mfd = aForm; this.InitializeComponent(); this.cDgv = dForm.SelectedDgv(); this.cmb_Select.Items.Clear(); for (int index = 0; index < this.cDgv.ColumnCount; ++index) { if (this.cDgv.Columns[index].Visible) { this.cmb_Select.Items.Add((object)this.cDgv.Columns[index].HeaderText); } } int stringExact = this.cmb_Select.FindStringExact(this.cDataForm.finedHeader_Bak); if (stringExact != -1) { this.cmb_Select.SelectedIndex = stringExact; } else { this.cmb_Select.SelectedIndex = 0; } switch (this.selCol) { case 1: case 2: case 3: case 9: case 51: this.txt_Data.Text = this.cDataForm.finedVal_Bak[this.selCol]; break; case 4: case 6: case 7: case 8: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 18: case 22: case 23: case 24: this.cmb_Data.Text = this.cDataForm.finedVal_Bak[this.selCol]; break; default: if (this.cDataForm.finedVal_Bak[this.selCol] == "1") { this.chb_Data.Checked = true; break; } this.chb_Data.Checked = false; break; } }