public void ExecuteShowForumArticles(ICommandContext context, int?forumId) { context.OpenUrlInBrowser( JanusProtocolDispatcher.FormatURI( JanusProtocolResourceType.ArticleList, GetForumId(context, forumId).ToString())); }
public void ExecuteShowUserRatingOut(ICommandContext context) { var uid = Config.Instance.SelfId; context.OpenUrlInBrowser( JanusProtocolDispatcher.FormatURI( JanusProtocolResourceType.UserOutrating, uid.ToString())); }
public void ExecuteOpenMessageInJBrowser(ICommandContext context, int?messageId) { var url = JanusProtocolDispatcher.FormatURI( JanusProtocolResourceType.Message, ForumCommandHelper.GetMessageId(context, messageId).ToString()); context.OpenUrlInBrowser(url, UrlBehavior.InternalBrowser); }
internal void Run(IServiceProvider serviceProvider) { serviceProvider.SetSplashMessage(SR.Splash.InitApplication); CheckJanusProtocolInstallation(); CheckGoJanusNetInstallation(); ProtocolDispatcher = new JanusProtocolDispatcher(serviceProvider); Forums.BeforeLoadData += ForumsBeforeLoadData; foreach (var forum in Forums.Instance.ForumList) { forum.BeforeLoadData += ActiveForumBeforeLoadData; } Init(serviceProvider); serviceProvider.SetSplashMessage(SR.Splash.RunApplication); Application.Run(MainForm); }
public void ExecuteShowAllArticles(ICommandContext context) { context.OpenUrlInBrowser( JanusProtocolDispatcher.FormatURI( JanusProtocolResourceType.ArticleList, "0")); }
public void ExecuteShowTeamList(ICommandContext context) { context.OpenUrlInBrowser( JanusProtocolDispatcher.FormatURI( JanusProtocolResourceType.TeamList, string.Empty)); }
/// <summary> /// Получить внешний формат ссылки для соответствующего ресурса. /// <seealso cref="SiteUrlHelper"/> /// </summary> /// <param name="resourceType">Тип ресурса.</param> /// <param name="parameters">Параметр ссылки.</param> /// <returns>Внешний формат ссылки на ресурс.</returns> private static string FormatExternalUri(JanusProtocolResourceType resourceType, string parameters) { return(JanusProtocolDispatcher.FormatExternalURI(resourceType, parameters)); }
internal void Run(IServiceProvider serviceProvider) { serviceProvider.SetSplashMessage(SR.Splash.InitApplication); CheckJanusProtocolInstallation(); CheckGoJanusNetInstallation(); ProtocolDispatcher = new JanusProtocolDispatcher(serviceProvider); Forums.BeforeLoadData += ForumsBeforeLoadData; foreach (var forum in Forums.Instance.ForumList) forum.BeforeLoadData += ActiveForumBeforeLoadData; Init(serviceProvider); serviceProvider.SetSplashMessage(SR.Splash.RunApplication); Application.Run(MainForm); }