Esempio n. 1
0
        private void Parking_Load(object sender, EventArgs e)
        {
            microgear            = new Microgear();
            microgear.onConnect += Connect;
            microgear.onMessage += Message;
            microgear.onPresent += Present;

            microgear.onError += Error;

            microgear.onInfo += Info;
            microgear.Connect(AppID, Key, Secret);
            microgear.SetAlias(Alias);
            microgear.Subscribe(Topic);
            microgear.onAbsent += Absent;
            Connect2Netpie();
            foreach (Park park in this.Controls.OfType <Park>())
            {
                ParkList.Add(park);
            }
            ParkList.Reverse();

            for (int i = 1; i < ParkList.Count + 1; i++)
            {
                ParkList[i - 1].SetParkNumber(i.ToString());
            }
        }
Esempio n. 2
0
 public void connect(String Alias)
 {
     Console.WriteLine("Connecting to NETPIE....");
     microgear.Connect(AppID, Key, Secret);
     microgear.SetAlias(Alias);
 }