Inheritance: System.Windows.Forms.Form
コード例 #1
0
 private void addButton_Click(object sender, System.EventArgs e)
 {
     using(BlogForm newBlog = new BlogForm())
     {
         if (newBlog.ShowDialog(this) == DialogResult.OK)
         {
             PopulateBlogList();
         }
     }
 }
コード例 #2
0
        private void blogsList_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (blogsList.SelectedItems.Count == 1)
            {
                Blog blog = (Blog) blogsList.SelectedItems[0].Tag;

                using(BlogForm newBlog = new BlogForm(blog))
                {
                    if (newBlog.ShowDialog(this) == DialogResult.OK)
                    {
                        PopulateBlogList();
                    }
                }
            }
        }