/// <summary> /// Adds any missing adapters for example if any were added since last run /// </summary> public void RefreshAdapters() { List <string> adapters = BizTalkHelper.GetAdapters(); //Add missing adapters foreach (string adapter in adapters) { if (!BizTalkHost.ContainsHandler(adapter, this.SendHandlers)) { this.SendHandlers.Add(new BizTalkAdapterHandler(adapter)); } if (!BizTalkHost.ContainsHandler(adapter, this.ReceiveHandlers)) { this.ReceiveHandlers.Add(new BizTalkAdapterHandler(adapter)); } } }
void RefreshPreRequsites() { if (_hasRefreshed) { btnNext.IsEnabled = true; return; } try { _bizTalkHelper = new BizTalkHelper(txtServer1.Text, txtMgmtDb1.Text); _perflogHelper = new PerflogHelper(_bizTalkHelper.GetServers(txtServer1.Text, txtMgmtDb1.Text)); //Check for CollectorSets bool isDataCollectorSetsCreated; if (!(bool)chbCheckPrerequsites.IsChecked) { isDataCollectorSetsCreated = true; } else { isDataCollectorSetsCreated = _perflogHelper.IsDataCollectorSetsCreated; } DoEvents(); picInstallCollectorSet.Source = isDataCollectorSetsCreated ? new System.Windows.Media.Imaging.BitmapImage(new Uri("pack://application:,,,/BizTalk Benchmark Wizard;component/Resources/Images/passed.png")) : new System.Windows.Media.Imaging.BitmapImage(new Uri("pack://application:,,,/BizTalk Benchmark Wizard;component/Resources/Images/checklist.png")); btnCreateCollectors.Visibility = isDataCollectorSetsCreated ? Visibility.Hidden : Visibility.Visible; btnCreateCollectors.IsEnabled = isDataCollectorSetsCreated ? false : true; chbStartCollectorSets.IsEnabled = isDataCollectorSetsCreated ? true : false; //Check for BizTalk Scenarios bool isBizTalkScenariosInstalled; if (!(bool)chbCheckPrerequsites.IsChecked) { isBizTalkScenariosInstalled = true; } else { isBizTalkScenariosInstalled = _bizTalkHelper.IsBizTalkScenariosInstalled; } DoEvents(); picInstalledScenario.Source = isBizTalkScenariosInstalled ? new System.Windows.Media.Imaging.BitmapImage(new Uri("pack://application:,,,/BizTalk Benchmark Wizard;component/Resources/Images/passed.png")) : new System.Windows.Media.Imaging.BitmapImage(new Uri("pack://application:,,,/BizTalk Benchmark Wizard;component/Resources/Images/checklist.png")); _btsServers = new List <string>(); foreach (Server s in _bizTalkHelper.GetServers(txtServer1.Text, txtMgmtDb1.Text).Where(s => s.Type == ServerType.BIZTALK)) { _btsServers.Add(s.Name); } HostMappings = _bizTalkHelper.GetHostMappings(); DoEvents(); this.lstHosts.DataContext = (IEnumerable <HostMaping>)HostMappings; WaitPanel.Visibility = Visibility.Collapsed; if (isBizTalkScenariosInstalled) { btnNext.IsEnabled = true; lblInstalledScenarioManual.Visibility = Visibility.Hidden; } else { InstallInstructions.Visibility = Visibility.Visible; } btnBack.IsEnabled = true; _hasRefreshed = true; } catch (Exception ex) { string msg = "There where a problem connecting to the database.\nMessage:\n" + ex.Message; if (ex.InnerException != null) { msg += "\n\nInner Exception:\n" + ex.InnerException.Message; } txtException.Text = msg; PopupException.IsOpen = true; } finally { this.Cursor = null; } }
public ReceiveLocationCreateStep() { _catalog = BizTalkHelper.GetBtsCatalogExplorer(); }