Ejemplo n.º 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((Stocky.Utility.PopUpNotificationView)(target));

            #line 20 "..\..\..\Notification\PopUpNotifiactionView.xaml"
                this.window.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden

            #line 21 "..\..\..\Notification\PopUpNotifiactionView.xaml"
                this.window.Deactivated += new System.EventHandler(this.Window_Deactivated);

            #line default
            #line hidden

            #line 22 "..\..\..\Notification\PopUpNotifiactionView.xaml"
                this.window.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.window_MouseDown);

            #line default
            #line hidden
                return;

            case 2:
                this.CloseAnimation_BeginStoryboard = ((System.Windows.Media.Animation.BeginStoryboard)(target));
                return;

            case 3:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.image = ((System.Windows.Controls.Image)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 2
0
        private async Task SendNotification()
        {
            var task = Task.Run(() =>
            {
                Stocky.Proxies.MailClient MailClient = new Proxies.MailClient();
                try
                {
                    OM.Send("NEWNOTIFICATION", NewNotification);
                    Application.Current.Dispatcher.Invoke((Action) delegate { Stocky.Utility.PopUpNotificationView p = new PopUpNotificationView(); p.Show(); });


                    MailClient.SendNotification(NewNotification);
                }
                finally
                {
                    MailClient.Close();
                }
            });

            await task;
        }