상속: INotifyPropertyChanged
예제 #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e) {
            base.OnNavigatedTo(e);

            string uriParam = "";
            
            if (NavigationContext.QueryString.TryGetValue("chatId", out uriParam)) {
                model = TelegramSession.Instance.GetChat(int.Parse(uriParam));
            } else {
                logger.error("Unable to get model id from navigation");
            }

            UpdateDataContext();
        }
예제 #2
0
        public void SaveChat(Chat chat) {
            ChatModel model = new ChatModel(chat);
            if (chats.ContainsKey(model.Id)) {
                Deployment.Current.Dispatcher.BeginInvoke(delegate {
                    chats[model.Id].SetChat(chat);
                });
            }
            else {
                chats[model.Id] = model;
            }

        }