Example #1
0
 public Gram GetGrams()
 {
     if (Constants.LinuxMode)
     {
         Gram g = ClientExecutor.Instance.GetGrams(this.Address);
         if (this.grams != g)
         {
             this.grams     = g;
             this.isCreated = 1;
             this.OnChanged();
         }
         return(g);
     }
     return(0);
 }
Example #2
0
        public void WaitGramsChangedLoop()
        {
            int  num    = 0;
            Gram mgrams = this.Grams;

            while (true)
            {
                num++;
                ClientExecutor.Instance.LastWait(2000);
                Gram g = GetGrams();
                if (g != mgrams || num > 20)
                {
                    this.grams = g;
                    this.OnChanged();
                    break;
                }
            }
        }