コード例 #1
0
ファイル: frmMain.cs プロジェクト: ltvinh/FRDB-SQLite
        private void SaveFuzzyDatabase()
        {
            try
            {
                // Record to database
                Cursor oldCursor = Cursor;
                Cursor = Cursors.WaitCursor;
                frmProgressBar frm = new frmProgressBar();
                frm.LblName.Text = "Saving...";
                frm.Show();
                frm.Refresh();

                fdbBll = new FdbBLL();

                fdbBll.DropFuzzyDatabase(fdbEntity);
                if (!fdbBll.SaveFuzzyDatabase(fdbEntity))//Why fdbEntity doesn't null? Because it was created in  OpenFuzzyDatabase or CreateFuzzyDatabase
                {
                    siStatus.Caption = "Cannnot save the Database!";
                    timer.Start();
                }
                else
                {
                    siStatus.Caption = "The Database has been saved!";
                    timer.Start();
                }

                frm.Close();
                Cursor = oldCursor;
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR:\n" + ex.Message);
            }
        }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: ltvinh/FRDB-SQLite
        private void Clone(String path)
        {
            timer.Start();
            FdbBLL bll = new FdbBLL();
            FdbEntity newDatabase = new FdbEntity(path);
            bll.CreateFuzzyDatabase(newDatabase);
            newDatabase.Schemes = fdbEntity.Schemes;
            newDatabase.Relations = fdbEntity.Relations;
            newDatabase.Queries = fdbEntity.Queries;
            fdbEntity = null;
            DBValues.connString = newDatabase.ConnString;
            DBValues.dbName = newDatabase.FdbName;

            parentFdbNode.Text = DBValues.dbName.ToUpper();
            parentFdbNode.ToolTipText = "Database " + newDatabase.FdbName;
            fdbEntity = newDatabase;
        }
コード例 #3
0
ファイル: frmMain.cs プロジェクト: ltvinh/FRDB-SQLite
        private void NewFuzzyDatabaseEntity(String path)
        {
            timer.Start();

            fdbEntity = null;

            fdbBll = new FdbBLL();
            fdbEntity = new FdbEntity(path);
            this.path = path;

            DBValues.connString = fdbEntity.ConnString;
            DBValues.dbName = fdbEntity.FdbName;
        }