private void Init() { //ConnecitonDetailsPage Binding if (WorkSpace.Instance.UserProfile.SourceControlURL == null) { WorkSpace.Instance.UserProfile.SourceControlURL = ""; } SourceControlClassComboBox.Init(WorkSpace.Instance.UserProfile, nameof(UserProfile.SourceControlType), typeof(SourceControlBase.eSourceControlType), SourceControlClassComboBox_SelectionChanged); SourceControlClassComboBox.ComboBox.Items.RemoveAt(0);//removing the NONE option from user selection //ProjectPage Binding. GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(SourceControlLocalFolderTextBox, TextBox.TextProperty, mSourceControl, nameof(SourceControlBase.SourceControlLocalFolder)); if (String.IsNullOrEmpty(WorkSpace.Instance.UserProfile.SourceControlLocalFolder)) { // Default local solutions folder mSourceControl.SourceControlLocalFolder = @"C:\GingerSourceControl\Solutions\"; } GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ConfigureProxyCheckBox, CheckBox.IsCheckedProperty, mSourceControl, nameof(SourceControlBase.SourceControlConfigureProxy)); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ProxyAddressTextBox, TextBox.TextProperty, mSourceControl, nameof(SourceControlBase.SourceControlProxyAddress)); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ProxyPortTextBox, TextBox.TextProperty, mSourceControl, nameof(SourceControlBase.SourceControlProxyPort)); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(txtConnectionTimeout, TextBox.TextProperty, mSourceControl, nameof(SourceControlBase.SourceControlTimeout)); SolutionsGrid.btnRefresh.AddHandler(Button.ClickEvent, new RoutedEventHandler(RefreshGrid)); if (mSourceControl.GetSourceControlType == SourceControlBase.eSourceControlType.GIT) { xBranchesCombo.ItemsSource = SourceControlIntegration.GetBranches(mSourceControl); } GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xBranchesCombo, ComboBox.TextProperty, mSourceControl, nameof(SourceControlBase.SourceControlBranch)); }
private void FetchBranches_Click(object sender, RoutedEventArgs e) { xProcessingIcon.Visibility = Visibility.Visible; xBranchesCombo.ItemsSource = SourceControlIntegration.GetBranches(mSourceControl); if (xBranchesCombo.Items.Count > 0) { xBranchesCombo.SelectedIndex = 0; } xProcessingIcon.Visibility = Visibility.Collapsed; }