예제 #1
0
파일: MainForm.cs 프로젝트: emm274/fcObj
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            DB = new fcDB();
            OBJ = new objDB();

            topoList = new List<List<string>>();
        }
예제 #2
0
파일: MainForm.cs 프로젝트: emm274/fcObj
        void btSyncClick(object sender, EventArgs e)
        {
            if (File.Exists(DBpath))
            if (File.Exists(OBJpath)) {

                this.btSync.Enabled=false;
                Cursor.Current=Cursors.WaitCursor;

                var ds = new FC.Data.DataSource();
                ds.Open(DBpath);

                var cat = ds.GetCatalogues().FirstOrDefault();
                if (cat != null) {

                    var OBJ = new objDB();
                    OBJ.Open(OBJpath);

                    OBJChanged();

                    OBJ.log=log;
                    OBJ.progress=__progress;

                    progressBar.Visible=true;

                    OBJ.syncFC(cat,0);
                    OBJ.Close();

                    progressBar.Visible=false;
                }

                Cursor.Current=Cursors.Default;
                this.btSync.Enabled=true;
            }
        }