点击回首页
我的浏览记录 | | 帮助?
当前位置:
首页>> 行业软件>> 网站监控程序2.0源码>> 源文件浏览
[商业版 100金币] WinForm,下载次数:0 次 | 关键字: 网站监控

源码截图

源码目录树

当前路径:WebService_Monitor/Monitor.cs     using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Function;
using Model;
using System.IO;

namespace WebService_Monitor
{
    public partial class Monitor : Form
    {

        public int status=-1;//记录当前webservice状态。-1,初始状态,1.为OK,2.为停止,3为出错
        public int restartflag = -1;//记录重启状态。
        public string Webserver_Name; //WebService名称
        public string Ip_Adress;//webservice地址
      
        public int Frequent;//频率
        public int Tip_Method;//监控方式
        public string logurl;//日志存储目录
        public int remaindays;//日志保留天数;
         //发邮件信息
        private string address;
        private string pwd;
        private string topic_success;
        private string content_success;
        private string host;
        private int port;
       
        private string topic_failure;
        private string content_failure;
        //接受邮件信息
        List<Receiver> To_email_address;
        //记录当前日期,判断是否进行日志清理
        private string startdate = "";

        //传递配置文件地址
        private string web_name;
        private string configureurl;
        
        public Monitor(string name,string url)
        {
            this.web_name = name;
            this.configureurl = url;
          
            InitializeComponent();
        }

        private void Monitor_Load(object sender, EventArgs e)
        {  
            this.Text = web_name; 
            NI_Monitor.Text = web_name;
            BTN_stop.Enabled = false;
            Get_webservice();
           
        }
        ///<summary>
             ///获取webservice基础设置
             ///</summary>
        public void Get_webservice()
        {
          
            List<webservice_model> model=new  List<webservice_model>();
            model = new Fun().Get_webservice_configure(configureurl);
            TB_Webservice_Name.Text = model[0].name.ToString();
            TB_Webservice_IP.Text = model[0].ip.ToString();
          
            TB_Webservice_Frequent.Text=model[0].frequent.ToString();
            CB_Webservice_Method.SelectedIndex=int.Parse(model[0].notify);
        }
        ///<summary>
        ///获取Email基础设置
        ///</summary>
        public void Get_Emailsender()
        {
           
            List<Email_Sender> model = new List<Email_Sender>();
            model = new Fun().Get_Email_Sender(configureurl);
                TB_Emailsender_Adress.Text = model[0].address.ToString();
                TB_Emailsender_PWD.Text = model[0].pwd.ToString();
                TB_Emailsender_topic_success.Text = model[0].topic_success;
                TB_Emailsender_content_success.Text = model[0].content_success;
                TB_Emailsender_Host.Text = model[0].host;
                TB_Emailsender_Port.Text = model[0].port.ToString();
               
                TB_Emailsender_Topic_failure.Text = model[0].topic_failure.ToString();
                TB_Emailsender_Content_failure.Text = model[0].content_failure.ToString();
               
         
        }
        public void Get_Receiver()
        {
            LB_Receiver.DataSource = null;
            List<Receiver> model = new List<Receiver>();
            model = new Fun().Get_Receiver(configureurl);
            if (model.Count > 0)
            {
                LB_Receiver.DataSource = model;
                LB_Receiver.DisplayMember = "address";
            }
  ...
对不起,完整源码文件,请先购买后再查看
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途) 企业QQ:2852517674
地址:北京市海淀区中关村鼎好大厦A座二层 邮编:100080
Room A-801,Dinghao Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2015. 京ICP备09089570号 | 京公网安备11010702000869号
分享该页面
关闭侧边栏