private void FormControl_Load(object sender, EventArgs e) { //以下、ウィンドウの設定 this.Location = ClsSystem.mSetting.mWindowControl.mLocation; this.Size = ClsSystem.mSetting.mWindowControl.mSize; //以下、初期化処理 ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion != null) { int inFrameNum = (int)this.numericUpDown_MaxFrame.Value; clMotion.SetMaxFrameNum(inFrameNum); } this.mFont = new Font("MS ゴシック", 10.5f); this.panel_Time.Width = CELL_WIDTH * (int)numericUpDown_MaxFrame.Value; this.panel_Time.Height = HEAD_HEIGHT * 5; this.ToolStripMenuItem_AddRotation.Tag = EnmTypeOption.ROTATION; this.ToolStripMenuItem_AddScale.Tag = EnmTypeOption.SCALE; this.ToolStripMenuItem_AddOffset.Tag = EnmTypeOption.OFFSET; this.ToolStripMenuItem_AddFlip.Tag = EnmTypeOption.FLIP; this.ToolStripMenuItem_AddTransparency.Tag = EnmTypeOption.TRANSPARENCY; this.ToolStripMenuItem_AddColor.Tag = EnmTypeOption.COLOR; this.ToolStripMenuItem_AddUserDataText.Tag = EnmTypeOption.USER_DATA; }
private void panel_list_DragDrop(object sender, DragEventArgs e) { //PNGファイル直受け入れ if (e.Data.GetDataPresent(DataFormats.FileDrop)) { //1画像 1CELL 1Element //File string[] AllPaths = (string[])e.Data.GetData(DataFormats.FileDrop); foreach (string str in AllPaths) { string ext = System.IO.Path.GetExtension(str).ToLower(); if (ext == ".png") { ClsSystem.CreateImageFromFile(str); //ImageListへ登録と更新 //CellListの表示更新 Refresh(); } } e.Effect = DragDropEffects.Copy; } else { e.Effect = DragDropEffects.None; } }
//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(); */ }
/// <summary> /// モーションのタイムライン描画処理 /// </summary> /// <param name="g">描画管理クラス</param> /// <param name="inWidth">描画先の幅</param> /// <param name="inHeight">描画先の高さ</param> public void DrawTime(Graphics g, int inWidth, int inHeight) { int inLineNo = ClsSystem.GetSelectLineNo(); int inFrameNo = ClsSystem.GetSelectFrameNo(); //以下、選択中フレームのラインを表示する処理 Brush clBrush = new SolidBrush(Color.DarkGreen); int inX = inFrameNo * FormControl.CELL_WIDTH; g.FillRectangle(clBrush, inX, 0, FormControl.CELL_WIDTH, inHeight); //以下、エレメント描画処理 int inCnt, inMax = this.mListElem.Count; for (inCnt = 0; inCnt < inMax; inCnt++) { ClsDatElem clElem = this.mListElem[inCnt]; clElem.DrawTime(g, inLineNo, inFrameNo, this.mMaxFrameNum, inWidth, inHeight); } //以下、最終フレームの境界線描画処理 Pen clPen = new Pen(Color.Green); inX = this.mMaxFrameNum * FormControl.CELL_WIDTH; g.DrawLine(clPen, inX, 0, inX, inHeight); }
/// <summary> /// 行番号からエレメントを取得する /// その行がオプションの場合は、その親のエレメントを取得する /// </summary> /// <param name="inLineNo">行番号</param> /// <returns>行番号のエレメント</returns> public static ClsDatElem GetElemFromLineNo(int inLineNo) { if (inLineNo < 0) { return(null); } ClsDatItem clItem = ClsSystem.GetItemFromLineNo(inLineNo); if (clItem == null) { return(null); } if (clItem.mTypeItem == ClsDatItem.TYPE_ITEM.ELEM) { ClsDatElem clElem = clItem as ClsDatElem; return(clElem); } else if (clItem.mTypeItem == ClsDatItem.TYPE_ITEM.OPTION) { ClsDatOption clOption = clItem as ClsDatOption; ClsDatElem clElem = clOption.mElemParent; return(clElem); } return(null); }
private void ToolStripMenuItem_Add_Click(object sender, EventArgs e) { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } ClsDatElem clElem = ClsSystem.GetElemFromSelectLineNo(); if (clElem == null) { return; } //以下、オプション追加処理 ToolStripMenuItem clITem = sender as ToolStripMenuItem; EnmTypeOption enTypeOption = (EnmTypeOption)clITem.Tag; object clValue1 = ClsParam.GetDefaultValue1(enTypeOption); object clValue2 = ClsParam.GetDefaultValue2(enTypeOption); clElem.SetOption(enTypeOption, false, false, null, null, clValue1, clValue2); //以下、行番号振り直し処理 clMotion.RefreshLineNo(); //以下、コントロール更新処理 this.RefreshControl(); this.panel_Control.Refresh(); this.panel_Time.Refresh(); this.mFormMain.Refresh(); }
private void ToolStripMenuItem_RemoveKeyframe_Click(object sender, EventArgs e) { int inIndex = (int)this.numericUpDown_NowFlame.Value; if (inIndex <= 0) { return; //0フレーム目のキーフレームは消せない } ClsDatOption clOption = ClsSystem.GetOptionFromSelectLineNo(); if (clOption == null) { return; } //以下、キーフレーム存在チェック処理 bool isExist = clOption.IsExistKeyFrame(inIndex); if (!isExist) { return; } //以下、キーフレーム削除処理 clOption.RemoveKeyFrame(inIndex); //以下、コントロール更新処理 this.RefreshControl(); this.panel_Control.Refresh(); this.panel_Time.Refresh(); this.mFormMain.Refresh(); }
/// <summary> /// 行番号からオプションを取得する /// </summary> /// <param name="inLineNo">行番号</param> /// <returns>行番号のオプション</returns> public static ClsDatOption GetOptionFromLineNo(int inLineNo) { ClsDatItem clItem = ClsSystem.GetItemFromLineNo(inLineNo); if (clItem == null) { return(null); } ClsDatOption clOption = null; bool isExist; if (clItem.mTypeItem == ClsDatItem.TYPE_ITEM.ELEM) { ClsDatElem clElem = clItem as ClsDatElem; if (clElem == null) { return(null); } isExist = clElem.mDicOption.ContainsKey(EnmTypeOption.DISPLAY); if (!isExist) { return(null); } clOption = clElem.mDicOption[EnmTypeOption.DISPLAY]; } else if (clItem.mTypeItem == ClsDatItem.TYPE_ITEM.OPTION) { clOption = clItem as ClsDatOption; } return(clOption); }
/// <summary> /// イメージインデックスを取得する /// </summary> /// <param name="clFilePath">イメージファイルパス</param> /// <returns>イメージインデックス</returns> public static int GetImageIndexFromFile(string clFilePath) { Image clImage = Bitmap.FromFile(clFilePath); int inKey = ClsSystem.GetImageIndexFromImage(clImage); return(inKey); }
private void panel_Control_MouseUp(object sender, MouseEventArgs e) { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } //以下、エレメントをドロップする処理 if (e.Button == MouseButtons.Left) { if (this.mFormDragLabel != null) { if (!this.mFormDragLabel.IsDisposed) { bool isHit = false; //以下、子供として登録する処理 ClsDatElem clElemBase = clMotion.FindElemFromMark(EnmMarkElement.IN); if (clElemBase != null) { ClsDatElem clElem = this.mFormDragLabel.GetElem(); clElemBase.AddElemChild(clElem); isHit = true; } //以下、自分の兄として登録する処理 clElemBase = clMotion.FindElemFromMark(EnmMarkElement.UP); if (clElemBase != null) { ClsDatElem clElem = this.mFormDragLabel.GetElem(); clElemBase.AddElemBigBrother(clElem); isHit = true; } //以下、行番号割り振り処理 if (isHit) { clMotion.RefreshLineNo(); } } this.mFormDragLabel.Close(); this.mFormDragLabel.Dispose(); this.mFormDragLabel = null; } //以下、マークをクリアする処理 clMotion.ClearInsertMark(); //以下、コントロール更新処理 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(); }
/// <summary> /// 同じイメージが存在するかチェックする /// </summary> /// <param name="clFilePath">イメージファイルパス</param> /// <returns>存在フラグ</returns> public static bool IsExistImageFromFile(string clFilePath) { Image clImage = Bitmap.FromFile(clFilePath); bool isExist = ClsSystem.IsExistImageFromImage(clImage); return(isExist); }
/// <summary> /// 現在選択中のアイテムを削除する /// </summary> private void RemoveItemFromSelectLineNo() { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } int inLineNo = ClsSystem.GetSelectLineNo(); if (inLineNo < 0) { return; } //以下、アイテム削除処理 clMotion.RemoveItemFromLineNo(inLineNo, false, true); //以下、行番号振り直し処理 clMotion.RefreshLineNo(); //以下、コントロール更新処理 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); }
/// <summary> /// オプションの情報を修正する処理 /// </summary> /// <param name="clParam">パラメーター情報</param> public void ChangeElemFromParam(ClsParam clParam) { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } ClsDatElem clElem = ClsSystem.GetElemFromSelectLineNo(); if (clElem == null) { return; } int inSelectFrameNo = ClsSystem.GetSelectFrameNo(); //以下、表示設定 object clValue2 = ClsParam.GetDefaultValue2(EnmTypeOption.DISPLAY); this.ChangeElem(clElem, EnmTypeOption.DISPLAY, inSelectFrameNo, clParam.mDisplayKeyFrame, false, false, null, null, clParam.mDisplay, clValue2); //以下、座標設定 this.ChangeElem(clElem, EnmTypeOption.POSITION, inSelectFrameNo, clParam.mPositionKeyFrame, clParam.mPositionXTween, clParam.mPositionYTween, clParam.mTweenPositionX, clParam.mTweenPositionY, clParam.mX, clParam.mY); //以下、回転設定 clValue2 = ClsParam.GetDefaultValue2(EnmTypeOption.ROTATION); this.ChangeElem(clElem, EnmTypeOption.ROTATION, inSelectFrameNo, clParam.mRotationKeyFrame, clParam.mRotationTween, false, clParam.mTweenRotation, null, clParam.mRZ, clValue2); //以下、スケール設定 this.ChangeElem(clElem, EnmTypeOption.SCALE, inSelectFrameNo, clParam.mScaleKeyFrame, clParam.mScaleXTween, clParam.mScaleYTween, clParam.mTweenScaleX, clParam.mTweenScaleY, clParam.mSX, clParam.mSY); //以下、オフセット設定 this.ChangeElem(clElem, EnmTypeOption.OFFSET, inSelectFrameNo, clParam.mOffsetKeyFrame, clParam.mOffsetXTween, clParam.mOffsetYTween, clParam.mTweenOffsetX, clParam.mTweenOffsetY, clParam.mCX, clParam.mCY); //以下、反転設定 this.ChangeElem(clElem, EnmTypeOption.FLIP, inSelectFrameNo, clParam.mFlipKeyFrame, false, false, null, null, clParam.mFlipH, clParam.mFlipV); //以下、透明設定 clValue2 = ClsParam.GetDefaultValue2(EnmTypeOption.TRANSPARENCY); this.ChangeElem(clElem, EnmTypeOption.TRANSPARENCY, inSelectFrameNo, clParam.mTransKeyFrame, clParam.mTransTween, false, clParam.mTweenTrans, null, clParam.mTrans, clValue2); //以下、カラー設定 clValue2 = ClsParam.GetDefaultValue2(EnmTypeOption.COLOR); this.ChangeElem(clElem, EnmTypeOption.COLOR, inSelectFrameNo, clParam.mColorKeyFrame, clParam.mColorTween, false, clParam.mTweenColor, null, clParam.mColor, clValue2); //以下、ユーザーデータ設定 clValue2 = ClsParam.GetDefaultValue2(EnmTypeOption.USER_DATA); this.ChangeElem(clElem, EnmTypeOption.USER_DATA, inSelectFrameNo, clParam.mUserDataKeyFrame, false, false, null, null, clParam.mUserData, clValue2); //以下、行番号を振り直す処理 clMotion.RefreshLineNo(); //以下、メインウィンドウ更新処理 this.mFormMain.RefreshAll(); }
/// <summary> /// イメージを作成する /// イメージファイルパスからファイルを読み込んでSystem.mListImageに追加して、インデックスを返します /// ただし、すでにSystem.mListImageに存在していた場合は、リストに追加せずに、そのインデックスを返します /// </summary> /// <param name="clFilePath">イメージファイルパス</param> /// <returns>イメージキー</returns> public static int CreateImageFromFile(string clFilePath) { Image clImage = Bitmap.FromFile(clFilePath); int inKey = ClsSystem.CreateImageFromImage(clImage); ClsDatImage clDatImage = ClsSystem.mDicImage[inKey]; clDatImage.mPath = clFilePath; return(inKey); }
/// <summary> /// モーションのコントロール描画処理 /// </summary> /// <param name="g">描画管理クラス</param> /// <param name="inWidth">描画先の幅</param> /// <param name="inHeight">描画先の高さ</param> /// <param name="clFont">フォント管理クラス</param> public void DrawControl(Graphics g, int inWidth, int inHeight, Font clFont) { int inLineNo = ClsSystem.GetSelectLineNo(); //以下、エレメント描画処理 int inCnt, inMax = this.mListElem.Count; for (inCnt = 0; inCnt < inMax; inCnt++) { ClsDatElem clElem = this.mListElem[inCnt]; clElem.DrawControl(g, inLineNo, inWidth, inHeight, clFont); } }
public void RemoveElementFromKey(int inElementKey) { ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } clMotion.RemoveElemFromIndex(inElementKey); this.RefreshAll(); }
/// <summary> /// 選択中のオプションを取得する処理 /// </summary> /// <returns>選択中のオプション</returns> public static ClsDatOption GetOptionFromSelectLineNo() { int inLineNo = ClsSystem.GetSelectLineNo(); if (inLineNo < 0) { return(null); } ClsDatOption clOption = ClsSystem.GetOptionFromLineNo(inLineNo); return(clOption); }
/// <summary> /// 選択中のアイテムを取得する処理 /// </summary> /// <returns>選択中のアイテム</returns> private static ClsDatItem GetItemFromSelectLineNo() { int inLineNo = ClsSystem.GetSelectLineNo(); if (inLineNo < 0) { return(null); } ClsDatItem clItem = ClsSystem.GetItemFromLineNo(inLineNo); return(clItem); }
private void panel_Control_Paint(object sender, PaintEventArgs e) { int inWidth = this.panel_Control.Width; int inHeight = this.panel_Control.Height; //以下、モーションのコントロール描画処理 ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion != null) { clMotion.DrawControl(e.Graphics, this.panel_Control.Width, this.panel_Control.Height, this.mFont); } }
/// <summary> /// 現在選択中のエレメントを取得する /// オプションを選択中の場合は、その親のエレメントを取得する /// </summary> /// <returns>現在選択中のエレメント</returns> public static ClsDatElem GetElemFromSelectLineNo() { int inLineNo = ClsSystem.GetSelectLineNo(); if (inLineNo < 0) { return(null); } ClsDatElem clElem = ClsSystem.GetElemFromLineNo(inLineNo); return(clElem); }
private void panel_Time_Paint(object sender, PaintEventArgs e) { //以下、モーションのコントロール描画処理 ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion != null) { int inSelectFrameNo = (int)this.numericUpDown_NowFlame.Value; ClsSystem.SetSelectFrameNo(inSelectFrameNo); clMotion.DrawTime(e.Graphics, this.panel_Time.Width, this.panel_Time.Height); } }
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_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(); }
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 MaxFrame_ValueChanged(object sender, EventArgs e) { int inFrameNum = (int)this.numericUpDown_MaxFrame.Value; ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion != null) { clMotion.SetMaxFrameNum(inFrameNum); } int inWidth = inFrameNum * FormControl.CELL_WIDTH + 1; this.panel_Time.Width = inWidth; this.panel_Time.Refresh(); }
/// <summary> /// 選択中のキーフレームを取得する処理 /// </summary> /// <returns>選択中のキーフレーム</returns> private static ClsDatKeyFrame GetKeyFrameFromSelectFrame() { ClsDatItem clItem = ClsSystem.GetItemFromSelectLineNo(); if (clItem == null) { return(null); } //以下、エレメント設定 ClsDatElem clElem = null; ClsDatOption clOption = null; if (clItem.mTypeItem == ClsDatItem.TYPE_ITEM.ELEM) { clElem = clItem as ClsDatElem; clOption = clElem.mDicOption[EnmTypeOption.DISPLAY]; } else if (clItem.mTypeItem == ClsDatItem.TYPE_ITEM.OPTION) { clOption = clItem as ClsDatOption; clElem = clOption.mElemParent; } if (clOption == null) { return(null); } int inIndex = ClsSystem.GetSelectFrameNo(); if (inIndex != 0) { bool isExist = clOption.IsExistKeyFrame(inIndex); if (!isExist) { return(null); } } //以下、キーフレーム取得処理 ClsDatKeyFrame clKeyFrame = clOption.GetKeyFrame(inIndex); return(clKeyFrame); }
/// <summary> /// 行番号からアイテムを取得する /// </summary> /// <param name="inLineNo">行番号</param> /// <returns>行番号のアイテム</returns> public static ClsDatItem GetItemFromLineNo(int inLineNo) { if (inLineNo < 0) { return(null); } ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return(null); } ClsDatItem clItem = clMotion.GetItemFromLineNo(inLineNo); return(clItem); }