Beispiel #1
0
        void Init()
        {
            _frmChooseCheckDevice = new frmChooseCheckDevice();
            _frmSettings          = new frmSettings();
            _frmMain                                    = new frmMain();
            _frmListBoard                               = new frmListBoard();
            _frmHelpBoard                               = new frmHelpBoard();
            _frmBoardSignals                            = new frmBoardSignals();
            _frmBoardShowPDF                            = new frmBoardShowPDF();
            _frmCurrents                                = new frmCurrents();
            _frmMainWindow                              = _frmChooseCheckDevice._frmMainWindow = _frmSettings._frmMainWindow =
                _frmMain._frmMainWindow                 = _frmListBoard._frmMainWindow = _frmHelpBoard._frmMainWindow =
                    _frmBoardSignals._frmMainWindow     =
                        _frmBoardShowPDF._frmMainWindow =
                            this;

            sets = new SettingsXML();
            xml  = new XMLParser();


            this.Text = sTitleMainForm + sVersion;

            if (Utils.isFileExist(sFileStandSignals))
            {
                standSignals = xml.openStandXML(Application.StartupPath + "//" + sFileStandSignals);
            }
            else
            {
                MessageBox.Show("Файл стендовых сигналов " + sFileStandSignals + " не найден! Приложение не сможет функционировать и будет закрыто.", "Ошибка загрузки файла", MessageBoxButtons.OK, MessageBoxIcon.Error);

                //Application.Exit();
                Environment.Exit(0);
            }
        }