本文整理汇总了C#中IPluginManager.CloseAddSnippetWindow方法的典型用法代码示例。如果您正苦于以下问题:C# IPluginManager.CloseAddSnippetWindow方法的具体用法?C# IPluginManager.CloseAddSnippetWindow怎么用?C# IPluginManager.CloseAddSnippetWindow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPluginManager
的用法示例。
在下文中一共展示了IPluginManager.CloseAddSnippetWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LogoutUser
/////////////////////////////////////////////////////////////////////////////////
#region Logout Actions
/////////////////////////////////////////////////////////////////////////////////
/// <summary>
/// Performs the logout action for the current user
/// </summary>
/// <param name="pluginManager"></param>
/// <param name="user"></param>
public static void LogoutUser(IPluginManager pluginManager, UserClient user)
{
System.Threading.Thread th = new System.Threading.Thread(
new System.Threading.ThreadStart(delegate { DoLogout(user); })
);
th.Start();
// change the buttons
pluginManager.DisplayLoggedOutButtons();
// clean up previous search contents (privacy concern)
ISearchSnippetForm searchForm = pluginManager.FindWindow<ISearchSnippetForm>();
if (searchForm != null)
searchForm.DisplayCleanForm();
// clean up previous publish info
IPublishSnippetForm publishForm = pluginManager.FindWindow<IPublishSnippetForm>();
if (publishForm != null)
publishForm.ResetResults();
// close publish window
pluginManager.ClosePublishSnippetWindow();
// close addSnippet Window
pluginManager.CloseAddSnippetWindow();
// cleanup previous login from login page
ILoginForm loginForm = pluginManager.FindWindow<ILoginForm>();
if (loginForm != null)
loginForm.ResetFields();
// show login page
PrepareLoginForm(pluginManager);
}
示例2: CloseObsoleteFormsFromAbout
/////////////////////////////////////////////////////////////////////////////////
#region About Form
/////////////////////////////////////////////////////////////////////////////////
/// <summary>
/// Closes the obsolete forms when the server is changed in the About form
/// </summary>
/// <param name="pluginManager"></param>
public static void CloseObsoleteFormsFromAbout(IPluginManager pluginManager)
{
SearchPageCleanup(pluginManager);
pluginManager.ClosePublishSnippetWindow();
pluginManager.CloseAddSnippetWindow();
}