Esempio n. 1
0
        void onKeyDown(object sender, KeyEventArgs e)
        {
            int        a   = 0;
            MapTabPage mtp = (MapTabPage)this.tabControl1.SelectedTab;

            mtp.onKeyDown(sender, e);
        }
Esempio n. 2
0
        public void setCursorSize(int size)
        {
            this.cursor_size = size;
            MapTabPage mtp = (MapTabPage)this.tabControl1.SelectedTab;

            mtp.ChangeCursorSize(size);
        }
Esempio n. 3
0
        private void 画像として保存ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MapTabPage tab =
                (MapTabPage)this.tabControl1.SelectedTab;

            tab.saveImage();
        }
Esempio n. 4
0
        private void tabControl1_MouseClick(object sender, MouseEventArgs e)
        {
            Point     p = e.Location;
            Rectangle r = this.tabControl1.GetTabRect(tabControl1.SelectedIndex);

            r.X     = r.X + r.Width - 8;
            r.Width = 8;
            if (r.Contains(p))
            {
                MapTabPage tab =
                    (MapTabPage)this.tabControl1.TabPages[tabControl1.SelectedIndex];
                if (tab.changedAfterSave)
                {
                    DialogResult result = MessageBox.Show(
                        tab.saveFileName + "は保存されていません\n変更を破棄してよろしいですか?",
                        "変更の破棄",
                        MessageBoxButtons.YesNo,
                        MessageBoxIcon.Exclamation,
                        MessageBoxDefaultButton.Button2
                        );
                    if (result != DialogResult.Yes)
                    {
                        return;
                    }
                }
                this.tabControl1.TabPages.RemoveAt(tabControl1.SelectedIndex);
            }
        }
Esempio n. 5
0
        private void BillBoardSelector_Click(object sender, EventArgs e)
        {
            MainForm   main = MainForm.mainform;
            MapTabPage mtp  = main.getSelectedTab();

            mtp.selecting_type = MapTabPage.SelectingType.Billboard;
            main.BillboardSelectorClicked();
        }
Esempio n. 6
0
        private void changeSelectingType()
        {
            MainForm   main = MainForm.mainform;
            MapTabPage mtp  = main.getSelectedTab();

            mtp.selecting_type = MapTabPage.SelectingType.Billboard;
            main.setCursorSize(cursor_size);
            main.BillboardSelectorClicked();
        }
Esempio n. 7
0
        private void マップを保存ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MapTabPage mtp = (MapTabPage)this.tabControl1.SelectedTab;

            if (mtp != null)
            {
                mtp.save();
            }
        }
Esempio n. 8
0
        private void マップを開くToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                this.tabControl1.Controls.Add(MapTabPage.fromFile(ofd.FileName));
                ofd.Dispose();
            }
        }
Esempio n. 9
0
        //public bool selectingMapchips;
        static public MapTabPage fromFile(String filename)
        {
            String     mapname = filename.Split('\\').Last();
            MapTabPage rtn     = new MapTabPage(mapname);

            rtn.data         = MapData.fromFile(filename, rtn.billboards);
            rtn.picbox.Size  = rtn.data.Size;
            rtn.AutoScroll   = true;
            rtn.saveFileName = mapname;
            return(rtn);
        }
Esempio n. 10
0
        private void 新規作成ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewMapDialog nmd = new NewMapDialog();

            if (nmd.ShowDialog() == DialogResult.OK)
            {
                MapTabPage mtp = new MapTabPage(nmd.MapName);
                mtp.Data.Width  = nmd.MapWidth;
                mtp.Data.Height = nmd.MapHeight;
                this.tabControl1.Controls.Add(mtp);
                nmd.Dispose();
            }
        }
Esempio n. 11
0
        public void ChipSelectorClicked(ChipSelector cs)
        {
            MapTabPage mtp = (MapTabPage)this.tabControl1.SelectedTab;

            if (cs == this.mapchip_selector)
            {
                mtp.selecting_type = MapTabPage.SelectingType.Mapchip;
            }
            else
            {
                mtp.selecting_type = MapTabPage.SelectingType.Object;
            }
        }
Esempio n. 12
0
        public void BillboardSelectorClicked()
        {
            MapTabPage mtp = (MapTabPage)this.tabControl1.SelectedTab;

            mtp.selecting_type = MapTabPage.SelectingType.Billboard;
        }