/// <summary>
        /// 构造函数。
        /// </summary>
        /// <param name="service"></param>
        /// <param name="classID"></param>
        /// <param name="catalogID"></param>
        /// <param name="title"></param>
        public WorkThumbnailsWindow(ICoreService service, string title, string classID, string catalogID)
            : base(service)
        {
            this.strTitle = title;
            this.classID = classID;
            this.catalogID = catalogID;
            this.pluginService = new LoadingPluginService(this.CoreService, this);

            InitializeComponent();
        }
        /// <summary>
        /// 构造函数。
        /// </summary>
        /// <param name="service"></param>
        /// <param name="classID"></param>
        /// <param name="catalogID"></param>
        public ModifyWorkWindow(ICoreService service, string classID, string catalogID)
            : base(service)
        {
            this.classID = classID;
            this.catalogID = catalogID;
            this.userInfo = this.CoreService["userinfo"] as UserInfo;

            this.pluginService = new LoadingPluginService(service, this);
            this.InitializeComponent();
        }
 /// <summary>
 /// 构造函数。
 /// </summary>
 /// <param name="service"></param>
 /// <param name="store"></param>
 /// <param name="students"></param>
 /// <param name="studentID"></param>
 public ModifyWorkDetailsWindow(ICoreService service, LocalStudentWorkStore store, string studentID)
     : base(service)
 {
     this.pluginService = new LoadingPluginService(service, this);
     //及时加载作业索引文件,同步修改信息。
     this.store = LocalStudentWorkStore.DeSerializer(store.FileSavePath());
     this.localStudentCollection = this.store.HasWorks();
     if (this.localStudentCollection != null && this.localStudentCollection.Count > 0 && !string.IsNullOrEmpty(studentID))
     {
         this.index = this.localStudentCollection.FindIndex(studentID);
     }
     this.InitializeComponent();
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void StudentMainWindow_Load(object sender, EventArgs e)
        {
            this.CoreService.ForceQuit = false;
            //this.lbBroadcast.Text = string.Empty;
            this.sendTo.Create();
            this.fileUploadObserver.UpdateFileUpload += this.DragFileObserver;

            this.listView.ListViewItemSorter = new ListViewIndexComparer();
            this.listView.InsertionMark.Color = Color.Red;
            this.listView.AllowDrop = true;

            this.OnMessageEvent(MessageType.Normal, "【请勾选需要上传的作品】");

            #region 用户信息。
            StringBuilder info = new StringBuilder();
            Student stu = this.CoreService["student"] as Student;
            if (stu != null)
            {
                UserInfo userInfo = new UserInfo();
                userInfo.UserID = stu.StudentID;
                userInfo.UserCode = stu.StudentCode;
                userInfo.UserName = stu.StudentName;
                this.CoreService["userinfo"] = userInfo;
                info.AppendFormat("学生姓名:{0}[{1}]", stu.StudentName, stu.StudentCode);
            }
            Catalog c = this.CoreService["catalog"] as Catalog;
            if (c != null)
            {
                if (info.Length > 0)
                    info.Append("\r\n");
                info.AppendFormat("课程目录:{0}({1})", c.CatalogName, c.TypeName);
                this.OnToolTipEvent(this.lbUserinfo, string.Format("知识要点:\r\n{0}", Utilities.BuildKnowledgePointsToolTip(c.Points)));
            }
            if (info.Length > 0)
                info.Append("\r\n");
            info.AppendFormat("教师主机:{0}", this.CoreService["host_ip"]);
            info.Append("\r\n");
            info.AppendFormat("本机名称:{0}", Dns.GetHostName());
            this.lbUserinfo.Text = info.ToString();
            this.OnToolTipEvent(this.lbUserinfo, info.ToString());
            #endregion

            this.btnUpload.Enabled = false;
            #region 插件初始化。
            this.pluginService = new LoadingPluginService(this.CoreService, this);
            PluginCfgs plugins = this.CoreService["plugins"] as PluginCfgs;
            if (plugins != null && plugins.Count > 0)
            {
                PluginCfgs cfgs = plugins.GetPluginCfgs("main");
                if (cfgs != null && cfgs.Count > 0)
                {
                    this.pluginService.Load(cfgs);
                    this.Update();
                }
            }
            #endregion

            #region 初始化鼠标右键。
            if (this.sendTo != null)
            {
                try
                {
                    this.sendTo.Create();
                }
                catch (Exception) { }
            }
            #endregion
        }
 /// <summary>
 /// 构造函数。
 /// </summary>
 /// <param name="service">核心服务接口。</param>
 public MonitorStudentsWindow(ICoreService service)
     : base(service)
 {
     this.pluginService = new LoadingPluginService(service, this);
     InitializeComponent();
 }