예제 #1
0
        public MergeDialog(string _path, SSDataBase _mydb)
        {
            InitializeComponent();

            //Additional initialization
            DataTable dt = new DataTable();

            mvars = new MergeVars();
            mvars.defaultDBPath = _path;
            mvars.Masterdb = _mydb;
            oldDBPath = _mydb.MyPath;
            mvars.mergeDBs = new List<SSDataBase>();

            //Check the info of the currently loaded master database and copy it into mvars for later use
            try {
                mvars.Masterdb.GetDBInfo(dt);
                mvars.Masterdbname = Convert.ToString(dt.Rows[0][0]);
                mvars.Masterdblocation = Convert.ToString(dt.Rows[0][1]);
                mvars.Masterdbdate = String.Format("{0:MM/dd/yyyy}", dt.Rows[0][2]);
            } catch (InvalidOperationException) { //Happens when no database is loaded
                mvars.Masterdbname = "";
                mvars.Masterdblocation = "";
            }

            page1 = new MergePage1(mvars);

            Controls.Add(page1);
        }
예제 #2
0
 public MergePage1(MergeVars _mvars)
 {
     InitializeComponent();
     mvars = _mvars;
     if(mvars.Masterdbname.Length > 0) {
         lb_CurrentMaster.Text = "Master Database: " + mvars.Masterdbname + " (" + mvars.Masterdblocation + ")";
     } else {
         lb_CurrentMaster.Text = "No master database currently loaded.";
     }
 }
예제 #3
0
 //        public MergePage(List<SSDataBase> _mergeDBs, string _defaultDBPath)
 public MergePage(MergeVars _mvars)
 {
     mvars = _mvars;
     //mergeDBs = _mergeDBs;
     //defaultDBPath = _defaultDBPath;
 }