Minecraft launcher kodu çalışınca kapanıyor

342524

Hectopat
Katılım
1 Haziran 2020
Mesajlar
7.167
Makaleler
3
Çözümler
20
C#:
using CmlLib.Core;
using CmlLib.Core.Auth;
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Aeron_Launcher

{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = true;
        }

        public int MaximumRamMb { get; private set; }
        public MSession Session { get; private set; }

        void gameoyunac()
        {
            var launchOption = new MLaunchOption()
            {
                Session = MSession.GetOfflineSession(label2.Text),
                Path = new MinecraftPath(),
                MaximumRamMb = 4096,
                JavaPath = "javaw.exe",
                VersionType = "CmlLauncher",
                GameLauncherName = "CmlLauncher",
                GameLauncherVersion = "2",

                FullScreen = false,

            };
        }
        private void guna2Button1_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(guna2TextBox1.Text))
            {
                MessageBox.Show("You cant enter the game without using name. Please Enter A user name");
            }
            else
            {
                guna2Button1.Enabled = false;
                Thread thread = new Thread(() => Launch());
                thread.IsBackground = true;
                thread.Start();

                Task.Run(gameoyunac);
            }
        }

        private void Launch()
        {
            throw new NotImplementedException();
        }

        private void launch()
        {
            throw new NotImplementedException();
        }
    }
}
Kod burada. Kodu çalıştırınca Launcher kapanıyor. Eksik bir şey mi yazdım?
@Linux Kaymak.
Hocam anlıyorsanız yardım edebilir misiniz?
 
Son düzenleme:

Yeni konular

Geri
Yukarı