//Right Paine private void panel_Time_MouseClick(object sender, MouseEventArgs e) { //以下、アイテム選択処理 int inLineNo = this.GetLineNoFromPositionY(e.Y); ClsSystem.SetSelectFromLineNo(inLineNo); /* 一旦コメントアウト 2017/01/31 comment out by yoshi * //Flameクリック処理 * //フレーム検出 * int cx = e.X / FormControl.CELL_WIDTH; * int inLineNo = this.GetLineNoFromPositionY(e.Y); * * //注:範囲指定時は考慮 * //クリックフレームを現在のフレームに指定 * if (cx <= this.numericUpDown_MaxFrame.Value) * { * this.numericUpDown_NowFlame.Value = cx; * this.mSelect_Pos_Start.X = cx; * this.mSelect_Pos_Start.Y = inLineNo; * * this.mFormMain.Refresh(); * } * * //以下、コントロール更新処理 * this.RefreshControl(); * this.panel_Control.Refresh(); * this.panel_Time.Refresh(); * this.mFormMain.Refresh(); */ }
private void panel_Control_MouseDown(object sender, MouseEventArgs e) { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } //以下、テキストボックス削除処理 this.RemoveTextBoxName(); //以下、アイテム選択処理 int inLineNo = this.GetLineNoFromPositionY(e.Y); ClsSystem.SetSelectFromLineNo(inLineNo); if (e.Button == MouseButtons.Left) { //以下、掴んでいるエレメントを別ウィンドウで表示する処理 ClsDatItem clItem = clMotion.GetItemFromLineNo(inLineNo); if (clItem != null && clItem.mTypeItem == ClsDatItem.TYPE_ITEM.ELEM) { int inX = Cursor.Position.X; int inY = Cursor.Position.Y; this.mCatchPosStart = new Point(inX, inY); } } //以下、コントロール更新処理 this.RefreshControl(); this.panel_Control.Refresh(); this.panel_Time.Refresh(); this.mFormMain.Refresh(); }
private void panel_Control_MouseClick(object sender, MouseEventArgs e) { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } //以下、アイテム選択処理 int inLineNo = this.GetLineNoFromPositionY(e.Y); ClsSystem.SetSelectFromLineNo(inLineNo); ClsDatElem clElem = ClsSystem.GetElemFromLineNo(inLineNo); if (clElem != null) { if (inLineNo == clElem.mLineNo) { //Click Eye if (0 <= e.X && e.X < 17) { clElem.isDisplay = !clElem.isDisplay; } //Click Parent if (17 <= e.X && e.X < 34) { if (clElem.mElem != null) { clElem.isParent = !clElem.isParent; } } //Click Locked if (34 <= e.X && e.X < 51) { clElem.isLocked = !clElem.isLocked; } //Attribute Open if (51 <= e.X && e.X < 68) { clElem.isOpen = !clElem.isOpen; clMotion.RefreshLineNo(); //行番号とタブを割り振る処理 } } } //以下、コントロール更新処理 this.RefreshControl(); this.panel_Control.Refresh(); this.panel_Time.Refresh(); this.mFormMain.Refresh(); }
/// <summary> /// アイテムを選択する処理 /// </summary> /// <param name="clItem">アイテム</param> public void SetSelectFromItem(ClsDatItem clItem) { if (clItem == null) { return; } ClsSystem.SetSelectFromLineNo(clItem.mLineNo); }
private void button_ItemDown_Click(object sender, EventArgs e) { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } int inLineNo = ClsSystem.GetSelectLineNo(); if (inLineNo < 0) { return; } ClsDatItem clItem = clMotion.GetItemFromLineNo(inLineNo); if (clItem == null) { return; } if (clItem.mTypeItem != ClsDatItem.TYPE_ITEM.ELEM) { return; } //以下、一つ下に移動する処理 ClsDatElem clElem = clItem as ClsDatElem; if (clElem.mElem == null) { clMotion.MoveDown(clElem); } else { clElem.mElem.MoveElemDown(clElem); } //以下、行番号振り直し処理 clMotion.RefreshLineNo(); //以下、改めてアイテムを選択する処理 ClsSystem.SetSelectFromLineNo(clItem.mLineNo); //上記の RefreshLineNo 関数内でmLineNoが変わっているはず //以下、コントロール更新処理 this.RefreshControl(); this.panel_Control.Refresh(); this.panel_Time.Refresh(); this.mFormMain.Refresh(); }
private void panel_Time_MouseDown(object sender, MouseEventArgs e) { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } int inFrameNo = this.GetFrameNoFromPositionX(e.X); int inLineNo = this.GetLineNoFromPositionY(e.Y); //以下、現在位置を設定する処理 ClsSystem.SetSelectFromLineNo(inLineNo); ClsSystem.SetSelectFrameNo(inFrameNo); //以下、フレーム選択処理 if (inFrameNo <= this.numericUpDown_MaxFrame.Value) { this.numericUpDown_NowFlame.Value = inFrameNo; } else { this.numericUpDown_NowFlame.Value = this.numericUpDown_MaxFrame.Value - 1; } /* 一旦コメントアウト 2017/01/31 comment out by yoshi * if (e.Button == MouseButtons.Left) * { * //以下、座標情報初期化処理 * mMouseDownL = true; * mSelect_Pos_End.X = 0; * mSelect_Pos_End.Y = 0; * } */ /* 一旦コメントアウト 2017/01/31 comment out by yoshi * //if (e.Button == MouseButtons.Right) { mMouseDownR = true; } * //if (e.Button == MouseButtons.Middle) { mMouseDownM = true; } * mSelect_Pos_Start.X = e.X / FormControl.CELL_WIDTH; * mSelect_Pos_Start.Y = e.Y / FormControl.CELL_HEIGHT; */ //以下、コントロール更新処理 this.RefreshControl(); this.panel_Control.Refresh(); this.panel_Time.Refresh(); this.mFormMain.Refresh(); }
private void panel_Control_MouseDoubleClick(object sender, MouseEventArgs e) { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } //Item選択 int inLineNo = this.GetLineNoFromPositionY(e.Y); //以下、エレメント選択処理 ClsSystem.SetSelectFromLineNo(inLineNo); //Item最大数を確認 ClsDatElem clElem = ClsSystem.GetElemFromLineNo(inLineNo); if (clElem != null) { if (e.X > 69) { //以下、テキストボックス削除処理 this.RemoveTextBoxName(); //以下、テキストボックス生成処理 this.mTextBox = new TextBox(); this.mTextBox.Location = new System.Drawing.Point(69, inLineNo * FormControl.CELL_HEIGHT - 1); this.mTextBox.Font = new System.Drawing.Font("MS ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.mTextBox.MaxLength = ClsDatElem.MAX_NAME; this.mTextBox.Text = clElem.GetName(); this.mTextBox.Name = "textBox_Name"; this.mTextBox.Size = new System.Drawing.Size(80, 19); this.mTextBox.Tag = inLineNo; this.mTextBox.TabIndex = 0; this.mTextBox.Leave += new System.EventHandler(this.textBox_Name_Leave); this.mTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox_Name_KeyDown); this.panel_Control.Controls.Add(this.mTextBox); this.mTextBox.Focus(); } } //以下、コントロール更新処理 this.RefreshControl(); this.panel_Control.Refresh(); this.panel_Time.Refresh(); this.mFormMain.Refresh(); }