Exemplo n.º 1
0
        void DoNotify()
        {
            Thread.Sleep(5000);

            Events.EndpointReferenceType reference = (Events.EndpointReferenceType)Application["consumer"];

            Notification.NotificationProvider provider = new NotificationProvider();

            //string address = "http://192.168.31.142:8080//onvif_notify_server/";
            string address = reference.Address.Value;

            provider.Notify(address);
        }
Exemplo n.º 2
0
        public ShellViewModel()
        {
            // Build the menus
            this.Menu.Add(new MenuItem()
            {
                Icon = new PackIconMaterial()
                {
                    Kind = PackIconMaterialKind.Home
                }, Text = "Home", NavigationDestination = new Uri("Views/HomeView.xaml", UriKind.RelativeOrAbsolute)
            });
            this.Menu.Add(new MenuItem()
            {
                Icon = new PackIconMaterial()
                {
                    Kind = PackIconMaterialKind.Collage
                }, Text = "Collection", NavigationDestination = new Uri("Views/CollectionView.xaml", UriKind.RelativeOrAbsolute)
            });
            this.Menu.Add(new MenuItem()
            {
                Icon = new PackIconMaterial()
                {
                    Kind = PackIconMaterialKind.Folder
                }, Text = "Folders", NavigationDestination = new Uri("Views/FoldersView.xaml", UriKind.RelativeOrAbsolute)
            });
            this.Menu.Add(new MenuItem()
            {
                Icon = new PackIconMaterial()
                {
                    Kind = PackIconMaterialKind.Sync
                }, Text = "Synchronization", NavigationDestination = new Uri("Views/SynchronizeView.xaml", UriKind.RelativeOrAbsolute)
            });

            this.OptionsMenu.Add(new MenuItem()
            {
                Icon = new PackIconMaterial()
                {
                    Kind = PackIconMaterialKind.Settings
                }, Text = "Settings", NavigationDestination = new Uri("Views/SettingsView.xaml", UriKind.RelativeOrAbsolute)
            });
            this.OptionsMenu.Add(new MenuItem()
            {
                Icon = new PackIconMaterial()
                {
                    Kind = PackIconMaterialKind.Help
                }, Text = "About", NavigationDestination = new Uri("Views/AboutView.xaml", UriKind.RelativeOrAbsolute)
            });

            NotificationProvider.Notify("[Ongoing] Antman & the Wasp", 2);
        }
Exemplo n.º 3
0
 private void Source_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "Speed")
     {
         if (AppSettings.Current.IsSpeedAlertEnabled &&
             source.Speed > AppSettings.Current.SpeedLimit &&
             !timer.IsEnabled)
         {
             NotificationProvider.Notify();
             timer.Start();
         }
         else if (timer.IsEnabled)
         {
             timer.Stop();
         }
     }
 }
Exemplo n.º 4
0
 private void Timer_Tick(object sender, EventArgs e)
 {
     NotificationProvider.Notify();
 }