public static void refreshListview(string profileName, string profile_status) { using (ProfileData pd = new ProfileData ()) { pd.profileName = profileName; pd.profile_status = profile_status; Device.BeginInvokeOnMainThread (()=> { ListviewItem.Add(pd); }); } }
public void switch_Toggled(object sender, ToggledEventArgs e) { var b = (Switch)sender; var ItemData = (NameByUser)b.BindingContext; ProfileData ProfileData = new ProfileData (); if (e.Value) { ProfileData.NameByUserNodeOfProfile = ItemData.node_name_by_user; ProfileData.nodeAddrOfProfile = ItemData.node_addr; ProfileData.node_deviceType = ItemData.node_deviceType; ProfileDataList.Add (ProfileData); } else { ProfileDataList.RemoveAll (x => x.nodeAddrOfProfile == ItemData.node_addr); } }
public ObservableItem() { item = new ProfileData(); }