public static void WriteConfigData(string path, VsBouyomiConfigData config) { var serializer = new XmlSerializer(typeof(VsBouyomiConfigData)); using (var sw = new StreamWriter(path, false, Encoding.UTF8)) { serializer.Serialize(sw, config); } }
public override void SaveSettingsToStorage() { var config = new VsBouyomiConfigData { BuildDone = BuildDoneTalkData, BuildFaild = BuildFaildTalkData, BuildBegin = BuildBeginTalkData, StartupComplete = StartupCompleteTalkData, BeginShutdown = BeginShutdownTalkData, Opened = OpenedTalkData, Closing = ClosingTalkData, ExceptionNotHandled = ExceptionNotHandledTalkData, ExceptionThrown = ExceptionThrownTalkData, EnterDebugger = EnterDebuggerTalkData, EnterDesign = EnterDesignTalkData, EnterRunMode = EnterRunModeTalkData, IPAddress = IPAddress, Port = Port }; Eventer.WriteConfigData(ActivatePackage.ConfigXmlPath, config); Activate.Eventer.Config = config; }
public Eventer(EventHolder h, string path) { _holder = h; Config = ReadConfigData(path); BouyomiTcpClient = new BouyomiTcpClient(Config.IPAddress, Config.Port); }