Advertisement
Krythic

D2 Item Socket Table Data Code

Aug 23rd, 2021
1,825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.72 KB | None | 0 0
  1. using System.IO;
  2. using System.Text;
  3. using System.Windows;
  4. using System.Windows.Forms.Integration;
  5. using VoidwalkerEngine.Editor;
  6.  
  7. namespace VoidwalkerEngine
  8. {
  9.     /// <summary>
  10.     /// Interaction logic for App.xaml
  11.     /// </summary>
  12.     public partial class App : Application
  13.     {
  14.         public static VoidwalkerEditor Editor;
  15.  
  16.         protected override void OnStartup(StartupEventArgs e)
  17.         {
  18.             string[] fileData = File.ReadAllLines("C:/Users/Krythic/Desktop/D2ItemSocketData.txt");
  19.             StringBuilder builder = new StringBuilder();
  20.             foreach(string line in fileData)
  21.             {
  22.                 if(line != null && line.Length > 0)
  23.                 {
  24.                     string[] tableData = line.Split('_');
  25.                     if(tableData != null && tableData.Length == 4)
  26.                     {
  27.                         builder.AppendLine("[tr=bg2]");
  28.                         builder.AppendLine("[td=null,1]" + tableData[0] + "[/td]");
  29.                         builder.AppendLine("[td=null,1]" + tableData[1] + "[/td]");
  30.                         builder.AppendLine("[td=null,1]" + tableData[2] + "[/td]");
  31.                         builder.AppendLine("[td=null,1]" + tableData[3] + "[/td]");
  32.                         builder.AppendLine("[/tr]");
  33.                     }
  34.                 }
  35.             }
  36.  
  37.             File.WriteAllText("C:/Users/Krythic/Desktop/Output.txt",builder.ToString());
  38.  
  39.  
  40.             // v Game Engine Startup stuff because I'm too lazy to make another project v
  41.  
  42.             //base.OnStartup(e);
  43.             //Editor = new VoidwalkerEditor();
  44.             //ElementHost.EnableModelessKeyboardInterop(Editor);
  45.             //Editor.Show();
  46.         }
  47.     }
  48. }
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement