private void LoadConfiguration() { WindowSettings winConfig = this.GetWindowsSettings(); this.cmBDiscoveryServiceUrl.Text = winConfig.GetValueString(paramDiscoveryServiceUrl); { var temp = winConfig.GetValueString(paramDiscoveryServiceUser); if (!string.IsNullOrEmpty(temp) && Guid.TryParse(temp, out Guid userId) ) { var user = this._crmConfig.Users.FirstOrDefault(u => u.UserId == userId); if (user != null) { if (cmBDiscoveryServiceUser.Items.Contains(user)) { cmBDiscoveryServiceUser.SelectedItem = user; } } } } }
private void LoadConfiguration() { WindowSettings winConfig = this.GetWindowsSettings(); this.txtBEntityName.Text = winConfig.GetValueString(paramEntityName); this.txtBMessageFilter.Text = winConfig.GetValueString(paramMessage); this.txtBPluginTypeFilter.Text = winConfig.GetValueString(paramPluginTypeName); this.chBStagePreValidation.IsChecked = winConfig.GetValueBool(paramPreValidationStage).GetValueOrDefault(); this.chBStagePre.IsChecked = winConfig.GetValueBool(paramPreStage).GetValueOrDefault(); this.chBStagePostSync.IsChecked = winConfig.GetValueBool(paramPostSynchStage).GetValueOrDefault(); this.chBStagePostAsync.IsChecked = winConfig.GetValueBool(paramPostAsynchStage).GetValueOrDefault(); { var temp = winConfig.GetValueString(paramView); if (!string.IsNullOrEmpty(temp)) { if (Enum.TryParse <View>(temp, out View tempView)) { this._currentView = tempView; this.IncreaseInit(); rBViewByEntity.IsChecked = rBViewByAssembly.IsChecked = rBViewByMessage.IsChecked = false; switch (this._currentView) { case View.ByAssembly: rBViewByAssembly.IsChecked = true; break; case View.ByMessage: rBViewByMessage.IsChecked = true; break; case View.ByEntity: default: rBViewByEntity.IsChecked = true; break; } this.DecreaseInit(); } } } }
private void LoadConfiguration() { WindowSettings winConfig = this.GetWindowsSettings(); if (string.IsNullOrEmpty(this.cmBEntityName.Text) && string.IsNullOrEmpty(this.txtBMessageFilter.Text) ) { this.cmBEntityName.Text = winConfig.GetValueString(paramEntityName); this.txtBMessageFilter.Text = winConfig.GetValueString(paramMessage); } { var temp = winConfig.GetValueString(paramView); if (!string.IsNullOrEmpty(temp)) { if (Enum.TryParse <View>(temp, out View tempView)) { this._currentView = tempView; this.IncreaseInit(); rBViewByEntity.IsChecked = rBViewByMessage.IsChecked = false; switch (this._currentView) { case View.ByMessage: rBViewByMessage.IsChecked = true; break; case View.ByEntity: default: rBViewByEntity.IsChecked = true; break; } this.DecreaseInit(); } } } }