void onKeyDown(object sender, KeyEventArgs e) { int a = 0; MapTabPage mtp = (MapTabPage)this.tabControl1.SelectedTab; mtp.onKeyDown(sender, e); }
public void setCursorSize(int size) { this.cursor_size = size; MapTabPage mtp = (MapTabPage)this.tabControl1.SelectedTab; mtp.ChangeCursorSize(size); }
private void 画像として保存ToolStripMenuItem_Click(object sender, EventArgs e) { MapTabPage tab = (MapTabPage)this.tabControl1.SelectedTab; tab.saveImage(); }
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); } }
private void BillBoardSelector_Click(object sender, EventArgs e) { MainForm main = MainForm.mainform; MapTabPage mtp = main.getSelectedTab(); mtp.selecting_type = MapTabPage.SelectingType.Billboard; main.BillboardSelectorClicked(); }
private void changeSelectingType() { MainForm main = MainForm.mainform; MapTabPage mtp = main.getSelectedTab(); mtp.selecting_type = MapTabPage.SelectingType.Billboard; main.setCursorSize(cursor_size); main.BillboardSelectorClicked(); }
private void マップを保存ToolStripMenuItem_Click(object sender, EventArgs e) { MapTabPage mtp = (MapTabPage)this.tabControl1.SelectedTab; if (mtp != null) { mtp.save(); } }
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(); } }
//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); }
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(); } }
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; } }
public void BillboardSelectorClicked() { MapTabPage mtp = (MapTabPage)this.tabControl1.SelectedTab; mtp.selecting_type = MapTabPage.SelectingType.Billboard; }