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(); }
private void ToolStripMenuItem_AddKeyFrame_Click(object sender, EventArgs e) { int inIndex = (int)this.numericUpDown_NowFlame.Value; if (inIndex <= 0) { return; //0フレーム目には作成できない } ClsDatMotion clMotion = ClsSystem.GetSelectMotion(); if (clMotion == null) { return; } ClsDatOption clOption = ClsSystem.GetOptionFromSelectLineNo(); if (clOption == null) { return; } //以下、キーフレーム作成・更新処理 ClsDatElem clElem = clOption.mElemParent; bool isParentFlag = ClsParam.GetDefaultParentFlag(clElem.mElem, clOption.mTypeOption); //以下、現在の値を取得する処理 object clValue1 = clOption.GetValue1(inIndex); object clValue2 = clOption.GetValue2(inIndex); ClsDatKeyFrame clKeyFrame = new ClsDatKeyFrame(clOption.mTypeOption, inIndex, false, false, null, null, clValue1, clValue2); clOption.SetKeyFrame(inIndex, false, false, null, null, clValue1, clValue2); //存在していたら更新、存在していなかったら追加 //以下、コントロール更新処理 this.RefreshControl(); this.panel_Control.Refresh(); this.panel_Time.Refresh(); this.mFormMain.Refresh(); }