static void Main( ) { DevExpress.Skins.SkinManager.EnableFormSkins(); DevExpress.LookAndFeel.LookAndFeelHelper.ForceDefaultLookAndFeelChanged(); DevExpress.Skins.SkinManager.EnableMdiFormSkins(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); DevExpress.Utils.WaitDialogForm waiting = new DevExpress.Utils.WaitDialogForm(); waiting.SetCaption("Connecting . . .!"); waiting.Text = ""; waiting.Show(); if (DataQueryProvider.Connect() == false) { waiting.Close(); DevExpress.XtraEditors.XtraMessageBox.Show("Please check connection", "Auto generator", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } DataQueryProvider.InitDataTables(); Form1 form = new Form1(); waiting.Close(); Application.Run(form); }
static void Main( ) { if (DataQueryProvider.Connect() == false) { MessageBox.Show("Please check connection", "Auto generator", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } DataQueryProvider.InitDataTables(); GenerationProvider.DetectModifyDatabase(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MessageBox.Show("Finished", "Auto generator", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public static bool ConnectDatabase(String strDatabase) { if (DataQueryProvider.Connect(strDatabase) == false) { ABCHelper.ABCMessageBox.Show("Kiểm tra lại thông tin kết nối", "Kết nối dữ liệu", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } if (strDatabase != CurrentDatabase) { DataQueryProvider.InitDataTables(); if (!SynchronizedDBs.Contains(strDatabase)) { if (DataSyncProvider.IsNeedSync()) { DataSyncProvider.Synchronize(); } SynchronizedDBs.Add(strDatabase); } CurrentDatabase = strDatabase; } return(true); }