コード例 #1
0
        private void PC_StartGame()
        {
            if (Directory.Exists($"Launcher/{FileManager.Modpacks.ProjectCenturos}"))
            {
                MCClient_Login.MODPACK = (int)FileManager.Modpacks.ProjectCenturos;

                if (File.Exists($"Launcher/{FileManager.Modpacks.ProjectCenturos}/Login.txt"))
                {
                    MC_Game.Login((FileManager.Modpacks)MCClient_Login.MODPACK);
                }
                else
                {
                    PC_ClientState(3);
                    MCClient_Login.main = this;
                    MCClient_Login mcClient = new MCClient_Login();
                    mcClient.Show();
                }
            }
            else
            {
                PC_ClientState(0);

                Dispatcher.Invoke(() =>
                {
                    MessageBox.Show($"Failed to start {FileManager.Modpacks.ProjectCenturos}!");
                });
            }
        }
コード例 #2
0
 private void XBoxLogin_Btn_Click(object sender, RoutedEventArgs e)
 {
     Hide();
     Dispatcher.Invoke(() =>
     {
         main.DeleteBtn_BC.IsEnabled = true;
         main.StartBtn_BC.IsEnabled  = true;
     });
     MC_Game.XBoxLogin((FileManager.Modpacks)MODPACK);
     Close();
 }
コード例 #3
0
        private void Login_Btn_Click(object sender, RoutedEventArgs e)
        {
            if (EMail_Box.Text.Length > 1 && Password_Box.Password.Length > 1)
            {
                File.WriteAllText("Launcher/BlockyCrafters/Login.txt", EMail_Box.Text + " " + Password_Box.Password);

                Dispatcher.Invoke(() =>
                {
                    main.DeleteBtn_BC.IsEnabled = true;
                    main.StartBtn_BC.IsEnabled  = true;
                });

                Close();
                MC_Game.Login((FileManager.Modpacks)MODPACK);
            }
            else
            {
                MessageBox.Show("Email or Password is invalid!");
            }
        }
コード例 #4
0
 private void LogOutMicrosoft_Btn_Click(object sender, RoutedEventArgs e)
 {
     MC_Game.XBoxLogout();
 }