Exemplo n.º 1
0
        protected override bool DoApply(BootFX.Common.UI.Common.ApplyReason reason)
        {
            if (base.DoApply(reason) == false)
            {
                return(false);
            }

            // check...
            if (this.GetHash(this.textCurrent.Text) != this.ExistingPasswordHash)
            {
                Alert.ShowWarning(this, "The current password you entered is invalid.");
                return(false);
            }

            // anything?
            if (this.textNew.Text == null || this.textNew.Text.Length == 0)
            {
                Alert.ShowWarning(this, "You must enter a password.");
                return(false);
            }

            // confirm...
            if (this.textNew.Text != this.textConfirm.Text)
            {
                Alert.ShowWarning(this, "The passwords you entered do not match.");
                return(false);
            }

            // ok...
            return(true);
        }
Exemplo n.º 2
0
        protected override bool DoApply(BootFX.Common.UI.Common.ApplyReason reason)
        {
            if (base.DoApply(reason) == false)
            {
                return(false);
            }

            // save...
            ConnectionSettings.SaveSettings();

            // ok...
            return(true);
        }
Exemplo n.º 3
0
        protected override bool DoApply(BootFX.Common.UI.Common.ApplyReason reason)
        {
            if (base.DoApply(reason) == false)
            {
                return(false);
            }

            // save changes...
            if (this.SaveChangesOnApply)
            {
                this.SaveChanges();
            }

            // return...
            return(true);
        }
Exemplo n.º 4
0
        protected override bool DoApply(BootFX.Common.UI.Common.ApplyReason reason)
        {
            if (base.DoApply(reason) == false)
            {
                return(false);
            }

            // check...
            if (this.FolderPath == null || this.FolderPath.Length == 0)
            {
                Alert.ShowWarning(this, "You must choose a folder.");
                return(false);
            }

            // exists?
            if (Directory.Exists(this.FolderPath) == false)
            {
                if (this.CreateIfNotFound)
                {
                    // ask...
                    if (Alert.AskYesNoQuestion(this, "The folder does not exist.  Do you want to create it?") != DialogResult.Yes)
                    {
                        return(false);
                    }

                    // create...
                    try
                    {
                        Directory.CreateDirectory(this.FolderPath);
                    }
                    catch (Exception ex)
                    {
                        throw new InvalidOperationException(string.Format("The folder '{0}' could not be created.", this.FolderPath), ex);
                    }
                }
                else
                {
                    Alert.ShowWarning(this, "The folder does not exist.");
                    return(false);
                }
            }

            // ok...
            return(true);
        }
Exemplo n.º 5
0
        protected override bool DoApply(BootFX.Common.UI.Common.ApplyReason reason)
        {
            // walk our pages...
            foreach (PropertyTabPage tabPage in this.Pages)
            {
                if (tabPage.PropertyPageAsIPropertyPage == null)
                {
                    throw new InvalidOperationException("page.PropertyPageAsIPropertyPage is null.");
                }
                if (tabPage.PropertyPageAsIPropertyPage.Apply(reason) == false)
                {
                    return(false);
                }
            }

            // base...
            return(base.DoApply(reason));
        }
Exemplo n.º 6
0
        protected override bool DoApply(BootFX.Common.UI.Common.ApplyReason reason)
        {
            if (!(base.DoApply(reason)))
            {
                return(false);
            }

            // check...
            if (this.CatalogName == null || this.CatalogName.Length == 0)
            {
                Alert.ShowWarning(this, "You must choose a database.");
                return(false);
            }
            else
            {
                return(true);
            }
        }