private void OnItemChangedBrand(HostSpot hostSpot) { if (ItemChangedBrandHandle != null) { ItemChangedBrandHandle(hostSpot.DataID, EventArgs.Empty); } }
private void OnItemOpened(HostSpot hostSpot) { if (ItemOpenedHandle != null) { ShopInfo shopInfo = ShopInfo.GetBySeatNo(hostSpot.DataID); //string shopData = ""; //if (shopInfo!=null) //{ // shopData = JsonConvert.SerializeObject(shopInfo); //} ItemOpenedHandle(this, new HotSpotEventArgs(shopInfo)); } }
public void cmAction_MenuItem_Click(object sender, RoutedEventArgs e) { MenuItem menuItem = sender as MenuItem; string dataID = menuItem.Tag as string; string actionType = menuItem.CommandParameter as string; switch (actionType) { case "Open": HostSpot hotspot = GetHotSpotByDataID(dataID); OnItemOpened(hotspot); break; case "Edit": EditHotSpot(dataID); break; case "Change": ChangeHotSpot(dataID); break; } }