Exemple #1
0
        private void OpenWorkingFile()
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Multiselect = false;
            ofd.Filter = "Trionic 5 files|*.bin;*.s19";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                CloseProject();
                string filename = string.Empty;
                if (ofd.FileName.ToUpper().EndsWith("S19"))
                {
                    srec2bin cvt = new srec2bin();

                    cvt.ConvertSrecToBin(ofd.FileName, out filename);
                }
                else
                {
                    filename = ofd.FileName;
                }
                OpenWorkingFile(filename);
                m_appSettings.LastOpenedType = 0;
                SetDefaultFilters();
            }
        }