コード例 #1
0
ファイル: Eventer.cs プロジェクト: xztaityozx/VSBouyomi
        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);
            }
        }
コード例 #2
0
        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;
        }
コード例 #3
0
ファイル: Eventer.cs プロジェクト: xztaityozx/VSBouyomi
 public Eventer(EventHolder h, string path)
 {
     _holder          = h;
     Config           = ReadConfigData(path);
     BouyomiTcpClient = new BouyomiTcpClient(Config.IPAddress, Config.Port);
 }