コード例 #1
0
        /// <summary>
        /// 给给服务器打电话截获到语音窗口之后的截图监控信息
        /// </summary>
        public void GiveWeChartAudioAction()
        {
            if (CheckProcessIsOk())
            {
                string content = "服务器终端实时状态:" + "\n" +
                                 "1.Multicharts 进程运行良好..." + "\n" +
                                 "2.内存使用率为: " + ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString() + "\n" +
                                 "3.CPU使用率为: " + ComputerInfomation.getCPUUsage().ToString() + "\n";

                UseClipBoardWenziSend(content);

                //3.完成截图;
                SendShotScreenOperater();

                //4.点击发送;
                SendEnterOperater();
            }
            else
            {
                string content = "服务器终端实时状态:" + "\n" +
                                 "1.Multicharts 进程运行异常,请立即检查..." + "\n" +
                                 "2.内存使用率为: " + ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString() + "\n" +
                                 "3.CPU使用率为: " + ComputerInfomation.getCPUUsage().ToString() + "\n";

                UseClipBoardWenziSend(content);

                //3.完成截图;
                SendShotScreenOperater();

                //4.点击发送;
                SendEnterOperater();
            }
        }
コード例 #2
0
        private void Computet_Usage_EnentTicker(object sender, EventArgs e)
        {
            this.timer1.Stop();

            this.textBox_CPU.Text = ComputerInfomation.getCPUUsage();
            this.textBox_RM.Text  = ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString();

            this.timer1.Start();
        }
コード例 #3
0
        private void SendMcStatus()
        {
            try
            {
                string dateTime = DateTime.Now.ToString("T");

                if (DateTime.Now.ToString("T").CompareTo(this.textBox_Morning.Text) == 0)
                {
                    System.Threading.Thread.Sleep(1000);
                    if (CheckProcessIsOk())
                    {
                        string rm  = ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString();
                        string cpu = ComputerInfomation.getCPUUsage();

                        string content = string.Empty;
                        content = "服务器终端实时状态:" + "\n" +
                                  "   1.Multicharts 进程运行良好..." + "\n" +
                                  "   2.内存使用率为: " + ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString() + "\n" +
                                  "   3.CPU使用率为: " + ComputerInfomation.getCPUUsage().ToString() + "\n" + "\n";

                        UseClipBoardWenziSend(content);

                        //3.完成截图;
                        SendShotScreenOperater();

                        //4.点击发送;
                        SendEnterOperater();

                        CanDOVoiceCheck();
                    }
                    else
                    {
                        string rm  = ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString();
                        string cpu = ComputerInfomation.getCPUUsage();


                        string content = string.Empty;
                        content = "服务器终端实时状态:" + "\n" +
                                  "   1.Multicharts 进程运行异常,请立即检查..." + "\n" +
                                  "   2.内存使用率为: " + ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString() + "\n" +
                                  "   3.CPU使用率为: " + ComputerInfomation.getCPUUsage().ToString() + "\n" + "\n";

                        UseClipBoardWenziSend(content);

                        //3.完成截图;
                        SendShotScreenOperater();

                        //4.点击发送;
                        SendEnterOperater();

                        CanDOVoiceCheck();
                    }
                }

                if (DateTime.Now.ToString("T").CompareTo(this.textBox_Noon.Text) == 0)
                {
                    System.Threading.Thread.Sleep(1000);
                    if (CheckProcessIsOk())
                    {
                        string rm  = ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString();
                        string cpu = ComputerInfomation.getCPUUsage();

                        string content = string.Empty;
                        content = "服务器终端实时状态:" + "\n" +
                                  "   1.Multicharts 进程运行良好..." + "\n" +
                                  "   2.内存使用率为: " + ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString() + "\n" +
                                  "   3.CPU使用率为: " + ComputerInfomation.getCPUUsage().ToString() + "\n" + "\n";

                        UseClipBoardWenziSend(content);

                        //3.完成截图;
                        SendShotScreenOperater();

                        //4.点击发送;
                        SendEnterOperater();

                        CanDOVoiceCheck();
                    }
                    else
                    {
                        string rm  = ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString();
                        string cpu = ComputerInfomation.getCPUUsage();

                        string content = string.Empty;
                        content = "服务器终端实时状态:" + "\n" +
                                  "   1.Multicharts 进程运行异常,请立即检查..." + "\n" +
                                  "   2.内存使用率为: " + ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString() + "\n" +
                                  "   3.CPU使用率为: " + ComputerInfomation.getCPUUsage().ToString() + "\n" + "\n";

                        UseClipBoardWenziSend(content);

                        //3.完成截图;
                        SendShotScreenOperater();

                        //4.点击发送;
                        SendEnterOperater();

                        CanDOVoiceCheck();
                    }
                }

                if (DateTime.Now.ToString("T").CompareTo(this.textBox_Eveing.Text) == 0)
                {
                    System.Threading.Thread.Sleep(1000);
                    if (CheckProcessIsOk())
                    {
                        string rm  = ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString();
                        string cpu = ComputerInfomation.getCPUUsage();

                        string content = string.Empty;
                        content = "服务器终端实时状态:" + "\n" +
                                  "   1.Multicharts 进程运行良好..." + "\n" +
                                  "   2.内存使用率为: " + ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString() + "\n" +
                                  "   3.CPU使用率为: " + ComputerInfomation.getCPUUsage().ToString() + "\n" + "\n";

                        UseClipBoardWenziSend(content);

                        //3.完成截图;
                        SendShotScreenOperater();

                        //4.点击发送;
                        SendEnterOperater();

                        CanDOVoiceCheck();
                    }
                    else
                    {
                        string rm  = ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString();
                        string cpu = ComputerInfomation.getCPUUsage();

                        string content = string.Empty;
                        content = "服务器终端实时状态:" + "\n" +
                                  "   1.Multicharts 进程运行异常,请立即检查..." + "\n" +
                                  "   2.内存使用率为: " + ComputerInfomation.get_StorageInfo().dwMemoryLoad.ToString() + "\n" +
                                  "   3.CPU使用率为: " + ComputerInfomation.getCPUUsage().ToString() + "\n" + "\n";

                        UseClipBoardWenziSend(content);

                        //3.完成截图;
                        SendShotScreenOperater();

                        //4.点击发送;
                        SendEnterOperater();

                        CanDOVoiceCheck();
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }