Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
20190112.1 - 更新国服4.4的官方中文译名,优化程序体积,修复部分BUG,加入4.5国际服数据,调整简易副本攻略的UI细节。
Browse files Browse the repository at this point in the history
  • Loading branch information
DieMoe233 committed Jan 11, 2019
1 parent 46786b8 commit d509eb5
Show file tree
Hide file tree
Showing 31 changed files with 786 additions and 1,632 deletions.
22 changes: 7 additions & 15 deletions App/App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form\TipsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\TipsForm.Designer.cs">
<DependentUpon>TipsForm.cs</DependentUpon>
</Compile>
<Compile Include="Form\TrackerForm.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -161,21 +167,6 @@
<Compile Include="Updater.cs" />
<Compile Include="Api\WinApi.cs" />
<Compile Include="Util\ZipStorer.cs" />
<EmbeddedResource Include="Form\TrackerForm.resx">
<DependentUpon>TrackerForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\OverlayFormMove.resx">
<DependentUpon>OverlayFormMove.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\UpdaterForm.resx">
<DependentUpon>UpdaterForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\OverlayForm.resx">
<DependentUpon>OverlayForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -216,6 +207,7 @@
<ItemGroup>
<Content Include="App.ico" />
<Content Include="ILMergeOrder.txt" />
<None Include="Resources\icon.bmp" />
</ItemGroup>
<ItemGroup>
<COMReference Include="NetFwTypeLib">
Expand Down
7 changes: 4 additions & 3 deletions App/Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static class Data
public static Dictionary<int, Roulette> Roulettes { get; private set; } = new Dictionary<int, Roulette>();
public static Dictionary<int, FATE> FATEs { get; private set; } = new Dictionary<int, FATE>();

internal static void Initialize(string language)
internal static void Initialize(string language, MainForm mainForm)
{
string json;

Expand Down Expand Up @@ -46,10 +46,10 @@ internal static void Initialize(string language)
return;
}

Fill(json);
Fill(json, mainForm);
}

public static void Fill(string json)
public static void Fill(string json, MainForm mainForm)
{
try
{
Expand Down Expand Up @@ -77,6 +77,7 @@ public static void Fill(string json)

if (Initialized)
{
mainForm.Update_FATENodes();
Log.S("l-data-updated", Version);
}

Expand Down
21 changes: 17 additions & 4 deletions App/Form/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 54 additions & 14 deletions App/Form/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public partial class MainForm : Form
internal Process FFXIVProcess;
internal OverlayForm overlayForm;
internal TrackerForm TrackerForm;
internal TipsForm tipsForm;
internal List<TreeNode> nodes;
internal bool TrackerFormLoaded = false;

Expand All @@ -23,7 +24,6 @@ public MainForm()
Settings.Load();

InitializeComponent();

Log.Form = this;
overlayForm = new OverlayForm(this);
nodes = new List<TreeNode>();
Expand All @@ -42,7 +42,7 @@ protected override void OnShown(EventArgs e)
private void MainForm_Load(object sender, EventArgs e)
{
Localization.Initialize(Settings.Language);
Data.Initialize(Settings.Language);
Data.Initialize(Settings.Language, this);
ApplyLanguage();
overlayForm.Show();
networkWorker = new Network(this);
Expand Down Expand Up @@ -108,6 +108,10 @@ private void MainForm_Load(object sender, EventArgs e)
checkBox_AutoOverlayHide.Checked = Settings.AutoOverlayHide;
checkBox_FlashWindow.Checked = Settings.FlashWindow;
checkBox_PlaySound.Checked = Settings.PlaySound;
if (Settings.TrackerMirror == "cn")
{
checkBox_tracker_CNmirror.Checked = true;
}
trackBar_tts_speed.Value = int.Parse(Settings.TTSSpeed);
if (System.IO.File.Exists(Settings.SoundLocation) == false)
{
Expand All @@ -128,17 +132,7 @@ private void MainForm_Load(object sender, EventArgs e)
checkBox_tracker_auto.Checked = Settings.AutoTracker;
checkBox_UpdateCheckBeta.Checked = Settings.CheckBeta;

foreach (var area in Data.Areas)
{
triStateTreeView_FATEs.Nodes.Add(area.Key.ToString(), area.Value.Name);

foreach (var fate in area.Value.FATEs)
{
var node = triStateTreeView_FATEs.Nodes[area.Key.ToString()].Nodes.Add(fate.Key.ToString(), fate.Value.Name);
node.Checked = Settings.FATEs.Contains(fate.Key);
nodes.Add(node);
}
}
Update_FATENodes();

Task.Factory.StartNew(() =>
{
Expand Down Expand Up @@ -508,7 +502,7 @@ private void comboBox_Language_SelectedValueChanged(object sender, EventArgs e)
Settings.Save();

Localization.Initialize(Settings.Language);
Data.Initialize(Settings.Language);
Data.Initialize(Settings.Language, this);

ApplyLanguage();

Expand Down Expand Up @@ -573,6 +567,7 @@ private void ApplyLanguage()
checkBox_tracker_enabled.Text = Localization.GetText("ui-settings-tracker-enabled");
checkBox_tracker_auto.Text = Localization.GetText("ui-settings-tracker-auto");
button_tracker_open.Text = Localization.GetText("ui-settings-tracker-open");
checkBox_tracker_CNmirror.Text= Localization.GetText("ui-settings-tracker-mirror-cn");
comboBox_dfaUpdate.SelectedValueChanged -= comboBox_dfaUpdate_SelectedValueChanged;
comboBox_dfaUpdate.DataSource = new[]
{
Expand Down Expand Up @@ -613,6 +608,32 @@ private void ApplyLanguage()
}
}

internal void Update_FATENodes()
{
triStateTreeView_FATEs.Nodes.Clear();
foreach (var area in Data.Areas)
{
triStateTreeView_FATEs.Nodes.Add(area.Key.ToString(), area.Value.Name);

foreach (var fate in area.Value.FATEs)
{
var node = triStateTreeView_FATEs.Nodes[area.Key.ToString()].Nodes.Add(fate.Key.ToString(), fate.Value.Name);
node.Checked = Settings.FATEs.Contains(fate.Key);
nodes.Add(node);
}
}
}

internal void Show_DutyTips(string Roullete, string Instance, string Tip, string Macro = null)
{
if (tipsForm != null)
{
tipsForm.Dispose();
}
tipsForm = new TipsForm(Roullete, Instance, Tip, Macro);
tipsForm.Show();
}

private void checkBox_PlaySound_CheckedChanged(object sender, EventArgs e)
{
button_SoundLocation.Enabled = checkBox_PlaySound.Checked;
Expand Down Expand Up @@ -687,6 +708,12 @@ private void button_tracker_open_Click(object sender, EventArgs e)
TrackerForm.Display();
}

internal void tracker_disable ()
{
TrackerFormLoaded = false;
checkBox_tracker_enabled.Checked = false;
}

private void checkBox_tracker_enabled_CheckedChanged(object sender, EventArgs e)
{
Settings.TrackerEnabled = checkBox_tracker_enabled.Checked;
Expand Down Expand Up @@ -787,5 +814,18 @@ private void checkBox_RoulleteTips_CheckedChanged(object sender, EventArgs e)
Settings.RouletteTips = checkBox_RoulleteTips.Checked;
Settings.Save();
}

private void checkBox_tracker_CNmirror_CheckedChanged(object sender, EventArgs e)
{
if (checkBox_tracker_CNmirror.Checked)
{
Settings.TrackerMirror = "cn";
}
else
{
Settings.TrackerMirror = "0";
}
Settings.Save();
}
}
}
Loading

0 comments on commit d509eb5

Please sign in to comment.