/// <summary> /// Called when navigation to a content fragment begins. /// </summary> /// <param name="e">An object that contains the navigation data.</param> public void OnFragmentNavigation(FragmentNavigationEventArgs e) { FragmentManager fm = new FragmentManager(e.Fragment); string testCaseIdStr = fm.Get("id"); if (!string.IsNullOrEmpty(testCaseIdStr)) { int testCaseId = int.Parse(testCaseIdStr); this.AssociateTestViewModel = new AssociateTestViewModel(testCaseId); } string suiteId = fm.Get("suiteId"); if (!string.IsNullOrEmpty(suiteId)) { this.AssociateTestViewModel.TestSuiteId = int.Parse(suiteId); } string createNew = fm.Get("createNew"); if (!string.IsNullOrEmpty(createNew)) { this.AssociateTestViewModel.CreateNew = bool.Parse(createNew); } string duplicate = fm.Get("duplicate"); if (!string.IsNullOrEmpty(duplicate)) { this.AssociateTestViewModel.Duplicate = bool.Parse(duplicate); } this.DataContext = this.AssociateTestViewModel; this.cbTestType.SelectedIndex = 0; }
/// <summary> /// Initializes the URL parameters. /// </summary> /// <param name="e">The <see cref="FragmentNavigationEventArgs"/> instance containing the event data.</param> private void InitializeUrlParameters(FragmentNavigationEventArgs e) { FragmentManager fm = new FragmentManager(e.Fragment); string loadTestCasesStr = fm.Get("loadTestCases"); if (!string.IsNullOrEmpty(loadTestCasesStr)) { this.loadTestCases = bool.Parse(loadTestCasesStr); } string loadSpecificTestCasesStr = fm.Get("loadSpecificTestCases"); if (!string.IsNullOrEmpty(loadSpecificTestCasesStr)) { this.loadSpecificTestCases = bool.Parse(loadSpecificTestCasesStr); } }
/// <summary> /// Called when navigation to a content fragment begins. /// </summary> /// <param name="e">An object that contains the navigation data.</param> public void OnFragmentNavigation(FragmentNavigationEventArgs e) { FragmentManager fm = new FragmentManager(e.Fragment); string suiteIdStr = fm.Get("suiteId"); if (!string.IsNullOrEmpty(suiteIdStr)) { this.suiteId = int.Parse(suiteIdStr); } }
/// <summary> /// Called when navigation to a content fragment begins. /// </summary> /// <param name="e">An object that contains the navigation data.</param> public void OnFragmentNavigation(FragmentNavigationEventArgs e) { FragmentManager fm = new FragmentManager(e.Fragment); string skipAutoLoadStr = fm.Get("skipAutoLoad"); if (!string.IsNullOrEmpty(skipAutoLoadStr)) { this.skipAutoLoad = bool.Parse(skipAutoLoadStr); } }
/// <summary> /// Initializes the URL parameters. /// </summary> /// <param name="e">The <see cref="FragmentNavigationEventArgs"/> instance containing the event data.</param> private void InitializeUrlParameters(FragmentNavigationEventArgs e) { this.editViewContext.CreateNew = false; this.editViewContext.Duplicate = false; FragmentManager fm = new FragmentManager(e.Fragment); string testCaseId = fm.Get("id"); if (!string.IsNullOrEmpty(testCaseId)) { this.editViewContext.TestCaseId = int.Parse(testCaseId); } string suiteId = fm.Get("suiteId"); if (!string.IsNullOrEmpty(suiteId)) { this.editViewContext.TestSuiteId = int.Parse(suiteId); } string createNew = fm.Get("createNew"); if (!string.IsNullOrEmpty(createNew)) { this.editViewContext.CreateNew = bool.Parse(createNew); } string duplicate = fm.Get("duplicate"); if (!string.IsNullOrEmpty(duplicate)) { this.editViewContext.Duplicate = bool.Parse(duplicate); } string isSharedStepStr = fm.Get("isSharedStep"); if (!string.IsNullOrEmpty(isSharedStepStr)) { this.editViewContext.IsSharedStep = bool.Parse(isSharedStepStr); } else { this.editViewContext.IsSharedStep = false; } string sharedStepIdStr = fm.Get("sharedStepId"); if (!string.IsNullOrEmpty(sharedStepIdStr)) { this.editViewContext.SharedStepId = int.Parse(sharedStepIdStr); } }