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()); } }
public void initialize() { microgear = new Microgear(); microgear.onConnect += Connect; microgear.onAbsent += Absent; microgear.onPresent += Present; microgear.onError += Error; microgear.onInfo += Info; }