private void build(int index) { Debug.Assert(platform is FatPlatform); FatPlatform fp = (FatPlatform)platform; if (fp.hasLane(index)) { if (fp.canRemoveLane(index)) { fp.removeLane(index); } else { MessageBox.Show("Could not be released due to an obstacle"); } //! MessageBox.Show("障害物があって解放できません"); } else { if (fp.canAddLane(index)) { fp.addLane(index); } else { MessageBox.Show("Could not be connected due to an obstacle"); } //! MessageBox.Show("障害物があって接続できません"); } updateDialog(); }
private void updateDialog() { if (platform is FatPlatform) { FatPlatform fp = (FatPlatform)platform; if (!fp.hasLane(lIdx)) { left.Text = "Left connect"; } //! if(!fp.hasLane(lIdx)) left.Text = "左に接続"; else { left.Text = "Left release"; } //! else left.Text = "左を解放"; if (!fp.hasLane(rIdx)) { right.Text = "Right connect"; } //! if(!fp.hasLane(rIdx)) right.Text = "右に接続"; else { right.Text = "Right release"; } //! else right.Text = "右を解放"; } if (platform.host != null) { warning.Hide(); } else { warning.Show(); } }