Esempio n. 1
0
        private void OpenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var openFileDialog = new OpenFileDialog
            {
                Filter = @"SBI File (*.sbi)|*.sbi"
            };

            var dialogResult = openFileDialog.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                HasSelectedPath = true;

                FullPathAndFileName = openFileDialog.FileName;
                MapPath             = Path.GetDirectoryName(openFileDialog.FileName);
                MapInx = Path.GetFileNameWithoutExtension(FullPathAndFileName);

                MBI = MapBlockInformation.LoadSBI(MapPath, MapInx);

                PictureBox.Size  = new Size(MBI.SHBD.XSize * 8, MBI.SHBD.YSize);
                PictureBox.Image = MBI.SHBD.Import();

                Draw(true);

                DoorPropertyGrid.ExpandAllGridItems();
                DoorsGroupBox.Show();
            }
        }
Esempio n. 2
0
 private void CloseToolStripMenuItem_Click(object sender, EventArgs e)
 {
     HasSelectedPath = false;
     MBI             = null;
     Draw(true);
     DoorsGroupBox.Hide();
     PictureBox.Image       = null;
     PictureBox.Size        = new Size(0, 0);
     SaveMenuItem.Enabled   = false;
     SaveAsMenuItem.Enabled = false;
 }
Esempio n. 3
0
        private void UpdateTabsElements()
        {
            if (MBETabControl.SelectedTab == null)
            {
                return;
            }

            var tab = MBETabControl.SelectedTab.Text;

            switch (tab)
            {
            case "AID":
                //TODO: Make it so it shows the AID
                DoorsGroupBox.Hide();
                break;

            case "SBI":
                //TODO: Make it so it shows the SBI
                DoorsGroupBox.Show();
                break;

            case "SHAB":
                //TODO: Make it so it shows the SHAB
                DoorsGroupBox.Hide();
                break;

            case "SHBD":
                //TODO: Make it so it shows the SHBD
                DoorsGroupBox.Hide();
                break;

            case "SHMD":
                //TODO: Make it so it shows the SHMD
                DoorsGroupBox.Hide();
                break;

            default:
                return;
            }
        }