public DeviceAddressListPage ()
		{
			InitializeComponent ();

			addressListView.ItemTapped  += (sender, e) => 
			{	

				var Item = (Db_allnode)e.Item;
				if (Item.node_deviceType.Equals (EnumtoString.EnumString(NodeDeviceType.GeneralPurposeDetector)) && Item.node_status.Equals("0")) {
					var DeviceList = new Node_io_GpdPage ();
					DeviceList.BindingContext = Item;
					Navigation.PushAsync (DeviceList);
				} else if (Item.node_deviceType.Equals (EnumtoString.EnumString(NodeDeviceType.InWallSwitch)) && Item.node_status.Equals("0")) {
					var DeviceList = new Node_io_ItemPage();//InitializePage.ni_iw;//new Node_io_ItemPage ();
					DeviceList.BindingContext = Item;
					Navigation.PushAsync (DeviceList);
				} else if (Item.node_deviceType.Equals (EnumtoString.EnumString(NodeDeviceType.RemoteControl)) && Item.node_status.Equals("0")) {
					var DeviceList = new RemotePage ();
					DeviceList.BindingContext = Item;
					Navigation.PushAsync (DeviceList);
				} 
				else {
					((ListView)sender).SelectedItem = null; //disable listview hightLight
				}
			};
		}
Esempio n. 2
0
		public InitializePage ()
		{
			ni_gpd = new Node_io_GpdPage ();
			da_l = new DeviceAddressListPage ();
			ni_iw = new Node_io_ItemPage ();
		}