コード例 #1
0
        public void GoNext()
        {
            if (_items.Any(i => i.HasChanges))
            {
                var prog = new ProgressStep <ExportProcessor>(_wizard.ExportProcessor);
                prog.MethodInvoke = e =>
                {
                    _wizard.InstallScript.Lines = Enumerable.Empty <InstallItem>();
                    e.Export(_wizard.InstallScript,
                             e.NormalizeRequest(from i in _items
                                                where i.Type == InstallType.Create && i.Item.Reference.Type != "Member"
                                                select i.Item.Reference));
                };
                prog.GoNextAction = () => _wizard.GoToStep(new ExportResolve());
                _wizard.GoToStep(prog);
            }
            else
            {
                if (_changes)
                {
                    _wizard.InstallScript.Lines = _items.Select(i => i.Item).ToList();
                }

                _wizard.GoToStep(new ExportOptions());
            }
        }
コード例 #2
0
        public void GoNext()
        {
            var connStep = new ConnectionSelection();

            connStep.MultiSelect  = true;
            connStep.GoNextAction = () =>
            {
                _wizard.GoToStep(new InstallProgress());
            };
            _wizard.GoToStep(connStep);
            _wizard.NextLabel = "&Install";
        }
コード例 #3
0
        public void GoNext()
        {
            _wizard.InstallScript.AddPackage = chkAddPackage.Checked;
            var connStep = new ConnectionSelection();

            connStep.MultiSelect  = true;
            connStep.GoNextAction = () =>
            {
                _wizard.GoToStep(new InstallProgress());
            };
            _wizard.GoToStep(connStep);
            _wizard.NextLabel = "&Install";
        }
コード例 #4
0
 private void btnCreate_Click(object sender, EventArgs e)
 {
     try
     {
         var connSelect = new ConnectionSelection();
         connSelect.MultiSelect  = false;
         connSelect.GoNextAction = () => _wizard.GoToStep(new ExportSelect());
         _wizard.GoToStep(connSelect);
     }
     catch (Exception ex)
     {
         Utils.HandleError(ex);
     }
 }
コード例 #5
0
        public void GoNext()
        {
            var connStep = new ConnectionSelection();

            connStep.MultiSelect  = true;
            connStep.GoNextAction = async() =>
            {
                if (_createInstallScript != null)
                {
                    _wizard.InstallScript = await _createInstallScript.Invoke();
                }
                _wizard.GoToStep(new InstallProgress());
            };
            _wizard.GoToStep(connStep);
            _wizard.NextLabel = "&Install";
        }
コード例 #6
0
        private void GetPatchPackage(InstallScript start, InstallScript dest)
        {
            var docs = new List <Tuple <XmlDocument, string> >();

            ProgressDialog.Display(this, d =>
            {
                start.WriteAmlMergeScripts(dest, (path, prog) =>
                {
                    d.SetProgress(prog);
                    var doc = new XmlDocument();
                    docs.Add(Tuple.Create(doc, path));
                    return(new XmlNodeWriter(doc));
                });
            });

            var items = docs
                        .Where(d => d.Item1.DocumentElement != null)
                        .SelectMany(d => XmlUtils.RootItems(d.Item1.DocumentElement)
                                    .Select(i => InstallItem.FromScript(i, d.Item2)))
                        .ToArray();

            _wizard.InstallScript = new InstallScript()
            {
                Lines = items
            };
            _wizard.GoToStep(new ExportOptions());
        }
コード例 #7
0
        public void GoNext()
        {
            var compare = new Compare();

            compare.BaseInstall   = InnovatorPackage.Load(leftPath.Text).Read();
            _wizard.InstallScript = InnovatorPackage.Load(rightPath.Text).Read();
            _wizard.GoToStep(compare);
        }
コード例 #8
0
        public void GoNext()
        {
            var compare = new Compare();

            compare.BaseInstall   = Package.Create(leftPath.Text).Single().Read();
            _wizard.InstallScript = Package.Create(rightPath.Text).Single().Read();
            _wizard.GoToStep(compare);
        }
コード例 #9
0
 public void GoNext()
 {
     if (_selectedRefs.Any())
     {
         var prog = new ProgressStep <ExportProcessor>(_wizard.ExportProcessor);
         prog.MethodInvoke = e => {
             _wizard.InstallScript           = _existingScript ?? new InstallScript();
             _wizard.InstallScript.ExportUri = new Uri(_wizard.ConnectionInfo.First().Url);
             _wizard.InstallScript.ExportDb  = _wizard.ConnectionInfo.First().Database;
             _wizard.InstallScript.Lines     = Enumerable.Empty <InstallItem>();
             e.Export(_wizard.InstallScript, _selectedRefs, chkDependencies.Checked);
         };
         prog.GoNextAction = () => _wizard.GoToStep(new ExportResolve());
         _wizard.GoToStep(prog);
     }
     else
     {
         Dialog.MessageDialog.Show(resources.Messages.SelectItemsExport);
     }
 }
コード例 #10
0
 private void btnInstall_Click(object sender, EventArgs e)
 {
     try
     {
         if (FlushMetadata())
         {
             var connStep = new ConnectionSelection();
             connStep.MultiSelect  = true;
             connStep.GoNextAction = () =>
             {
                 _wizard.GoToStep(new InstallProgress());
             };
             _wizard.GoToStep(connStep);
             _wizard.NextLabel = "&Install";
         }
     }
     catch (Exception ex)
     {
         Utils.HandleError(ex);
     }
 }
コード例 #11
0
 void _timer_Tick(object sender, EventArgs e)
 {
     try
     {
         if (_ex == null)
         {
             _connections.RemoveAt(0);
             if (!StartInstall(false))
             {
                 _wizard.GoToStep(new InstallComplete());
             }
         }
         else
         {
             Utils.HandleError(_ex);
         }
         _timer.Enabled = false;
     }
     catch (Exception ex)
     {
         Utils.HandleError(ex);
     }
 }
コード例 #12
0
 public void GoNext()
 {
     _wizard.GoToStep(new Welcome());
 }
コード例 #13
0
 void _timer_Tick(object sender, EventArgs e)
 {
     UnLink();
     _wizard.GoToStep(new ImportComplete());
     _timer.Enabled = false;
 }