/// <summary> /// Sets the merge sources for the mergeFromComboBox. /// </summary> private void SetMergeSources(ICollection <Uri> mergeSources) { if (InvokeRequired) { SetMergeSourcesCallBack c = new SetMergeSourcesCallBack(SetMergeSources); BeginInvoke(c, new object[] { mergeSources }); return; } bool containsAtLeastOne = false; foreach (Uri u in mergeSources) { containsAtLeastOne = true; suggestedSources.Add(u.ToString()); } if (containsAtLeastOne) { UIUtils.ResizeDropDownForLongestEntry(mergeFromComboBox); } else if (MergeType == MergeWizard.MergeType.ManuallyRemove) { Message = new WizardMessage(MergeStrings.NoRevisionsToUnblock, WizardMessage.MessageType.Error); mergeFromComboBox.DropDownStyle = ComboBoxStyle.DropDownList; } ((Wizard)ParentForm).EnablePageAndButtons(true); }
/// <summary> /// Sets the merge sources for the mergeFromComboBox. /// </summary> private void SetMergeSources(ICollection<Uri> mergeSources) { if (InvokeRequired) { SetMergeSourcesCallBack c = new SetMergeSourcesCallBack(SetMergeSources); BeginInvoke(c, new object[] { mergeSources }); return; } bool containsAtLeastOne = false; foreach (Uri u in mergeSources) { containsAtLeastOne = true; suggestedSources.Add(u.ToString()); } if (containsAtLeastOne) { UIUtils.ResizeDropDownForLongestEntry(mergeFromComboBox); } else if (MergeType == MergeWizard.MergeType.ManuallyRemove) { Message = new WizardMessage(MergeStrings.NoRevisionsToUnblock, WizardMessage.MessageType.Error); mergeFromComboBox.DropDownStyle = ComboBoxStyle.DropDownList; } ((Wizard)ParentForm).EnablePageAndButtons(true); }