예제 #1
0
        public FormMap(Form mdiParent)
        {
            InitializeComponent();
            MdiParent = mdiParent;
            MinimapWindow = new FormMinimap { MdiParent = mdiParent };
            MinimapWindow.Location = new Point(Parent.Width - 280, 20);

            menuStrip.Visible = false;
            //pnlImage.Paint += pnlImage_Paint;

            showMinimapToolStripMenuItem.PerformClick();
            resizeWindowToDefaultToolStripMenuItem.PerformClick();
            showTilesToolStripMenuItem.Checked = true;
            showTiles = showTilesToolStripMenuItem.Checked;
            showObjectsToolStripMenuItem.Checked = true;
            showObjects = showObjectsToolStripMenuItem.Checked;

            Reload(false);
            CreateNewMapCore(initialWidth, initialHeight);

            MinimapWindow.FormClosing += MinimapWindow_FormClosing;
            MinimapWindow.SelectionChanged += MinimapWindow_SelectionChanged;
            this.LostFocus += new EventHandler(FormMap_LostFocus);
            this.MouseWheel += new MouseEventHandler(FormMap_MouseWheel);
            panel1.Scroll += (s, e) => UpdateMinimap(false, false);
            Resize += (s, e) => UpdateMinimap(false, false);
        }
예제 #2
0
        public FormMap(Form mdiParent)
        {
            InitializeComponent();
            MdiParent     = mdiParent;
            MinimapWindow = new FormMinimap {
                MdiParent = mdiParent
            };
            MinimapWindow.Location = new Point(Parent.Width - 280, 20);

            menuStrip.Visible = false;
            //pnlImage.Paint += pnlImage_Paint;

            showMinimapToolStripMenuItem.PerformClick();
            resizeWindowToDefaultToolStripMenuItem.PerformClick();
            showTilesToolStripMenuItem.Checked = true;
            showTiles = showTilesToolStripMenuItem.Checked;
            showObjectsToolStripMenuItem.Checked = true;
            showObjects = showObjectsToolStripMenuItem.Checked;

            Reload(false);
            CreateNewMapCore(initialWidth, initialHeight);

            MinimapWindow.FormClosing      += MinimapWindow_FormClosing;
            MinimapWindow.SelectionChanged += MinimapWindow_SelectionChanged;
            this.LostFocus  += new EventHandler(FormMap_LostFocus);
            this.MouseWheel += new MouseEventHandler(FormMap_MouseWheel);
            panel1.Scroll   += (s, e) => UpdateMinimap(false, false);
            Resize          += (s, e) => UpdateMinimap(false, false);
        }