Ejemplo n.º 1
0
 /// <summary>
 /// Constructor for the LogModel class
 /// </summary>
 public LogModel()
 {
     Logs   = new ObservableCollection <LogMessage>();
     client = CommunicationSingleton.Instance;
     client.MessageArrived += ProcessMessage;
     client.SendCommandToServer(CommandEnum.LogRequest, new string[] { });
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor for SettingsModel class
 /// </summary>
 public SettingsModel()
 {
     Handlers = new ObservableCollection <string>();
     client   = CommunicationSingleton.Instance;
     client.MessageArrived += ProcessMessage;
     client.SendCommandToServer(CommandEnum.GetConfigCommand, new string[] { });
 }
        private void OnRemove(object obj)
        {
            string[] args = { this.model.SelectedItem.ToString() };
            this.model.Handlerslist.Remove(this.model.SelectedItem);
            CommandRecievedEventArgs command = new CommandRecievedEventArgs((int)CommandEnum.CommandEnum.CloseCommand, args, null);
            string str = JsonConvert.SerializeObject(command);

            CommunicationSingleton.Write(str);
        }