Advertisement
RocaKvs

Ini Editor

Mar 24th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. \\grab ini
  2. if (Console.Connect(out Console))
  3. {
  4. Console.ReceiveFile(AppDomain.CurrentDomain.BaseDirectory + comboBox1.Text, comboBox2.SelectedItem + comboBox1.Text);
  5. richTextBox1.Text = System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + comboBox1.Text);
  6. button5.Text = "Loaded";
  7. }
  8. else
  9. {
  10. MessageBox.Show("Could Not Connect");
  11. }
  12. \\Send Ini
  13. switch (comboBox1.SelectedIndex)
  14. {
  15. case 0:
  16. try
  17. {
  18. System.IO.File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + "\\launch.ini", richTextBox1.Text);
  19. Console.SendFile(AppDomain.CurrentDomain.BaseDirectory + "\\launch.ini", comboBox2.SelectedItem + "launch.ini");
  20.  
  21. }
  22. catch(Exception ex)
  23. {
  24.  
  25. }
  26. break;
  27. case 1:
  28. try
  29. {
  30. System.IO.File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + "\\JRPC.ini", richTextBox1.Text);
  31. Console.SendFile(AppDomain.CurrentDomain.BaseDirectory + "\\JRPC.ini", comboBox2.SelectedItem + "JRPC.ini");
  32.  
  33. }
  34. catch (Exception ex)
  35. {
  36.  
  37. }
  38. break;
  39. case 2:
  40. try
  41. {
  42. System.IO.File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + "\\xdbm.ini", richTextBox1.Text);
  43. Console.SendFile(AppDomain.CurrentDomain.BaseDirectory + "\\xdbm.ini", comboBox2.SelectedItem + "xdbm.ini");
  44.  
  45. }
  46. catch (Exception ex)
  47. {
  48.  
  49. }
  50. break;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement