/// <summary> /// ************************************************************************************************************************ /// マウスのボタンが放されたときの挙動です。 /// ************************************************************************************************************************ /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Uc_Form1Main_MouseUp(object sender, MouseEventArgs e) { // このメインパネルに、何かして欲しいという要求は、ここに入れられます。 this.MainGui.RepaintRequest = new RepaintRequestImpl(); //------------------------------ // マウスボタンが放されたときの、表示物の反応や、将棋データの変更がこの中に書かれています。 //------------------------------ if (e.Button == MouseButtons.Left) { //------------------------------------------------------------ // 左ボタン //------------------------------------------------------------ TimedB_MouseCapture timeB = ((TimedB_MouseCapture)this.MainGui.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(this.MainGui.Scene, Shape_CanvasImpl.WINDOW_NAME_SHOGIBAN, MouseEventStateName.MouseLeftButtonUp, e.Location)); } else if (e.Button == MouseButtons.Right) { //------------------------------------------------------------ // 右ボタン //------------------------------------------------------------ TimedB_MouseCapture timeB = ((TimedB_MouseCapture)this.MainGui.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(this.MainGui.Scene, Shape_CanvasImpl.WINDOW_NAME_SHOGIBAN, MouseEventStateName.MouseRightButtonUp, e.Location)); } }
private void Uc_Form2Main_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { MainGui_Csharp mainGui = ((Form2_Console)this.ParentForm).Form1_Shogi.Uc_Form1Main.MainGui; // このメインパネルに、何かして欲しいという要求は、ここに入れられます。 mainGui.RepaintRequest = new RepaintRequestImpl(); //------------------------------ // マウスボタンが放されたときの、表示物の反応や、将棋データの変更がこの中に書かれています。 //------------------------------ if (e.Button == MouseButtons.Left) { //------------------------------------------------------------ // 左ボタン //------------------------------------------------------------ TimedB_MouseCapture timeB = ((TimedB_MouseCapture)mainGui.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(mainGui.Scene, Shape_CanvasImpl.WINDOW_NAME_CONSOLE, MouseEventStateName.MouseLeftButtonUp, e.Location)); } else if (e.Button == MouseButtons.Right) { //------------------------------------------------------------ // 右ボタン //------------------------------------------------------------ TimedB_MouseCapture timeB = ((TimedB_MouseCapture)mainGui.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(mainGui.Scene, Shape_CanvasImpl.WINDOW_NAME_CONSOLE, MouseEventStateName.MouseRightButtonUp, e.Location)); } }
public void SetFlowB(SceneName name1) { this.flowB = name1; //アライブ { TimedB_MouseCapture timeB = ((TimedB_MouseCapture)this.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(name1, Shape_CanvasImpl.WINDOW_NAME_SHOGIBAN, MouseEventStateName.Arive, Point.Empty)); } }
private void Uc_Form2Main_MouseDown(object sender, MouseEventArgs e) { MainGui_Csharp shogibanGui = ((Form2_Console)this.ParentForm).Form1_Shogi.Uc_Form1Main.MainGui; if (null == shogibanGui.Shape_PnlTaikyoku) { goto gt_EndMethod; } // このメインパネルに、何かして欲しいという要求は、ここに入れられます。 shogibanGui.RepaintRequest = new RepaintRequestImpl(); if (e.Button == MouseButtons.Left) { //------------------------------------------------------------ // 左ボタン //------------------------------------------------------------ TimedB_MouseCapture timeB = ((TimedB_MouseCapture)shogibanGui.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(shogibanGui.Scene, Shape_CanvasImpl.WINDOW_NAME_CONSOLE, MouseEventStateName.MouseLeftButtonDown, e.Location)); } else if (e.Button == MouseButtons.Right) { //------------------------------------------------------------ // 右ボタン //------------------------------------------------------------ TimedB_MouseCapture timeB = ((TimedB_MouseCapture)shogibanGui.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(shogibanGui.Scene, Shape_CanvasImpl.WINDOW_NAME_CONSOLE, MouseEventStateName.MouseRightButtonDown, e.Location)); //------------------------------ // このメインパネルの反応 //------------------------------ shogibanGui.Response("MouseOperation"); } else { //------------------------------ // このメインパネルの反応 //------------------------------ shogibanGui.Response("MouseOperation"); } gt_EndMethod: ; }
/// <summary> /// ************************************************************************************************************************ /// マウスのボタンを押下したときの挙動です。 /// ************************************************************************************************************************ /// /// マウスボタンが押下されたときの、表示物の反応や、将棋データの変更がこの中に書かれています。 /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Uc_Form1Main_MouseDown(object sender, MouseEventArgs e) { if (null == this.MainGui.Shape_PnlTaikyoku) { goto gt_EndMethod; } // このメインパネルに、何かして欲しいという要求は、ここに入れられます。 this.MainGui.RepaintRequest = new RepaintRequestImpl(); if (e.Button == MouseButtons.Left) { //------------------------------------------------------------ // 左ボタン //------------------------------------------------------------ TimedB_MouseCapture timeB = ((TimedB_MouseCapture)this.MainGui.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(this.MainGui.Scene, Shape_CanvasImpl.WINDOW_NAME_SHOGIBAN, MouseEventStateName.MouseLeftButtonDown, e.Location)); } else if (e.Button == MouseButtons.Right) { //------------------------------------------------------------ // 右ボタン //------------------------------------------------------------ TimedB_MouseCapture timeB = ((TimedB_MouseCapture)this.MainGui.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(this.MainGui.Scene, Shape_CanvasImpl.WINDOW_NAME_SHOGIBAN, MouseEventStateName.MouseRightButtonDown, e.Location)); //------------------------------ // このメインパネルの反応 //------------------------------ this.MainGui.Response("MouseOperation"); } else { //------------------------------ // このメインパネルの反応 //------------------------------ this.MainGui.Response("MouseOperation"); } gt_EndMethod: ; }
/// <summary> /// ************************************************************************************************************************ /// マウスが動いたときの挙動です。 /// ************************************************************************************************************************ /// /// マウスが重なったときの、表示物の反応や、将棋データの変更がこの中に書かれています。 /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Uc_Form1Main_MouseMove(object sender, MouseEventArgs e) { if (null != this.MainGui.Shape_PnlTaikyoku) { // このメインパネルに、何かして欲しいという要求は、ここに入れられます。 this.MainGui.RepaintRequest = new RepaintRequestImpl(); // マウスムーブ { TimedB_MouseCapture timeB = ((TimedB_MouseCapture)this.MainGui.TimedB_MouseCapture); timeB.MouseEventQueue.Enqueue( new MouseEventState(this.MainGui.Scene, Shape_CanvasImpl.WINDOW_NAME_SHOGIBAN, MouseEventStateName.MouseMove, e.Location)); } //------------------------------ // このメインパネルの反応 //------------------------------ this.MainGui.Response("MouseOperation"); } }