Ejemplo n.º 1
0
        public MainViewModel(INavigation navigation, string title)
            : base(navigation, title)
        {
            var homeVm = new HomeViewModel();

            Navigation.Add(() => new Home(homeVm));

            var statsAnalysisVm = new StatsAnalysisManagerViewModel(Navigation);

            Navigation.Add(() => new StatsAnalysis(statsAnalysisVm));

            _pagesViewModels = new IPageViewModel[]
            {
                homeVm, statsAnalysisVm
            };

            _navigationItems = new INavigationItem[]
            {
                new NavigationItem(homeVm.Title, typeof(Home), PackIconKind.Home),
                new NavigationItem(statsAnalysisVm.Title, typeof(StatsAnalysis), PackIconKind.ChartBar)
            };

            Links = new ILink[]
            {
                new Link("GitHub", "https://github.com/holydk/StatisticalAnalysis", PackIconKind.GithubCircle, "Исходный код")
            };
        }
Ejemplo n.º 2
0
 public ChartTabModel()
 {
     CreateModel.Name    = "Create Chart";
     CreateModel.Command = new RelayCommand(param => SharedData._command(_clm), param => true);
     Navigation          = _clm.Navigation;
     Navigation.Add(_clm);
 }
Ejemplo n.º 3
0
        public ApplicationViewModel()
        {
            //Adding navigation items and their associated viewModels
            Navigation.Add(new NavigationItemModel(new NowPlayingViewModel(), "Now Playing"));
            Navigation.Add(new NavigationItemModel(new LibraryViewModel(), "Library"));
            Navigation.Add(new NavigationItemModel(new SettingsViewModel(), "Settings"));

            //Set the starting page to LibraryView and select it
            ChangeViewModel(Navigation[1]);
            SelectedNavigation = 1;

            //Register for NowPlaying packets
            Messenger.Default.Register <NowPlayingPacket>
            (
                this,
                (action) => ReceiveMessage(action)
            );
            //Register for Playlist packets
            Messenger.Default.Register <List <PlaylistModel> >
            (
                this,
                (action) => ReceiveMessage(action)
            );

            //Initialize model
            mp = MusicPlayer.Instance;
            mp.BroadcastPlaylists();

            //Setup the progressTimer for updating the slider
            progressTimer          = new DispatcherTimer();
            progressTimer.Tick    += advanceTimeEllapsed;
            progressTimer.Interval = new TimeSpan(0, 0, 1);
        }
Ejemplo n.º 4
0
        private void ChangeViewModel(NavigationItemModel nav)
        {
            if (!Navigation.Contains(nav))
            {
                Navigation.Add(nav);
            }

            CurrentPageViewModel = Navigation.FirstOrDefault(vm => vm == nav).ViewModel;
        }
Ejemplo n.º 5
0
        //Populate the script lists here.  Follow the example on how to add to a list
        #region Populate Lists
        /// <summary>
        /// Use this method to populate the lists.  They are already set to be selected from the
        /// CycleScripts method and no other work is required.
        /// </summary>
        public override void PopulateLists()
        {
            SignIn.Clear();
            AccountCreation.Clear();
            Activities.Clear();
            ActivityDetail.Clear();
            Workouts.Clear();
            Courses.Clear();
            Dashboard.Clear();
            Navigation.Clear();
            Explore.Clear();
            Reports.Clear();
            Health.Clear();
            Goals.Clear();
            Upload.Clear();
            Settings.Clear();
            CheckFirmware.Clear();
            ManualActivity.Clear();
            Troubleshoot.Clear();
            base.PopulateLists();
            //MyCategory.Add(new TestCase(base.baseURL, base.webdriver, base.verificationErrors));
            SignIn.Add(new Connect_SignIn(base.baseURL, base.webdriver, base.verificationErrors));
            SignIn.Add(new Connect_SignInValidation(base.baseURL, base.webdriver, base.verificationErrors));

            Settings.Add(new Connect_MeasurementSettings(base.baseURL, base.webdriver, base.verificationErrors));
            Navigation.Add(new Connect_GeneralNavigation(base.baseURL, base.webdriver, base.verificationErrors));
            Navigation.Add(new Connect_Navigation_Unauthenticated(base.baseURL, base.webdriver, base.verificationErrors));
            Upload.Add(new Connect_UploadFile(base.baseURL, base.webdriver, base.verificationErrors));
            Activities.Add(new Connect_ActivitiesSort(base.baseURL, base.webdriver, base.verificationErrors));
            ActivityDetail.Add(new Connect_ActivityDetail_Validation(base.baseURL, base.webdriver, base.verificationErrors));
            //CheckFirmware.Add(new Connect_CheckFirmware_Edge800(base.baseURL, base.webdriver, base.verificationErrors));  // Jira opened
            CheckFirmware.Add(new Connect_CheckFirmware_Edge705(base.baseURL, base.webdriver, base.verificationErrors));
            CheckFirmware.Add(new Connect_CheckFirmware_Edge605(base.baseURL, base.webdriver, base.verificationErrors));
            CheckFirmware.Add(new Connect_CheckFirmware_FR60(base.baseURL, base.webdriver, base.verificationErrors));
            CheckFirmware.Add(new Connect_CheckFirmware_FR405CX(base.baseURL, base.webdriver, base.verificationErrors));
            CheckFirmware.Add(new Connect_CheckFirmware_Edge305(base.baseURL, base.webdriver, base.verificationErrors));
            CheckFirmware.Add(new Connect_CheckFirmware_FR201(base.baseURL, base.webdriver, base.verificationErrors));
            //CheckFirmware.Add(new Connect_CheckFirmware_FR210(base.baseURL, base.webdriver, base.verificationErrors)); //Test Failing
            CheckFirmware.Add(new Connect_CheckFirmware_Edge500(base.baseURL, base.webdriver, base.verificationErrors));
            //CheckFirmware.Add(new Connect_CheckFirmware_FR110(base.baseURL, base.webdriver, base.verificationErrors));  //Test Failing
            //CheckFirmware.Add(new Connect_CheckFirmware_FR910(base.baseURL, base.webdriver, base.verificationErrors));
            CheckFirmware.Add(new Connect_CheckFirmware_FR610(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Connect_Dashboard_CreateGoal(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Connect_Dashboard_NoGoal(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Connect_Dashboard_PercentComplete(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Connect_Dashboard_NoUploads(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Connect_Dashboard_FiveItems(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Connect_Dashboard_ActivityNameTabs(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Connect_Dashboard_ActivityType(base.baseURL, base.webdriver, base.verificationErrors));
            //Dashboard.Add(new Connect_Dashboard_FiveItems(base.baseURL, base.webdriver, base.verificationErrors)); //jira 10209
            ManualActivity.Add(new Connect_ManualActivity_NameCharLimit(base.baseURL, base.webdriver, base.verificationErrors));
            ManualActivity.Add(new Connect_ManualActivity_NoName(base.baseURL, base.webdriver, base.verificationErrors));
            ManualActivity.Add(new Connect_ManualActivity_ActivityType(base.baseURL, base.webdriver, base.verificationErrors));
            ManualActivity.Add(new Connect_ManualActivity_DescriptionLimit(base.baseURL, base.webdriver, base.verificationErrors)); //Related to Jira 10309
            ManualActivity.Add(new Connect_ManualActivity_PaceCalc(base.baseURL, base.webdriver, base.verificationErrors));
        }
Ejemplo n.º 6
0
 //Populate the script lists here.  Follow the example on how to add to a list
 #region Populate Tests
 /// <summary>
 /// Use this method to populate the lists.  They are already set to be selected from the
 /// CycleScripts method and no other work is required.
 /// </summary>
 public override void PopulateLists()
 {
     SignIn.Clear();
     AccountCreation.Clear();
     Registration.Clear();
     SoftwareUpdates.Clear();
     Navigation.Clear();
     MapUpdates.Clear();
     base.PopulateLists();
     //**below is a sample of how to add in a test.  Simply add in the name of the test in replace of Connect_SignIn
     //SignIn.Add(new Connect_SignIn(base.baseURL, base.webdriver, base.verificationErrors));
     // SignIn.Add(new prototype(base.baseURL, base.webdriver, base.verificationErrors));  //This Test was to investigate Selenium RC - Webdriver opted for due to usability/port setting issues/future support.
     Navigation.Add(new Buy_PurchaseTest(base.baseURL, base.webdriver, base.verificationErrors));
 }
        public StatsAnalysisManagerViewModel(INavigation navigation)
            : base(navigation, "Статистический анализ")
        {
            _informationItems = new IInformationItem[]
            {
                new InformationItem("Cтатистический анализ", "Статистика — отрасль знаний, наука, в которой излагаются общие вопросы сбора, измерения, мониторинга и анализа массовых статистических (количественных или качественных) данных; изучение количественной стороны массовых общественных явлений в числовой форме."),
                new InformationItem("Что делать дальше?", "Выберите тематику, необходимую для дальнейших исследований."),
                new InformationItem("Долго искать необходимую тему?", "Воспользуйтесь кнопкой поиска.")
            };

            var hypTestingVm = new HypothesisTestingManagerViewModel(navigation);

            Navigation.Add(() => new HypothesisTestingView(hypTestingVm));

            var corRegAnalysisVm = new CorRegAnalysisViewModel();

            Navigation.Add(() => new CorRegAnalysisView(corRegAnalysisVm));

            var timeSerAnalysisVm = new TimeSeriesAnalysisViewModel();

            Navigation.Add(() => new TimeSeriesAnalysisView(timeSerAnalysisVm));

            var forecastingTimeSerVm = new ForecastingTimeSeriesViewModel();

            Navigation.Add(() => new ForecastingTimeSeriesView(forecastingTimeSerVm));

            _pagesViewModels = new IPageViewModel[]
            {
                hypTestingVm, corRegAnalysisVm, timeSerAnalysisVm
            };

            _navigationItems = new INavigationItem[]
            {
                new NavigationItem(hypTestingVm.Title, typeof(HypothesisTestingView), MaterialDesignThemes.Wpf.PackIconKind.FormatListChecks),
                new NavigationItem(corRegAnalysisVm.Title, typeof(CorRegAnalysisView), MaterialDesignThemes.Wpf.PackIconKind.ChartArc),
                new NavigationItem(timeSerAnalysisVm.Title, typeof(TimeSeriesAnalysisView), MaterialDesignThemes.Wpf.PackIconKind.ChartLine),
                new NavigationItem(forecastingTimeSerVm.Title, typeof(ForecastingTimeSeriesView), MaterialDesignThemes.Wpf.PackIconKind.ChartTimeline)
            };

            _informationLinks = new ILink[]
            {
                new Link("Википедия", "https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D0%B0%D1%82%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0", MaterialDesignThemes.Wpf.PackIconKind.Wikipedia)
            };
        }
Ejemplo n.º 8
0
        override protected async Task Process(string input)
        {
            switch (Navigation.Count)
            {
            case 0:
                if (input == "1" || input == "enter the palace")
                {
                    Navigation.Add(1);
                    await SendMessage(KingdomText.Text_1.text);
                }

                else if (input == "2" || input == "train skills")
                {
                    Navigation.Add(2);
                    await SendMessage(KingdomText.Text_2.text);
                }

                break;

            case 1:
                break;
            }
        }
Ejemplo n.º 9
0
        override protected async Task Process(string input)
        {
            switch (Navigation.Count)
            {
            case 0:
                if (input.ToLower() == "buy" || input == "1")
                {
                    await SendMessage(ShopText.BuyText.Text1);

                    Navigation.Add(1);
                }
                else if (input.ToLower() == "sell" || input == "2")
                {
                    await SendMessage(ShopText.SellText.Text1);

                    Navigation.Add(2);
                }
                else if (input.ToLower() == "list" || input == "3")
                {
                    await SendMessage(ShopText.ListText.Text1);

                    Navigation.Add(3);
                }
                else if (input == "4")
                {
                    state = IMessageState.Closed;
                    return;
                }
                break;

            case 1:
                //selling or buying
                if (Navigation[0] == 1 || Navigation[0] == 2)
                {
                    foreach (Item i in Item.Items)
                    {
                        //If attempting to buy a discontinued item, prevent
                        if (!i.Purchasable && Navigation[0] == 1)
                        {
                            continue;
                        }

                        if (i.Name.ToLower() == input)
                        {
                            itemID = i.ID;
                            break;
                        }
                    }

                    if (itemID == -1)
                    {
                        await SendMessage($"Item `{input}` was not found.\nPlease type again.");
                    }
                    else
                    {
                        text = string.Format(
                            "Item: **{0}**{1}\n{2}Price: **{3}**", Item.Name,
                            Navigation[0] == 2 ? $"  ( `{Player.Character.Inventory.Items.Find(x => x.ID == Item.ID).amount}` )" : string.Empty,
                            Navigation[0] == 2 ? "Sell " : string.Empty,
                            Navigation[0] == 1 ? Item.Price : (Item.Price / 2));

                        if (Navigation[0] == 1)
                        {
                            await SendMessage($"{text}\n{ShopText.BuyText.Text2}");
                        }
                        else if (Navigation[0] == 2)
                        {
                            await SendMessage($"{text}\n{ShopText.SellText.Text2}");
                        }

                        Navigation.Add(1);
                    }
                }
                //listing
                else if (Navigation[0] == 3)
                {
                    if (input == "1")
                    {
                        await SendMessage(ShopText.ListText.GemSelection);

                        Navigation.Add(1);
                    }
                }
                break;

            case 2:
                //Selling or Buying (Amount selection)
                if (Navigation[0] == 1 || Navigation[0] == 2)
                {
                    if (!Library.IsDigit(input))
                    {
                        if (Navigation[0] == 1)
                        {
                            await SendMessage($"Numbers only!\n{text}\n{ShopText.BuyText.Text2}");
                        }
                        else if (Navigation[0] == 2)
                        {
                            await SendMessage($"Numbers only!\n{text}\n{ShopText.SellText.Text2}");
                        }
                    }
                    else if (input.Length > 2)
                    {
                        if (Navigation[0] == 1)
                        {
                            await SendMessage($"Maximum amount you can purchase at once is `99`\n{text}\n{ShopText.BuyText.Text2}");
                        }
                        else if (Navigation[0] == 2)
                        {
                            await SendMessage($"Maximum amount you can purchase at once is `99`\n{text}\n{ShopText.SellText.Text2}");
                        }
                    }
                    else
                    {
                        if (int.Parse(input) < 1)
                        {
                            if (Navigation[0] == 1)
                            {
                                await SendMessage($"You must select atleast `1` item to purchase\n{text}\n{ShopText.BuyText.Text2}");
                            }
                            else if (Navigation[0] == 2)
                            {
                                await SendMessage($"You must select atleast `1` item to sell\n{text}\n{ShopText.SellText.Text2}");
                            }

                            return;
                        }

                        quantity = int.Parse(input);

                        bool pass = true;

                        if (Navigation[0] == 1)
                        {
                            if (quantity * Item.Price > Player.Character.Gold)
                            {
                                text = $"You still lack `{(quantity * Item.Price) - Player.Character.Gold}` more gold.";

                                await SendMessage($"{text}\n\n{ShopText.BuyText.Text1}");

                                pass = false;
                            }
                        }
                        else if (Navigation[0] == 2)
                        {
                            if (quantity > Player.Character.Inventory.Items.Find(x => x.ID == Item.ID).amount)
                            {
                                text = $"Your inventory doesn't contain `{quantity}x` of **{Item.Name}**.";

                                await SendMessage($"{text}\n\n{ShopText.SellText.Text1}");

                                pass = false;
                            }
                        }

                        if (pass)
                        {
                            Random random = new Random();

                            for (int i = 0; i < 4; i++)
                            {
                                ConfirmationSeed += random.Next(10);
                            }

                            if (Navigation[0] == 1)
                            {
                                text =
                                    $"Item: `{quantity}x` **{Item.Name}**\n" +
                                    $"Total Price: **{string.Format("{0:n0}", quantity * Item.Price)}**\n" +
                                    $"Your Gold: **{string.Format("{0:n0}", Player.Character.Gold)}**\n\n" +
                                    $"Type **{ConfirmationSeed}** to proceed.";
                            }
                            else if (Navigation[0] == 2)
                            {
                                text =
                                    $"Item: **{quantity}x** {Item.Name}\n" +
                                    $"Total Selling Price: **{string.Format("{0:n0}", (quantity * Item.Price) / 2)}**\n" +
                                    $"Your Gold: **{string.Format("{0:n0}", Player.Character.Gold)}**\n\n" +
                                    $"Type **{ConfirmationSeed}** to proceed.";
                            }

                            Navigation.Add(1);
                        }

                        await SendMessage(text);
                    }
                }
                //Listing (Gems)
                else if (Navigation[0] == 3 && Navigation[1] == 1)
                {
                    if (input.ToLower() == "ruby" || input == "1")
                    {
                        string rubyList =
                            $"`{Item.Ruby.Ruby_Level_1.Name}`   - **{Item.Ruby.Ruby_Level_1.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_2.Name}`   - **{Item.Ruby.Ruby_Level_2.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_3.Name}`   - **{Item.Ruby.Ruby_Level_3.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_4.Name}`   - **{Item.Ruby.Ruby_Level_4.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_5.Name}`   - **{Item.Ruby.Ruby_Level_5.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_6.Name}`   - **{Item.Ruby.Ruby_Level_6.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_7.Name}`   - **{Item.Ruby.Ruby_Level_7.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_8.Name}`   - **{Item.Ruby.Ruby_Level_8.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_9.Name}`   - **{Item.Ruby.Ruby_Level_9.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_10.Name}` - **{Item.Ruby.Ruby_Level_10.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_11.Name}` - **{Item.Ruby.Ruby_Level_11.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_12.Name}` - **{Item.Ruby.Ruby_Level_12.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_13.Name}` - **{Item.Ruby.Ruby_Level_13.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_14.Name}` - **{Item.Ruby.Ruby_Level_14.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_15.Name}` - **{Item.Ruby.Ruby_Level_15.Price}**\n" +
                            $"`{Item.Ruby.Ruby_Level_16.Name}` - **{Item.Ruby.Ruby_Level_16.Price}**\n";

                        await SendMessage(rubyList);

                        state = IMessageState.Closed;
                    }
                    else if (input.ToLower() == "emerald" || input == "2")
                    {
                        string emeraldList = $"`{Item.Emerald.Emerald_Level_1.Name}`  - **{Item.Emerald.Emerald_Level_1.Price}**\n";
                        emeraldList += $"`{Item.Emerald.Emerald_Level_2.Name}`  - **{Item.Emerald.Emerald_Level_2.Price}**\n";
                        emeraldList += $"`{Item.Emerald.Emerald_Level_3.Name}`  - **{Item.Emerald.Emerald_Level_3.Price}**\n";
                        emeraldList += $"`{Item.Emerald.Emerald_Level_4.Name}`  - **{Item.Emerald.Emerald_Level_4.Price}**\n";

                        await SendMessage(emeraldList);

                        state = IMessageState.Closed;
                    }
                }

                break;

            case 3:
                //Buying or Selling (Checking confirmation input)
                if (Navigation[0] == 1 || Navigation[0] == 2)
                {
                    if (input == ConfirmationSeed)
                    {
                        if (Navigation[0] == 1)
                        {
                            Player.Character.Gold -= (Item.Price * quantity);
                            Player.Character.Inventory.AddItem(Item.ID, quantity);
                            await SendMessage($"`{quantity}x` of **{Item.Name}** bought!");

                            state = IMessageState.Closed;
                        }
                        else if (Navigation[0] == 2)
                        {
                            Player.Character.Gold += ((Item.Price * quantity) / 2);
                            Player.Character.Inventory.RemoveItem(Item.ID, quantity);
                            await SendMessage($"`{quantity}x` of **{Item.Name}** sold!");

                            state = IMessageState.Closed;
                        }
                    }
                }
                break;
            }
        }
Ejemplo n.º 10
0
        public void Bootstrap()
        {
            var _fs = new Filesystem(Directory.GetCurrentDirectory());

            Console.WriteLine("[I] Bootstrap...");
            AccessProvider.ProviderResponse     += Handle_Provider_Event;
            ServerProvider.ProviderResponse     += Handle_Provider_Event;
            ClientProvider.ProviderResponse     += Handle_Provider_Event;
            UserProvider.ProviderResponse       += Handle_Provider_Event;
            NewsProvider.ProviderResponse       += Handle_Provider_Event;
            NavigationProvider.ProviderResponse += Handle_Provider_Event;

            if (!Directory.Exists(Path.Combine(_fs.Root, "Providers")))
            {
                Directory.CreateDirectory(Path.Combine(_fs.Root, "Providers"));
                Console.WriteLine("[I] Provider installation needed..., Bootstrapping them...");
            }

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "System",
                Level    = ulong.MaxValue,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Server-Administratoren",
                Level    = byte.MaxValue,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Server-Operatoren",
                Level    = 250,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Seiten-Administroren",
                Level    = 245,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Seiten-Operatoren",
                Level    = 240,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "News-Administratoren",
                Level    = 235,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "News-Operatoren",
                Level    = 230,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Sendeplan-Administratoren",
                Level    = 225,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Sendeplan-Operatoren",
                Level    = 220,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Stream-Administratoren",
                Level    = 215,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Stream-Operatoren",
                Level    = 210,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Seiten-Mitglied",
                Level    = 1,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            AccessProvider.Add(Guid.NewGuid(), new GroupEntry <Guid>()
            {
                Active   = true,
                Name     = "Unregistriert",
                Level    = byte.MinValue,
                Locked   = true,
                Provider = AccessProvider.Name,
            });

            #region "News Provider - Installation"


            var news_user = Guid.Empty;
            var xmlDoc    = new XmlDocument();
            xmlDoc.Load(NewsProvider.InstallScript);
            var newsEntries = xmlDoc.SelectNodes("Namiono/Install/Users/User");

            for (var i = 0; i < newsEntries.Count; i++)
            {
                var res_level = ulong.MinValue;


                var user = new UserEntry <Guid>
                {
                    Id                                 = newsEntries[i].Attributes["Id"] == null?Guid.NewGuid() : Guid.Parse(newsEntries[i].Attributes["Id"].Value),
                                             Name      = newsEntries[i].Attributes["Name"].Value,
                                             Service   = bool.Parse(newsEntries[i].Attributes["Service"].Value == "0" ? "false" : "true"),
                                             Moderator = bool.Parse(newsEntries[i].Attributes["Moderator"].Value == "0" ? "false" : "true"),
                                             Locked    = bool.Parse(newsEntries[i].Attributes["Locked"].Value == "0" ? "false" : "true"),
                                             Password  = MD5.GetMD5Hash(newsEntries[i].Attributes["Password"].Value),
                                             Provider  = UserProvider.Name
                };

                if (newsEntries[i].Attributes["Level"] != null)
                {
                    ulong.TryParse(newsEntries[i].Attributes["Level"].Value, out res_level);
                    user.Level = res_level;
                }

                news_user = user.Id;

                UserProvider.Add(user.Id, user);
            }

            newsEntries = xmlDoc.SelectNodes("Namiono/Install/Entries/Entry");

            for (var i = 0; i < newsEntries.Count; i++)
            {
                var res_level = ulong.MinValue;

                var news = new NewsEntry <Guid>
                {
                    Name      = newsEntries[i].Attributes["Name"].Value,
                    Service   = bool.Parse(newsEntries[i].Attributes["Service"].Value == "0" ? "false" : "true"),
                    Moderator = bool.Parse(newsEntries[i].Attributes["Moderator"].Value == "0" ? "false" : "true"),
                    Locked    = bool.Parse(newsEntries[i].Attributes["Locked"].Value == "0" ? "false" : "true"),
                    OutPut    = newsEntries[i].Attributes["Output"].Value.Replace("[[NL]]", "<br />"),
                    Url       = newsEntries[i].Attributes["Url"].Value,
                    Author    = news_user
                };

                if (newsEntries[i].Attributes["Level"] != null)
                {
                    ulong.TryParse(newsEntries[i].Attributes["Level"].Value, out res_level);
                    news.Level = res_level;
                }


                NewsProvider.Add(Guid.NewGuid(), news);
            }

            #endregion

            #region "Navigation Provider - Installation"
            xmlDoc.Load(NavigationProvider.InstallScript);

            var navEntries = xmlDoc.SelectNodes("Namiono/Install/Entries/Entry");

            for (var i = 0; i < navEntries.Count; i++)
            {
                var res_level = ulong.MinValue;

                var nav = new NavigationEntry <Guid>
                {
                    Name      = navEntries[i].Attributes["Name"].Value,
                    Service   = bool.Parse(navEntries[i].Attributes["Service"].Value == "0" ? "false" : "true"),
                    Moderator = bool.Parse(navEntries[i].Attributes["Moderator"].Value == "0" ? "false" : "true"),
                    Locked    = bool.Parse(navEntries[i].Attributes["Locked"].Value == "0" ? "false" : "true"),
                    OutPut    = navEntries[i].Attributes["Output"].Value.Replace("[[NL]]", "<br />"),
                    Url       = navEntries[i].Attributes["Url"].Value,
                    Author    = Guid.Empty
                };

                if (navEntries[i].Attributes["Level"] != null)
                {
                    ulong.TryParse(navEntries[i].Attributes["Level"].Value, out res_level);
                    nav.Level = res_level;
                }


                NavigationProvider.Add(Guid.NewGuid(), nav);
            }


            NavigationProvider.Add(Guid.NewGuid(), new NavigationEntry <Guid>()
            {
                Name = "Mitglieder", Active = true, Locked = false, Level = 1, Frame = "#content", Provider = UserProvider.Name, Action = "show"
            });
            NavigationProvider.Add(Guid.NewGuid(), new NavigationEntry <Guid>()
            {
                Name = "News", Active = true, Locked = false, Level = 1, Frame = "#content", Provider = NewsProvider.Name, Action = "show"
            });

            #endregion
            AccessProvider.Bootstrap();
            ServerProvider.Bootstrap();
            ClientProvider.Bootstrap();
            UserProvider.Bootstrap();
            NewsProvider.Bootstrap();
            NavigationProvider.Bootstrap();



            Console.WriteLine("[I] Starting ...");
        }
Ejemplo n.º 11
0
        public MainViewModel(User user, INavigation navigation, string title, ISnackbarMessageQueue snackbarMessageQueue)
            : base(navigation, title, snackbarMessageQueue)
        {
            _user = user ?? throw new ArgumentNullException(nameof(user));

            var homeVm = new HomeViewModel(snackbarMessageQueue);

            Navigation.Add(() => new Home(homeVm));

            var bloodyVm = new BloodTypesViewModel(snackbarMessageQueue, _user);

            Navigation.Add(() => new BloodTypesView(bloodyVm));

            var breedsVm = new BreedsViewModel(snackbarMessageQueue, _user);

            Navigation.Add(() => new BreedsView(breedsVm));

            var categoriesVm = new CategoriesViewModel(snackbarMessageQueue, _user);

            Navigation.Add(() => new CategoriesView(categoriesVm));

            var linesVm = new LinesViewModel(snackbarMessageQueue, _user);

            Navigation.Add(() => new LinesView(linesVm));

            var familiesVm = new FamiliesViewModel(snackbarMessageQueue, _user);

            Navigation.Add(() => new FamiliesView(familiesVm));

            var gendersVm = new GendersViewModel(snackbarMessageQueue, _user);

            Navigation.Add(() => new GendersView(gendersVm));

            var msVm = new MethodsSluchkiViewModel(snackbarMessageQueue, _user);

            Navigation.Add(() => new MethodsSluchkiView(msVm));

            var bullsVm = new BullsViewModel(snackbarMessageQueue, _user);

            Navigation.Add(() => new BullsView(bullsVm));

            var cowsVm = new CowsViewModel(snackbarMessageQueue, _user, bullsVm, bloodyVm, categoriesVm, linesVm, breedsVm, familiesVm);

            Navigation.Add(() => new CowsView(cowsVm));

            var repsVm = new ReproductionsViewModel(snackbarMessageQueue, _user, cowsVm, msVm);

            Navigation.Add(() => new ReproductionsView(repsVm));

            var usersTypesVm = new UsersTypesViewModel(snackbarMessageQueue, _user);

            var usersVm = new UsersViewModel(snackbarMessageQueue, _user, usersTypesVm);

            Navigation.Add(() => new UsersView(usersVm));

            var prodVm = new ProductivitiesViewModel(snackbarMessageQueue, _user, cowsVm);

            Navigation.Add(() => new ProductivitiesView(prodVm));

            var retVm = new RetirementsViewModel(snackbarMessageQueue, _user, cowsVm);

            Navigation.Add(() => new RetirementsView(retVm));

            var priplodsVm = new PriplodsViewModel(snackbarMessageQueue, _user, cowsVm, gendersVm);

            Navigation.Add(() => new PriplodsView(priplodsVm));

            _pagesViewModels = new IPageViewModel[]
            {
                homeVm, bloodyVm, breedsVm, categoriesVm, linesVm, familiesVm, gendersVm, msVm, bullsVm, prodVm, cowsVm, usersTypesVm, usersVm, retVm, priplodsVm
            };

            Navigation.Navigating += (obj, e) =>
            {
                if (e.Content != null && e.Content.DataContext is IDatabaseTableViewModel dbVm)
                {
                    dbVm.ClearData();
                }
            };

            _navigationItems = new INavigationItem[]
            {
                new NavigationItem(bloodyVm.Title, typeof(BloodTypesView), PackIconKind.Fire),
                new NavigationItem(breedsVm.Title, typeof(BreedsView), PackIconKind.Eraser),
                new NavigationItem(categoriesVm.Title, typeof(CategoriesView), PackIconKind.CardsOutline),
                new NavigationItem(linesVm.Title, typeof(LinesView), PackIconKind.SourceBranch),
                new NavigationItem(familiesVm.Title, typeof(FamiliesView), PackIconKind.CardsVariant),
                new NavigationItem(gendersVm.Title, typeof(GendersView), PackIconKind.GenderMaleFemale),
                new NavigationItem(msVm.Title, typeof(MethodsSluchkiView), PackIconKind.SourceFork),
                new NavigationItem(bullsVm.Title, typeof(BullsView), PackIconKind.Cow),
                new NavigationItem(prodVm.Title, typeof(ProductivitiesView), PackIconKind.ChartBar),
                new NavigationItem(usersVm.Title, typeof(UsersView), PackIconKind.AccountMultiple),
                new NavigationItem(cowsVm.Title, typeof(CowsView), PackIconKind.Cow),
                new NavigationItem(repsVm.Title, typeof(ReproductionsView), PackIconKind.HeartHalfFull),
                new NavigationItem(retVm.Title, typeof(RetirementsView), PackIconKind.Logout),
                new NavigationItem(priplodsVm.Title, typeof(PriplodsView), PackIconKind.Cow)
            }.OrderBy(i => i.Title).Prepend(new NavigationItem(homeVm.Title, typeof(Home), PackIconKind.Home));

            Links = new ILink[]
            {
                new Link("GitHub", "https://github.com/holydk/Farming", PackIconKind.GithubCircle, "Исходный код")
            };
        }
Ejemplo n.º 12
0
        //Populate the script lists here.  Follow the example on how to add to a list
        #region Populate Lists
        /// <summary>
        /// Use this method to populate the lists.  They are already set to be selected from the
        /// CycleScripts method and no other work is required.
        /// </summary>
        public override void PopulateLists()
        {
            Account.Clear();
            ForgotUsername.Clear();
            SignIn.Clear();
            AccountCreation.Clear();
            Dashboard.Clear();
            Navigation.Clear();
            Scan.Clear();
            NoScan.Clear();
            TroubleShoot.Clear();
            base.PopulateLists();
            //MyCategory.Add(new TestCase(base.baseURL, base.webdriver, base.verificationErrors));

            Navigation.Add(new Kenwood_Navigation(base.baseURL, base.webdriver, base.verificationErrors));
            SignIn.Add(new Kenwood_SingInTest(base.baseURL, base.webdriver, base.verificationErrors));
            SignIn.Add(new Kenwood_SignInIndicationTest(base.baseURL, base.webdriver, base.verificationErrors));
            SignIn.Add(new Kenwood_SignOut_ValidationTest(base.baseURL, base.webdriver, base.verificationErrors));
            AccountCreation.Add(new TheKenwood_CreateAccount_NewUserTest(base.baseURL, base.webdriver, base.verificationErrors));
            AccountCreation.Add(new Kenwood_CreateAccount_ValidationTest(base.baseURL, base.webdriver, base.verificationErrors));
            ForgotUsername.Add(new Kenwood_ForgotUsername_ValidationTest(base.baseURL, base.webdriver, base.verificationErrors));
            Account.Add(new Kenwood_MyAccount_ValidationTest(base.baseURL, base.webdriver, base.verificationErrors));
            Account.Add(new Kenwood_MyAccount_OrderHistoryTest(base.baseURL, base.webdriver, base.verificationErrors));
            Account.Add(new Kenwood_MyAccount_TrafficSubscriptions_UnlockCodesTest(base.baseURL, base.webdriver, base.verificationErrors));
            Account.Add(new Kenwood_MyAccount_TrafficSubscriptions_ActivateSubscriptionTest(base.baseURL, base.webdriver, base.verificationErrors));
            Account.Add(new Kenwood_ActivateYourMap_Validation(base.baseURL, base.webdriver, base.verificationErrors));
            Account.Add(new Kenwood_ActivateYourMap_GetUnlockCode(base.baseURL, base.webdriver, base.verificationErrors));
            NoScan.Add(new Kenwood_NoScanSD_CheckAddToCart_TrafficService_UserNotLogged_Validation(base.baseURL, base.webdriver, base.verificationErrors));
            //NoScan.Add(new Kenwood_NoScanSD_CheckDeliveryOptions_Validation(base.baseURL, base.webdriver, base.verificationErrors));  //not working in FF to ID missing elements.
            NoScan.Add(new Kenwood_NoScanSD_CheckTheSoftwareUpdates(base.baseURL, base.webdriver, base.verificationErrors));
            NoScan.Add(new Kenwood_NoScanSD_CheckTrafficServices(base.baseURL, base.webdriver, base.verificationErrors));
            NoScan.Add(new Kenwood_NoScanSD_CheckLatestMapForKenwood(base.baseURL, base.webdriver, base.verificationErrors));
            NoScan.Add(new Kenwood_NoScanSD_OtherRegion_CheckTheSoftwareUpdates(base.baseURL, base.webdriver, base.verificationErrors));
            NoScan.Add(new Kenwood_NoScanSD_OtherRegion_CheckLatestMapForKenwood(base.baseURL, base.webdriver, base.verificationErrors));
            //NoScan.Add(new Kenwood_NoScanSD_CheckShippingAddress_Validation(base.baseURL, base.webdriver, base.verificationErrors)); //Not working in FF cannot ID
            NoScan.Add(new Kenwood_NoScanSD_CheckAddToCart_TrafficService_ExternalTrafficRec_CancelPressed(base.baseURL, base.webdriver, base.verificationErrors));
            NoScan.Add(new Kenwood_NoScanSD_CheckAddToCart_TrafficService_CancelPressed(base.baseURL, base.webdriver, base.verificationErrors));
            NoScan.Add(new Kenwood_NoScanSD_CheckShoppingCart_ForATrafficServcie_TryToUpdate(base.baseURL, base.webdriver, base.verificationErrors));
            NoScan.Add(new Kenwood_NoScanSD_CheckShoppingCart_ForATrafficServcie_ContinueShopping(base.baseURL, base.webdriver, base.verificationErrors));
            //NoScan.Add(new Kenwood_NoScanSD_CheckShoppingCart_ForATrafficServcie_ShippingValidation(base.baseURL, base.webdriver, base.verificationErrors));  //Not working in FF and cannot ID
            Scan.Add(new Kenwood_ScanSD_CheckAddToCart_TrafficService_DeviceAlreadyRegisteredToAnotherUser(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckAddToCart_TrafficService_DeviceHasOnlyTrafficReceiveId(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckLatestMap_DeviceRequieresUpdates_DNX9980_Validation(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckLatestMap_DeviceRequieresUpdates_DNX7180_Validation(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckShoppingCart_ForALatestMap_TryToUpdate(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckShoppingCart_ForALatestMap_ContinueShopping(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckShoppingCart_ForALatestMap_UserNotLogged_ShippingValidation(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckShippingAddress_UpdateDetails_BackCart(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckBillingAddress_Validation(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_PaymentInformation_Validation(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_WL_PaymentInfo_check(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckMediaScanValidation(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckTheSoftwareUpdates_FirmwareValidation(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckRealTrafficSubscription(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckTrafficServicesForKenwood(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_ScanSD_CheckLatestMapForKenwood(base.baseURL, base.webdriver, base.verificationErrors));
            Scan.Add(new Kenwood_Model(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Kenwood_OrderSummary_check(base.baseURL, base.webdriver, base.verificationErrors));
            TroubleShoot.Add(new Kenwood_CheckEach_NA_DeviceType_fortheProductUpdates(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Kenwood_CheckEach_EU_DeviceType_fortheProductUpdates(base.baseURL, base.webdriver, base.verificationErrors));
            Dashboard.Add(new Kenwood_CheckEach_Other_DeviceType_fortheProductUpdates(base.baseURL, base.webdriver, base.verificationErrors));
        }
Ejemplo n.º 13
0
        override protected async Task Process(string input)
        {
            switch (Navigation.Count)
            {
            case 0:

                if (input == "1" || input.ToLower() == "profile settings")
                {
                    await SendMessage(SettingsText.ProfileSettingsText.text);

                    Navigation.Add(1);
                }
                else if (input == "2" || input.ToLower() == "alert settings")
                {
                    await SendMessage(SettingsText.AlertSettingsText.text);

                    Navigation.Add(2);
                }
                else if (input == "3")
                {
                    state = IMessageState.Closed;
                    await message.DeleteAsync();

                    return;
                }

                break;

            case 1:
                //Profile Settings
                if (Navigation[0] == 1)
                {
                    //Reset Name
                    if (input == "1")
                    {
                        if (Player.Character.NameChangedAt != default(DateTime))
                        {
                            TimeSpan passedTime = DateTime.Now - Player.Character.NameChangedAt;

                            if (passedTime.Days != 30)
                            {
                                await SendMessage(string.Format("You have changed your Character Name recently. Wait {0} More Day{1}.",
                                                                (30 - passedTime.Days),
                                                                passedTime.Days != 1 ? "s" : string.Empty));

                                state = IMessageState.Closed;
                                return;
                            }
                        }

                        await SendMessage(SettingsText.ProfileSettingsText.ResetNameText.text);

                        Navigation.Add(1);
                    }
                    //Reset Profile
                    else if (input == "2")
                    {
                        await SendMessage(SettingsText.ProfileSettingsText.ResetProfileText.text);

                        Navigation.Add(2);
                    }
                }
                //Alert Settings
                else if (Navigation[0] == 2)
                {
                    if (input.ToLower() == "alerts" || input == "1")
                    {
                        await SendMessage(SettingsText.AlertSettingsText.options);

                        Navigation.Add(1);
                    }
                    else if (input.ToLower() == "additional alerts" || input == "2")
                    {
                        await SendMessage(SettingsText.AlertSettingsText.options);

                        Navigation.Add(2);
                    }
                }
                break;

            case 2:
                //Profile Settings
                if (Navigation[0] == 1)
                {
                    //Reset Name
                    if (Navigation[1] == 1)
                    {
                        //yes
                        if (input == "1")
                        {
                            await SendMessage(SettingsText.ProfileSettingsText.ResetNameText.text2);

                            Navigation.Add(1);
                        }
                        //no
                        else if (input == "2")
                        {
                            Navigation.Clear();
                            await SendMessage(EntryText);

                            return;
                        }
                    }
                    //Reset Profile
                    else if (Navigation[1] == 2)
                    {
                        //Proceed
                        if (input == "1")
                        {
                            for (int i = 0; i < 4; i++)
                            {
                                ConfirmationSeed += Program.random.Next(10);
                            }

                            await SendMessage($"Enter **{ConfirmationSeed}** to confirm profile reset.\n**Beyond this point, there is no return.**");

                            Navigation.Add(1);
                        }
                        else
                        {
                            Navigation.Clear();
                            await SendMessage(EntryText);

                            return;
                        }
                    }
                }
                //Alert Settings
                else if (Navigation[0] == 2)
                {
                    //Alerts
                    if (Navigation[1] == 1)
                    {
                        if (input.ToLower() == "yes" || input == "1")
                        {
                            if (!Player.User.alertsOn)
                            {
                                Player.User.alertsOn = true;
                                await SendMessage("Alerts state has been changed to `On` state.");

                                state = IMessageState.Closed;
                            }
                            else
                            {
                                await SendMessage("You have Alerts set to `On` already.");

                                state = IMessageState.Closed;
                            }
                        }
                        else if (input.ToLower() == "no" || input == "2")
                        {
                            if (Player.User.alertsOn)
                            {
                                Player.User.alertsOn = false;
                                await SendMessage("Alerts state has been changed to `Off` state.");

                                state = IMessageState.Closed;
                            }
                            else
                            {
                                await SendMessage("You have Alerts set to `Off` already.");

                                state = IMessageState.Closed;
                            }
                        }
                    }
                    //Additional Alerts
                    else if (Navigation[1] == 2)
                    {
                        if (input.ToLower() == "yes" || input == "1")
                        {
                            if (!Player.User.additionalAlertsOn)
                            {
                                Player.User.additionalAlertsOn = true;
                                await SendMessage("Additional Alerts state has been changed to `On` state.");

                                state = IMessageState.Closed;
                            }
                            else
                            {
                                await SendMessage("You have Additional Alerts set to `On` already.");

                                state = IMessageState.Closed;
                            }
                        }
                        else if (input.ToLower() == "no" || input == "2")
                        {
                            if (Player.User.additionalAlertsOn)
                            {
                                Player.User.additionalAlertsOn = false;
                                await SendMessage("Additional Alerts state has been changed to `Off` state.");

                                state = IMessageState.Closed;
                            }
                            else
                            {
                                await SendMessage("You have Additional Alerts set to `Off` already.");

                                state = IMessageState.Closed;
                            }
                        }
                    }
                }
                break;

            case 3:
                //Profile Settings
                if (Navigation[0] == 1)
                {
                    //Reset Name
                    if (Navigation[1] == 1)
                    {
                        if (Navigation[2] == 1)
                        {
                            ChangeNameTo = input;

                            if (Program.handler.Players.Exists(x => x.Character.Name.ToLower() == input.ToLower()))
                            {
                                await SendMessage("There is a player with such Character Name already.\nPlease choose something different:");
                            }
                            else if (input.Length > 15)
                            {
                                await SendMessage("Your chosen name is too long.\nPlease choose something different:");
                            }
                            else if (input.Length < 5)
                            {
                                await SendMessage("Your chosen name is too short.\nPlease choose something different:");
                            }
                            else if (input.Contains("rank") || input.Contains("back"))
                            {
                                await SendMessage("Names with **rank** or **back** in them are impossible to create");
                            }
                            else
                            {
                                ChangingNames.Add(ChangeNameTo);

                                await SendMessage(
                                    $"Are you sure you want to change your character name from **{Player.Character.Name}** to **{ChangeNameTo}**?\n" +
                                    $":one: ⇒ ✅\n" +
                                    $":two: ⇒ ❌\n" +
                                    $"**This warning is the last and final. You won't be able to change your name for 30 days.**");

                                Navigation.Add(1);
                            }
                        }
                        else if (Navigation[2] == 2)
                        {
                            Navigation.Clear();
                            await SendMessage(EntryText);

                            return;
                        }
                    }
                    //Reset Profile
                    if (Navigation[1] == 2)
                    {
                        if (input == ConfirmationSeed)
                        {
                            Player resetPlayer = new Player();
                            resetPlayer.User.UserID             = Player.User.UserID;
                            resetPlayer.User.ServerID           = Player.User.ServerID;
                            resetPlayer.User.alertsOn           = Player.User.alertsOn;
                            resetPlayer.User.additionalAlertsOn = Player.User.additionalAlertsOn;
                            resetPlayer.Character.Name          = Player.Character.Name;
                            resetPlayer.Character.NameChangedAt = Player.Character.NameChangedAt;

                            resetPlayer.Character.Gear.Sword      = new GearSword(GearSword.Short_Sword);
                            resetPlayer.Character.Gear.Helmet     = new GearHelmet(GearHelmet.Leather_Cap);
                            resetPlayer.Character.Gear.Chestplate = new GearChestplate(GearChestplate.Leather_Armor);
                            resetPlayer.Character.Gear.Leggings   = new GearLeggings(GearLeggings.Leather_Leggings);
                            resetPlayer.Character.Gear.Gloves     = new GearGloves(GearGloves.Leather_Gloves);
                            resetPlayer.Character.Gear.Boots      = new GearBoots(GearBoots.Leather_Boots);

                            if (Player.Character.Titles.Find(x => x.name == "Alpha Player") != null)
                            {
                                resetPlayer.Character.Titles.Add(ITitle.Titles.AlphaPlayer);
                            }

                            Program.handler.Players.Remove(Program.handler.Players.Find(x => x.User.UserID == Player.User.UserID));
                            Program.handler.Players.Insert(0, resetPlayer);

                            await SendMessage("Your profile has been successfully resetted!");
                        }
                        else if (input != ConfirmationSeed)
                        {
                            await SendMessage("Confirmation seeds did not match. Profile restart aborted.");
                        }
                        state = IMessageState.Closed;
                    }
                }
                break;

            case 4:
                //Profile Settings
                if (Navigation[0] == 1)
                {
                    //Reset Name
                    if (Navigation[1] == 1 && Navigation[2] == 1)
                    {
                        if (Navigation[3] == 1)
                        {
                            Player.Character.Name          = ChangeNameTo;
                            Player.Character.NameChangedAt = DateTime.Now;
                            ChangingNames.Remove(ChangeNameTo);

                            await SendMessage($"Your name has been successfully changed to **{Player.Character.Name}**!");

                            state = IMessageState.Closed;
                        }
                        else if (Navigation[3] == 2)
                        {
                            ChangingNames.Remove(ChangeNameTo);
                            Navigation.Clear();
                            await SendMessage(SettingsText.text);

                            return;
                        }
                    }
                }
                break;
            }
        }