Esempio n. 1
0
 private void checkPull2()
 {
     txtLocationPull2.Text  = this.pull2Location;
     chkEnablePull2.Checked = this.pull2Enabled;
     if (String.IsNullOrEmpty(this.pull2Location) == false && this.pull2Enabled)
     {
         gammuPull2 = new GMonit(pull2Location, GMonit.PULL2INDEX);
         if (!gammuPull2.checkTableExists())
         {
             chkEnablePull2.Checked = false;
             this.pull2Enabled      = false;
             DialogResult dr = MessageBox.Show("System Cannot detected table, want to create new?",
                                               "Table not found", MessageBoxButtons.YesNo);
             switch (dr)
             {
             case DialogResult.Yes:
                 gammuPull2.createTableLog();
                 break;
             }
         }
         else
         {
             gammuPull2.detectProcess();
             timerMonitPull2.Start();
             fillPull2DataList();
         }
     }
 }
Esempio n. 2
0
        private void timerMonitPull2_Tick(object sender, EventArgs e)
        {
            gammuPull2.detectProcess();
            if (gammuPull2.checkRunning())
            {
                picStatusPull2.Image  = GammuMonitoring.Properties.Resources.power_on;
                btnPull2Start.Enabled = false;
                btnPull2Stop.Enabled  = true;
                lblProcessId2.Text    = gammuPull2.process.Id.ToString();
            }
            else
            {
                picStatusPull2.Image  = GammuMonitoring.Properties.Resources.power;
                btnPull2Start.Enabled = true;
                btnPull2Stop.Enabled  = false;
                lblProcessId2.Text    = "";
            }
            int d = gammuPull2.runSchedule();

            if (d > 0)
            {
                fillPull2DataList();
            }
        }