コード例 #1
0
ファイル: MainWindow.cs プロジェクト: ejholmes/openfocus
        void Logger_LoggerWrite(object sender, LoggerEventArgs e)
        {
            if (e.Type == Logger.LogType.Error)
            {
                this.lbLog.Font = new Font(this.lbLog.Font, this.lbLog.Font.Style | FontStyle.Bold);
            }

            this.lbLog.Items.Add(e.Text);

            if (e.Text == String.Empty)
            {
                int current = this.lbLog.SelectedIndex;
                this.lbLog.SelectedIndex = this.lbLog.Items.Count - 1;
                this.lbLog.SelectedIndex = current;
            }
            else
            {
                this.lbLog.SelectedIndex = this.lbLog.Items.Count - 1;
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: ejholmes/openfocus
        void Logger_LoggerWrite(object sender, LoggerEventArgs e)
        {
            this.lbLog.Items.Add(e.Text);

            if (e.Text == String.Empty)
            {
                int current = this.lbLog.SelectedIndex;
                this.lbLog.SelectedIndex = this.lbLog.Items.Count - 1;
                this.lbLog.SelectedIndex = current;
            }
            else
            {
                this.lbLog.SelectedIndex = this.lbLog.Items.Count - 1;
            }
        }