Exemplo n.º 1
0
        private void Do强制结束_Click(object sender, EventArgs e)
        {
            var __窗口 = new F结束进程(_B命令行.IsWindows);

            if (new F空窗口(__窗口, "结束进程").ShowDialog() == DialogResult.OK)
            {
                var __命令   = __窗口.命令;
                var __进程标识 = Guid.NewGuid().ToString();
                _B命令行.创建进程(__进程标识);
                _B命令行.执行(__进程标识, __命令);
                _B命令行.结束进程(__进程标识);
            }
        }
Exemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            this.do导出.Click += Do导出_Click;
            this.do清空.Click += Do清空_Click;
            this.do滚屏.Click += Do滚屏_Click;

            this.Disposed += (sender1, e1) =>
            {
                _B命令行.正常输出 -= _B命令行_正常输出;
                _B命令行.异常输出 -= _B命令行_异常输出;
                _B命令行.结束进程(_进程标识);
            };
            _B命令行.正常输出 += _B命令行_正常输出;
            _B命令行.异常输出 += _B命令行_异常输出;

            _B命令行.创建进程(_进程标识);
        }
Exemplo n.º 3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            this.timer1.Interval = 1000;
            this.timer1.Tick    += Timer1_Tick;
            this.timer1.Start();
            this.out命令列表.NodeMouseDoubleClick += Out命令列表_NodeMouseDoubleClick;
            this.in输入.KeyDown += In输入_KeyDown;
            this.in查询.KeyDown += In查询_KeyDown;
            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   += (sender1, e1) => this.splitContainer1.Panel1Collapsed = !this.splitContainer1.Panel1Collapsed;

            this.do复制.Click  += Do复制_Click;
            this.do查询1.Click += Do查询1_Click;
            this.do查询.Click  += Do查询_Click;
            导入(_配置文件);

            _B命令行 = new B命令行(_客户端);
            foreach (TreeNode node in this.out命令列表.Nodes)
            {
                if ((_B命令行.IsWindows && node.Text == "Windows") || (!_B命令行.IsWindows && node.Text != "Windows"))
                {
                    node.ExpandAll();
                }
            }

            this.Disposed += (sender1, e1) =>
            {
                _B命令行.正常输出 -= _B命令行_正常输出;
                _B命令行.异常输出 -= _B命令行_异常输出;
                _B命令行.结束进程(_进程标识);
            };
            _B命令行.正常输出 += _B命令行_正常输出;
            _B命令行.异常输出 += _B命令行_异常输出;
            创建进程();
        }