public static void ReadPlugin() { FileStream fs = new FileStream(Application.StartupPath + "\\Meta Editor Settings.xml", FileMode.Open, FileAccess.ReadWrite); XmlTextReader xtr = new XmlTextReader(fs); while (xtr.Read()) { switch (xtr.Name.ToLower()) { case "colors": { try { ShiftColors.SetVariables(Convert.ToInt32(xtr.GetAttribute("StartingRed")), Convert.ToInt32(xtr.GetAttribute("StartingBlue")), Convert.ToInt32(xtr.GetAttribute("StartingGreen")) , Convert.ToInt32(xtr.GetAttribute("RedToShift")), Convert.ToInt32(xtr.GetAttribute("BlueToShift")), Convert.ToInt32(xtr.GetAttribute("GreenToShift"))); } catch { } break; } } } xtr.Close(); fs.Close(); }
public MetaEditor() { InitializeComponent(); ShiftColors.ReadPlugin(); }