Exemple #1
0
 public void EditProperties()
 {
     m_vdb.Reload();
     if (VersionDbPropsForm.Run(m_vdb))
     {
         m_vdb.ChangedProps();
         m_vdb.Save();
     }
     else
     {
         m_vdb.Reload();
     }
 }
Exemple #2
0
        public override bool CreateFile(string fn)
        {
            VersionDbProperties props = new VersionDbProperties();

            props.Dialect = GenericDialect.Instance;
            VersionDb vdb = new VersionDb(props);

            vdb.m_file = fn;

            if (VersionDbPropsForm.Run(vdb))
            {
                vdb.Save();
                return(true);
            }
            return(false);
        }
Exemple #3
0
        public static bool Run(VersionDb db)
        {
            var win = new VersionDbPropsForm(db);

            if (win.ShowDialogEx() == DialogResult.OK)
            {
                db.m_props.ForceSingleSchema = win.chbForceSingleSchema.Checked;
                db.m_props.Dialect           = (ISqlDialect)win.cbxDialect.SelectedItem;

                if (win.chbCreateDefaultVariables.Checked)
                {
                    db.CreateDefaultVariableTable();
                }
                else
                {
                    db.m_props.GetVersionSql = win.codeEditorGet.CodeText;
                    db.m_props.SetVersionSql = win.codeEditorSet.CodeText;
                }
                return(true);
            }
            return(false);
        }