Ejemplo n.º 1
0
        public WizardForm()
        {
            InitializeComponent();
            _currentStep = overviewCtrl1;

            CheckSQLMobileAssemblyPaths();
            if (!SqlMobileVer31Good)
            {
                //in this case we do not have a good path to the Compact Edition drivers
                Dialogs.SelectMobileAssembliesDialog dialog = new GLT.SqlCopy.Dialogs.SelectMobileAssembliesDialog();
                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    if (dialog.Ver31Valid)
                        GLT.SqlCopy.Properties.Settings.Default.SQLMobile30 = dialog.Ver31Path;

                    GLT.SqlCopy.Properties.Settings.Default.Save();
                }
                else
                {
                    Environment.Exit(0);
                }
            }

            //Verify that we have at least one good Compact Edition Driver
            bool validDriver = false;
            CheckSQLMobileAssemblyPaths();
            outputCtrl1.EnableVer31 = true;
            validDriver = true;

            UpdateWizard();
        }
Ejemplo n.º 2
0
        public WizardForm()
        {
            InitializeComponent();
            _currentStep = overviewCtrl1;

            CheckSQLMobileAssemblyPaths();
            if (!SqlMobileVer31Good && !SqlMobileVer35Good)
            {
                //in this case we do not have a good path to the Compact Edition drivers
                Dialogs.SelectMobileAssembliesDialog dialog = new GLT.SqlCopy.Dialogs.SelectMobileAssembliesDialog();
                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    if (dialog.Ver31Valid)
                        GLT.SqlCopy.Properties.Settings.Default.SQLMobile30 = dialog.Ver31Path;

                    if (dialog.Ver35Valid)
                        GLT.SqlCopy.Properties.Settings.Default.SQLMobile35 = dialog.Ver35Path;

                    GLT.SqlCopy.Properties.Settings.Default.Save();
                }
            }

            //Verify that we have at least one good Compact Edition Driver
            bool validDriver = false;
            CheckSQLMobileAssemblyPaths();
            if (SqlMobileVer31Good)
            {
                outputCtrl1.EnableVer31 = true;
                validDriver = true;
            }
            else
                outputCtrl1.EnableVer31 = false;

            if (SqlMobileVer35Good)
            {
                outputCtrl1.EnableVer35 = true;
                validDriver = true;
            }
            else
                outputCtrl1.EnableVer35 = false;

            if (!validDriver)
            {
                MessageBox.Show(this, "Unable to locate valid SQL Server Compact Edition assemblies.", "Assemblies not found!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Environment.Exit(0);
                return;
            }

            UpdateWizard();
        }