示例#1
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);
            }
        }
示例#2
0
        private void mcdInfoTab_Click(object sender, System.EventArgs e)
        {
            if (!mcdInfoTab.Checked)
            {
                if (MCDInfoForm == null)
                {
                    MCDInfoForm = new McdViewerForm();
//					MCDInfoForm.Size = new Size(480, 670); // not req'd.
                    MCDInfoForm.Closing += infoTabClosing;

                    var tile = SelectedTile;
                    if (tile != null && tile.Info is McdEntry)
                    {
                        var info = (McdEntry)tile.Info;
                        Text = "TileView: mapID:" + tile.MapId + " mcdID: " + tile.Id;
                        UpdateMcdText(info);
                    }
                }

                MCDInfoForm.Visible = true;
//				MCDInfoForm.Location = new Point( // this is f'd.
//											this.Location.X - MCDInfoForm.Width,
//											this.Location.Y);
                MCDInfoForm.Show();
                mcdInfoTab.Checked = true;
            }
        }