Exemplo n.º 1
0
 public void EditProperties()
 {
     m_vdb.Reload();
     if (VersionDbPropsForm.Run(m_vdb))
     {
         m_vdb.ChangedProps();
         m_vdb.Save();
     }
     else
     {
         m_vdb.Reload();
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }