public async Task <IActionResult> Edit(int id, [Bind("ID,Title,Title_Ru,Title_Az,Content,Content_Az,Content_Ru")] AboutItems aboutItems)
        {
            if (id != aboutItems.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(aboutItems);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AboutItemsExists(aboutItems.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(aboutItems));
        }
Пример #2
0
        public AboutViewModel()
        {
            AboutItems.Clear();

            InfoItems.AddRange(new[]
            {
                new MenuItem {
                    Name = "About this app", Icon = "icon_venue.png", Parameter = "about"
                },
                new MenuItem {
                    Name = "Sponsors", Icon = "icon_venue.png", Parameter = "sponsors"
                },
                new MenuItem {
                    Name = "Event Map", Icon = "icon_venue.png", Parameter = "floor-maps"
                },
                //new MenuItem { Name = "Lunch Locations", Icon = "ic_restaurant_menu.png", Parameter = "lunch-locations"},
                new MenuItem {
                    Name = "Venue", Icon = "icon_venue.png", Parameter = "venue"
                },
            });

            accountItem = new MenuItem
            {
                Name = "Logged in as:"
            };

            syncItem = new MenuItem
            {
                Name = "Last Sync:"
            };

            UpdateItems();

            AccountItems.Add(accountItem);
            AccountItems.Add(syncItem);

            //This will be triggered wen
            Settings.PropertyChanged += async(sender, e) =>
            {
                if (e.PropertyName == "Email")
                {
                    Settings.NeedsSync = true;

                    UpdateItems();

                    OnPropertyChanged("LoginText");
                    OnPropertyChanged("AccountItems");
                    //if logged in you should go ahead and sync data.
                    if (Settings.IsLoggedIn)
                    {
                        await ExecuteSyncCommandAsync();
                    }
                }

                if (e.PropertyName == "Email" || e.PropertyName == "LastSync" || e.PropertyName == "PushNotificationsEnabled")
                {
                    OnPropertyChanged("AccountItems");
                }
            };
        }
        public async Task <IActionResult> Create([Bind("ID,Title,Title_Ru,Title_Az,Content,Content_Az,Content_Ru")] AboutItems aboutItems)
        {
            if (ModelState.IsValid)
            {
                _context.Add(aboutItems);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(aboutItems));
        }
Пример #4
0
        public AboutPageViewModel(ILogger logger) : base(logger)
        {
            AboutItems.AddRange(new[]
            {
                new AboutMenuItem {
                    Name = "Created by Xamarin with <3", Command = LaunchBrowserCommand, Parameter = "http://www.xamarin.com"
                },
                new AboutMenuItem {
                    Name = "Open source on GitHub!", Command = LaunchBrowserCommand, Parameter = "https://github.com/doodz/AppSshForm"
                },
                new AboutMenuItem {
                    Name = "License GPL 3", Command = LaunchBrowserCommand, Parameter = "https://opensource.org/licenses/GPL-3.0/"
                }
            });

            TechnologyItems.AddRange(new[]
            {
                new AboutMenuItem {
                    Name = "PCL Storage", Command = LaunchBrowserCommand, Parameter = "https://github.com/dsplaisted/PCLStorage"
                },
                new AboutMenuItem {
                    Name = "Settings Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Settings"
                },
                new AboutMenuItem {
                    Name = "sqlite-net-pcl", Command = LaunchBrowserCommand, Parameter = "https://github.com/praeclarum/sqlite-net"
                },
                new AboutMenuItem {
                    Name = "Autofac", Command = LaunchBrowserCommand, Parameter = "https://github.com/autofac/Autofac"
                },
                new AboutMenuItem {
                    Name = "NLog", Command = LaunchBrowserCommand, Parameter = "https://github.com/NLog/NLog/"
                },
                new AboutMenuItem {
                    Name = "SSH.NET", Command = LaunchBrowserCommand, Parameter = "https://github.com/sshnet/SSH.NET/"
                },
                new AboutMenuItem {
                    Name = "Rg.Plugins.Popup", Command = LaunchBrowserCommand, Parameter = "https://github.com/rotorgames/Rg.Plugins.Popup/"
                },
                new AboutMenuItem {
                    Name = "Microcharts", Command = LaunchBrowserCommand, Parameter = "https://github.com/aloisdeniel/Microcharts"
                },
                new AboutMenuItem {
                    Name = "httptransfertasks", Command = LaunchBrowserCommand, Parameter = "https://github.com/aritchie/httptransfertasks"
                },
                new AboutMenuItem {
                    Name = "Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "http://xamarin.com/forms"
                }
            });
        }
Пример #5
0
        public AboutViewModel()
        {
            AboutItems.Clear();
            AboutItems.Add(new MenuItem {
                Name = "About this app", Icon = "icon_venue.png"
            });

            InfoItems.AddRange(new[]
            {
                new MenuItem {
                    Name = "Sponsors", Icon = "icon_venue.png", Parameter = "sponsors"
                },
                new MenuItem {
                    Name = "Event Map", Icon = "icon_venue.png", Parameter = "floor-maps"
                },
                new MenuItem {
                    Name = "Lunch Locations", Icon = "ic_restaurant_menu.png", Parameter = "lunch-locations"
                },
                new MenuItem {
                    Name = "Venue", Icon = "icon_venue.png", Parameter = "venue"
                },
            });

            accountItem = new MenuItem
            {
                Name = "Logged in as:"
            };

            syncItem = new MenuItem
            {
                Name = "Last Sync:"
            };

            UpdateItems();

            AccountItems.Add(accountItem);
            AccountItems.Add(syncItem);

            //This will be triggered wen
            Settings.PropertyChanged += (sender, e) =>
            {
                if (e.PropertyName == "Email" || e.PropertyName == "LastSync" || e.PropertyName == "PushNotificationsEnabled")
                {
                    UpdateItems();
                    OnPropertyChanged("AccountItems");
                }
            };
        }
Пример #6
0
        public AboutViewModel()
        {
            AboutItems.Clear();
            AboutItems.Add(new MenuItem {
                Name = "About this app", Icon = "icon_venue.png"
            });

            if (!FeatureFlags.SponsorsOnTabPage)
            {
                InfoItems.Add(new MenuItem {
                    Name = "Friends", Icon = "icon_venue.png", Parameter = "sponsors"
                });
            }

            // pushItem.Command = new Command(
            // () =>
            // {
            // if (push.IsRegistered)
            // {
            // UpdateItems();
            // return;
            // }

            // if (Settings.AttemptedPush)
            // {
            // MessagingService.Current.SendMessage<MessagingServiceQuestion>(
            // MessageKeys.Question,
            // new MessagingServiceQuestion
            // {
            // Title = "Push Notification",
            // Question =
            // "To enable push notifications, please go into Settings, Tap Notifications, and set Allow Notifications to on.",
            // Positive = "Settings",
            // Negative = "Maybe Later",
            // OnCompleted = (result) =>
            // {
            // if (result)
            // {
            // push.OpenSettings();
            // }
            // }
            // });
            // return;
            // }

            // push.RegisterForNotifications();
            // });
        }
Пример #7
0
        public SettingsPageViewModel(ILogger logger) : base(logger)
        {
            AboutItems.AddRange(new[]
            {
                new SettingsMenuItem {
                    Name = "Created by Xamarin with <3", Command = LaunchBrowserCommand, Parameter = "http://www.xamarin.com"
                },
                new SettingsMenuItem {
                    Name = "Open source on GitHub!", Command = LaunchBrowserCommand, Parameter = "https://github.com/doodz/AppSshForm"
                },
                new SettingsMenuItem {
                    Name = "License GPL 3", Command = LaunchBrowserCommand, Parameter = "https://opensource.org/licenses/GPL-3.0/"
                }
            });

            TechnologyItems.AddRange(new[]
            {
                new SettingsMenuItem {
                    Name = "PCL Storage", Command = LaunchBrowserCommand, Parameter = "https://github.com/dsplaisted/PCLStorage"
                },
                new SettingsMenuItem {
                    Name = "Settings Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Settings"
                },
                new SettingsMenuItem {
                    Name = "sqlite-net-pcl", Command = LaunchBrowserCommand, Parameter = "https://github.com/praeclarum/sqlite-net"
                },
                new SettingsMenuItem {
                    Name = "Autofac", Command = LaunchBrowserCommand, Parameter = "https://github.com/autofac/Autofac"
                },
                new SettingsMenuItem {
                    Name = "NLog", Command = LaunchBrowserCommand, Parameter = "https://github.com/NLog/NLog/"
                },
                new SettingsMenuItem {
                    Name = "Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "http://xamarin.com/forms"
                }
            });
        }
Пример #8
0
        public AboutViewModel()
        {
            AboutItems.Clear();
            AboutItems.Add(new MenuItem {
                Name = "About this app", Icon = "icon_venue.png"
            });
            push = DependencyService.Get <IPushNotifications>();

            if (!FeatureFlags.SponsorsOnTabPage)
            {
                InfoItems.Add(new MenuItem {
                    Name = "Sponsors", Icon = "icon_venue.png", Parameter = "sponsors"
                });
            }
            if (FeatureFlags.EvalEnabled)
            {
                InfoItems.Add(new MenuItem {
                    Name = "Evaluations", Icon = "icon_venue.png", Parameter = "evaluations"
                });
            }

            InfoItems.Add(new MenuItem {
                Name = "Venue", Icon = "icon_venue.png", Parameter = "venue"
            });

            if (FeatureFlags.FloormapEnabled)
            {
                InfoItems.Add(new MenuItem {
                    Name = "Conference Floor Maps", Icon = "icon_venue.png", Parameter = "floor-maps"
                });
            }

            if (FeatureFlags.CodeOfConductEnabled)
            {
                InfoItems.Add(new MenuItem {
                    Name = AboutThisApp.CodeOfConductPageTitle, Icon = "icon_code_of_conduct.png", Parameter = "code-of-conduct"
                });
            }
            if (FeatureFlags.WifiEnabled)
            {
                InfoItems.Add(new MenuItem {
                    Name = "Wi-Fi Information", Icon = "icon_wifi.png", Parameter = "wi-fi"
                });
            }
            accountItem = new MenuItem
            {
                Name = "Logged in as:"
            };

            syncItem = new MenuItem
            {
                Name = "Last Sync:"
            };

            pushItem = new MenuItem
            {
                Name = "Enable push notifications"
            };

            pushItem.Command = new Command(() =>
            {
                if (push.IsRegistered)
                {
                    UpdateItems();
                    return;
                }

                if (Settings.AttemptedPush)
                {
                    MessagingService.Current.SendMessage <MessagingServiceQuestion>(MessageKeys.Question, new MessagingServiceQuestion
                    {
                        Title       = "Push Notification",
                        Question    = "To enable push notifications, please go into Settings, Tap Notifications, and set Allow Notifications to on.",
                        Positive    = "Settings",
                        Negative    = "Maybe Later",
                        OnCompleted = (result) =>
                        {
                            if (result)
                            {
                                push.OpenSettings();
                            }
                        }
                    });
                    return;
                }

                push.RegisterForNotifications();
            });

            UpdateItems();

            if (FeatureFlags.LoginEnabled)
            {
                AccountItems.Add(accountItem);
            }
            AccountItems.Add(syncItem);
            AccountItems.Add(pushItem);

            if (!FeatureFlags.LoginEnabled && FeatureFlags.AppToWebLinkingEnabled)
            {
                AccountItems.Add(new MenuItem {
                    Name = "Link app data to website", Icon = "icon_linkapptoweb.png", Parameter = "mobiletowebsync"
                });
                AccountItems.Add(new MenuItem {
                    Name = "Link website data to app", Icon = "icon_linkapptoweb.png", Parameter = "webtomobilesync"
                });
            }

            //This will be triggered wen
            Settings.PropertyChanged += (sender, e) =>
            {
                if (e.PropertyName == "Email" || e.PropertyName == "LastSync" || e.PropertyName == "PushNotificationsEnabled")
                {
                    UpdateItems();
                    OnPropertyChanged("AccountItems");
                }
            };
        }
Пример #9
0
        public SettingsViewModel()
        {
            //This will be triggered wen
            Settings.PropertyChanged += async(sender, e) =>
            {
                if (e.PropertyName == "Email")
                {
                    Settings.NeedsSync = true;
                    OnPropertyChanged("LoginText");
                    OnPropertyChanged("AccountItems");
                    //if logged in you should go ahead and sync data.
                    if (Settings.IsLoggedIn)
                    {
                        await ExecuteSyncCommandAsync();
                    }
                }
            };

            AboutItems.AddRange(new []
            {
                new MenuItem {
                    Name = "Created by Xamarin with <3", Command = LaunchBrowserCommand, Parameter = "http://www.xamarin.com"
                },
                new MenuItem {
                    Name = "Open source on GitHub!", Command = LaunchBrowserCommand, Parameter = "http://tiny.cc/app-conference"
                },
                new MenuItem {
                    Name = "Terms of Use", Command = LaunchBrowserCommand, Parameter = "https://store.xamarin.com/terms"
                },
                new MenuItem {
                    Name = "Privacy Policy", Command = LaunchBrowserCommand, Parameter = "http://xamarin.com/privacy"
                },
                new MenuItem {
                    Name = "Open Source Notice", Command = LaunchBrowserCommand, Parameter = "http://tiny.cc/app-conference-osn"
                }
            });

            TechnologyItems.AddRange(new []
            {
                new MenuItem {
                    Name = "Azure Mobile Apps", Command = LaunchBrowserCommand, Parameter = "https://github.com/Azure/azure-mobile-apps-net-client/"
                },
                new MenuItem {
                    Name = "Censored", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Censored"
                },
                new MenuItem {
                    Name = "Calendar Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/TheAlmightyBob/Calendars"
                },
                new MenuItem {
                    Name = "Connectivity Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Connectivity"
                },
                new MenuItem {
                    Name = "Embedded Resource Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/JosephHill/EmbeddedResourcePlugin"
                },
                new MenuItem {
                    Name = "External Maps Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/ExternalMaps"
                },
                new MenuItem {
                    Name = "Humanizer", Command = LaunchBrowserCommand, Parameter = "https://github.com/Humanizr/Humanizer"
                },
                new MenuItem {
                    Name = "Image Circles", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/ImageCircle"
                },
                new MenuItem {
                    Name = "Json.NET", Command = LaunchBrowserCommand, Parameter = "https://github.com/JamesNK/Newtonsoft.Json"
                },
                new MenuItem {
                    Name = "LinqToTwitter", Command = LaunchBrowserCommand, Parameter = "https://github.com/JoeMayo/LinqToTwitter"
                },
                new MenuItem {
                    Name = "Messaging Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/cjlotz/Xamarin.Plugins"
                },
                new MenuItem {
                    Name = "Mvvm Helpers", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/mvvm-helpers"
                },
                new MenuItem {
                    Name = "Noda Time", Command = LaunchBrowserCommand, Parameter = "https://github.com/nodatime/nodatime"
                },
                new MenuItem {
                    Name = "Permissions Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Permissions"
                },
                new MenuItem {
                    Name = "PCL Storage", Command = LaunchBrowserCommand, Parameter = "https://github.com/dsplaisted/PCLStorage"
                },
                new MenuItem {
                    Name = "Pull to Refresh Layout", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout"
                },
                new MenuItem {
                    Name = "Settings Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Settings"
                },
                new MenuItem {
                    Name = "Toolkit for Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/xamarin.forms-toolkit"
                },
                new MenuItem {
                    Name = "Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "http://xamarin.com/forms"
                },
                new MenuItem {
                    Name = "Xamarin Insights", Command = LaunchBrowserCommand, Parameter = "http://xamarin.com/insights"
                },
                new MenuItem {
                    Name = "ZXing.Net Mobile", Command = LaunchBrowserCommand, Parameter = "https://github.com/Redth/ZXing.Net.Mobile"
                }
            });
        }
Пример #10
0
        public AboutViewModel()
        {
            AboutItems.Clear();
            // AboutItems.Add(new MenuItem { Name = "About this app", Icon = "icon_venue.png" });
            push = DependencyService.Get <IPushNotifications>();

            //InfoItems.AddRange(new []
            //    {
            //        new MenuItem { Name = "News", Icon = "icon_venue.png", Parameter="news"},
            //         new MenuItem { Name = "Notifications", Icon = "icon_venue.png", Parameter="notifications"},//binny
            //        new MenuItem { Name = "Feedback & Ratings", Icon = "icon_venue.png", Parameter="feedback-ratings"},
            //        new MenuItem { Name = "Maps", Icon = "icon_venue.png", Parameter = "maps"},
            //        new MenuItem { Name = "Restaurant Floor Plans", Icon = "icon_venue.png", Parameter = "restaurant-maps"},
            //        new MenuItem { Name = "Sealegs Promise", Icon = "icon_code_of_conduct.png", Parameter="sealegs-promise" },
            //        new MenuItem { Name = "Wi-Fi Information", Icon = "icon_wifi.png", Parameter="wi-fi" },
            //    });

            //accountItem = new MenuItem
            //    {
            //        Name = "Logged in as:"
            //    };

            //syncItem = new MenuItem
            //    {
            //        Name = "Last Sync:"
            //    };

            pushItem = new MenuItem
            {
                Name = "Enable push notifications"
            };

            pushItem.Command = new Command(() =>
            {
                MessagingService.Current.SendMessage <MessagingServiceQuestion>(MessageKeys.Question, new MessagingServiceQuestion
                {
                    Title       = "Push Notification",
                    Question    = "To enable push notifications, please go into Settings, Tap Notifications, and set Allow Notifications to on.",
                    Positive    = "Settings",
                    Negative    = "Maybe Later",
                    OnCompleted = (result) =>
                    {
                        if (result)
                        {
                            push.OpenSettings();
                        }
                    }
                });

                push.RegisterForNotifications();
                pushItem.Name = "Push notifications enabled";
                return;
            });

            // UpdateItems();

            // AccountItems.Add(accountItem);
            // AccountItems.Add(syncItem);
            AccountItems.Add(pushItem);

            //This will be triggered wen
            //Settings.PropertyChanged += (sender, e) =>
            //    {
            //        if(e.PropertyName == "Email" || e.PropertyName == "LastSync" || e.PropertyName == "PushNotificationsEnabled")
            //        {
            //            UpdateItems();
            //            RaisePropertyChanged("AccountItems");
            //        }
            //    };
        }
Пример #11
0
        public AboutViewModel(INavigationService navigationService, IEventAggregator eventAggregator, IStoreManager storeManager, IToast toast, IFavoriteService favoriteService, ILoggerFacade logger, ILaunchTwitter twitter, ISSOClient ssoClient, IPushNotifications pushNotifications, IReminderService reminderService, IPageDialogService pageDialogService)
            : base(navigationService, eventAggregator, storeManager, toast, favoriteService, logger, twitter, ssoClient, pushNotifications, reminderService, pageDialogService)
        {
            ToolBarItems.Add(new ToolbarItem
            {
                Text = LoginText,
                Command = LoginCommand
            });
            AboutItems.Clear();
            AboutItems.Add(new Models.MenuItem { Name = "About this app", Icon = "icon_venue.png" });

            InfoItems.AddRange(new[] 
            {
                new Models.MenuItem { Name = "Conference Feed", Icon = "menu_feed.png", Pagename = nameof(FeedPage) },
                new Models.MenuItem { Name = "Sponsors", Icon = "menu_sponsors.png", Pagename = nameof(SponsorsPage) },
                new Models.MenuItem { Name = "Venue", Icon = "menu_venue.png", Pagename = nameof(VenuePage) },
                new Models.MenuItem { Name = "Floor Maps", Icon = "menu_plan.png", Pagename = nameof(FloorMapsPage) },
                new Models.MenuItem { Name = "Conference Info", Icon = "menu_info.png", Pagename = nameof(ConferenceInformationPage) },
                new Models.MenuItem { Name = "Settings", Icon = "menu_settings.png", Pagename = nameof(SettingsPage) }
            });

            accountItem = new Models.MenuItem
            {
                Name = "Logged in as:"
            };

            syncItem = new Models.MenuItem
            {
                Name = "Last Sync:"
            };

            pushItem = new Models.MenuItem
            {
                Name = "Enable push notifications"
            };

            pushItem.Command = DelegateCommand.FromAsyncHandler(async () =>
            {
                if (PushNotifications.IsRegistered)
                {
                    UpdateItems();
                    return;
                }

                if (Settings.AttemptedPush)
                {
                    var response = await PageDialogService.DisplayAlertAsync("Push Notification",
                        "To enable push notifications, please go into Settings, Tap Notifications, and set Allow Notifications to on.",
                        "Settings",
                        "Maybe Later");

                    if (response)
                    {
                        PushNotifications.OpenSettings();
                    }
                }

                await PushNotifications.RegisterForNotifications();
            });

            UpdateItems();

            AccountItems.Add(accountItem);
            AccountItems.Add(syncItem);
            AccountItems.Add(pushItem);

            //This will be triggered wen 
            Settings.PropertyChanged += (sender, e) =>
            {
                if (e.PropertyName == "Email" || e.PropertyName == "LastSync" || e.PropertyName == "PushNotificationsEnabled")
                {
                    UpdateItems();
                    OnPropertyChanged("AccountItems");
                }
            };

            AccountItems.CollectionChanged += (sender, e) =>
            {
                AccountListHeightAdjustment = AccountItems.Count;
            };
            AccountListHeightAdjustment = AccountItems.Count;

            _isRegistered = PushNotifications.IsRegistered;
        }
Пример #12
0
        public SettingsViewModel(INavigationService navigationService, IEventAggregator eventAggregator, IStoreManager storeManager, IToast toast, IFavoriteService favoriteService, ILoggerFacade logger, ILaunchTwitter twitter, ISSOClient ssoClient, IPushNotifications pushNotifications, IReminderService reminderService, IPageDialogService pageDialogService)
            : base(navigationService, eventAggregator, storeManager, toast, favoriteService, logger, twitter, ssoClient, pushNotifications, reminderService, pageDialogService)
        {
            //This will be triggered wen
            Settings.PropertyChanged += async(sender, e) =>
            {
                if (e.PropertyName == "Email")
                {
                    Settings.NeedsSync = true;
                    OnPropertyChanged("LoginText");
                    OnPropertyChanged("AccountItems");
                    //if logged in you should go ahead and sync data.
                    if (Settings.IsLoggedIn)
                    {
                        await ExecuteSyncCommandAsync();
                    }
                }
            };

            AboutItems.AddRange(new[]
            {
                new Models.MenuItem {
                    Name = "Created by MyMie with love for Dev Open Space Leipzig", Command = LaunchBrowserCommand, Parameter = "https://www.mymieapp.com"
                },
                new Models.MenuItem {
                    Name = "Open source on GitHub!", Command = LaunchBrowserCommand, Parameter = "https://github.com/dersia/devopenspaceapp"
                },
                //new Models.MenuItem { Name = "Open Source Notice", Command=LaunchBrowserCommand, Parameter="http://tiny.cc/app-evolve-osn"}
            });

            TechnologyItems.AddRange(new[]
            {
                new Models.MenuItem {
                    Name = "Azure Mobile Apps", Command = LaunchBrowserCommand, Parameter = "https://github.com/Azure/azure-mobile-apps-net-client/"
                },
                new Models.MenuItem {
                    Name = "Censored", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Censored"
                },
                new Models.MenuItem {
                    Name = "Calendar Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/TheAlmightyBob/Calendars"
                },
                new Models.MenuItem {
                    Name = "Connectivity Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Connectivity"
                },
                new Models.MenuItem {
                    Name = "Embedded Resource Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/JosephHill/EmbeddedResourcePlugin"
                },
                new Models.MenuItem {
                    Name = "External Maps Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/ExternalMaps"
                },
                new Models.MenuItem {
                    Name = "Image Circles", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/ImageCircle"
                },
                new Models.MenuItem {
                    Name = "Json.NET", Command = LaunchBrowserCommand, Parameter = "https://github.com/JamesNK/Newtonsoft.Json"
                },
                new Models.MenuItem {
                    Name = "LinqToTwitter", Command = LaunchBrowserCommand, Parameter = "https://github.com/JoeMayo/LinqToTwitter"
                },
                new Models.MenuItem {
                    Name = "Messaging Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/cjlotz/Xamarin.Plugins"
                },
                new Models.MenuItem {
                    Name = "Permissions Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Permissions"
                },
                new Models.MenuItem {
                    Name = "Xamarin Evolve App", Command = LaunchBrowserCommand, Parameter = "https://github.com/xamarinhq/app-evolve"
                },
                new Models.MenuItem {
                    Name = "PCL Storage", Command = LaunchBrowserCommand, Parameter = "https://github.com/dsplaisted/PCLStorage"
                },
                new Models.MenuItem {
                    Name = "Pull to Refresh Layout", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout"
                },
                new Models.MenuItem {
                    Name = "Settings Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Settings"
                },
                new Models.MenuItem {
                    Name = "Toolkit for Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/xamarin.forms-toolkit"
                },
                new Models.MenuItem {
                    Name = "Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "http://xamarin.com/forms"
                },
                new Models.MenuItem {
                    Name = "Prism.Forms", Command = LaunchBrowserCommand, Parameter = "https://github.com/PrismLibrary/Prism"
                },
            });

            AboutItems.CollectionChanged += (sender, e) =>
            {
                AboutListHeightAdjustment = AboutItems.Count;
            };
            AboutListHeightAdjustment = AboutItems.Count;
        }
Пример #13
0
        public SettingsViewModel(INavigation navigation) : base(navigation)
        {
            signOnClient = DependencyService.Get <ISignOnClient>();

            AboutItems.AddRange(new[]
            {
                new MenuItem {
                    Name = "Created by Chris Risner", Command = LaunchBrowserCommand, Parameter = "http://chrisrisner.com"
                },
                new MenuItem {
                    Name = "Version: " + VersionNumber
                },
            });

            TechnologyItems.AddRange(new[]
            {
                new MenuItem {
                    Name = "ACR User Dialogs", Command = LaunchBrowserCommand, Parameter = "https://github.com/aritchie/userdialogs"
                },
                new MenuItem {
                    Name = "Fody", Command = LaunchBrowserCommand, Parameter = "http://github.com/Fody/Fody"
                },
                new MenuItem {
                    Name = "Fresh Essentials", Command = LaunchBrowserCommand, Parameter = "https://github.com/XAM-Consulting/FreshEssentials"
                },
                new MenuItem {
                    Name = "Connectivity Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Connectivity"
                },
                new MenuItem {
                    Name = "Current Activity Plugin", Command = LaunchBrowserCommand, Parameter = "http://www.github.com/jamesmontemagno/Xamarin.Plugins"
                },
                new MenuItem {
                    Name = "Modern HTTP Client", Command = LaunchBrowserCommand, Parameter = "https://github.com/paulcbetts/ModernHttpClient"
                },
                new MenuItem {
                    Name = "Humanizer", Command = LaunchBrowserCommand, Parameter = "https://github.com/Humanizr/Humanizer"
                },
                new MenuItem {
                    Name = "Image Circles", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/ImageCircle"
                },
                new MenuItem {
                    Name = "Json.NET", Command = LaunchBrowserCommand, Parameter = "https://github.com/JamesNK/Newtonsoft.Json"
                },
                new MenuItem {
                    Name = "Mvvm Helpers", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/mvvm-helpers"
                },
                new MenuItem {
                    Name = "Permissions Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Permissions"
                },
                new MenuItem {
                    Name = "Realm", Command = LaunchBrowserCommand, Parameter = "http://github.com/realm/realm-dotnet"
                },
                new MenuItem {
                    Name = "Share Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jguertl/SharePlugin"
                },
                new MenuItem {
                    Name = "Pull to Refresh Layout", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout"
                },
                new MenuItem {
                    Name = "Settings Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Settings"
                },
                new MenuItem {
                    Name = "Toolkit for Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/xamarin.forms-toolkit"
                },
                new MenuItem {
                    Name = "Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "http://xamarin.com/forms"
                },
                new MenuItem {
                    Name = "Visual Studio Mobile Center", Command = LaunchBrowserCommand, Parameter = "https://www.visualstudio.com/vs/mobile-center/"
                }
            });
        }
Пример #14
0
        public SettingsViewModel()
        {
            AboutItems.AddRange(
                new[]
            {
                new MenuItem
                {
                    Name      = $"Created by {AboutThisApp.Developer} with <3",
                    Command   = LaunchBrowserCommand,
                    Parameter = AboutThisApp.DeveloperWebsite
                },
                new MenuItem
                {
                    Name      = $"Big thanks to James Montemagno!",
                    Command   = LaunchBrowserCommand,
                    Parameter = AboutThisApp.MontemagnoWebsite
                },
                new MenuItem
                {
                    Name      = "Open source on GitHub!",
                    Command   = LaunchBrowserCommand,
                    Parameter = AboutThisApp.OpenSourceUrl
                },
                new MenuItem
                {
                    Name      = "Terms of Use",
                    Command   = LaunchBrowserCommand,
                    Parameter = AboutThisApp.TermsOfUseUrl
                },
                new MenuItem
                {
                    Name      = "Privacy Policy",
                    Command   = LaunchBrowserCommand,
                    Parameter = AboutThisApp.PrivacyPolicyUrl
                },
                new MenuItem
                {
                    Name      = "Open Source Notice",
                    Command   = LaunchBrowserCommand,
                    Parameter = AboutThisApp.OpenSourceNoticeUrl
                }
            });

            TechnologyItems.AddRange(
                new[]
            {
                new MenuItem
                {
                    Name      = "Censored",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/jamesmontemagno/Censored"
                },
                new MenuItem
                {
                    Name      = "Calendar Plugin",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/TheAlmightyBob/Calendars"
                },
                new MenuItem
                {
                    Name      = "Connectivity Plugin",
                    Command   = LaunchBrowserCommand,
                    Parameter =
                        "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Connectivity"
                },
                new MenuItem
                {
                    Name      = "Embedded Resource Plugin",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/JosephHill/EmbeddedResourcePlugin"
                },
                new MenuItem
                {
                    Name      = "Humanizer",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/Humanizr/Humanizer"
                },
                new MenuItem
                {
                    Name      = "Image Circles",
                    Command   = LaunchBrowserCommand,
                    Parameter =
                        "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/ImageCircle"
                },
                new MenuItem
                {
                    Name      = "Json.NET",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/JamesNK/Newtonsoft.Json"
                },
                new MenuItem
                {
                    Name      = "LinqToTwitter",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/JoeMayo/LinqToTwitter"
                },
                new MenuItem
                {
                    Name      = "Messaging Plugin",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/cjlotz/Xamarin.Plugins"
                },
                new MenuItem
                {
                    Name      = "Mvvm Helpers",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/jamesmontemagno/mvvm-helpers"
                },
                new MenuItem
                {
                    Name      = "Noda Time",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/nodatime/nodatime"
                },
                new MenuItem
                {
                    Name      = "Permissions Plugin",
                    Command   = LaunchBrowserCommand,
                    Parameter =
                        "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Permissions"
                },
                new MenuItem
                {
                    Name      = "PCL Storage",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/dsplaisted/PCLStorage"
                },
                new MenuItem
                {
                    Name      = "Pull to Refresh Layout",
                    Command   = LaunchBrowserCommand,
                    Parameter =
                        "https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout"
                },
                new MenuItem
                {
                    Name      = "Settings Plugin",
                    Command   = LaunchBrowserCommand,
                    Parameter =
                        "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Settings"
                },
                new MenuItem
                {
                    Name      = "Toolkit for Xamarin.Forms",
                    Command   = LaunchBrowserCommand,
                    Parameter = "https://github.com/jamesmontemagno/xamarin.forms-toolkit"
                },
                new MenuItem
                {
                    Name      = "Xamarin.Forms",
                    Command   = LaunchBrowserCommand,
                    Parameter = "http://xamarin.com/forms"
                },
                new MenuItem
                {
                    Name      = "Xamarin Insights",
                    Command   = LaunchBrowserCommand,
                    Parameter = "http://xamarin.com/insights"
                }
            });
        }
Пример #15
0
        public AboutViewModel()
        {
            AboutItems.Clear();
            //AboutItems.Add(new MenuItem { Name = "About this app", Icon = "icon_venue.png" });
            push = DependencyService.Get <IPushNotifications>();

            InfoItems.AddRange(new []
            {
                new MenuItem {
                    Name = "Sponsorlar", Icon = "icon_venue.png", Parameter = "sponsors"
                },
                //new MenuItem { Name = "Evaluations", Icon = "icon_venue.png", Parameter="evaluations"},
                new MenuItem {
                    Name = "Etkinlik Alanı", Icon = "icon_venue.png", Parameter = "venue"
                },
                new MenuItem {
                    Name = "Kat Planı", Icon = "icon_venue.png", Parameter = "floor-maps"
                },
                new MenuItem {
                    Name = "Code of Conduct", Icon = "icon_code_of_conduct.png", Parameter = "code-of-conduct"
                },
                new MenuItem {
                    Name = "Wi-Fi Bilgisi", Icon = "icon_wifi.png", Parameter = "wi-fi"
                },
            });

            //accountItem = new MenuItem
            //    {
            //        Name = "Logged in as:"
            //    };

            //syncItem = new MenuItem
            //{
            //    Name = "Last Sync:"
            //};

            pushItem = new MenuItem
            {
                Name = "Bildirimleri Etkinleştir"
            };

            pushItem.Command = new Command(() =>
            {
                if (push.IsRegistered)
                {
                    UpdateItems();
                    return;
                }

                if (Settings.AttemptedPush)
                {
                    MessagingService.Current.SendMessage <MessagingServiceQuestion>(MessageKeys.Question, new MessagingServiceQuestion
                    {
                        Title       = "Bildirimler",
                        Question    = "To enable push notifications, please go into Settings, Tap Notifications, and set Allow Notifications to on.",
                        Positive    = "Settings",
                        Negative    = "Maybe Later",
                        OnCompleted = (result) =>
                        {
                            if (result)
                            {
                                push.OpenSettings();
                            }
                        }
                    });
                    return;
                }

                push.RegisterForNotifications();
            });

            UpdateItems();

            //AccountItems.Add(accountItem);
            //AccountItems.Add(syncItem);
            AccountItems.Add(pushItem);

            //This will be triggered wen
            Settings.PropertyChanged += (sender, e) =>
            {
                if (e.PropertyName == "Email" || e.PropertyName == "LastSync" || e.PropertyName == "PushNotificationsEnabled")
                {
                    UpdateItems();
                    OnPropertyChanged("AccountItems");
                }
            };
        }
        public SettingsViewModel()
        {
            //This will be triggered wen
            Settings.PropertyChanged += async(sender, e) =>
            {
                if (e.PropertyName == "Email")
                {
                    Settings.NeedsSync = true;
                    OnPropertyChanged("LoginText");
                    OnPropertyChanged("AccountItems");
                    //if logged in you should go ahead and sync data.
                    if (Settings.IsLoggedIn)
                    {
                        await ExecuteSyncCommandAsync();
                    }
                }
            };

            AboutItems.AddRange(new []
            {
                new MenuItem {
                    Name = "Created by Megsoft Consulting, Inc", Command = LaunchBrowserCommand, Parameter = "https://megsoftconsulting.com/"
                },
                new MenuItem {
                    Name = "Open source on GitHub!", Command = LaunchBrowserCommand, Parameter = "https://github.com/megsoftconsulting/app-conference"
                },
            });

            TechnologyItems.AddRange(new []
            {
                new MenuItem {
                    Name = "Azure Mobile Apps", Command = LaunchBrowserCommand, Parameter = "https://github.com/Azure/azure-mobile-apps-net-client/"
                },
                new MenuItem {
                    Name = "Censored", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Censored"
                },
                new MenuItem {
                    Name = "Calendar Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/TheAlmightyBob/Calendars"
                },
                new MenuItem {
                    Name = "External Maps Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/ExternalMaps"
                },
                new MenuItem {
                    Name = "Humanizer", Command = LaunchBrowserCommand, Parameter = "https://github.com/Humanizr/Humanizer"
                },
                new MenuItem {
                    Name = "Image Circles", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/ImageCircle"
                },
                new MenuItem {
                    Name = "Json.NET", Command = LaunchBrowserCommand, Parameter = "https://github.com/JamesNK/Newtonsoft.Json"
                },
                new MenuItem {
                    Name = "LinqToTwitter", Command = LaunchBrowserCommand, Parameter = "https://github.com/JoeMayo/LinqToTwitter"
                },
                new MenuItem {
                    Name = "Mvvm Helpers", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/mvvm-helpers"
                },
                new MenuItem {
                    Name = "Noda Time", Command = LaunchBrowserCommand, Parameter = "https://github.com/nodatime/nodatime"
                },
                new MenuItem {
                    Name = "Permissions Plugin", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Permissions"
                },
                new MenuItem {
                    Name = "Pull to Refresh Layout", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout"
                },
                new MenuItem {
                    Name = "Toolkit for Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "https://github.com/jamesmontemagno/xamarin.forms-toolkit"
                },
                new MenuItem {
                    Name = "Xamarin.Essentials", Command = LaunchBrowserCommand, Parameter = "https://github.com/xamarin/Essentials"
                },
                new MenuItem {
                    Name = "Xamarin.Forms", Command = LaunchBrowserCommand, Parameter = "http://xamarin.com/forms"
                },
                new MenuItem {
                    Name = "ZXing.Net Mobile", Command = LaunchBrowserCommand, Parameter = "https://github.com/Redth/ZXing.Net.Mobile"
                }
            });
        }