private void OnCreateSessionTokenCompleted(object sender, CreateSessionTokenCompletedEventArgs e) { if (e.Error == null) { CSISystemContext.Token = e.Result; CSISystemContext.SavedUser = UserEdit.Text; CSISystemContext.SavedPassword = PasswordEdit.Text; CSISystemContext.SaveUser = SaveUserSwitch.Checked; CSISystemContext.SavePassword = SavePasswordSwitch.Checked; CSISystemContext.Configuration = (string)ConfigurationEdit.SelectedItem; CSISystemContext.WriteConfigurations(); if (!string.IsNullOrEmpty(CSISystemContext.Token)) { GetParmInfor(); } } else { WriteErrorLog(e.Error); ErrorText.Text = CSIBaseInvoker.TranslateError(e.Error); ErrorText.Visibility = ViewStates.Visible; } ShowProgressBar(false); }
private void SaveConfiguration() { CSISystemContext.CSIWebServerName = CSIWebServerEdit.Text; CSISystemContext.Configuration = (string)ConfigurationSpinner.SelectedItem; CSISystemContext.Theme = InterpretThemeValue((string)ThemeSpinner.SelectedItem); CSISystemContext.SavedUser = UserEdit.Text; CSISystemContext.SavedPassword = PasswordEdit.Text; CSISystemContext.EnableHTTPS = EnableHTTPSSwitch.Checked; CSISystemContext.UseRESTForRequest = UseRESTForRequestSwitch.Checked; CSISystemContext.LoadPicture = LoadPictureSwitch.Checked; CSISystemContext.ForceAutoPost = ForceAutoPostSwitch.Checked; CSISystemContext.ShowSuccessMessage = ShowSuccessMessageSwitch.Checked; CSISystemContext.RecordCap = RecordCapEdit.Text; CSISystemContext.SaveUser = SaveUserSwitch.Checked; CSISystemContext.SavePassword = SavePasswordSwitch.Checked; CSISystemContext.WriteConfigurations(); }