private void UpdateFWVersion() { IOUserData = MySerialTest.DirectIO(0, 0, "<</?f"); string DataFW = IOUserData.Object.ToString(); DataFW = DataFW.Substring(7, 20); // FWVersion.Text = DataFW; }
private void button1_Click(object sender, EventArgs e) { try { int command = 0, data = 0; try { command = int.Parse(tbCommand.Text, System.Globalization.CultureInfo.CurrentCulture); } catch (Exception) { } try { data = int.Parse(tbData.Text, System.Globalization.CultureInfo.CurrentCulture); } catch (Exception) { } LastResult = null; rbBytes.Enabled = rbHex.Enabled = rbString.Enabled = rbBits.Enabled = false; DirectIOData ret = poscommon.DirectIO(command, data, tbObject.Text); //MessageBox.Show(ret.ToString()); //tbResult.Text = ret.ToString(); if (ret == null) { tbResultData.Text = "<null>"; tbResultObject.Text = "<null>"; } else { tbResultData.Text = ret.Data.ToString(CultureInfo.InvariantCulture); if (ret.Object == null) { tbResultObject.Text = "<null>"; } else if (ret.Object is byte[]) { rbBytes.Enabled = rbHex.Enabled = rbString.Enabled = rbBits.Enabled = true; LastResult = ret.Object as byte[]; UpdateLastResult(); } else { tbResultObject.Text = ret.Object.ToString(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnC1_Click_1(object sender, EventArgs e) { try { IOUserData = MySerialTest.DirectIO(0, 0, "=C1"); updateForm(IOUserData.Object.ToString()); } catch (System.Exception ex) { MessageBox.Show("Errore " + ex.ToString()); } }
private void button25_Click(object sender, EventArgs e) { try { IOUserData = MySerialTest.DirectIO(0, 0, "=T3/$10000/(Contanti )"); updateForm(IOUserData.Object.ToString()); } catch (System.Exception ex) { MessageBox.Show("Errore A" + ex.ToString()); } }
private void button4_Click(object sender, EventArgs e) { //Programmazione Display try { IOUserData = MySerialTest.DirectIO(0, 0, "=D1/(Messaggio1)"); IOUserData = MySerialTest.DirectIO(0, 0, "=D2/(Messaggio2)"); } catch (System.Exception ex) { MessageBox.Show("Error " + ex.ToString()); } }
private void btnSend1_Click(object sender, EventArgs e) { try { IOUserData = MySerialTest.DirectIO(0, 0, "=R1/$100"); if (IOUserData.Object.ToString() == "") { MessageBox.Show("Comunicazione assente"); } //updateForm(IOUserData.Object.ToString()); updateForm(IOUserData.Object.ToString()); } catch (System.Exception ex) { MessageBox.Show("Errore " + ex.ToString()); } }
private void txtSend_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Return) { try { IOUserData = MySerialTest.DirectIO(0, 0, "txtSend.Text"); updateForm(IOUserData.Object.ToString()); //int i= IOUserData.Data; //txtSend.Clear(); } catch (System.Exception ex) { MessageBox.Show("Errore " + ex.ToString()); } } }
private void FirstCom() { IOUserData = MySerialTest.DirectIO(0, 0, "<</?s"); toolStripStatusLabel1.BackColor = Color.Green; toolStripStatusLabel1.Text = "ECR CONNECTED"; IOUserData = MySerialTest.DirectIO(0, 0, "<</?f"); string DataFW = IOUserData.Object.ToString(); switch (cmBOXModels.Text) { case "PRINTF": DataFW = DataFW.Substring(7, (DataFW.Length - 10)); break; case "GLOBE": DataFW = DataFW.Substring(7, (DataFW.Length - 10)); break; case "ONDA": DataFW = DataFW.Substring(7, (DataFW.Length - 10)); break; case "SWING": DataFW = DataFW.Substring(7, (DataFW.Length - 10)); break; case "ISWING": DataFW = DataFW.Substring(7, (DataFW.Length - 10)); break; case "IGLOBE": DataFW = DataFW.Substring(7, (DataFW.Length - 10)); break; default: DataFW = DataFW.Substring(7, (DataFW.Length - 10)); break; } FWVersion.Text = DataFW; }
private void button1_Click(object sender, EventArgs e) { IOUserData = MySerialTest.DirectIO(0, 0, "=C2"); String strResp = IOUserData.Object.ToString(); if (strResp == "") { MessageBox.Show("COLLEGAMENTO ECR ASSENTE, VERIFICARE LA STAMPANTE FISCALE"); } IOUserData = MySerialTest.DirectIO(0, 0, "=C10"); strResp = IOUserData.Object.ToString(); if (strResp == "") { MessageBox.Show("COLLEGAMENTO ECR ASSENTE, VERIFICARE LA STAMPANTE FISCALE"); } IOUserData = MySerialTest.DirectIO(0, 0, "=C1"); strResp = IOUserData.Object.ToString(); if (strResp == "") { MessageBox.Show("COLLEGAMENTO ECR ASSENTE, VERIFICARE LA STAMPANTE FISCALE"); } }
private void btnSend7_Click() { try { for (int i = 1; i <= 1; i++) { IOUserData = MySerialTest.DirectIO(0, 0, "=K"); IOUserData = MySerialTest.DirectIO(0, 0, "=C1"); IOUserData = MySerialTest.DirectIO(0, 0, "=R1/$100/(Descrizione)"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=R2/$1620/(Descrizione)"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=R3/$250/(Descrizione)"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=R5/$120/(Descrizione)"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=R1/*2/$100/(Descrizione)"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=R4/$650/(Descrizione)"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=s"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=R3/$250/(Descrizione)"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=R3/$7000/(Descrizione)"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=S"); //updateForm(IOUserData.Object.ToString()); IOUserData = MySerialTest.DirectIO(0, 0, "=T"); //updateForm(IOUserData.Object.ToString()); } } catch (System.Exception ex) { MessageBox.Show("Errore " + ex.ToString()); } }
//private void cmBOXModels_SelectedIndexChanged(object sender, EventArgs e) //{ // switch (cmBOXModels.Text) // { // case "GLOBE": // radBut_Serial.Enabled = true; // radBut_USB.Enabled = false; // radBut_LAN.Enabled = true; // cmBoxCOM.Enabled = true; // cmBOXBaudRate.Enabled = true; // radBut_Serial.Checked = true; // btnRead.Enabled = true; // chkBoxOldProt.Visible = false; // break; // case "ONDA": // radBut_Serial.Enabled = true; // radBut_USB.Enabled = false; // radBut_LAN.Enabled = true; // cmBoxCOM.Enabled = true; // cmBOXBaudRate.Enabled = true; // radBut_Serial.Checked = true; // btnRead.Enabled = false; // chkBoxOldProt.Visible = true; // break; // case "SWING": // radBut_Serial.Enabled = true; // radBut_USB.Enabled = false; // radBut_LAN.Enabled = false; // cmBoxCOM.Enabled = true; // cmBOXBaudRate.Enabled = true; // radBut_Serial.Checked = true; // btnRead.Enabled = true; // chkBoxOldProt.Visible = false; // break; // case "XOVER": // radBut_Serial.Enabled = true; // radBut_USB.Enabled = false; // radBut_LAN.Enabled = true; // cmBoxCOM.Enabled = true; // cmBOXBaudRate.Enabled = true; // radBut_Serial.Checked = true; // btnRead.Enabled = true; // chkBoxOldProt.Visible = false; // break; // case "IGLOBE": // radBut_Serial.Enabled = true; // radBut_USB.Enabled = true; // radBut_LAN.Enabled = true; // cmBoxCOM.Enabled = true; // cmBOXBaudRate.Enabled = true; // radBut_Serial.Checked = true; // btnRead.Enabled = true; // chkBoxOldProt.Visible = false; // break; // default: // chkBoxOldProt.Visible = false; // break; // } //} //private void radBut_Serial_CheckedChanged(object sender, EventArgs e) //{ // cmBoxCOM.Enabled = true; // cmBOXBaudRate.Enabled = true; // txtBoxIP.Enabled = false; // txtBoxPORT.Enabled = false; //} //private void radBut_LAN_CheckedChanged(object sender, EventArgs e) //{ // cmBoxCOM.Enabled = false; // cmBOXBaudRate.Enabled = false; // txtBoxIP.Enabled = true; // txtBoxPORT.Enabled = true; //} //private void radBut_LANServer_CheckedChanged(object sender, EventArgs e) //{ // cmBoxCOM.Enabled = false; // cmBOXBaudRate.Enabled = false; // txtBoxIP.Enabled = false; // txtBoxPORT.Enabled = true; //} //private void comboBoxLetture_SelectedIndexChanged(object sender, EventArgs e) //{ // try // { // TipoLettura = comboBoxLetture.SelectedIndex + 1; // switch (TipoLettura) // { // case 1: // //GE For Data From Sct to SCT // dateTimePickerFrom.Enabled = true; // dateTimePickerTo.Enabled = false; // FromRcpt.Enabled = true; // ToRcpt.Enabled = true; // rBVideo.Enabled = true; // rBVideo.Enabled = true; // rBVideo.Checked = true; // break; // case 2: // //GE From Data to Data // dateTimePickerFrom.Enabled = true; // dateTimePickerTo.Enabled = true; // FromRcpt.Enabled = false; // ToRcpt.Enabled = false; // rBVideo.Enabled = true; // rBVideo.Enabled = true; // rBVideo.Checked = true; // break; // case 3: // //GE Full // dateTimePickerFrom.Enabled = false; // dateTimePickerTo.Enabled = false; // FromRcpt.Enabled = false; // ToRcpt.Enabled = false; // rBVideo.Enabled = true; // rBVideo.Enabled = true; // rBVideo.Checked = true; // break; // case 4: // //MF // rBVideo.Enabled = false; // rBPrint.Checked = true; // break; // case 5: // //MF // rBVideo.Enabled = false; // rBPrint.Checked = true; // break; // case 6: // //MF // rBVideo.Enabled = false; // rBPrint.Checked = true; // break; // default: // break; // } // } // catch (System.Exception ex) // { // MessageBox.Show("Errore " + ex.ToString()); // } //} //private void btnRead_Click(object sender, EventArgs e) //{ // try // { // DateTime DataFrom; // DateTime DataTo; // string strFromData, strToData; // string strFromReceipt, strToReceipt; // //TipoLettura = comboBoxLetture.SelectedIndex + 1; // switch (cmBOXModels.Text) // { // case "IGLOBE": // if (rBVideo.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C120"); // IOUserData = MySerialTest.DirectIO(0, 0, "=R1"); // } // if (rBPrint.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C120"); // IOUserData = MySerialTest.DirectIO(0, 0, "=R0"); // } // switch (TipoLettura) // { // case 1: // //GE For Data From Sct to SCT // DataFrom = dateTimePickerFrom.Value; // strFromData = "=\"" + DataFrom.ToString("ddMMyy") + "S"; // strFromReceipt = "=\"" + FromRcpt.Value.ToString() + "S"; // strToReceipt = "=\"" + ToRcpt.Value.ToString() + "S"; // IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C452"); // IOUserData = MySerialTest.DirectIO(0, 0, strFromData); // IOUserData = MySerialTest.DirectIO(0, 0, strFromReceipt); // IOUserData = MySerialTest.DirectIO(0, 0, strToReceipt); // break; // case 2: // //GE From Data to Data // DataFrom = dateTimePickerFrom.Value; // strFromData = "=\"" + DataFrom.ToString("ddMMyy") + "S"; // DataTo = dateTimePickerTo.Value; // strToData = "=\"" + DataTo.ToString("ddMMyy") + "S"; // IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C451"); // IOUserData = MySerialTest.DirectIO(0, 0, strFromData); // IOUserData = MySerialTest.DirectIO(0, 0, strToData); // break; // case 3: // //GE Full // IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C450"); // break; // case 4: // //MF // break; // case 5: // //MF // break; // case 6: // //MF // break; // default: // break; // } // break; // case "ONDA": // break; // case "SWING": // switch (TipoLettura) // { // case 1: // //GE For Data From Sct to SCT // DataFrom = dateTimePickerFrom.Value; // strFromData = "&" + DataFrom.ToString("ddMMyy"); // strFromReceipt = "[" + FromRcpt.Value.ToString(); // strToReceipt = "]" + ToRcpt.Value.ToString(); // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // if (rBVideo.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C452/$0/" + strFromData + "/" + strFromReceipt + "/" + strToReceipt); // } // if (rBPrint.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C452/$1/" + strFromData + "/" + strFromReceipt + "/" + strToReceipt); // } // break; // case 2: // //GE From Data to Data // DataFrom = dateTimePickerFrom.Value; // strFromData = "&" + DataFrom.ToString("ddMMyy"); // DataTo = dateTimePickerTo.Value; // strToData = "[" + DataTo.ToString("ddMMyy"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // if (rBVideo.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C451/$0/" + strFromData + "/" + strToData); // } // if (rBPrint.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C451/$1/" + strFromData + "/" + strToData); // } // break; // case 3: // //GE Full // if (rBVideo.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C450/$0"); // } // if (rBPrint.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C450/$1"); // } // break; // case 4: // //MF // break; // case 5: // //MF From Data to Data // DataFrom = dateTimePickerFrom.Value; // strFromData = "&" + DataFrom.ToString("ddMMyy"); // DataTo = dateTimePickerTo.Value; // strToData = "[" + DataTo.ToString("ddMMyy"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C401/" + strFromData + "/" + strToData); // break; // case 6: // //MF FULL // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C400"); // break; // default: // break; // } // break; // case "PRINTF": // switch (TipoLettura) // { // case 1: // //GE For Data From Sct to SCT // DataFrom = dateTimePickerFrom.Value; // strFromData = "&" + DataFrom.ToString("ddMMyy"); // strFromReceipt = "[" + FromRcpt.Value.ToString(); // strToReceipt = "]" + ToRcpt.Value.ToString(); // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // if (rBVideo.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C452/$0/" + strFromData + "/" + strFromReceipt + "/" + strToReceipt); // } // if (rBPrint.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C452/$1/" + strFromData + "/" + strFromReceipt + "/" + strToReceipt); // } // break; // case 2: // //GE From Data to Data // DataFrom = dateTimePickerFrom.Value; // strFromData = "&" + DataFrom.ToString("ddMMyy"); // DataTo = dateTimePickerTo.Value; // strToData = "[" + DataTo.ToString("ddMMyy"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // if (rBVideo.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C451/$0/" + strFromData + "/" + strToData); // } // if (rBPrint.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C451/$1/" + strFromData + "/" + strToData); // } // break; // case 3: // //GE Full // if (rBVideo.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C450/$0"); // } // if (rBPrint.Checked) // { // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C450/$1"); // } // break; // case 4: // //MF // break; // case 5: // //MF From Data to Data // DataFrom = dateTimePickerFrom.Value; // strFromData = "&" + DataFrom.ToString("ddMMyy"); // DataTo = dateTimePickerTo.Value; // strToData = "[" + DataTo.ToString("ddMMyy"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C401/" + strFromData + "/" + strToData); // break; // case 6: // //MF FULL // IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); // IOUserData = MySerialTest.DirectIO(0, 0, "=C400"); // break; // default: // break; // } // break; // default: // break; // } // //IOUserData = MySerialTest.DirectIO(0, 0, "=C1"); // } // catch (System.Exception ex) // { // MessageBox.Show("Errore " + ex.ToString()); // } //} //private void TimerLAN_Tick(object sender, EventArgs e) //{ // //Only for LAN // if (ISConnected) // { // TimerLAN.Enabled = false; // //CINA non va con XOVER (ISWING) // //DisplayFWVersion DisplayFW = UpdateFWVersion; // //Invoke(DisplayFW); // } //} private void btnRunCmdFiles_Click(object sender, EventArgs e) { string strCommand = ""; try { Stream myStream; OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = "c:\\"; openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"; //openFileDialog1.FilterIndex = 2; openFileDialog1.RestoreDirectory = true; openFileDialog1.Title = "SELEZIONARE FILE DA ESEGUIRE"; if (openFileDialog1.ShowDialog() == DialogResult.OK) { if ((myStream = openFileDialog1.OpenFile()) != null) { // Insert code to read the stream here. StreamReader reader = new StreamReader(myStream); while (!reader.EndOfStream) { strCommand = reader.ReadLine(); //textBoxCmdExec.Text = strCommand; // textBoxCmdExec.Refresh(); IOUserData = MySerialTest.DirectIO(0, 0, strCommand); updateForm(IOUserData.Object.ToString()); } myStream.Close(); } } } catch (System.Exception ex) { MessageBox.Show("Comando Errato: " + strCommand + ex.ToString()); } }
public override DirectIOData DirectIO(int command, int data, object obj) { DirectIOData a= new DirectIOData() ; return a; }
private void btnRead_Click(object sender, EventArgs e) { try { DateTime DataFrom; DateTime DataTo; string strFromData, strToData; string strFromReceipt, strToReceipt; TipoLettura = comboBoxLetture.SelectedIndex + 1; switch (cmBOXModels.Text) { case "IGLOBE": if (rBVideo.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); IOUserData = MySerialTest.DirectIO(0, 0, "=C120"); IOUserData = MySerialTest.DirectIO(0, 0, "=R1"); } if (rBPrint.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); IOUserData = MySerialTest.DirectIO(0, 0, "=C120"); IOUserData = MySerialTest.DirectIO(0, 0, "=R0"); } switch (TipoLettura) { case 1: //GE For Data From Sct to SCT DataFrom = dateTimePickerFrom.Value; strFromData = "=\"" + DataFrom.ToString("ddMMyy") + "S"; strFromReceipt = "=\"" + FromRcpt.Value.ToString() + "S"; strToReceipt = "=\"" + ToRcpt.Value.ToString() + "S"; IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); IOUserData = MySerialTest.DirectIO(0, 0, "=C452"); IOUserData = MySerialTest.DirectIO(0, 0, strFromData); IOUserData = MySerialTest.DirectIO(0, 0, strFromReceipt); IOUserData = MySerialTest.DirectIO(0, 0, strToReceipt); break; case 2: //GE From Data to Data DataFrom = dateTimePickerFrom.Value; strFromData = "=\"" + DataFrom.ToString("ddMMyy") + "S"; DataTo = dateTimePickerTo.Value; strToData = "=\"" + DataTo.ToString("ddMMyy") + "S"; IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); IOUserData = MySerialTest.DirectIO(0, 0, "=C451"); IOUserData = MySerialTest.DirectIO(0, 0, strFromData); IOUserData = MySerialTest.DirectIO(0, 0, strToData); break; case 3: //GE Full IOUserData = MySerialTest.DirectIO(0, 0, "=C4"); IOUserData = MySerialTest.DirectIO(0, 0, "=C450"); break; case 4: //MF break; case 5: //MF break; case 6: //MF break; default: break; } break; case "ONDA": break; case "SWING": switch (TipoLettura) { case 1: //GE For Data From Sct to SCT DataFrom = dateTimePickerFrom.Value; strFromData = "&" + DataFrom.ToString("ddMMyy"); strFromReceipt = "[" + FromRcpt.Value.ToString(); strToReceipt = "]" + ToRcpt.Value.ToString(); IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); if (rBVideo.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C452/$0/" + strFromData + "/" + strFromReceipt + "/" + strToReceipt); } if (rBPrint.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C452/$1/" + strFromData + "/" + strFromReceipt + "/" + strToReceipt); } break; case 2: //GE From Data to Data DataFrom = dateTimePickerFrom.Value; strFromData = "&" + DataFrom.ToString("ddMMyy"); DataTo = dateTimePickerTo.Value; strToData = "[" + DataTo.ToString("ddMMyy"); IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); if (rBVideo.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C451/$0/" + strFromData + "/" + strToData); } if (rBPrint.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C451/$1/" + strFromData + "/" + strToData); } break; case 3: //GE Full if (rBVideo.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); IOUserData = MySerialTest.DirectIO(0, 0, "=C450/$0"); } if (rBPrint.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); IOUserData = MySerialTest.DirectIO(0, 0, "=C450/$1"); } break; case 4: //MF break; case 5: //MF From Data to Data DataFrom = dateTimePickerFrom.Value; strFromData = "&" + DataFrom.ToString("ddMMyy"); DataTo = dateTimePickerTo.Value; strToData = "[" + DataTo.ToString("ddMMyy"); IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); IOUserData = MySerialTest.DirectIO(0, 0, "=C401/" + strFromData + "/" + strToData); break; case 6: //MF FULL IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); IOUserData = MySerialTest.DirectIO(0, 0, "=C400"); break; default: break; } break; case "PRINTF": switch (TipoLettura) { case 1: //GE For Data From Sct to SCT DataFrom = dateTimePickerFrom.Value; strFromData = "&" + DataFrom.ToString("ddMMyy"); strFromReceipt = "[" + FromRcpt.Value.ToString(); strToReceipt = "]" + ToRcpt.Value.ToString(); IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); if (rBVideo.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C452/$0/" + strFromData + "/" + strFromReceipt + "/" + strToReceipt); } if (rBPrint.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C452/$1/" + strFromData + "/" + strFromReceipt + "/" + strToReceipt); } break; case 2: //GE From Data to Data DataFrom = dateTimePickerFrom.Value; strFromData = "&" + DataFrom.ToString("ddMMyy"); DataTo = dateTimePickerTo.Value; strToData = "[" + DataTo.ToString("ddMMyy"); IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); if (rBVideo.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C451/$0/" + strFromData + "/" + strToData); } if (rBPrint.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C451/$1/" + strFromData + "/" + strToData); } break; case 3: //GE Full if (rBVideo.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); IOUserData = MySerialTest.DirectIO(0, 0, "=C450/$0"); } if (rBPrint.Checked) { IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); IOUserData = MySerialTest.DirectIO(0, 0, "=C450/$1"); } break; case 4: //MF break; case 5: //MF From Data to Data DataFrom = dateTimePickerFrom.Value; strFromData = "&" + DataFrom.ToString("ddMMyy"); DataTo = dateTimePickerTo.Value; strToData = "[" + DataTo.ToString("ddMMyy"); IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); IOUserData = MySerialTest.DirectIO(0, 0, "=C401/" + strFromData + "/" + strToData); break; case 6: //MF FULL IOUserData = MySerialTest.DirectIO(0, 0, "=C3"); IOUserData = MySerialTest.DirectIO(0, 0, "=C400"); break; default: break; } break; default: break; } //IOUserData = MySerialTest.DirectIO(0, 0, "=C1"); } catch (System.Exception ex) { MessageBox.Show("Errore " + ex.ToString()); } }