Beispiel #1
0
        private void ShowLog()
        {
            DateTime dt = new DateTime();

            for (; ;)
            {
                if (this.CurrentTask != null)
                {
                    dt = this.CurrentTask.CreateTime;
                    break;
                }
            }
            for (; ;)
            {
                Thread.Sleep(1000);

                if (true)//不是暂停状态
                {
                    List <Log> logList = log.SelectGT("CreateTime", dt).Where(s => s.TaskId == this.CurrentTask.Id).ToList();
                    if (logList.Count > 0)
                    {
                        dt = logList.Max(s => s.CreateTime);
                        foreach (var inst in logList)
                        {
                            string text = inst.CreateTime.ToString() + ": " + inst.Author + ": " + inst.Content + "\r\n";
                            ShowMessage.Invoke(inst, text);
                        }
                    }
                }
            }
        }