private void loadToolStripMenuItem1_Click(object sender, EventArgs e) { OpenFileDialog open = new OpenFileDialog(); open.Filter = "NDatabase files (*.ndb)|*.ndb|All files (*.*)|*.*"; if (open.ShowDialog() == DialogResult.OK) { SplashScreen spf = new SplashScreen(); spf.Show(); spf.Update(); try { this.loadProfile(open.FileName); } catch (Exception ex) { MessageBox.Show(ex.Message, "MMS", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { if (spf != null) { spf.Close(); spf.Dispose(); } } } open.Dispose(); }
private void selectRecipentAddress(string str) { SplashScreen spf = new SplashScreen(); spf.Show(); spf.Update(); int n = 0; this.grid.BeginUpdate(); foreach (ListViewItem item in this.grid.Items) { item.Checked = item.SubItems[2].Text.Contains(str); if (item.Checked) n++; } this.grid.EndUpdate(); if (spf != null) { spf.Close(); spf.Dispose(); } this.toolStripStatusSelect.Text = "Selected " + n.ToString(); }