Exemple #1
0
 public static bool LoadFile()
 {
     try
     {
         using (var sr = new StreamReader(SettingPath.SettingFolderPath + "\\ChSet5.txt", Encoding.GetEncoding(932)))
         {
             sr.Peek();//CurrentEncodingが更新される
             fileEncoding = sr.CurrentEncoding;
             return(ChSet5.Load(sr));
         }
     }
     catch { }
     return(false);
 }
Exemple #2
0
 public static bool LoadFile()
 {
     try
     {
         // 直接ファイルを読まずに EpgTimerSrv.exe に問い合わせる
         byte[] binData;
         if (CommonManager.Instance.CtrlCmd.SendFileCopy("ChSet5.txt", out binData) == ErrCode.CMD_SUCCESS)
         {
             using (var stream = new MemoryStream(binData))
                 using (var sr = new StreamReader(stream, Encoding.Default))
                 {
                     return(ChSet5.Load(sr));
                 }
         }
     }
     catch { }
     return(false);
 }