Esempio n. 1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (DesignMode)
            {
                return;
            }

            this.in启动次数_时段.SelectedIndex = 1;
            if (_加载默认文件)
            {
                this.加载日志文件();
            }

            this.out当前启动次数.Text = string.Empty;

            this.do刷新文件路径.Click                  += do刷新文件路径_Click;
            this.do指定时间_确定.Click                 += do指定时间_确定_Click;
            this.do启动次数_第一次.Click                += do启动次数_第一次_Click;
            this.do启动次数_最后一次.Click               += do启动次数_最后一次_Click;
            this.do启动次数_上一次.Click                += do启动次数_上一次_Click;
            this.do启动次数_下一次.Click                += do启动次数_下一次_Click;
            this.do启动次数_确定.Click                 += do启动次数_确定_Click;
            this.out详细信息表格.RowCellStyle          += out详细信息表格_RowCellStyle;
            this.out详细信息表格.RowStyle              += out详细信息表格_RowStyle;
            this.out详细信息表格.DoubleClick           += out详细信息表格_DoubleClick;
            this.out概要信息表格.Click                 += out概要信息表格_Click;
            this.out概要信息表格.CustomFieldValueStyle += out概要信息表格_CustomFieldValueStyle;
            this.out警告信息表格.Click                 += out警告信息表格_Click;

            this.do启动次数_确定.PerformClick();
            //this.out详细信息表格.TopRowIndex = this.out详细信息表格.RowCount - 1;
            //this.out详细信息表格.MoveLast();

            //启用拖动文件到程序,然后解析的功能
            this.out文件路径.AllowDrop  = true;
            this.out文件路径.DragEnter += (sender1, e1) => e1.Effect = DragDropEffects.Link;
            this.out文件路径.DragDrop  += 文件路径_DragDrop;

            this.do过滤提示.Click += (sender1, e1) => new F查询提示().ShowDialog();

            this.do加入右键.Visible = !H注册表.验证是否为所有文件添加操作系统右键菜单("浏览日志", Assembly.GetExecutingAssembly().Location);
            this.do加入右键.Click  += do加入右键_Click;

            this.do高亮.Click += do高亮_Click;
            this.do过滤.Click += do过滤_Click;
            this.do清除.Click += do清除_Click;
            this.in查询条件.Properties.ButtonClick += Properties_ButtonClick;
            this.in查询条件.Properties.KeyDown     += Properties_KeyDown;
            this.in查询条件.Properties.Items.AddRange(new object[] { "时间:\"??:??\"", "标题:\"???\" +内容:\"???\"" });
        }
Esempio n. 2
0
 void do加入右键_Click(object sender, EventArgs e)
 {
     H注册表.为所有文件添加操作系统右键菜单("浏览日志", Assembly.GetExecutingAssembly().Location);
     this.do加入右键.Visible = !H注册表.验证是否为所有文件添加操作系统右键菜单("浏览日志", Assembly.GetExecutingAssembly().Location);
 }