/// <summary> /// エレメント情報変更処理 /// </summary> /// <param name="clElem">変更対象となるエレメント</param> /// <param name="enTypeOption">オプションタイプ</param> /// <param name="inSelectFrameNo">フレーム番号</param> /// <param name="isExistKeyFrame">キーフレーム存在フラグ</param> /// <param name="isEnable1">有効フラグ1</param> /// <param name="isEnable2">有効フラグ2</param> /// <param name="clTween1">トゥイーン1</param> /// <param name="clTween2">トゥイーン2</param> /// <param name="clValue1">値1</param> /// <param name="clValue2">値2</param> private void ChangeElem(ClsDatElem clElem, EnmTypeOption enTypeOption, int inSelectFrameNo, bool isExistKeyFrame, bool isEnable1, bool isEnable2, ClsDatTween clTween1, ClsDatTween clTween2, object clValue1, object clValue2) { ClsDatOption clOption = null; if (inSelectFrameNo == 0) { clElem.SetOption(enTypeOption, isEnable1, isEnable2, clTween1, clTween2, clValue1, clValue2); } else { bool isExist = clElem.IsExistOption(enTypeOption); if (isExist) { clOption = clElem.GetOption(enTypeOption); } else { clValue1 = ClsParam.GetDefaultValue1(enTypeOption); clValue2 = ClsParam.GetDefaultValue2(enTypeOption); clElem.SetOption(enTypeOption, isEnable1, isEnable2, clTween1, clTween2, clValue1, clValue2); clOption = clElem.GetOption(enTypeOption); } if (isExistKeyFrame) { clOption.SetKeyFrame(inSelectFrameNo, isEnable1, isEnable2, clTween1, clTween2, clValue1, clValue2); //追加または更新 } else { clOption.RemoveKeyFrame(inSelectFrameNo); } } }
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(); }