private void Setting_FormClosed(object sender, FormClosedEventArgs e) { Settings1 se = new Settings1(); se.Seton = "False"; se.Save(); }
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 :; }
private void loadForm_FormClosed(object sender, FormClosedEventArgs e) { Settings1 se = new Settings1(); se.loaddataform = "False"; se.Save(); }
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 :; }
private void Easyst_FormClosed(object sender, FormClosedEventArgs e) { Settings1 se = new Settings1(); se.est = "False"; se.Save(); }
private void button1_Click(object sender, EventArgs e) { Settings1 kmm1 = new Settings1(); loadForm ff1 = new loadForm(); ff1.Show(); kmm1.loaddataform = "True"; kmm1.Save(); }
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(); }
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 :; }
private void metroToggle1_CheckedChanged(object sender, EventArgs e) { switch (metroToggle1.Checked) { case true: setting.lisk = "true"; setting.Save(); goto exit; case false: setting.lisk = "false"; setting.Save(); goto exit; } exit :; }
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(); } }
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(); } }
private void b1_Click_1(object sender, EventArgs e) { if (se.file == "file1") { Thread p = new Thread(new ThreadStart(df.ui)); info.Text = "File [1] 로드됨"; return; } else { DialogResult d = MessageBox.Show("다음 구동(실행)부터 File[1]에 저장하시겠습니까?", "확인중..", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (d == DialogResult.Yes) { se.file = "file1"; se.Save(); info.Text = "File [1] 설정됨"; return; } } }
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); } }
private async void command() { if (intxt.Text == "!help") { intxt.Clear(); textBox1.AppendText("\r\n!help - 프로그램 내 명령어를 봅니다.\r\n" + "!clr - 출력창을 지웁니다.\r\n" + "!info - 프로그램 정보를 봅니다.\r\n" + "!logging - 현재 출력된 내용을 \"" + Application.StartupPath + @"\logging" + kmm.logging + ".txt\"에 기록합니다.\r\n" + "!log - 로그 옵션을 봅니다.\r\n" + "!systeminfo - 시스템 정보를 출력시켜줍니다.(!sinfo 도 됩니다)\r\n"); return; } else if (intxt.Text == "!clr") { intxt.Clear(); textBox1.Clear(); } else if (intxt.Text == "!info") { intxt.Clear(); textBox1.AppendText("\r\n프로그램 버전: V4.5 PREMIUM\r\nGUI MODE Version: V2.0\r\n"); //업데이트 수정 return; } else if (intxt.Text == "!systeminfo" | intxt.Text == "!sinfo") { intxt.Clear(); new Thread(new ThreadStart(system_checker)).Start(); return; } else if (intxt.Text == "!logging") { intxt.Clear(); StreamWriter Abc; int VB = Convert.ToInt16(kmm.logging); VB++; Abc = File.CreateText(Application.StartupPath + @"\logging" + kmm.logging + @".txt"); await Abc.WriteLineAsync(textBox1.Text); Abc.Close(); kmm.logging = VB.ToString(); kmm.Save(); textBox1.AppendText("\r\n로그를 기록했습니다.\r\n"); return; } else if (intxt.Text == "!log") { intxt.Clear(); textBox1.AppendText("\r\n!log -reset : 로그를 초기화 시킵니다.\r\n"); return; } else if (intxt.Text == "!srvdata") { intxt.Clear(); textBox1.AppendText("\r\n" + shell.ToString()); return; } else if (intxt.Text == "!log -reset") { lock (this) { intxt.Clear(); int p = Convert.ToInt16(kmm.logging); for (int i = 1; i != p; i++) { string K = Application.StartupPath + @"\logging" + i + @".txt"; FileInfo kdel = new FileInfo(K); if (kdel.Exists) { kdel.Delete(); } } textBox1.AppendText("\r\n로그를 초기화 했습니다."); } kmm.logging = "1"; kmm.Save(); return; } // 서버 명령어 else if (starting) { if (intxt.Text == "help") { helpdata = true; } q.StandardInput.WriteLine(this.intxt.Text); this.intxt.Clear(); return; } else { intxt.Clear(); textBox1.AppendText("\r\n알 수 없는 명령어입니다, !help로 프로그램 내 명령어를 확인하실 수 있습니다\r\n"); return; } }