예제 #1
0
파일: Form1.cs 프로젝트: umby24/D3GUI
        private void Form1_Load(object sender, EventArgs e)
        {
            if (!File.Exists("Minecraft-Server.x86.exe")) {
                MessageBox.Show("Please place in the same folder as your D3 Server.", "Critical Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Close();
                return;
            }

            LoadSettings();
            LoadRanks();
            LoadCommands();
            LoadBlocks();
            LoadMaps();
            var psi = new ProcessStartInfo("Minecraft-Server.x86.exe")
            {
                CreateNoWindow = true,
                UseShellExecute = false,
                RedirectStandardOutput = true,
                WindowStyle = ProcessWindowStyle.Minimized
            };

            _serverProc = new Process {StartInfo = psi};
            _serverProc.OutputDataReceived += HandleMessage;

            // -- Check for updates
            var ud = new Updater {MainForm = this};
            ud.CheckUpdates();
            ud.CheckUpdatesServer(ServerVersion);
        }
예제 #2
0
파일: Form1.cs 프로젝트: TNTUP/D3GUI
        private void Form1_Load(object sender, EventArgs e)
        {
            if (!File.Exists("Minecraft-Server.x86.exe")) {
                MessageBox.Show("Please place in the same folder as your D3 Server.", "Critical Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
                return;
            }

            loadSettings();
            loadRanks();
            loadCommands();
            loadBlocks();
            loadMaps();
            ProcessStartInfo psi = new ProcessStartInfo("Minecraft-Server.x86.exe");
            psi.CreateNoWindow = true;
            psi.UseShellExecute = false;
            psi.RedirectStandardOutput = true;
            psi.WindowStyle = ProcessWindowStyle.Minimized;

            serverProc = new Process();
            serverProc.StartInfo = psi;
            serverProc.OutputDataReceived += new DataReceivedEventHandler(handleMessage);

            // -- Check for updates
            Updater ud = new Updater();
            ud.mainForm = this;
            ud.checkUpdates();
            ud.checkUpdatesServer(serverVersion);
        }