public AppViewModel() { _logger = new Log("Server.Main"); _model = new ServerModel(); _model.PropertyChanged += _model_PropertyChanged; _model.LoadSetting(); foreach (var devCashier in _model.DeviceCashiers) { devCashier.Cashier.PropertyChanged += Cashier_PropertyChanged; devCashier.PropertyChanged += DevCashierOnPropertyChanged; } if (_model.Listener != null) { _model.Listener.PropertyChanged += Listener_PropertyChanged; _mainTask = _model.Start(); } _model.SoundQueue.PropertyChanged += SoundQueue_PropertyChanged; _model.SoundQueue.StartQueue(); var queueMain = _model.QueuePriorities.FirstOrDefault(q => q.Name == "Main"); if (queueMain != null) { queueMain.PropertyChanged += QueueMain_PropertyChanged; } _model.LoadStates(); //ЗАГРУЗКА НАСТРОЕК ТАБЛО HeaderBackgroundColor = new SolidColorBrush(Colors.DarkRed); HeaderFontColor = new SolidColorBrush(Colors.Black); ColorListRows = new SolidColorBrush(Colors.Azure); ColorListBackground = new SolidColorBrush(Colors.CadetBlue); ListFontColor = new SolidColorBrush(Colors.Black); CurrentFontCash = new FontSetting { FontHeader = null, FontRow = new Font(System.Drawing.FontFamily.GenericMonospace, 10), PaddingHeader = 0, PaddingRow = 0 }; CurrentFont8X2 = new FontSetting { FontHeader = new Font(System.Drawing.FontFamily.GenericMonospace, 10), FontRow = new Font(System.Drawing.FontFamily.GenericMonospace, 10), PaddingHeader = 0, PaddingRow = 0 }; CurrentFont4X4 = new FontSetting { FontHeader = new Font(System.Drawing.FontFamily.GenericMonospace, 10), FontRow = new Font(System.Drawing.FontFamily.GenericMonospace, 10), PaddingHeader = 0, PaddingRow = 0 }; var settingUi = LoadSettingUi(); ApplySetting(settingUi); //DEBUG------------- //TimerAutoTest.Elapsed += TimerAutoTest_Elapsed; //TimerAutoTest.Start(); }