Skip to content

Commit

Permalink
Made Win7 UI look good
Browse files Browse the repository at this point in the history
  • Loading branch information
random-facades committed Feb 14, 2020
1 parent 1cf2eac commit ace8030
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 187 deletions.
25 changes: 3 additions & 22 deletions WFInfoCS/Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private void LoadMarketItem(string item_name, string url)
};
}

private bool LoadEqmtData(bool force = false)
private bool LoadEqmtData()
{
if (equipmentData == null)
equipmentData = File.Exists(eqmtDataPath) ? JsonConvert.DeserializeObject<JObject>(File.ReadAllText(eqmtDataPath)) : new JObject();
Expand Down Expand Up @@ -442,42 +442,23 @@ public void ForceMarketUpdate()
MainWindow.INSTANCE.Market_Data.Content = marketData["timestamp"].ToString().Substring(5, 11);
Main.StatusUpdate("Market data reloaded", 0);
MainWindow.INSTANCE.ReloadDrop.IsEnabled = true;
MainWindow.INSTANCE.ReloadWiki.IsEnabled = true;
MainWindow.INSTANCE.ReloadMarket.IsEnabled = true;
});
}

public void ForceEquipmentUpdate()
{
Main.AddLog("Forcing equipment update");
LoadEqmtData(true);
LoadEqmtData();
SaveDatabase(eqmtDataPath, equipmentData);
SaveDatabase(relicDataPath, relicData);
SaveDatabase(nameDataPath, nameData);
Main.RunOnUIThread(() =>
{
MainWindow.INSTANCE.Drop_Data.Content = equipmentData["timestamp"].ToString().Substring(5, 11);
MainWindow.INSTANCE.Wiki_Data.Content = equipmentData["rqmts_timestamp"].ToObject<DateTime>().ToString("R").Substring(5, 11);
Main.StatusUpdate("Drop data reloaded", 0);
Main.StatusUpdate("Equipment data reloaded", 0);
MainWindow.INSTANCE.ReloadDrop.IsEnabled = true;
MainWindow.INSTANCE.ReloadWiki.IsEnabled = true;
MainWindow.INSTANCE.ReloadMarket.IsEnabled = true;
});
}

public void ForceItemDbUpdate()
{
Main.AddLog("Forcing wiki update");
//LoadEquipmentRequirements(true);
SaveDatabase(eqmtDataPath, equipmentData);
Main.RunOnUIThread(() =>
{
MainWindow.INSTANCE.Wiki_Data.Content = equipmentData["rqmts_timestamp"].ToObject<DateTime>().ToString("R").Substring(5, 11);
Main.StatusUpdate("Item data reloaded", 0);
MainWindow.INSTANCE.ReloadDrop.IsEnabled = true;
MainWindow.INSTANCE.ReloadWiki.IsEnabled = true;
MainWindow.INSTANCE.ReloadMarket.IsEnabled = true;
});
}
Expand Down
Loading

0 comments on commit ace8030

Please sign in to comment.