Ejemplo 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();
         }
     }
 }
Ejemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            timerJam.Start();
            picStatusPull1.Image = GammuMonitoring.Properties.Resources.power;
            picStatusPull2.Image = GammuMonitoring.Properties.Resources.power;
            bool firstStart = Boolean.Parse(ConfigurationManager.AppSettings.Get("firstload"));

            if (firstStart)
            {
                gammuPull1 = new GMonit("", GMonit.PULL1INDEX);
                gammuPull1.createTableLog();
                gammuPull2 = new GMonit("", GMonit.PULL2INDEX);
                gammuPull2.createTableLog();
                Helper.Setingan.set("firstload", "true");
            }
            else
            {
                checkPull1();
                checkPull2();
            }
        }