public MoveStateCommand(EffectManager manager, string exp, int beforeframe, int newframe, TimeLine.KeyOperationMode opmode, SelectedManager selectedmanager) : base(manager, exp) { this.beforeframe = beforeframe; this.newframe = newframe; this.opmode = opmode; this.selectedmanager = selectedmanager; }
public void MoveState(int beforeframe, int newframe, TimeLine.KeyOperationMode opmode) { if (beforeframe == 0) { return; } try { var be = canvasDock.SelectedManager.Effect as BaseEffect; var name = Path.GetFileNameWithoutExtension(be.Filename); var msc = new MoveStateCommand(canvasDock.EffectManager, state + (opmode == TimeLine.KeyOperationMode.LeftMoveOnly || opmode == TimeLine.KeyOperationMode.RightMoveOnly ? fix : "") + move + name, beforeframe, newframe, opmode, canvasDock.SelectedManager); //msc.Execute(); historyDock.CommandManager.AddCommand(msc); } catch (Exception e) { MessageBox.Show(e.Message); } }