Esempio n. 1
0
        private void RunLogList_ResetDisplay()
        {
            string NowState = "Now";

            if (this.Paragraph.InvokeRequired)
            {
                this.Invoke((MethodInvoker) delegate
                {
                    NowState = this.Paragraph.Text;

                    if (Flag.AddLogList.Paragraph > 0 && Flag.AddLogList.Paragraph > this.Paragraph.Items.Count - 1)
                    {
                        this.Paragraph.Items.Clear();
                        for (int i = 1; i < Flag.AddLogList.Paragraph + 1; i++)
                        {
                            this.Paragraph.Items.Add((((i - 1) * 300) + 1).ToString("00000") + "—" + (i * 300).ToString("00000"));
                        }
                        this.Paragraph.Items.Add("Now");
                        this.Paragraph.Text = NowState;
                    }
                });
            }
            else
            {
                NowState = this.Paragraph.Text;
            }
            if (NowState == "Now")
            {
                for (int i = Flag.AddLogList.LastIndex; i < Flag.RunLogList.Count; i++)
                {
                    if (Flag.AddLogList.AdditionNum >= 300)
                    {
                        if (this.RunLog.InvokeRequired)
                        {
                            this.Invoke((MethodInvoker) delegate { this.RunLog.Clear(); });
                        }
                        else
                        {
                            this.RunLog.Clear();
                        }
                        Flag.AddLogList.ClearAdditionNum();
                    }

                    FlagStruct.LogBase Log = Flag.RunLogList.GetLog(i);
                    Function.Log.Message(this.RunLog, Log.color, Log.time, Log.text);
                    Flag.AddLogList.Add(Log.time, Log.text, Log.color);
                }

                Function.Log.End(this.RunLog);
            }
        }
Esempio n. 2
0
        private void NowLogList_ResetDisplay()
        {
            if (this.NowLog.InvokeRequired)
            {
                this.Invoke((MethodInvoker) delegate
                {
                    this.NowLog.Clear();
                });
            }
            else
            {
                this.NowLog.Clear();
            }

            for (int i = 0; i < Flag.NowLogList.Count; i++)
            {
                FlagStruct.LogBase Log = Flag.NowLogList.GetLog(i);
                Function.Log.Message(this.NowLog, Log.color, Log.time, Log.text);
            }
            Function.Log.End(this.NowLog);
        }
Esempio n. 3
0
        private void Paragraph_SelectionChangeCommitted(object sender, EventArgs e)
        {
            if (Paragraph.Text == "Now")
            {
                this.RunLog.Clear();
                for (int i = Flag.AddLogList.Count - Flag.AddLogList.AdditionNum; i < Flag.AddLogList.Count; i++)
                {
                    FlagStruct.LogBase Log = Flag.AddLogList.GetLog(i);
                    Function.Log.Message(this.RunLog, Log.color, Log.time, Log.text);
                }

                for (int i = Flag.AddLogList.LastIndex; i < Flag.RunLogList.Count; i++)
                {
                    if (Flag.AddLogList.AdditionNum >= 300)
                    {
                        this.RunLog.Clear();
                        Flag.AddLogList.ClearAdditionNum();
                    }

                    FlagStruct.LogBase Log = Flag.RunLogList.GetLog(i);
                    Function.Log.Message(this.RunLog, Log.color, Log.time, Log.text);
                    Flag.AddLogList.Add(Log.time, Log.text, Log.color);
                }

                Function.Log.End(this.RunLog);
            }
            else
            {
                this.RunLog.Clear();
                string[] Index = Paragraph.Text.Split('—');
                for (int i = int.Parse(Index[0]); i < int.Parse(Index[1]); i++)
                {
                    FlagStruct.LogBase Log = Flag.AddLogList.GetLog(i);
                    Function.Log.Message(this.RunLog, Log.color, Log.time, Log.text);
                }
            }
        }