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";
 }
Beispiel #2
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";
        }
Beispiel #3
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);
       }
 }
Beispiel #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);
     }
 }
Beispiel #5
0
        private void btnImportData_Click(object sender, EventArgs e)
        {
            try
            {
                IDataExtractor result = null;

                using (var dialog = new Dialog.ImportSelectDialog())
                {
                    dialog.Filter      = "File / Folders to Import|*.*|Data File|*.csv;*.xslx";
                    dialog.Multiselect = true;
                    if (dialog.ShowDialog() == DialogResult.OK)
                    {
                        if (dialog.FileName == Utils.GetAppFilePath(AppFileType.ImportExtractor))
                        {
                            result = DataExtractorFactory.Deserialize(File.ReadAllText(dialog.FileName));
                        }
                        else if (dialog.FilterIndex == 1 || Directory.Exists(dialog.FileName))
                        {
                            result = DataExtractorFactory.Get(dialog.FileNames, ImportType.Files);
                        }
                        else
                        {
                            throw new NotSupportedException();
                        }
                    }
                }

                if (result != null)
                {
                    var mapping = new ImportMapping();
                    mapping.Extractor = result;

                    var connSelect = new ConnectionSelection();
                    connSelect.MultiSelect  = false;
                    connSelect.GoNextAction = () => _wizard.GoToStep(mapping);
                    _wizard.GoToStep(connSelect);
                }
            }
            catch (Exception ex)
            {
                Utils.HandleError(ex);
            }
        }
Beispiel #6
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);
     }
 }
        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);
              }
        }
Beispiel #8
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);
            }
        }
Beispiel #9
0
        private void btnImportData_Click(object sender, EventArgs e)
        {
            try
              {
            IDataExtractor result = null;

            using (var dialog = new Dialog.ImportSelectDialog())
            {
              dialog.Filter = "File / Folders to Import|*.*|Data File|*.csv;*.xslx";
              dialog.Multiselect = true;
              if (dialog.ShowDialog() == DialogResult.OK)
              {
            if (dialog.FileName == Utils.GetAppFilePath(AppFileType.ImportExtractor))
            {
              result = DataExtractorFactory.Deserialize(File.ReadAllText(dialog.FileName));
            }
            else if (dialog.FilterIndex == 1 || Directory.Exists(dialog.FileName))
            {
              result = DataExtractorFactory.Get(dialog.FileNames, ImportType.Files);
            }
            else
            {
              throw new NotSupportedException();
            }
              }
            }

            if (result != null)
            {
              var mapping = new ImportMapping();
              mapping.Extractor = result;

              var connSelect = new ConnectionSelection();
              connSelect.MultiSelect = false;
              connSelect.GoNextAction = () => _wizard.GoToStep(mapping);
              _wizard.GoToStep(connSelect);
            }
              }
              catch (Exception ex)
              {
            Utils.HandleError(ex);
              }
        }
 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);
       }
 }