Ejemplo n.º 1
0
        public frmMain(bool isAutoRun = false)
        {
            _isAutoRun = isAutoRun;
            InitializeComponent();
            System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;
            OnIPRetriveProgress += new IPRetriveProgress(UpdateUIProgress);
            OnLogQueryStatus += new LogQueryStatus(frmMain_OnLogQueryStatus);

            OnIPScanProgress += new IPScanProgress(UpdateUIProgressForIPScan);

            try
            {
                top_lblCurrentIPRetrive_Click(null, null);
                SettingBiz biz = new SettingBiz();
                myTimer.Tick += new EventHandler(TimerEventProcessor);
                myTimer.Interval = biz.GetSettings().ExecuteInterval * (1000 * 60 * 60);
                myTimer.Start();

                if (isAutoRun)
                {
                    SettingBiz settingBiz = new SettingBiz();
                    var settingData = settingBiz.GetSettings();
                    SendRequestToRetrieveIP(settingData.StartupRunTimes);
                }
            }
            catch { }
        }
Ejemplo n.º 2
0
 private void frmScan_Load(object sender, EventArgs e)
 {
     OnIPScanProgress += new IPScanProgress(UpdateUIProgress);
 }