Esempio n. 1
0
        void Init()
        {
            SchemeAction.SchemeParser = (host, segments) =>
            {
                var action     = string.Empty;
                var startIndex = 0;

                if (host == "heleuscore.com" && segments[1] == "verify/")
                {
                    if (segments[2] == "request/")
                    {
                        action     = SchemeAction.GetString(segments, 3);
                        startIndex = 4;
                    }
                }

                return(new Tuple <string, int>(action, startIndex));
            };

            SchemeAction.RegisterSchemeAction <ViewVerificationSchemeAction>();

            var sem = new ServiceNodeManager(VerifyServiceInfo.ChainId, VerifyServiceInfo.EndPoint, VerifyServiceInfo.Version, VerifyServiceInfo.Name, _currentSettings, _currentSettings, PubSub);

            VerifyApp.Current.Init();
            _ = new ProfileManager(new ClientBase(sem.HasDebugEndPoint ? sem.DefaultEndPoint : ProfileServiceInfo.EndPoint, ProfileServiceInfo.ChainId), sem.CacheStorage, PubSub);

            if (IsAndroid || IsUWP || IsDesktop)
            {
                var      masterDetail = new ExtMasterDetailPage();
                var      navigation   = new ExtNavigationPage(new VerifyPage());
                MenuPage menu         = null;

                if (IsAndroid)
                {
                    menu = new AndroidMenuPage(masterDetail, navigation);
                }
                else if (IsUWP)
                {
                    menu = new UWPMenuPage(masterDetail, navigation);
                }
                else if (IsDesktop)
                {
                    menu = new DesktopMenuPage(masterDetail, navigation);
                }

                menu.AddPage(typeof(VerifyPage), "VerifyPage.Title", Icons.ShieldCheck);
                menu.AddPage(typeof(AddVerificationPage), "AddVerificationPage.Title", Icons.Plus);
                menu.AddPage(typeof(VerificationsPage), "VerificationsPage.Title", Icons.Bars);
                menu.AddPage(typeof(SettingsPage), "SettingsPage.Title", Icons.Slider);

                masterDetail.Master = menu;
                masterDetail.Detail = navigation;

                MainPage = MainMasterDetailPage = masterDetail;
            }
            else if (IsIOS)
            {
                var tabbed = new ExtTabbedPage();

                tabbed.AddPage(typeof(VerifyPage), "VerifyPage.Title", "icons/shield-check.png");
                tabbed.AddPage(typeof(AddVerificationPage), "AddVerificationPage.Title", "icons/plus.png");
                tabbed.AddPage(typeof(VerificationsPage), "VerificationsPage.Title", "icons/bars.png");
                tabbed.AddPage(typeof(SettingsPage), "SettingsPage.Title", "icons/sliders.png");

                MainPage = MainTabbedPage = tabbed;
            }
        }
Esempio n. 2
0
        void Init()
        {
            SchemeAction.SchemeParser = (host, segments) =>
            {
                var action     = string.Empty;
                var startIndex = 0;

                if (host == "heleuscore.com" && segments[1] == "message/")
                {
                    if (segments[2] == "request/")
                    {
                        action     = SchemeAction.GetString(segments, 3);
                        startIndex = 4;
                    }
                }

                return(new Tuple <string, int>(action, startIndex));
            };

            SchemeAction.RegisterSchemeAction <ViewFriendSchemeAction>();
            SchemeAction.RegisterSchemeAction <ViewChatSchemeAction>();

            var sem = new ServiceNodeManager(MessageServiceInfo.ChainId, MessageServiceInfo.EndPoint, MessageServiceInfo.Version, MessageServiceInfo.Name, _currentSettings, _currentSettings, PubSub, TransactionDownloadManagerFlags.DecrytpedTransactionStorage);

            _ = new ProfileManager(new ClientBase(sem.HasDebugEndPoint ? sem.DefaultEndPoint : ProfileServiceInfo.EndPoint, ProfileServiceInfo.ChainId), sem.CacheStorage, PubSub);
            MessageApp.Current.Init();

            if ((IsAndroid || IsUWP || IsDesktop))
            {
                var      masterDetail = new ExtMasterDetailPage();
                var      navigation   = new ExtNavigationPage(new ChatsPage());
                MenuPage menu         = null;

                if (IsAndroid)
                {
                    menu = new AndroidMenuPage(masterDetail, navigation);
                }
                else if (IsUWP)
                {
                    menu = new UWPMenuPage(masterDetail, navigation);
                }
                else if (IsDesktop)
                {
                    menu = new DesktopMenuPage(masterDetail, navigation);
                }

                menu.AddPage(typeof(ChatsPage), $"{nameof(ChatsPage)}.Title", Icons.Comments);
                menu.AddPage(typeof(ContactsPage), $"{nameof(ContactsPage)}.Title", Icons.UserFriends);
                menu.AddPage(typeof(SettingsPage), $"{nameof(SettingsPage)}.Title", Icons.Slider);
                menu.SetTitle("Menu");

                masterDetail.Master = menu;
                masterDetail.Detail = navigation;

                MainPage = MainMasterDetailPage = masterDetail;
            }
            else if (IsIOS)
            {
                var tabbed = new ExtTabbedPage();

                tabbed.AddPage(typeof(ChatsPage), $"{nameof(ChatsPage)}.Title", "icons/comments.png");
                tabbed.AddPage(typeof(ContactsPage), $"{nameof(ContactsPage)}.Title", "icons/users.png");
                tabbed.AddPage(typeof(SettingsPage), $"{nameof(SettingsPage)}.Title", "icons/sliders.png");

                MainPage = MainTabbedPage = tabbed;
            }
        }
Esempio n. 3
0
        public void Init()
        {
            SchemeAction.SchemeParser = (host, segments) =>
            {
                var action     = string.Empty;
                var startIndex = 0;

                if (host == "heleuscore.com" && segments[1] == "heleus/")
                {
                    if (segments[2] == "request/")
                    {
                        action     = SchemeAction.GetString(segments, 3);
                        startIndex = 4;
                    }
                }

                return(new Tuple <string, int>(action, startIndex));
            };

            SchemeAction.RegisterSchemeAction <TransferCoinsSchemeAction>();
            SchemeAction.RegisterSchemeAction <RequestRevenueSchemeAction>();
            SchemeAction.RegisterSchemeAction <AuthorizeServiceSchemeAction>();
            SchemeAction.RegisterSchemeAction <AuthorizeServiceDerivedSchemeAction>();
            SchemeAction.RegisterSchemeAction <ViewTransactionsSchemeAction>();
            SchemeAction.RegisterSchemeAction <ViewProfileSchemeAction>();
            SchemeAction.RegisterSchemeAction <AuthorizePurchaseSchemeAction>();
            SchemeAction.RegisterSchemeAction <EditProfileSchemeAction>();

            WalletApp.Init();

            if (IsAndroid || IsUWP || IsDesktop)
            {
                var      masterDetail = new ExtMasterDetailPage();
                var      navigation   = new ExtNavigationPage(new Apps.HeleusApp.Page.Account.AccountPage());
                MenuPage menu         = null;

                if (IsAndroid)
                {
                    menu = new AndroidMenuPage(masterDetail, navigation);
                }
                else if (IsUWP)
                {
                    menu = new UWPMenuPage(masterDetail, navigation);
                }
                else if (IsDesktop)
                {
                    menu = new DesktopMenuPage(masterDetail, navigation);
                }

                menu.AddPage(typeof(Apps.HeleusApp.Page.Account.AccountPage), "AccountPage.Title", Icons.Coins);
                menu.AddPage(typeof(Apps.HeleusApp.Page.Profile.ProfilePage), "ProfilePage.Title", Icons.UserCircle);
                menu.AddPage(typeof(TransactionsPage), "TransactionsPage.Title", Icons.History);
                menu.AddPage(typeof(SettingsPage), "SettingsPage.Title", Icons.Slider);

                masterDetail.Master = menu;
                masterDetail.Detail = navigation;

                MainPage = MainMasterDetailPage = masterDetail;
            }
            else if (IsIOS)
            {
                var tabbed = new ExtTabbedPage();

                tabbed.AddPage(typeof(Apps.HeleusApp.Page.Account.AccountPage), "AccountPage.Title", "icons/coins.png");
                tabbed.AddPage(typeof(Apps.HeleusApp.Page.Profile.ProfilePage), "ProfilePage.Title", "icons/usercircle.png");
                tabbed.AddPage(typeof(TransactionsPage), "TransactionsPage.Title", "icons/history.png");
                tabbed.AddPage(typeof(SettingsPage), "SettingsPage.Title", "icons/sliders.png");

                MainPage = MainTabbedPage = tabbed;
            }
        }
Esempio n. 4
0
        void Init()
        {
            SchemeAction.SchemeParser = (host, segments) =>
            {
                var action     = string.Empty;
                var startIndex = 0;

                if (host == "heleuscore.com" && segments[1] == "note/")
                {
                    if (segments[2] == "request/")
                    {
                        action     = SchemeAction.GetString(segments, 3);
                        startIndex = 4;
                    }
                }

                return(new Tuple <string, int>(action, startIndex));
            };

            var sem = new ServiceNodeManager(NoteServiceInfo.ChainId, NoteServiceInfo.EndPoint, NoteServiceInfo.Version, NoteServiceInfo.Name, _currentSettings, _currentSettings, PubSub, TransactionDownloadManagerFlags.DecrytpedTransactionStorage);

            NoteApp.Current.Init();
            _ = new ProfileManager(new ClientBase(sem.HasDebugEndPoint ? sem.DefaultEndPoint : ProfileServiceInfo.EndPoint, ProfileServiceInfo.ChainId), sem.CacheStorage, PubSub);

            if (IsAndroid || IsUWP || IsDesktop)
            {
                var      masterDetail = new ExtMasterDetailPage();
                var      navigation   = new ExtNavigationPage(new NotesPage());
                MenuPage menu         = null;

                if (IsAndroid)
                {
                    menu = new AndroidMenuPage(masterDetail, navigation);
                }
                else if (IsUWP)
                {
                    menu = new UWPMenuPage(masterDetail, navigation);
                }
                else if (IsDesktop)
                {
                    menu = new DesktopMenuPage(masterDetail, navigation);
                }

                menu.AddPage(typeof(NotesPage), "NotesPage.Title", Icons.StickyNote);
                menu.AddPage(typeof(AddNotePage), "AddNotePage.Title", Icons.Plus);
                menu.AddPage(typeof(SettingsPage), "SettingsPage.Title", Icons.Slider);

                masterDetail.Master = menu;
                masterDetail.Detail = navigation;

                MainPage = MainMasterDetailPage = masterDetail;
            }
            else if (IsIOS)
            {
                var tabbed = new ExtTabbedPage();

                tabbed.AddPage(typeof(NotesPage), "NotesPage.Title", "icons/stickynote.png");
                tabbed.AddPage(typeof(AddNotePage), "AddNotePage.Title", "icons/plus.png");
                tabbed.AddPage(typeof(SettingsPage), "SettingsPage.Title", "icons/sliders.png");

                MainPage = MainTabbedPage = tabbed;
            }
        }
Esempio n. 5
0
        void Init()
        {
            SchemeAction.SchemeParser = (host, segments) =>
            {
                var action     = string.Empty;
                var startIndex = 0;

                if (host == "heleuscore.com" && segments[1] == "status/")
                {
                    if (segments[2] == "request/")
                    {
                        action     = SchemeAction.GetString(segments, 3);
                        startIndex = 4;
                    }
                }

                return(new Tuple <string, int>(action, startIndex));
            };

            SchemeAction.RegisterSchemeAction <ViewMessageSchemeAction>();
            SchemeAction.RegisterSchemeAction <ViewAccountSchemeAction>();

            var sem = new ServiceNodeManager(StatusServiceInfo.ChainId, StatusServiceInfo.EndPoint, StatusServiceInfo.Version, StatusServiceInfo.Name, _currentSettings, _currentSettings, PubSub);

            _ = new ProfileManager(new ClientBase(sem.HasDebugEndPoint ? sem.DefaultEndPoint : ProfileServiceInfo.EndPoint, ProfileServiceInfo.ChainId), sem.CacheStorage, PubSub);
            StatusApp.Current.Init();

            if (IsAndroid || IsUWP || IsDesktop)
            {
                var      masterDetail = new ExtMasterDetailPage();
                var      navigation   = new ExtNavigationPage(new StatusPage());
                MenuPage menu         = null;

                if (IsAndroid)
                {
                    menu = new AndroidMenuPage(masterDetail, navigation);
                }
                else if (IsUWP)
                {
                    menu = new UWPMenuPage(masterDetail, navigation);
                }
                else if (IsDesktop)
                {
                    menu = new DesktopMenuPage(masterDetail, navigation);
                }

                menu.AddPage(typeof(StatusPage), "StatusPage.Title", Icons.ListUl);
                menu.AddPage(typeof(WritePage), "WritePage.Title", Icons.Pencil);
                menu.AddPage(typeof(SubscriptionsPage), "SubscriptionsPage.Title", Icons.Check);
                menu.AddPage(typeof(ExplorePage), "ExplorePage.Title", Icons.Search);
                menu.AddPage(typeof(SettingsPage), "SettingsPage.Title", Icons.Slider);

                masterDetail.Master = menu;
                masterDetail.Detail = navigation;

                MainPage = MainMasterDetailPage = masterDetail;
            }
            else if (IsIOS)
            {
                var tabbed = new ExtTabbedPage();

                tabbed.AddPage(typeof(StatusPage), "StatusPage.Title", "icons/list-ul.png");
                tabbed.AddPage(typeof(WritePage), "WritePage.Title", "icons/pencil.png");
                tabbed.AddPage(typeof(SubscriptionsPage), "SubscriptionsPage.Title", "icons/list-ul.png");
                tabbed.AddPage(typeof(ExplorePage), "ExplorePage.Title", "icons/search.png");
                tabbed.AddPage(typeof(SettingsPage), "SettingsPage.Title", "icons/sliders.png");

                MainPage = MainTabbedPage = tabbed;
            }
        }