private void frmMain_Load(object sender, EventArgs e) { try { HelperSetting.SetFilePath(Application.StartupPath + "\\" + HelperSetting.FileName); var setting = HelperSetting.GetSetting(); if (string.IsNullOrEmpty(setting.FileData) || string.IsNullOrEmpty(setting.FolderBackground) || string.IsNullOrEmpty(setting.FolderPointer)) { var frm = new frmSetting(); frm.ShowDialog(); } HelperImage.Load(); mnuLibrary.Text = string.Format("Library ({0})", HelperImage.List().Count); } catch (Exception ex) { MessageBox.Show(ex.Message); this.Close(); } }
private void mnuSetting_Click(object sender, EventArgs e) { var frm = new frmSetting(); frm.ShowDialog(); }