/// <summary> /// C'tor /// </summary> public LogModel() { m_logEntries = new ObservableCollection <MessageRecievedEventArgs>(); m_commands = new Dictionary <int, CommandExecute> { { (int)CommandEnum.LogCommand, SetLogEntries } }; communicationHandler = ModelCommunicationHandler.Instance; communicationHandler.DataReceived += GetCommand; MessageCommand mc = new MessageCommand(); mc.CommandID = (int)CommandEnum.LogCommand; mc.CommandMsg = ""; communicationHandler.Client.Send(mc.ToJSON()); Thread.Sleep(100); }
/// <summary> /// C'tor. /// </summary> public SettingsModel() { // need to remove this m_commands = new Dictionary <int, CommandExecute> { { (int)CommandEnum.GetConfigCommand, SetConfigSettings }, { (int)CommandEnum.CloseCommand, RemoveDir } }; communicationHandler = ModelCommunicationHandler.Instance; communicationHandler.DataReceived += GetCommand; MessageCommand mc = new MessageCommand(); mc.CommandID = (int)CommandEnum.GetConfigCommand; mc.CommandMsg = ""; communicationHandler.Client.Send(mc.ToJSON()); Thread.Sleep(1000); }