Exemple #1
0
 private void barButtonItem12_ItemClick(object sender, ItemClickEventArgs e)
 {
     SaveFileDialog sfd1 = new SaveFileDialog();
     sfd1.Filter = "S19 files|*.S19";
     sfd1.AddExtension = true;
     sfd1.DefaultExt = "S19";
     sfd1.OverwritePrompt = true;
     sfd1.Title = "Export file to motorola S19 format...";
     if (sfd1.ShowDialog() == DialogResult.OK)
     {
         srec2bin srec = new srec2bin();
         srec.ConvertBinToSrec(m_currentfile, sfd1.FileName);
     }
 }
Exemple #2
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.DefaultExt = "bin";
            ofd.Filter = "Trionic 8 binary files|*.bin;*.s19";
            ofd.Multiselect = false;
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                string filename = string.Empty;
                if (ofd.FileName.ToUpper().EndsWith("S19"))
                {
                    srec2bin cvt = new srec2bin();

                    cvt.ConvertSrecToBin(ofd.FileName, out filename);
                }
                else
                {
                    filename = ofd.FileName;
                }
                OpenFile(filename);
            }
            //if (m_currentfile != string.Empty) LoadRealtimeTable();
        }