/// <summary> /// Remove session dialog if dataset is closed //13Feb2013 /// </summary> /// <param name="data"></param> private void RemoveSessionDialogs(TabItem panel) { DataSource removedds = panel.Tag as DataSource; string semiKey = removedds.FileName + removedds.Name; List <string> fullkeylist = new List <string>(); SessionDialogContainer sdc = LifetimeService.Instance.Container.Resolve <SessionDialogContainer>(); foreach (string fullkey in sdc.SessionDialogList.Keys) //collect all dialogkeys related to dataset that is currently closed { if (fullkey.Contains(semiKey)) { fullkeylist.Add(fullkey); } } //Remove items(dialogs) from dictionary // foreach (string dlgfullkey in fullkeylist) { if (sdc.SessionDialogList.ContainsKey(dlgfullkey)) //if it has that key { sdc.SessionDialogList.Remove(dlgfullkey); // then remove it } } //remove QPro dataset related details of Qpro dataset is closed QproHandler.RemoveQPDatasetInfo(removedds.Name); }
public ExportToQPro(OutputWindow owin) { InitializeComponent(); ow = owin; confService = LifetimeService.Instance.Container.Resolve <IConfigService>(); List <string> keys = QproHandler.GetKeys(); datasetcombo.ItemsSource = keys; }
private void Datasetcombo_SelectionChanged(object sender, SelectionChangedEventArgs e) { string selected = datasetcombo.SelectedValue as string; logService.WriteToLogLevel("QP Selected dataset for PUT:" + selected, LogLevelEnum.Info); QProDatasetInfo qpdsinfo = QproHandler.GetQPDatasetInfo(selected); //Note no slash at the end https://hivelabs.questionpro.com/a/api/v2 baseurltxt.Text = confService.GetConfigValueForKey("qpbaseputurl"); apikeytxt.Text = qpdsinfo.ApiKey; datasetidtxt.Text = qpdsinfo.DatasetId; surveyidtxt.Text = qpdsinfo.SurveyId; useridtxt.Text = qpdsinfo.UserId; detailsGrid.Visibility = Visibility.Visible; }