This commit is contained in:
backuppc
2025-11-10 17:25:51 +09:00
parent 6e54633c08
commit 81c11601c5
7 changed files with 178 additions and 6 deletions

View File

@@ -166,7 +166,7 @@ namespace Project
[Category("General Setting"), Browsable(false)]
public string Language { get; set; }
[Category("General Setting"), DisplayName("Full Screen Window State"),
[Browsable(false), Category("General Setting"), DisplayName("Full Screen Window State"),
Description("화면을 전체화면으로 사용 합니다.")]
public Boolean FullScreen { get; set; }
public bool DetectManualCharge { get; set; }

View File

@@ -37,13 +37,43 @@ namespace Project.ViewForm
timer1.Stop();
lbIP.Text = PUB.IP;
label1.Text = PUB.AGV.LastSTS;
richTextBox1.Text = PUB.AGV.system0.ToString();
richTextBox2.Text = PUB.AGV.system1.ToString();
richTextBox3.Text = PUB.AGV.signal.ToString() + "\n" + PUB.AGV.data.ToString();
richTextBox4.Text = PUB.AGV.error.ToString();
richTextBox1.Rtf = PUB.AGV.system0.ToRtfString();
richTextBox2.Rtf = PUB.AGV.system1.ToRtfString();
richTextBox3.Rtf = CombineRtfStrings(PUB.AGV.signal.ToRtfString(), PUB.AGV.data.ToRtfString());
richTextBox4.Rtf = PUB.AGV.error.ToRtfString();
timer1.Start();
}
private string CombineRtfStrings(string rtf1, string rtf2)
{
// RTF 문자열 합치기: 첫 번째 RTF의 닫는 } 제거하고 두 번째 RTF의 헤더 제거
var rtf1Body = rtf1.Replace("}", "").Trim();
var rtf2Lines = rtf2.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
var sb = new System.Text.StringBuilder();
sb.Append(rtf1Body);
// 두 번째 RTF의 헤더 부분 건너뛰기
bool skipHeader = true;
foreach (var line in rtf2Lines)
{
if (line.Contains(@"\line") || (!line.StartsWith(@"{\rtf") && !line.StartsWith(@"{\colortbl") && !line.Contains("}")))
{
skipHeader = false;
}
if (!skipHeader && !line.Trim().Equals("}"))
{
sb.AppendLine(line);
}
}
sb.AppendLine("}");
return sb.ToString();
}
private void fAgv_VisibleChanged(object sender, EventArgs e)
{
this.timer1.Enabled = this.Visible;