public BoardController( ForumServices forumServices, SearchServices searchServices, ThreadServices threadServices, PostServices postServices, PollServices pollServices, GlobalServices globalServices, IRepository <OnlineUser> onlineUserRepository, IRepository <OnlineGuest> onlineGuestRepository, IRepository <User> userRepository, UserServices usersServices, RoleServices roleServices, MessageServices messageServices, PermissionServices permissionServices, FileServices fileServices, User currentUser, Theme currentTheme) { _forumServices = forumServices; _searchServices = searchServices; _threadServices = threadServices; _postServices = postServices; _pollServices = pollServices; _onlineUserRepository = onlineUserRepository; _onlineGuestRepository = onlineGuestRepository; _userRepository = userRepository; _userServices = usersServices; _roleServices = roleServices; _messageServices = messageServices; _permissionServices = permissionServices; _fileServices = fileServices; _currentUser = currentUser; _currentTheme = currentTheme; SetTopBreadCrumb("Board"); }
//单击历史列表内容时触发 private void ListTitle_CellContentClick(object sender, DataGridViewCellEventArgs e) { int rowindex = e.RowIndex; //1章节2内容 int comIndex = e.ColumnIndex; if (rowindex >= 0 && comIndex != 0) { ps.MessageBoxShow(this.PointToScreen(new Point(0, 0)), "正在获取目录,请稍后..."); string bookName = listTitle.CurrentRow.Cells["Title"].Value.ToString(); //获取书名 string pathurl = listTitle.CurrentRow.Cells["Path"].Value.ToString(); //获取目录URL string contentUrl = listTitle.CurrentRow.Cells["Historyurl"].Value.ToString(); //获取具体内容URL //目录章节 if (comIndex == 1) { this.Close(); SoTitle objForm = new SoTitle() { sFrom = sFrom, titleUrl = pathurl, bookName = bookName, pShow = pShow }; //再主窗体中加载 章节窗体 sFrom?.Invoke(objForm); } //具体内容 else if (comIndex == 2) { if (contentUrl == "") { return; } latch = new CountdownEvent(1); //创建TestClass类的对象 ThreadServices threadClass = new ThreadServices() { //在testclass对象的mainThread(委托)对象上搭载方法,在线程中调用mainThread对象时相当于调用了这方法。 mainThread = new ThreadServices.WebDataDelegate(GetChapterData) }; //启动线程,启动之后线程才开始执行 void starter() { threadClass.QueryData(pathurl); } new Thread(starter).Start(); latch.Wait(); ThreadRefund(pathurl, contentUrl, bookName); } ps.MessageBoxClose(); this.Close(); } }
/// <summary> /// Initializes a new instance of the <see cref="StreakServices"/> class. /// </summary> /// <param name="apiKey">The API key.</param> /// <param name="apiBaseUrl">The API base URL.</param> /// <param name="includeRawResponse">if set to <c>true</c> [include raw JSON response from Streak API].</param> public StreakServices(string apiKey, string apiBaseUrl, bool includeRawResponse) { Users = new UserServices(apiKey, apiBaseUrl, includeRawResponse); Pipelines = new PipelineServices(apiKey, apiBaseUrl, includeRawResponse); Boxes = new BoxServices(apiKey, apiBaseUrl, includeRawResponse); Stages = new StageServices(apiKey, apiBaseUrl, includeRawResponse); Fields = new FieldServices(apiKey, apiBaseUrl, includeRawResponse); Tasks = new TaskServices(apiKey, apiBaseUrl, includeRawResponse); Tasks = new TaskServices(apiKey, apiBaseUrl, includeRawResponse); Files = new FileServices(apiKey, apiBaseUrl, includeRawResponse); Threads = new ThreadServices(apiKey, apiBaseUrl, includeRawResponse); Comments = new CommentServices(apiKey, apiBaseUrl, includeRawResponse); Snippets = new SnippetServices(apiKey, apiBaseUrl, includeRawResponse); }
public PostController( IRepository<Smiley> smileyRepository, ForumServices forumServices, PostServices postServices, ThreadServices threadServices, FileServices fileServices, PollServices pollServices, EmailServices emailServices, PermissionServices permissionServices, ParseServices parseServices, User currentUser) { _smileyRepository = smileyRepository; _forumServices = forumServices; _postServices = postServices; _threadServices = threadServices; _fileServices = fileServices; _pollServices = pollServices; _emailServices = emailServices; _permissionServices = permissionServices; _parseServices = parseServices; _currentUser = currentUser; }