public SettingsModel() { this.LbHandlers = new ObservableCollection <string>(); this.communication = CommunicationSingleton.Instance; this.communication.InMessage += IncomingMessage; this.communication.Read(); }
/// <summary> /// Constructor /// </summary> public Logs() { Communication = CommunicationSingleton.Instance; Communication.InMessage += UpdateAction; Communication.Read(); LogItems = new List <Log>(); CommandRecievedEventArgs args = new CommandRecievedEventArgs((int)CommandEnum.LogCommand, null, ""); Communication.Write(args); }
public Config() { Communication = CommunicationSingleton.Instance; Communication.Read(); Communication.InMessage += UpdateResponse; SourceName = ""; LogName = ""; OutputDirectory = ""; ThumbnailSize = 1; Handlers = new ObservableCollection <string>(); Enabled = false; string[] arr = new string[5]; CommandRecievedEventArgs command = new CommandRecievedEventArgs((int)CommandEnum.GetConfigCommand, arr, ""); Communication.Write(command); }
/// <summary> /// Constructor /// </summary> public SettingsModel() { //get instance of communication this.Communication = CommunicationSingleton.Instance; //sign to InMessage this.Communication.Read(); this.Communication.InMessage += UpdateSettings; //create list of handelrs this.LbHandlers = new ObservableCollection <string>(); Object settingsLock = new Object(); BindingOperations.EnableCollectionSynchronization(LbHandlers, settingsLock); //write GetConfigCommand to server string[] arr = new string[5]; CommandRecievedEventArgs command = new CommandRecievedEventArgs((int)CommandEnum.GetConfigCommand, arr, ""); this.Communication.Write(command); }