private async Task Start() { try { await Services.InitializeServices(); Settings = await App.Services.Get <ISettingsService>().Load <MainApplicationSettings>(); while (ErrorDialog.Count > 0) { await Task.Delay(500); } Application.Current.Dispatcher.Invoke(() => { Window oldwindow = this.MainWindow; this.MainWindow = new ConceptMatrix.GUI.MainWindow(); this.MainWindow.Show(); oldwindow.Close(); }); } catch (Exception ex) { Log.Write(ex); } }
public async Task Start() { ISettingsService settingsService = ConceptMatrix.Services.Get <ISettingsService>(); MainApplicationSettings mainSettings = await settingsService.Load <MainApplicationSettings>(); this.SetLocale(mainSettings.Language); }
private async Task Start() { try { await Services.InitializeServices(); Services.Get <IViewService>().AddActorPage <ActorPage>("Actor", "wrench"); Settings = await App.Services.Get <ISettingsService>().Load <MainApplicationSettings>(); Settings.Changed += this.OnSettingsChanged; this.OnSettingsChanged(Settings); Application.Current.Dispatcher.Invoke(() => { Window oldwindow = this.MainWindow; this.MainWindow = new ConceptMatrix.GUI.MainWindow(); this.MainWindow.Show(); oldwindow.Close(); }); } catch (Exception ex) { Log.Write(ex); } }
public async Task Start() { ISettingsService settingsService = ConceptMatrix.Services.Get <ISettingsService>(); MainApplicationSettings mainSettings = await settingsService.Load <MainApplicationSettings>(); if (this.locales.ContainsKey(mainSettings.Language)) { this.currentLocale = this.locales[mainSettings.Language]; } else { this.currentLocale = this.fallbackLocale; } }
private void frmSettings_Load(object sender, EventArgs e) { try { _tmp_settings = new MainApplicationSettings(); _tmp_settings.WebServices = new List <MainApplicationSettings.WebServiceInfo>(); if (_tmp_settings.LoadSettings(false)[0] == ApplicationSettings.classes.common.CommonConst.Loading_Status.NOT_FOUND) { return; } if (_tmp_settings.WebServices.Count > 0) { foreach (MainApplicationSettings.WebServiceInfo wsInfo in _tmp_settings.WebServices) { WebServiceNameComboBox.Items.Add(wsInfo); } WebServiceNameComboBox.SelectedIndex = 0; MainApplicationSettings.WebServiceInfo tmpWs = (MainApplicationSettings.WebServiceInfo)WebServiceNameComboBox.SelectedItem; this.WebServiceDescriptionLabel.Text = tmpWs.WebService_Description; this.WebServiceURLLabel.Text = tmpWs.WebService_public_URL; this.WebServiceUserNameLabel.Text = tmpWs.WebService_UserName; this.WebServicePasswordLabel.Text = tmpWs.WebService_Password; this.WebServiceReturnDetailImplementationLabel.Text = tmpWs.WebService_ReturnDetail.ToString(); } SaveDBConnButton.Enabled = false; RemoveDBConnButton.Enabled = false; _newDbConnection = false; if (_tmp_settings.DBConnections != null) { if (_tmp_settings.DBConnections.Count > 0) { this.DBConnectionsComboBox.Items.Clear(); foreach (MainApplicationSettings.DBInfo dbInfo in _tmp_settings.DBConnections) { this.DBConnectionsComboBox.Items.Add(dbInfo.DBConnectionName); } this.DBConnectionsComboBox.SelectedIndex = 0; this.DBConnectionNameTextBox.Text = _tmp_settings.DBConnections[0].DBConnectionName; this.DbTypeComboBox.SelectedIndex = DbTypeComboBox.FindStringExact(_tmp_settings.DBConnections[0].DBType.ToString()); this.DBUserNameTextBox.Text = _tmp_settings.DBConnections[0].UserName; this.DBPasswordTextBox.Text = _tmp_settings.DBConnections[0].Pwd; this.OracleTNSTextBox.Text = _tmp_settings.DBConnections[0].TSNName; RemoveDBConnButton.Enabled = true; } } if (_tmp_settings.InteractionWebService != null) { this.IntWSlabelName.Text = _tmp_settings.InteractionWebService.WebService_Name; this.IntWSlabelDescr.Text = _tmp_settings.InteractionWebService.WebService_Description; this.IntWSlabelUrl.Text = _tmp_settings.InteractionWebService.WebService_public_URL; this.IntWSlabelUser.Text = _tmp_settings.InteractionWebService.WebService_UserName; this.IntWSlabelPwd.Text = _tmp_settings.InteractionWebService.WebService_Password; } if (_tmp_settings.ValidationWebService != null) { this.ValWSlabelName.Text = _tmp_settings.ValidationWebService.WebService_Name; this.ValWSlabelDescription.Text = _tmp_settings.ValidationWebService.WebService_Description; this.ValWSlabelWSUrl.Text = _tmp_settings.ValidationWebService.WebService_public_URL; this.ValWSlabelUser.Text = _tmp_settings.ValidationWebService.WebService_UserName; this.ValWSlabelPwd.Text = _tmp_settings.ValidationWebService.WebService_Password; } this.TIME_PERIODTextBox.Text = _tmp_settings.TIME_PERIOD_default_valueDomainID; this.OBS_VALUEtextBox.Text = _tmp_settings.OBS_default_valueDomainID; //Initialize provider //InitializeProviders(); } catch (Exception ex) { CommonItem.ErrManger.ErrorManagement(ex, false, this); } }