예제 #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 processor = new ProcessFiles();
            var prog      = new ProgressStep <ProcessFiles>(processor);

            prog.MethodInvoke = e =>
            {
                e.Execute(_mergeData.Unfiltered, _mergeOp);
            };
            prog.GoNextAction = () => _wizard.GoToStep(this);
            _wizard.GoToStep(prog);
        }
예제 #3
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);
     }
 }
예제 #4
0
        private void btnCompare_Click(object sender, EventArgs e)
        {
            try
            {
                var currInstall = _wizard.InstallScript;
                var refs        = (from i in _wizard.InstallScript.Lines
                                   where i.Reference != null && i.Type == InstallType.Create
                                   select i.Reference);

                var connStep = new ConnectionSelection();
                connStep.MultiSelect  = false;
                connStep.GoNextAction = () =>
                {
                    var prog = new ProgressStep <ExportProcessor>(_wizard.ExportProcessor);
                    prog.MethodInvoke = p =>
                    {
                        _wizard.InstallScript           = new InstallScript();
                        _wizard.InstallScript.ExportUri = new Uri(_wizard.ConnectionInfo.First().Url);
                        _wizard.InstallScript.ExportDb  = _wizard.ConnectionInfo.First().Database;
                        _wizard.InstallScript.Lines     = Enumerable.Empty <InstallItem>();
                        p.Export(_wizard.InstallScript, refs);
                    };
                    prog.GoNextAction = () => {
                        var compare = new Compare();
                        compare.BaseInstall = currInstall;
                        _wizard.GoToStep(compare);
                    };

                    _wizard.GoToStep(prog);
                };
                _wizard.GoToStep(connStep);
                _wizard.NextLabel = "&Export Compare";
            }
            catch (Exception ex)
            {
                Utils.HandleError(ex);
            }
        }