public Form1() { // hook the exception #if DEBUG #else AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); #endif // cache file if (!Directory.Exists(FileCache.Default.cachefolder)) { Directory.CreateDirectory(FileCache.Default.cachefolder); } if (DataSettings.Default.UnInit && !JianLiLinq.Default.DB.DatabaseExists()) { AppSettingForm f = new AppSettingForm(); if (f.ShowDialog() == DialogResult.Cancel) { havetoleft = true; } } DataSettings.Default.OnUserChanged += new EventHandler(Default_OnUserChanged); InitializeComponent(); FileViewer.AppendTab = this.tabControl1; // register for python UniIronPython.Default.Register(this, "m"); UniIronPython.Default.Register(JianLiLinq.Default.DB, "db"); UniIronPythonHelper.ImportWinForm(UniIronPython.Default); }
private void AddNewBookButton_Click(object sender, EventArgs e) { AppSettingForm sf = new AppSettingForm(); sf.ShowDialog(); }