Beispiel #1
0
        private void _firstTimer_Tick
        (
            object sender,
            EventArgs e
        )
        {
            _firstTimer.Enabled = false;

            _browser.Navigate("about:blank");
            while (_browser.IsBusy)
            {
                Application.DoEvents();
            }
            _browser.Navigate("about:blank");
            while (_browser.IsBusy)
            {
                Application.DoEvents();
            }

            using (IrbisConnection connection = GetConnection())
            {
                FileSpecification specification
                    = new FileSpecification
                      (
                          IrbisPath.MasterFile,
                          connection.Database,
                          "ste.mnu"
                      );
                MenuFile menu = MenuFile.ReadFromServer
                                (
                    connection,
                    specification
                                );
                MenuEntry[] entries
                    = menu.SortEntries(MenuSort.ByCode);

                if (entries.Length == 0)
                {
                    throw new Exception("Empty entries list");
                }

                _statusBox.Items.AddRange(entries);
                _statusBox.SelectedIndex = 0;
            }

            _numberBox.Focus();
        }