コード例 #1
0
 public void OpenPost(OpenPostForm.OpenMode openMode)
 {
     using (new WaitCursor())
     {
         using (OpenPostForm openPostForm = new OpenPostForm(openMode))
         {
             openPostForm.UserDeletedPost += new UserDeletedPostEventHandler(openPostForm_UserDeletedPost);
             if (openPostForm.ShowDialog(_mainFrameWindow) == DialogResult.OK)
             {
                 // get the editing context
                 OpenPost(openPostForm.BlogPostEditingContext);
             }
             openPostForm.UserDeletedPost -= new UserDeletedPostEventHandler(openPostForm_UserDeletedPost);
         }
     }
 }
コード例 #2
0
 private static void ExecuteOpenPost()
 {
     using (OpenPostForm openPostForm = new OpenPostForm())
     {
         if (openPostForm.ShowDialog(Win32WindowImpl.DesktopWin32Window) == DialogResult.OK)
         {
             IBlogPostEditingContext editingContext = openPostForm.BlogPostEditingContext;
             PostEditorForm.Launch(editingContext, true);
         }
     }
 }