Esempio n. 1
0
        private void UndoRedoManager_CommandDone(object sender, CommandDoneEventArgs e)
        {
            if (!(DataContext is PropertyItem p))
            {
                return;
            }

            switch (e.CommandDoneType)
            {
            case CommandDoneType.Undo:
                if (e.Caption == p.PropertyName)
                {
                    Do();
                }
                break;

            case CommandDoneType.Redo:
                if (e.Caption == p.PropertyName)
                {
                    Do();
                }
                break;
            }

            //Debug.WriteLine(string.Format("Action: [name: {0}, value: {1}, type: {2}]",
            //    p.PropertyName, p.Value, e.CommandDoneType));
        }
Esempio n. 2
0
        private void UndoManager_CommandDone(object sender, CommandDoneEventArgs e)
        {
            if (!(DataContext is PropertyItem p))
            {
                return;
            }

            switch (e.CommandDoneType)
            {
            case CommandDoneType.Undo:
                if (e.Caption == p.PropertyName)
                {
                    decimalUpDown.Value = value.Value;

                    //Debug.WriteLine(string.Format("Undo: [name: {0}, value: {1}]",
                    //    p.PropertyName, p.Value));
                }
                break;

            case CommandDoneType.Redo:
                if (e.Caption == p.PropertyName)
                {
                    decimalUpDown.Value = value.Value;

                    //Debug.WriteLine(string.Format("Redo: [name: {0}, value: {1}]",
                    //    p.PropertyName, p.Value));
                }
                break;
            }
        }
        void UndoRedoManager_CommandDone(object sender, CommandDoneEventArgs e)
        {
            undoToolStripMenuItem.Enabled = UndoRedoManager.CanUndo;
            redoToolStripMenuItem.Enabled = UndoRedoManager.CanRedo;

            RefreshGameHistory();
        }
 /// <summary>
 /// Informs the client that the command is has rejested to be down has finished,
 /// the client uses this to then make use of the data the clienthandeler pass to it
 /// whiles't knowing that the server has finished doing all that ahs benn requested of it.
 /// </summary>
 /// <param name="sender">The client.</param>
 /// <param name="e">The arguements specifing the result of the command / the info that was requested.</param>
 public void CommandDone(object sender, CommandDoneEventArgs e)
 {
     if (e.Client == null)
     {
         return;
     }
     clients[e.Client].WriteMessage  = true;
     clients[e.Client].MessageString = e.Message;
 }
        /// <summary>
        /// A function that is activated when the server finishes processing the request to close a handleler.
        /// </summary>
        /// <param name="sender">The client, originally the server, originally the service.</param>
        /// <param name="args">Data about what command was finished and how it was finished.</param>
        public void CommandDone(object sender, CommandDoneEventArgs args)
        {
            JObject Obj = JObject.Parse(args.Message);

            if ((string)Obj["type"] == "close command done" || (string)Obj["type"] == "config")
            {
                Answer         = args.Message;
                AnswerRecieved = true;
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Function that is called when a command has been completed by the server,
        /// </summary>
        /// <param name="sender">The client.</param>
        /// <param name="args">The data that was sent by the client.</param>
        public void CommandDone(object sender, CommandDoneEventArgs args)
        {
            JObject JSONObjectLogs = JObject.Parse(args.Message);

            if ((string)JSONObjectLogs["type"] == "stats")
            {
                Answer         = args.Message;
                AnswerRecieved = true;
            }
        }