예제 #1
0
        private void transferTerminToNewDate(Panel currentPanel, Termin termin, DateTime pocetakTermina, DateTime krajTermina)
        {
            ChainAction chainAction = new ChainAction(termin);
            Termin      novi        = new Termin(pocetakTermina, krajTermina, termin.Predmet, GuiObject);

            chainAction.actions.Add(new DeleteAction(termin));

            chainAction.actions.Add(new CreateAction(novi));

            DataControllercs.addAction(chainAction);
        }
예제 #2
0
        public override Action GetReverseAction()
        {
            List <Action> reverseActions = new List <Action>(actions);
            ChainAction   reverse        = new ChainAction(o);

            reverseActions.Reverse();
            foreach (Action action in reverseActions)
            {
                reverse.actions.Add(action.GetReverseAction());
            }
            reverse.timeOfCreation = timeOfCreation;

            return(reverse);
        }