diff --git a/MainWindow.xaml b/MainWindow.xaml
index cbf4b0a..9afa473 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -22,26 +22,14 @@
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -51,10 +39,14 @@
+
+
+
+
-
+
@@ -78,25 +70,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index b604c32..dd40350 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -68,6 +68,10 @@ namespace EliteBGS {
}
}
+ private void TreeView_CheckBox_Updated(object sender, RoutedEventArgs args) {
+ GenerateLog();
+ }
+
private void Loadentries_EntriesLoaded(List lines) {
try {
report.Scan(lines);
@@ -116,6 +120,7 @@ namespace EliteBGS {
var end = enddate.SelectedDate ?? DateTime.Now;
report.Scan(journal, start, end, collate);
RefreshObjectives();
+ GenerateLog();
} catch (Exception exception) {
Log("Something went terribly wrong while parsing the E:D player journal.");
Log("Please send this to CMDR Hekateh:");
@@ -123,29 +128,7 @@ namespace EliteBGS {
}
}
- private void AddObjective() {
- Objective objective = new Objective {
- System = system.Text,
- Faction = faction.Text,
- Station = station.Text,
- ManuallyAdded = true,
- };
-
- if (!objective.IsValid) {
- return;
- }
-
- if (report.AddObjective(objective)) {
- RefreshObjectives();
- config.SaveObjectives(Report);
- }
- }
-
- private void AddFilter_Click(object sender, RoutedEventArgs e) {
- AddObjective();
- }
-
- private void GenerateDiscord_Click(object sender, RoutedEventArgs e) {
+ private void GenerateLog() {
try {
DiscordLogGenerator discord = LogType.SelectedItem as DiscordLogGenerator;
string report = discord.GenerateDiscordLog(Report);
@@ -158,6 +141,10 @@ namespace EliteBGS {
}
}
+ private void GenerateDiscord_Click(object sender, RoutedEventArgs e) {
+ GenerateLog();
+ }
+
private void RemoveCurrentObjective() {
if (entries.SelectedItem == null) {
return;
@@ -179,7 +166,7 @@ namespace EliteBGS {
if (removed) {
RefreshObjectives();
- config.SaveObjectives(Report);
+ GenerateLog();
}
}
@@ -201,12 +188,6 @@ namespace EliteBGS {
journal = new PlayerJournal(config.Global.JournalLocation);
}
- private void Filter_KeyDown(object sender, KeyEventArgs e) {
- if (e.Key == Key.Enter) {
- AddObjective();
- }
- }
-
///
/// Gets the currently selected objective, even if a log entry in said objective
/// is selected instead. If nothing is selected, returns null.
@@ -263,6 +244,7 @@ namespace EliteBGS {
objective.LogEntries.Add(zone);
RefreshObjectives();
+ GenerateLog();
}
private void AdjustProfit_Click(object sender, RoutedEventArgs e) {
@@ -282,6 +264,7 @@ namespace EliteBGS {
if (int.TryParse(adjust.Profit.Text, out int newprofit)) {
sell.Profit = newprofit;
RefreshObjectives();
+ GenerateLog();
}
}
@@ -292,6 +275,7 @@ namespace EliteBGS {
string template = LogType.SelectedItem.ToString();
config.Global.LastUsedDiscordTemplate = template;
+ GenerateLog();
}
private void ManuallyParse_Click(object sender, RoutedEventArgs e) {