Ejemplo n.º 1
0
        protected virtual void OnNewMessageEvent(VkMessageEventArgs e)
        {
            var handler = this.NewMessageEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Ejemplo n.º 2
0
        private void onMessageReceive(object sender, VkMessageEventArgs e)
        {
            Deployment.Current.Dispatcher.BeginInvoke(
                () =>
                    {
                        App.VK.GetMessage(e.Id.ToString(), result => Deployment.Current.Dispatcher.BeginInvoke(() =>
                        {

                            App.MainPageData.AddMessage((VKMessageModel[])result);
                            App.MainPageData.AddDialog((VKMessageModel[])result);
                            if (incomingSound != null && !e.Flags.Outbox && App.MainPageData.IsSoundEnabled)
                            {
                                incomingSound.Stop();
                                incomingSound.Play();
                            }
                        }), error => { });
                        if (!e.Flags.Outbox)
                        {
                            this.dataContext.UnreadMessages += 1;
                        }
                    });
        }
Ejemplo n.º 3
0
        protected virtual void OnNewMessageEvent(VkMessageEventArgs e)
        {
            var handler = this.NewMessageEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }