Ejemplo n.º 1
0
        private void metroButton2_Click(object sender, EventArgs e)
        {
            Settings1 kam = new Settings1();

            try
            {
                metroLabel2.Text     = "[100]%";
                metroTrackBar1.Value = 100;
                metroToggle1.Checked = false;
                metroToggle2.Checked = false;
                metroToggle3.Checked = false;

                kam.lisk    = "false";
                kam.sltac   = "True";
                kam.opab    = "False";
                kam.guimode = "True";
                kam.Save();

                goto complete;
            }
            catch
            {
                MessageBox.Show("기본값으로 설정 하였습니다.", "기본값", MessageBoxButtons.OK, MessageBoxIcon.Information);
                goto exit;
            }
complete:
            {
                MessageBox.Show("기본값으로 설정 하였습니다.", "기본값", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            exit :;
        }
Ejemplo n.º 2
0
        private void Setting_FormClosed(object sender, FormClosedEventArgs e)
        {
            Settings1 se = new Settings1();

            se.Seton = "False";
            se.Save();
        }
Ejemplo n.º 3
0
        private void metroToggle4_CheckedChanged(object sender, EventArgs e)
        {
            Settings1 kmm1 = new Settings1();

            if (metroToggle4.Checked == true)
            {
                setting.svdt = "True";
                setting.Save();
                button1.Show();
                goto exit;
            }
            else
            {
                setting.svdt = "False";
                setting.Save();

                loadForm ff2 = new loadForm();
                ff2.Close();
                kmm1.loaddataform = "False";
                kmm1.Save();


                button1.Hide();
                goto exit;
            }
            exit :;
        }
Ejemplo n.º 4
0
        private void loadForm_Load(object sender, EventArgs e)
        {
            Settings1 n = new Settings1();

            try
            {
                string   value = Application.StartupPath + @"\Program_Data\bin\cobin\" + n.file.ToString() + @".Xml";
                FileInfo val   = new FileInfo(value);
                if (!val.Exists || val.Length <= 0)
                {
                    info.Text = "File [" + n.file.ToString() + "] 설정됨";
                    return;
                }
                else if (val.Exists & val.Length > 0)
                {
                    info.Text = "File [" + n.file + "] 로드됨";
                }
                return;
            }
            catch
            {
                info.Text = "File [Err] 로드됨";
                return;
            }
        }
Ejemplo n.º 5
0
        private void loadForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Settings1 se = new Settings1();

            se.loaddataform = "False";
            se.Save();
        }
Ejemplo n.º 6
0
        private void Easyst_FormClosed(object sender, FormClosedEventArgs e)
        {
            Settings1 se = new Settings1();

            se.est = "False";
            se.Save();
        }
Ejemplo n.º 7
0
        private void button1_Click(object sender, EventArgs e)
        {
            Settings1 kmm1 = new Settings1();
            loadForm  ff1  = new loadForm();

            ff1.Show();
            kmm1.loaddataform = "True";
            kmm1.Save();
        }
Ejemplo n.º 8
0
        private void metroTrackBar1_ValueChanged(object sender, EventArgs e)
        {
            Settings1 kam = new Settings1();

            kam.opa = Convert.ToString(metroTrackBar1.Value * 0.01);
            kam.Save();
            string aak = Convert.ToString(metroTrackBar1.Value * 0.01);

            ser1.SetData(aak);
            GC.Collect();
        }
Ejemplo n.º 9
0
        private void button7_Click(object sender, EventArgs e)
        {
            this.ActiveControl = null;

            Settings1 se = new Settings1();

            if (se.iplist == "False")
            {
                iplist ip = new iplist();
                ip.Show();
                se.iplist = "True";
                se.Save();
            }
        }
Ejemplo n.º 10
0
        private void button4_Click(object sender, EventArgs e)
        {
            this.ActiveControl = null;

            Settings1 se = new Settings1();

            if (se.est == "False")
            {
                Easyst eee = new Easyst();
                eee.Show();
                se.est = "True";
                se.Save();
            }
        }
Ejemplo n.º 11
0
        private void metroButton2_Click(object sender, EventArgs e)
        {
            this.ActiveControl = null;
            Settings1 k = new Settings1();

            if (k.sltac == "True")
            {
                toform1(url1.Text);
                this.Close();
            }
            else
            {
                toform1(url1.Text);
            }
        }
Ejemplo n.º 12
0
 private void metroButton1_Click(object sender, EventArgs e)
 {
     if (DialogResult.Yes == MessageBox.Show("현재 내용을 저장하시겠습니까?", "확인 메세지", MessageBoxButtons.YesNo, MessageBoxIcon.Information))
     {
         Settings1 kam = new Settings1();
         if (kam.opab == "True")
         {
             string str = metroLabel2.Text;
             if (str == "[100]%")
             {
                 kam.opab = "False";
                 kam.Save();
                 goto exit;
             }
             else
             {
                 if (str == "100%")
                 {
                     kam.opab = "False";
                     kam.Save();
                     goto exit;
                 }
                 else
                 {
                     kam.opab = "True";
                     kam.Save();
                     goto exit;
                 }
             }
         }
         else
         {
             kam.opab = "True";
             kam.Save();
             goto exit;
         }
     }
     exit :;
 }
Ejemplo n.º 13
0
        private void Setting_Load(object sender, EventArgs e)
        {
            Settings1 kam = new Settings1();

            button1.Hide();
            if (kam.lisk == "true")
            {
                metroToggle1.Checked = true;
                goto next;
            }
            else
            {
                metroToggle1.Checked = false;
                goto next;
            }
next:
            {
                if (kam.opab == "True")
                {
                    try
                    {
                        decimal f  = Convert.ToDecimal(kam.opa);
                        decimal K  = f * 100;
                        string  PP = string.Format("{0:#,##0}", K);
                        metroLabel2.Text     = "[" + PP + "]%";
                        metroTrackBar1.Value = Convert.ToInt16(PP);
                        GC.Collect();
                    }
                    catch
                    {
                        metroLabel2.Text     = "[100]%";
                        metroTrackBar1.Value = 100;
                    }
                    goto aff;
                }
                else
                {
                    goto exit;
                }
aff:
                {
                    if (kam.sltac == "True")
                    {
                        metroToggle2.Checked = true;
                        goto exit;
                    }
                    else
                    {
                        metroToggle2.Checked = false;
                        goto exit;
                    }
                }
exit:
                {
                    if (kam.guimode == "True")
                    {
                        metroToggle3.Checked = true;
                        goto exit2;
                    }
                    else
                    {
                        metroToggle3.Checked = false;
                        goto exit2;
                    }
                }
exit2:
                {
                    if (kam.svdt == "True")
                    {
                        metroToggle4.Checked = true;
                        goto exit3;
                    }
                    else
                    {
                        metroToggle4.Checked = false;
                        goto exit3;
                    }
                }
                exit3 :;
            }
        }
Ejemplo n.º 14
0
        private void info_Click(object sender, EventArgs e)
        {
            Settings1 kmm = new Settings1();

            if (kmm.file != "file1")
            {
                string   assf1 = Application.StartupPath + @"\Program_Data\bin\cobin\" + kmm.file + @".Xml";
                FileInfo asmf  = new FileInfo(assf1);
                if (!asmf.Exists || asmf.Length <= 0)
                {
                    MessageBox.Show("자바: 설정되지 않음" + Environment.NewLine + "메모리(RAM): 설정되지 않음" + Environment.NewLine + "코어파일: 설정되지 않음" + Environment.NewLine + Environment.NewLine + kmm.file.ToString() + @".xml파일 존재 여부: False", "정보", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }


                XmlDocument loadxml = new XmlDocument();

                loadxml.Load(assf1);

                XmlNodeList xmlread = loadxml.SelectNodes("/Root");

                foreach (XmlNode list in xmlread)
                {
                    string read0 = list["ID"]["java"].InnerText;
                    string read1 = list["ID"]["ram"].InnerText;
                    string read3 = list["ID"]["ram-or"].InnerText;
                    string read2 = list["ID"]["jar"].InnerText;

                    if (read0.ToString() == null | read1.ToString() == null | read2.ToString() == null | read3.ToString() == null)
                    {
                        MessageBox.Show("자바: 설정되지 않음" + Environment.NewLine + "메모리(RAM): 설정되지 않음" + Environment.NewLine + "코어파일: 설정되지 않음" + Environment.NewLine + Environment.NewLine + kmm.file.ToString() + @".xml파일 존재 여부: True", "정보", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }

                    if (read0.ToString() == "not")
                    {
                        MessageBox.Show("자바: 설정되지 않음" + Environment.NewLine + "메모리(RAM): " + read1.ToString() + read3.ToString() + Environment.NewLine + "코어파일: " + read2.ToString() + Environment.NewLine + Environment.NewLine + @"file1.xml파일 존재 여부: True", "정보", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    else
                    {
                        MessageBox.Show("자바: " + read0.ToString() + Environment.NewLine + "메모리(RAM): " + read1.ToString() + read3.ToString() + Environment.NewLine + "코어파일: " + read2.ToString() + Environment.NewLine + Environment.NewLine + @"file1.xml파일 존재 여부: True", "정보", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                }
            }
            else  // default 값에 해당하는 아래 코드
            {
                string   assf2 = Application.StartupPath + @"\Program_Data\bin\cobin\file1.Xml";
                FileInfo asmf1 = new FileInfo(assf2);
                if (!asmf1.Exists || asmf1.Length <= 0)
                {
                    MessageBox.Show("자바: 설정되지 않음" + Environment.NewLine + "메모리(RAM): 설정되지 않음" + Environment.NewLine + "코어파일: 설정되지 않음" + Environment.NewLine + Environment.NewLine + @"file1.xml파일 존재 여부: False", "정보", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                if (kmm.file == "file1")
                {
                    XmlDocument loadxml1 = new XmlDocument();

                    loadxml1.Load(assf2);
                    XmlNodeList xmlread = loadxml1.SelectNodes("/Root");

                    foreach (XmlNode list in xmlread)
                    {
                        string read0 = list["ID"]["java"].InnerText;
                        string read1 = list["ID"]["ram"].InnerText;
                        string read3 = list["ID"]["ram-or"].InnerText;
                        string read2 = list["ID"]["jar"].InnerText;

                        if (read0.ToString() == null | read1.ToString() == null | read2.ToString() == null | read3.ToString() == null)
                        {
                            MessageBox.Show("자바: 설정되지 않음" + Environment.NewLine + "메모리(RAM): 설정되지 않음" + Environment.NewLine + "코어파일: 설정되지 않음" + Environment.NewLine + Environment.NewLine + @"file1.xml파일 존재 여부: True", "정보", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            return;
                        }

                        if (read0.ToString() == "not")
                        {
                            MessageBox.Show("자바: 설정되지 않음" + Environment.NewLine + "메모리(RAM): " + read1.ToString() + read3.ToString() + Environment.NewLine + "코어파일: " + read2.ToString() + Environment.NewLine + Environment.NewLine + @"file1.xml파일 존재 여부: True", "정보", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            return;
                        }
                        else
                        {
                            MessageBox.Show("자바: " + read0.ToString() + Environment.NewLine + "메모리(RAM): " + read1.ToString() + read3.ToString() + Environment.NewLine + "코어파일: " + read2.ToString() + Environment.NewLine + Environment.NewLine + @"file1.xml파일 존재 여부: True", "정보", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            return;
                        }
                    }
                }
            }
        }
Ejemplo n.º 15
0
        static void Main()
        {
            try
            {
                Process[] pen2 = Process.GetProcessesByName("java");
                if (pen2.Length > 0)
                {
                    DialogResult qs = MessageBox.Show("Java.exe 프로세서가 작동되고 있습니다.\r\nGUI 구동시 자동 종료 되지만, 지금 종료하시겠습니까?", "사용자 응답을 기다리는 중...", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (qs == DialogResult.Yes)
                    {
                        pen2[0].Kill();
                    }
                }

                bool cancel = false;
                string[,] rev = new string[3, 10];
                rev[1, 1]     = @"\MetroFramework.Design.dll";
                rev[1, 2]     = @"\MetroFramework.dll";
                rev[2, 1]     = @"\Program_Data";
                rev[2, 2]     = @"\Program_Data\bin";
                rev[1, 3]     = @"\Program_Data\bin\eula.txt";
                rev[2, 3]     = @"\Program_Data\bin\cobin";
                rev[1, 4]     = @"\Program_Data\bin\cobin\sfile.txt";
                rev[2, 4]     = @"\Program_Data\Core";
                rev[2, 5]     = @"\Program_Data\Core\Craftbukkit";
                rev[2, 6]     = @"\Program_Data\Core\Spigot";
                rev[2, 7]     = @"\Program_Data\Core\Sponge";
                rev[2, 8]     = @"\Program_Data\Core\Sponge\Forge";
                rev[2, 9]     = @"\User_Data";

                for (int i = 0; i < 14; i++)
                {
                    if (i >= 9 & i <= 12)
                    {
                        string   pp = rev.GetValue(1, (i - 8)).ToString();
                        FileInfo mp = new FileInfo(Application.StartupPath + rev.GetValue(1, (i - 8)).ToString());
                        if (!mp.Exists)
                        {
                            if (pp.ToString() == @"\Program_Data\bin\cobin\sfile.txt")
                            {
                                System.IO.File.WriteAllText(Application.StartupPath + pp.ToString(), "file1", Encoding.Default);
                            }
                            else if (pp.ToString() == @"\Program_Data\bin\eula.txt")
                            {
                                System.IO.File.WriteAllText(Application.StartupPath + pp.ToString(), @"#By changing the setting below to TRUE you are indicating your agreement to our EULA" + Environment.NewLine + @"(https://account.mojang.com/documents/minecraft_eula)." + Environment.NewLine + @"#Sun Jan 10 13:49:24 KST 2016" + Environment.NewLine + @"eula=true", Encoding.Default);
                            }
                            else if (pp.ToString() == @"\MetroFramework.Design.dll" | pp.ToString() == @"\MetroFramework.dll")
                            {
                                MessageBox.Show(pp.ToString() + Environment.NewLine + "...가(이) 없습니다. 재설치를 권장드립니다.", "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                Process.Start("explorer.exe", "http://ekfvoddl3535.cafe24.com/xe/server_maker");
                                cancel = true;
                            }
                        }
                    }
                    else if (i >= 0 & i <= 8)
                    {
                        DirectoryInfo mpd = new DirectoryInfo(Application.StartupPath + rev.GetValue(2, (i + 1)).ToString());
                        if (!mpd.Exists)
                        {
                            mpd.Create();
                        }
                    }
                    if (cancel)
                    {
                        Application.ExitThread();
                        Application.Exit();
                        return;
                    }
                }

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                string   resetting = Application.StartupPath + @"\reset.rstd";
                FileInfo reset     = new FileInfo(resetting);
                if (reset.Exists)
                {
                    Settings1 a1 = new Settings1();
                    try
                    {
                        a1.Reset();
                        a1.Save();
                        goto aty1;
                    }
                    catch
                    {
                        a1.Reset();
                    }
aty1:
                    MessageBox.Show("프로그램 설정이 초기화 되었습니다.");
                    reset.Delete();
                    try
                    {
                        a1.Upgrade();
                        a1.Save();
                    }
                    catch
                    {
                    }
                    Application.ExitThread();
                    Application.Exit();
                }
                // Application.Run(new Main1());
                if (eulaskip.ToString() == "true")
                {
                    Application.Run(new Main1());
                    return;
                }
                Application.Run(new Form3());
            }
            catch (Exception errore)
            {
                MessageBox.Show(errore.Message.ToString(), "오류 정보", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 16
0
        private void Easyst_Load(object sender, EventArgs e)
        {
            try
            {
                Settings1 kmm = new Settings1();

                string   apd1 = Application.StartupPath + @"\User_Data\server.properties";
                FileInfo ap   = new FileInfo(apd1);
                if (!ap.Exists | ap.Length <= 0)
                {
                    b1.Enabled = false;
                    b1.Text    = "파일없음";
                    return;
                }
                else
                {
                    b1.Enabled = false;
                    b1.Text    = "로딩중";

                    string       stsr;
                    StreamReader fo = new StreamReader(Application.StartupPath + @"\User_Data\server.properties");

                    //무엇...?
                    while (fo.EndOfStream == false)
                    {
                        stsr = fo.ReadLine();

                        if (stsr.Contains("server-ip="))
                        {
                            stsr         = stsr.Substring(10);
                            address.Text = stsr.ToString();
                        }
                        else if (stsr.Contains("server-port="))
                        {
                            stsr       = stsr.Substring(12);
                            port.Value = Convert.ToDecimal(stsr);
                        }
                        else if (stsr.Contains("level-name="))
                        {
                            stsr        = stsr.Substring(11);
                            lvname.Text = stsr.ToString();
                        }
                        else if (stsr.Contains("difficulty="))
                        {
                            stsr = stsr.Substring(11);
                            switch (stsr.ToString())
                            {
                            case "0":
                            {
                                diff.Text = "평화로움";
                                goto next;
                            }

                            case "1":
                            {
                                diff.Text = "쉬움";
                                goto next;
                            }

                            case "2":
                            {
                                diff.Text = "보통";
                                goto next;
                            }

                            case "3":
                            {
                                diff.Text = "어려움";
                                goto next;
                            }
                            }
                            next :;
                        }
                        else if (stsr.Contains("max-players="))
                        {
                            stsr           = stsr.Substring(12);
                            maxplayer.Text = stsr.ToString();
                        }
                        else if (stsr.Contains("gamemode="))
                        {
                            stsr = stsr.Substring(9);
                            switch (stsr.ToString())
                            {
                            case "0":
                            {
                                gmmode.Text = "서바이벌 (Survival)";
                                goto next2;
                            }

                            case "1":
                            {
                                gmmode.Text = "크리에이티브(Creative)";
                                goto next2;
                            }

                            case "2":
                            {
                                gmmode.Text = "어드벤쳐(Adventrue)";
                                goto next2;
                            }

                            case "3":
                            {
                                gmmode.Text = "관람[1.8 이상](Spectator)";
                                goto next2;
                            }
                            }
                            next2 :;
                        }
                        else if (stsr.Contains("online-mode="))
                        {
                            stsr = stsr.Substring(12);
                            if (stsr.ToString() == "true")
                            {
                                online.Checked = true;
                            }
                            else if (stsr.ToString() == "false")
                            {
                                online.Checked = false;
                            }
                        }
                        else if (stsr.Contains("pvp="))
                        {
                            stsr = stsr.Substring(4);
                            if (stsr.ToString() == "true")
                            {
                                pvp.Checked = true;
                            }
                            else if (stsr.ToString() == "false")
                            {
                                pvp.Checked = false;
                            }
                        }
                        else if (stsr.Contains("spawn-animals="))
                        {
                            stsr = stsr.Substring(14);
                            if (stsr.ToString() == "true")
                            {
                                anispwn.Checked = true;
                            }
                            else if (stsr.ToString() == "false")
                            {
                                anispwn.Checked = false;
                            }
                        }
                        else if (stsr.Contains("spawn-npcs="))
                        {
                            stsr = stsr.Substring(11);
                            if (stsr.ToString() == "true")
                            {
                                npspwn.Checked = true;
                            }
                            else if (stsr.ToString() == "false")
                            {
                                npspwn.Checked = false;
                            }
                        }
                        else if (stsr.Contains("spawn-monsters="))
                        {
                            stsr = stsr.Substring(15);
                            if (stsr.ToString() == "true")
                            {
                                monspwn.Checked = true;
                            }
                            else if (stsr.ToString() == "false")
                            {
                                monspwn.Checked = false;
                            }
                        }
                        else if (stsr.Contains("enable-command-block="))
                        {
                            stsr = stsr.Substring(21);
                            if (stsr.ToString() == "true")
                            {
                                cmbk.Checked = true;
                            }
                            else if (stsr.ToString() == "false")
                            {
                                cmbk.Checked = false;
                            }
                        }
                        else if (stsr.Contains("white-list="))
                        {
                            stsr = stsr.Substring(11);
                            if (stsr.ToString() == "true")
                            {
                                wlist.Checked = true;
                            }
                            else if (stsr.ToString() == "false")
                            {
                                wlist.Checked = false;
                            }
                        }
                        else if (stsr.Contains("hardcore="))
                        {
                            stsr = stsr.Substring(9);
                            if (stsr.ToString() == "true")
                            {
                                hardcore.Checked = true;
                            }
                            else if (stsr.ToString() == "false")
                            {
                                hardcore.Checked = false;
                            }
                        }
                        else if (stsr.Contains("op-permission-level="))
                        {
                            stsr       = stsr.Substring(20);
                            oplv.Value = Convert.ToDecimal(stsr.ToString());
                        }
                        else if (stsr.Contains("max-world-size="))
                        {
                            stsr = stsr.Substring(15);
                            worldmaxsize.Value = Convert.ToDecimal(stsr.ToString());
                        }
                        else if (stsr.Contains("max-build-height="))
                        {
                            stsr            = stsr.Substring(17);
                            maxheight.Value = Convert.ToDecimal(stsr.ToString());
                        }
                        else if (stsr.Contains("spawn-protection="))
                        {
                            stsr = stsr.Substring(17);
                            spawnprotect.Value = Convert.ToDecimal(stsr.ToString());
                        }
                    }
                    fo.BaseStream.Close();


                    b1.Enabled = true;
                    b1.Text    = "저장";
                    return;
                }
            }
            catch
            {
                MessageBox.Show("문제가 발생하였습니다. 이지 셋팅을 이용할 수 없습니다.", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
            }
        }