public ConfigurationWindowViewModel() { Address = ConfigurationService.Instance.Address; UseHttps = ConfigurationService.Instance.UseHttps; Username = ConfigurationService.Instance.Username; Password = ConfigurationService.Instance.Password; Port = ConfigurationService.Instance.Port; OpenConfigurationFile = new CustomCommand(OpenConfigFile, o => true); }
public MainWindowViewModel() { RefreshRate = RefreshRate.Ms30Seconds; WindowControlClose = Visibility.Hidden; WindowControlMinimize = Visibility.Hidden; WindowControlRefresh = Visibility.Hidden; ShowWindowControls = new CustomCommand(o => { WindowControlClose = Visibility.Visible; WindowControlMinimize = Visibility.Visible; WindowControlRefresh = Visibility.Visible; }, o => true); HideWindowControls = new CustomCommand(o => { WindowControlClose = Visibility.Hidden; WindowControlMinimize = Visibility.Hidden; WindowControlRefresh = Visibility.Hidden; }, o => true); OpenConfigDialog = new CustomCommand(OpenConfigWindow, o => true); WindowClosePressed = new CustomCommand(CloseWindow, o => true); WindowRefreshPressed = new CustomCommand(RefreshCamImagesNow, o => true); LoadData(); }