public void DoBus()
 {
     Splash sp = new Splash();
     try
     {
         sp.Show();
         DownloadWindow win = new DownloadWindow(_wizard);
         _wizard.DownloadOpenEngSb(false);
         sp.Close();
         win.ShowDialog();
         _wizard.ExecuteBus();
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
     finally
     {
         sp.Close();
     }
 }
        private void buttonBridge_Click(object sender, RoutedEventArgs e)
        {
            if (_wizard.Configuration.BridgeRepo == null)
            {
                MessageBox.Show("Configure repository first!");
                return;
            }

            WizardConfiguration originalConf = _wizard.Configuration;
            _wizard.Configuration = new WizardConfiguration();
            _wizard.Configuration.Repositories = new List<Repository>();
            _wizard.Configuration.BridgeRepo = originalConf.BridgeRepo;
            _wizard.Configuration.BridgeRepo.GroupIds = new string[] { textboxBridgeId.Text };
            _wizard.Configuration.Repositories.Add(_wizard.Configuration.BridgeRepo);

            Splash splash = new Splash();
            splash.Show();
            BrowserWindow browser = new BrowserWindow(_wizard, (string s) => s.ToLower().EndsWith(".zip"));
            splash.Close();
            if (!browser.ShowDialog().Value)
                return;

            IList<Item> items = _wizard.Items;
            if (items == null)
                return;

            if (items.Count <= 0)
                return;

            Item item = items.First();
            item.Path = System.IO.Path.Combine(_wizard.Configuration.ArtifactFolder, item.Name);

            _wizard.Configuration = originalConf;
            _wizard.Configuration.BridgePath = item.Path;
            _wizard.Configuration.BridgeUrl = item.Url;
            labelBridge.Content = _wizard.Configuration.BridgeUrl;
            labelBridgePath.Content = _wizard.Configuration.BridgePath;
        }
        public void DownloadBridge(bool overwrite)
        {
            Splash sp = new Splash();
            try
            {

                sp.Show();
                DownloadWindow win = new DownloadWindow(_wizard);
                _wizard.DownloadBridge(overwrite);
                sp.Close();
                win.ShowDialog();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
            finally
            {
                sp.Close();
            }
        }
        private void resetSteps()
        {
            _wizard.WizardSteps.Clear();

            Splash sp = new Splash();
            try
            {
                sp.Show();
                _wizard.WizardSteps.Add(new BrowserWindow(_wizard, null));
                _wizard.WizardSteps.Add(new DownloadWindow(_wizard));
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
            finally
            {
                sp.Close();
            }
        }