Esempio n. 1
0
        private void CreateAndExecuteAction(Editroid.Actions.ItemProperty itemProperty, int value)
        {
            var action = new EditItemProperty(UndoRedoQueue, new Point(SelectedScreen.MapX, SelectedScreen.MapY), SelectedScreen, SelectedItem, itemProperty, value);

            //UndoRedoQueue.Do(action);
            Program.PerformAction(action);
        }
Esempio n. 2
0
 /// <summary>
 /// Helper method. Applies the value change specified by 'args' to the item property specified if the value is >= 0.
 /// </summary>
 /// <param name="property"></param>
 /// <param name="args"></param>
 static void SetItemValue(Editroid.Actions.ItemProperty property, ItemUiSetterArgs args)
 {
     if (args.EnteredValue >= 0)
     {
         args.EditedProperty = property;
         args.AssignedValue  = args.EnteredValue;
     }
 }