Esempio n. 1
0
        public LogModel()
        {
            client        = GUIClient.Instance();
            model_entries = new ObservableCollection <EventLogEntry>();
            //to enable non UI thread to update the collection
            BindingOperations.EnableCollectionSynchronization(model_entries, _lock);
            //enlisting for new log message event case
            client.NewMessage += UpdateLog;
            //sending request for log base
            JObject response = new JObject();

            response["commandID"] = (int)CommandEnum.LogCommand;
            client.SendMessage(response.ToString());
        }
Esempio n. 2
0
        public GameControl(IGUIClient guiClient)
        {
            this.guiClient = guiClient;
            score          = new Score();
            score.AddObserver(this);

            playTimer = new PlayTimer(this, this);
            playTimer.AddObserver(this);

            gameIsPaused = true;
            colorThemes  = new ColorThemes();

            highscore = new Highscore();
        }
Esempio n. 3
0
 /// <summary>
 /// ctor init as blank and than updating using event (different func)
 /// </summary>
 public ConfigModel()
 {
     client = GUIClient.Instance();
     //update setting on new message event
     client.NewMessage += UpdateSettings;
     //blank properties
     model_OPD = "";
     model_handlers = new ObservableCollection<string>();
     BindingOperations.EnableCollectionSynchronization(model_handlers, _lock);
     model_logName = "";
     model_source = "";
     model_thumbSize = "";
     //requesting config data
     JObject response = new JObject();
     response["commandID"] = (int)CommandEnum.GetConfigCommand;
     client.SendMessage(response.ToString());
     //waiting for update with delay
     Task.Delay(500).Wait();
 }
Esempio n. 4
0
 public HomeModel()
 {
     client = GUIClient.Instance();
 }