}//{Binding text}" FontSize="38" HorizontalOptions=" {Binding position} private void DialogPage_Send(object sender, EventArgs e) { ReqO.message = message.Text; NetService net = new NetService(); net.AddMessage(ReqO, localDate); ReqO.message = ""; }
private async void CreateDialog_Enter(object sender, EventArgs e) { interlocutor = loginEntry.Text; NetService net = new NetService(); net.AddDialog(ReqO, interlocutor); //запрос на создание диалога с login MessagingCenter.Send <Page>(this, "Dialogs_Refresh"); await Navigation.PopAsync(); }
private async void Refresh() { NetService net = new NetService(); List <Dialog> Dialogs = new List <Dialog> { }; IEnumerable <Dialog> dialogs = await net.GetDialogs(ReqO); foreach (Dialog d in dialogs) { Dialogs.Add(d); } }
private async void DialogPage_Refresh(object sender, EventArgs e) { NetService net = new NetService(); List <Message> Messages = new List <Message> { }; IEnumerable <Message> messages = await net.GetMessages(ReqO); ре foreach (Message m in messages) { Messages.Add(m); } await Navigation.PushAsync(new DialogPage(ReqO, Messages)); }
private async void User_Create(object sender, EventArgs e) { NetService net = new NetService(); request_objs ReqO = new request_objs(loginEntry.Text, passwordEntry.Text); List <Dialog> Dialogs = new List <Dialog> { }; /*IEnumerable<Dialog> dialogs = await*/ net.CreateAcc(ReqO); //foreach (Dialog d in dialogs) // Dialogs.Add(d); await Navigation.PushAsync(new MainPage(ReqO, Dialogs)); }
private async void Overview_JoinDialog(object sender, ItemTappedEventArgs e) { NetService net = new NetService(); Dialog talk = e.Item as Dialog; List <Message> Messages = new List <Message> { }; ReqO.dialog_id = talk.dialog_id; IEnumerable <Message> messages = await net.GetMessages(ReqO); foreach (Message m in messages) { Messages.Add(m); } await Navigation.PushAsync(new DialogPage(ReqO, Messages)); }
private async void User_Enter(object sender, EventArgs e) { NetService net = new NetService(); request_objs ReqO = new request_objs(loginEntry.Text, passwordEntry.Text); List <Dialog> Dialogs = new List <Dialog> { }; IEnumerable <Dialog> dialogs = await net.GetDialogs(ReqO); foreach (Dialog d in dialogs) { Dialogs.Add(d); } await Navigation.PushAsync(new MainPage(ReqO, Dialogs)); }