Beispiel #1
0
 private void A1_Tick(object sender, EventArgs e)
 {
     PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5M^7ain ^5M^7enu\n\n^2-->^5Host Menu\nClient 1 Menu\nReset Menu\nAccount Menu\nTeleport Menu\nVision Menu\nCredit Menu\n\n\n^3Client 0 : ^2" + textBox1.Text + "\n^3Client 1 : ^2" + textBox2.Text + "^5");
     if (Key_IsDown((uint)0) == "X")
     {
         HostMenuMain.Stop();
         B1.Start();
     }
     if (Key_IsDown((uint)0) == "R1")
     {
         HostMenuMain.Stop();
         Client1.Start();
     }
     if (Key_IsDown((uint)0) == "R3 + L3")
     {
         HostMenuMain.Stop();
         B1.Stop();
         B2.Stop();
         B3.Stop();
         B4.Stop();
         B5.Stop();
         Client1.Stop();
         C1.Stop();
         C2.Stop();
         C3.Stop();
         C4.Stop();
         ResetMenu.Stop();
         D1.Stop();
         D2.Stop();
         D3.Stop();
         D4.Stop();
         D5.Stop();
         AccountMenu.Stop();
         E1.Stop();
         E2.Stop();
         E3.Stop();
         E4.Stop();
         E5.Stop();
         TeleportMenu.Stop();
         F1.Stop();
         F2.Stop();
         F3.Stop();
         F4.Stop();
         VisionMenu.Stop();
         G1.Stop();
         G2.Stop();
         G3.Stop();
         G4.Stop();
         G5.Stop();
         G6.Stop();
         OtherMenu.Stop();
         H1.Stop();
         PS3.Extension.WriteString(0x004eb39c, "^5Menu ^1Closed");
         simpleButton2.Enabled           = true;
         toolStripStatusLabel2.Text      = "Not Started !";
         toolStripStatusLabel2.ForeColor = Color.Red;
         simpleButton3.Enabled           = false;
     }
 }
Beispiel #2
0
 public static void Postfix(PlayerDetailsCanvas __instance)
 {
     try
     {
         FieldInfo   accountMenuInfo = __instance.GetType().GetField("_accountMenu", BindingFlags.NonPublic | BindingFlags.Instance);
         AccountMenu acMenu          = (AccountMenu)accountMenuInfo.GetValue(__instance);
         InstanceKeeper.SetAccountMenu(acMenu);
         WriteLog.Verbose("Successfully got AccountMenu class");
     }
     catch (Exception ex)
     {
         WriteLog.Error("Error while obtaining AccountMenu class: " + ex.ToString());
     }
 }
Beispiel #3
0
 private void simpleButton3_Click(object sender, EventArgs e)
 {
     MainMenu.Stop();
     HostMenuMain.Stop();
     B1.Stop();
     B2.Stop();
     B3.Stop();
     B4.Stop();
     B5.Stop();
     Client1.Stop();
     C1.Stop();
     C2.Stop();
     C3.Stop();
     C4.Stop();
     ResetMenu.Stop();
     D1.Stop();
     D2.Stop();
     D3.Stop();
     D4.Stop();
     D5.Stop();
     AccountMenu.Stop();
     E1.Stop();
     E2.Stop();
     E3.Stop();
     E4.Stop();
     E5.Stop();
     TeleportMenu.Stop();
     F1.Stop();
     F2.Stop();
     F3.Stop();
     F4.Stop();
     VisionMenu.Stop();
     G1.Stop();
     G2.Stop();
     G3.Stop();
     G4.Stop();
     G5.Stop();
     G6.Stop();
     OtherMenu.Stop();
     H1.Stop();
     PS3.Extension.WriteString(0x004eb39c, "^5Menu ^1Closed");
     toolStripStatusLabel2.Text      = "Not Started !";
     toolStripStatusLabel2.ForeColor = Color.Red;
     simpleButton2.Enabled           = true;
     simpleButton3.Enabled           = false;
 }
Beispiel #4
0
 private void AccountMenu_Tick(object sender, EventArgs e)
 {
     PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5M^7ain ^5M^7enu\n\n^5Host Menu\nClient 1 Menu\nReset Menu\n^2-->^5Account Menu\nTeleport Menu\nVision Menu\nCredit Menu\n\n\n^3Client 0 : ^2" + textBox1.Text + "\n^3Client 1 : ^2" + textBox2.Text + "^5");
     if (Key_IsDown((uint)0) == "X")
     {
         AccountMenu.Stop();
         E1.Start();
     }
     if (Key_IsDown((uint)0) == "R1")
     {
         AccountMenu.Stop();
         TeleportMenu.Start();
     }
     if (Key_IsDown((uint)0) == "L1")
     {
         AccountMenu.Stop();
         ResetMenu.Start();
     }
 }
Beispiel #5
0
        public IActionResult AccountMenuEdit(MenuModel menuModel)
        {
            if (ModelState.IsValid)
            {
                if (menuModel?.Id != null)
                {
                    List <AccountMenuLanguage> accountMenuLanguages = _baselDb.AccountMenus
                                                                      .SelectMany(x => x.AccountMenuLanguages
                                                                                  .Where(z => z.AccountMenu.Id == menuModel.Id))
                                                                      .Include(a => a.AccountMenu)
                                                                      .ToList();


                    foreach (AccountMenuLanguage item in accountMenuLanguages)
                    {
                        if (item.LanguageId == 1)
                        {
                            item.Name = menuModel.EngName;
                        }
                        else if (item.LanguageId == 2)
                        {
                            item.Name = menuModel.AzName;
                        }
                        else if (item.LanguageId == 3)
                        {
                            item.Name = menuModel.RuName;
                        }
                    }

                    AccountMenu accountMenu = accountMenuLanguages.Select(x => x.AccountMenu).FirstOrDefault();

                    accountMenu.Action     = menuModel.Action;
                    accountMenu.Controller = menuModel.Controller;

                    _baselDb.SaveChanges();
                }
            }

            return(View(nameof(Menu)));
        }
 public static bool Prefix(AccountMenu __instance)
 {
     if (Main.IsPatched && Main.AwaitingServerAndName)
     {
         try
         {
             FieldInfo  emailInputInfo = __instance.GetType().GetField("_loginEmailInputField", BindingFlags.NonPublic | BindingFlags.Instance);
             FieldInfo  passInputInfo  = __instance.GetType().GetField("_loginPasswordInputField", BindingFlags.NonPublic | BindingFlags.Instance);
             InputField serverIP       = (InputField)emailInputInfo.GetValue(__instance);
             InputField username       = (InputField)passInputInfo.GetValue(__instance);
             InstanceKeeper.mainClient.SetServerIpUsername(serverIP.text, username.text);
         }
         catch (Exception ex)
         {
             WriteLog.Error("Error while determining server ip and username: " + ex.ToString());
         }
         return(false);
     }
     else
     {
         return(true);
     }
 }
Beispiel #7
0
        public IActionResult AccountMenuCreate(MenuModel menuModel)
        {
            if (ModelState.IsValid)
            {
                List <AccountMenuLanguage> accountMenuLanguages = new List <AccountMenuLanguage>()
                {
                    new AccountMenuLanguage()
                    {
                        LanguageId = 1,
                        Name       = menuModel.EngName
                    },
                    new AccountMenuLanguage()
                    {
                        LanguageId = 2,
                        Name       = menuModel.AzName
                    },
                    new AccountMenuLanguage()
                    {
                        LanguageId = 3,
                        Name       = menuModel.RuName
                    }
                };

                AccountMenu accountMenu = new AccountMenu()
                {
                    Action               = menuModel.Action,
                    Controller           = menuModel.Controller,
                    AccountMenuLanguages = accountMenuLanguages
                };

                _baselDb.AccountMenus.Add(accountMenu);

                _baselDb.SaveChanges();
            }
            return(View(nameof(Menu)));
        }
Beispiel #8
0
 public static void SetAccountMenu(AccountMenu menu)
 {
     accountMenu = menu;
 }
 public static void Postfix(AccountMenu __instance)
 {
     WriteLog.General("Searching for serverlogin.tmp ...");
     if (File.Exists("serverlogin.tmp"))
     {
         WriteLog.Verbose("Successfully found serverlogin.tmp, verifying timestamp...");
         try
         {
             string text = File.ReadAllText("serverlogin.tmp");
             File.Delete("serverlogin.tmp");
             string[] splitDateTime = text.Split(':');
             if (splitDateTime[0] == DateTime.Now.Year.ToString() && splitDateTime[1] == DateTime.Now.Month.ToString() && splitDateTime[2] == DateTime.Now.Day.ToString() && (splitDateTime[3] == DateTime.Now.Hour.ToString() || splitDateTime[3] == (DateTime.Now.Hour - 1).ToString() || splitDateTime[3] == (24).ToString()) && (splitDateTime[4] == DateTime.Now.Minute.ToString() || splitDateTime[4] == (DateTime.Now.Minute - 1).ToString() || splitDateTime[4] == (59).ToString()))     //dunno if this is necessary, but did this in case
             {
                 WriteLog.Verbose("Successfully verified serverlogin.tmp");
                 foreach (GameObject gObject in SceneManager.GetActiveScene().GetRootGameObjects())
                 {
                     //WriteLog.General("FOR DEVELOPMENT: Found a GameObject in scene called " + gObject.name);
                     foreach (TextMeshProUGUI TMP in gObject.GetComponentsInChildren <TextMeshProUGUI>())
                     {
                         //WriteLog.General("Found a text called " + TMP.text + " in GameObject " + TMP.gameObject);
                         if (TMP.text == "Login E-mail:" && TMP.gameObject.name == "AccountEmailText")
                         {
                             TMP.text = "Server IP:";
                         }
                         else if (TMP.text == "Password:"******"AccountPasswordText")
                         {
                             TMP.text = "Username:"******"Login" && TMP.gameObject.name == "Text")
                         {
                             TMP.text = "Connect";
                         }
                         else if (TMP.text == "Login" && TMP.gameObject.name == "TopAccountPanelText")
                         {
                             TMP.text = "Please enter server IP and your username";
                         }
                         else if (TMP.text == "Forgot password" && TMP.gameObject.name == "Text")
                         {
                             TMP.text = "";
                         }
                     }
                     foreach (Text NormalText in gObject.GetComponentsInChildren <Text>())
                     {
                         // WriteLog.General("Found a Unity text called " + NormalText.text + " in GameObject " + NormalText.gameObject);
                         if (NormalText.text == "Enter e-mail address..." && NormalText.gameObject.name == "Placeholder")
                         {
                             NormalText.text = "";
                         }
                         else if (NormalText.text == "Enter password..." && NormalText.gameObject.name == "Placeholder")
                         {
                             NormalText.text = "";
                         }
                     }
                 }
                 FieldInfo topPanelHeaderInfo = __instance.GetType().GetField("_topPanelHeaderLocalize", BindingFlags.NonPublic | BindingFlags.Instance);
                 Localize  topPanelHeader     = (Localize)topPanelHeaderInfo.GetValue(__instance);
                 topPanelHeader.SetTerm("Please enter the server IP and your username");
                 __instance.CancelDelegate = new AccountMenu.CancelButtonDelegate(__instance.HideAccountPanel);
             }
         }
         catch (Exception ex)
         {
             WriteLog.Error("An error ocurred while using ShowLoginAccountPanel to get server IP and username: " + ex.ToString());
         }
     }
 }
 private void Update()
 {
     menu = FindObjectOfType <AccountMenu>();
 }
Beispiel #11
0
        public void Run()
        {
            var login       = new Login();
            var main        = new MainMenu();
            var accountMenu = new AccountMenu(_transactionService, _accountService);

            User user = null;

            // Loop to get the user
            while (user == null)
            {
                var userId = login.GetUserId();
                user = _userService.GetUser(userId);

                if (user == null)
                {
                    Console.WriteLine("User does not exist. Try again.");
                    Console.ReadKey();
                    Console.Clear();
                }
            }

            Console.Clear();
            Console.WriteLine($"Welcome, {user.FirstName}!");
            //_accountService.CreateAccount(user, AccountTypes.Checking, "1234");
            var account = accountMenu.GetAccountSelection(user);

            if (account == null)
            {
                // Ends if user enters the wrong account or
                // if there are no accounts for the user
                return;
            }

            int selection = -1;

            while (selection == -1)
            {
                Console.Clear();
                selection = main.GetMenuSelection();
            }

            Console.Clear();
            switch (selection)
            {
            case (1):     // Get Balance
                Console.WriteLine(_transactionService.GetBalance(account));
                break;

            case (2):     // Withdraw
                accountMenu.Withdraw(account);
                break;

            case (3):     // Deposit
                accountMenu.Deposit(account);
                break;

            case (4):     // Transfer
                accountMenu.Transfer(account);
                break;
            }
        }
Beispiel #12
0
 private void btnAccount_Click(object sender, EventArgs e)
 {
     AccountMenu.Show(btnAccount, new Point(0, btnAccount.Height));
 }