diff --git a/Data/DcLang-Japanese.txt b/Data/DcLang-Japanese.txt index b25f9d2..3ebef28 100644 --- a/Data/DcLang-Japanese.txt +++ b/Data/DcLang-Japanese.txt @@ -103,7 +103,7 @@ LANG=日本語 405=ふつう 406=わるい 407=グラフ -408=クライアントの接触がない場合のDC選択 +408=基本DC選択 409=現在アドレス 410=グラフタイプ 411=線形 diff --git a/Data/DcLang-Korean(Actoz).txt b/Data/DcLang-Korean(Actoz).txt index dd998a6..24b07dc 100644 --- a/Data/DcLang-Korean(Actoz).txt +++ b/Data/DcLang-Korean(Actoz).txt @@ -103,7 +103,7 @@ LANG=한국어(액토즈) 405=보통 406=나쁨 407=그래프 보기 -408=클라이언트의 접속이 없을때 사용할 DC 선택 +408=기본으로 테스트할 DC 409=연결된 IP주소 410=그래프 모양 411=선형 diff --git a/Data/DcLang-Korean(Test).txt b/Data/DcLang-Korean(Test).txt index 213f8e2..3f387ad 100644 --- a/Data/DcLang-Korean(Test).txt +++ b/Data/DcLang-Korean(Test).txt @@ -103,7 +103,7 @@ LANG=한국어 405=보통 406=나쁨 407=그래프 보기 -408=클라이언트의 접속이 없을때 사용할 DC 선택 +408=기본으로 테스트할 DC 409=현재 연결 IP 410=그래프 모양 411=선형 diff --git a/DcConfig.cs b/DcConfig.cs index 63362ce..bba843b 100644 --- a/DcConfig.cs +++ b/DcConfig.cs @@ -12,7 +12,7 @@ namespace DutyContent { class DcConfig { - public static int PluginTag => 15; + public static int PluginTag => 16; public static Version PluginVersion => System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; public static bool PluginEnable { get; set; } diff --git a/README.md b/README.md index e561ea0..53df3bc 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,6 @@ * Network analyzer codes from https://github.com/Noisyfox/ACT.FFXIVPing ## New test version -[Download Release 15 ](https://github.com/kshman/DutyContent/releases/tag/15) +[Download Release 16 ](https://github.com/kshman/DutyContent/releases/tag/16) Please try & test new pre-release version!!! 🤗 diff --git a/Tab/DutyForm.cs b/Tab/DutyForm.cs index 8070815..555c008 100644 --- a/Tab/DutyForm.cs +++ b/Tab/DutyForm.cs @@ -525,29 +525,32 @@ namespace DutyContent.Tab if (withlog) WriteLog(Color.Black, key, 10001, fate.Name); - lock (_lock_contents) + WorkerAct.Invoker(() => { - var sc = code.ToString(); - var i = UnsafeFindContent(sc, out int nth); - - if (i == null && progress >= 0) + lock (_lock_contents) { - var li = new ThirdParty.EXListViewItem(sc); - var si = new ThirdParty.EXImageListViewSubItem(_ilCategory.Images[subs], ""); + var sc = code.ToString(); + var i = UnsafeFindContent(sc, out int nth); - li.SubItems.Add(si); - li.SubItems.Add(progress.ToString()); - li.SubItems.Add(fate.Name); - lstContents.Items.Add(li); + if (i == null && progress >= 0) + { + var li = new ThirdParty.EXListViewItem(sc); + var si = new ThirdParty.EXImageListViewSubItem(_ilCategory.Images[subs], ""); + + li.SubItems.Add(si); + li.SubItems.Add(progress.ToString()); + li.SubItems.Add(fate.Name); + lstContents.Items.Add(li); + } + else + { + if (progress >= 0) + i.SubItems[2].Text = progress.ToString(); + else if (nth >= 0) + lstContents.Items.RemoveAt(nth); + } } - else - { - if (progress >= 0) - i.SubItems[2].Text = progress.ToString(); - else if (nth >= 0) - lstContents.Items.RemoveAt(nth); - } - } + }); } // @@ -556,51 +559,57 @@ namespace DutyContent.Tab if (withlog) WriteLog(Color.Black, 25, 10001, fate.Name); - lock (_lock_contents) + WorkerAct.Invoker(() => { - var sc = code.ToString(); - var i = UnsafeFindContent(sc, out int nth); - - if (i == null && progress != null) + lock (_lock_contents) { - var li = new ThirdParty.EXListViewItem(sc); - var si = new ThirdParty.EXImageListViewSubItem(_ilCategory.Images[5], ""); + var sc = code.ToString(); + var i = UnsafeFindContent(sc, out int nth); - li.SubItems.Add(si); - li.SubItems.Add(progress.ToString()); - li.SubItems.Add(fate.Name); - lstContents.Items.Add(li); - } - else - { - if (progress == null) - lstContents.Items.RemoveAt(nth); + if (i == null && progress != null) + { + var li = new ThirdParty.EXListViewItem(sc); + var si = new ThirdParty.EXImageListViewSubItem(_ilCategory.Images[5], ""); + + li.SubItems.Add(si); + li.SubItems.Add(progress.ToString()); + li.SubItems.Add(fate.Name); + lstContents.Items.Add(li); + } else - i.SubItems[2].Text = progress; + { + if (progress == null) + lstContents.Items.RemoveAt(nth); + else + i.SubItems[2].Text = progress; + } } - } + }); } // private void UpdateTraceInstance(string insname, int count, int imageindex) { - lock (_lock_contents) + WorkerAct.Invoker(() => { - if (lstContents.Items.Count > 0) + lock (_lock_contents) { - //lstContents.BeginUpdate(); + if (lstContents.Items.Count > 0) + { + //lstContents.BeginUpdate(); - var li = lstContents.Items[0]; + var li = lstContents.Items[0]; - var si = li.SubItems[1] as ThirdParty.EXImageListViewSubItem; - si.MyImage = _ilCategory.Images[imageindex]; + var si = li.SubItems[1] as ThirdParty.EXImageListViewSubItem; + si.MyImage = _ilCategory.Images[imageindex]; - li.SubItems[2].Text = count == 0 ? string.Empty : count.ToString(); - li.SubItems[3].Text = insname; + li.SubItems[2].Text = count == 0 ? string.Empty : count.ToString(); + li.SubItems[3].Text = insname; - //lstContents.EndUpdate(); + //lstContents.EndUpdate(); + } } - } + }); } // @@ -1774,15 +1783,18 @@ namespace DutyContent.Tab private void ResetContents() { - lock (_lock_contents) + WorkerAct.Invoker(() => { - lstContents.BeginUpdate(); + lock (_lock_contents) + { + lstContents.BeginUpdate(); - for (var i = lstContents.Items.Count - 1; i > 0; i--) - lstContents.Items.RemoveAt(1); + for (var i = lstContents.Items.Count - 1; i > 0; i--) + lstContents.Items.RemoveAt(1); - lstContents.EndUpdate(); - } + lstContents.EndUpdate(); + } + }); } private ListViewItem UnsafeFindContent(string code, out int nth) @@ -1804,21 +1816,5 @@ namespace DutyContent.Tab return null; } - - private void RemoveContent(string code) - { - if (lstContents.Items.Count <= 1) - return; - - for (var i = 1; i < lstContents.Items.Count; i++) - { - var v = lstContents.Items[i]; - if (v.Text.Equals(code)) - { - lstContents.Items.RemoveAt(i); - break; - } - } - } } }