private void _configButton_Click(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; DatabaseConfigDialog dialog = new DatabaseConfigDialog(); this.Cursor = Cursors.Default; dialog.ShowDialog(this); }
protected override void OnShown(EventArgs e) { base.OnShown(e); if (!ServiceManager.OptionService.HasOption) { DatabaseConfigDialog dialog = new DatabaseConfigDialog(); dialog.ShowDialog(this); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!ServiceManager.OptionService.HasOption) { DatabaseConfigDialog dialog = new DatabaseConfigDialog(); dialog.ShowDialog(this); } else { try { Thread.Sleep(10 * 1000); _logListBox.Items.Clear(); ServiceManager.Logger.Write(Gean.SimpleLogger.SimpleLoggerLevel.Info, "启动服务"); ServiceManager.SqlService.startService(); } catch (Exception) { ServiceManager.Logger.Write(SimpleLoggerLevel.Info, "未能启动服务,请手动启动服务。"); } } }