Esempio n. 1
0
        /// <summary>
        /// Fires when a tab is clicked.
        /// Focuses the selected page/panel, updates the quadrant and MCD-info
        /// if applicable.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnSelectedIndexChanged(object sender, EventArgs e)
        {
            GetSelectedPanel().Focus();
            var f = FindForm();

            McdRecord record = null;

            if (SelectedTilepart != null)
            {
                ViewerFormsManager.TopView.Control.SelectQuadrant(SelectedTilepart.Record.PartType);
                ViewerFormsManager.TopRouteView.ControlTop.SelectQuadrant(SelectedTilepart.Record.PartType);

                f.Text = BuildTitleString(SelectedTilepart.SetId, SelectedTilepart.TerId);
                record = SelectedTilepart.Record;
            }
            else
            {
                f.Text = "TileView";
            }

            if (_mcdInfoForm != null)
            {
                _mcdInfoForm.UpdateData(record);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Opens the MCD-info screen.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        internal void OnMcdInfoClick(object sender, EventArgs e)
        {
            if (!tsmiMcdInfo.Checked)
            {
                tsmiMcdInfo.Checked = true;

                if (_mcdInfoForm == null)
                {
                    _mcdInfoForm              = new McdViewerForm();
                    _mcdInfoForm.FormClosing += OnMcdInfoFormClosing;

                    var f = FindForm();

                    McdRecord record = null;

                    var part = SelectedTilepart;
                    if (part != null)
                    {
                        f.Text = BuildTitleString(part.SetId, part.TerId);
                        record = part.Record;
                    }
                    else
                    {
                        f.Text = "TileView";
                    }

                    _mcdInfoForm.UpdateData(record);
                }
                _mcdInfoForm.Show();
            }
            else
            {
                OnMcdInfoFormClosing(null, null);
            }
        }
Esempio n. 3
0
 private void UpdateMcdText(McdEntry info)
 {
     if (MCDInfoForm != null)
     {
         MCDInfoForm.UpdateData(info);
     }
 }