spt/qk30ic/ConRead.cs
2025-09-19 18:34:20 +09:00

43 lines
838 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#define TRACE
#define DEBUG
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
namespace qk30ic;
internal class ConRead
{
public static uint ReadConFile(ref string[] con)
{
try
{
string text = Directory.GetCurrentDirectory() + "\\" + Form1.CONFIG_PATH;
Debug.WriteLine(text);
using StreamReader streamReader = new StreamReader(text, Encoding.GetEncoding("shift_jis"));
int num = 0;
string text2 = "";
while ((text2 = streamReader.ReadLine()) != null)
{
if (text2.Length > 0)
{
string text3 = text2.Substring(0, 1);
if (text3 != "#")
{
Debug.WriteLine(num + "" + text2);
con[num++] = text2;
}
}
}
}
catch (Exception ex)
{
Debug.WriteLine("★★_ERROR_27");
Trace.WriteLine(ex.Message);
return 1u;
}
return 0u;
}
}