/// <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[] { }); }
/// <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); }