diff --git a/Elinor/AboutWindow.xaml b/Elinor/AboutWindow.xaml
index 443e065..4ff3fbe 100644
--- a/Elinor/AboutWindow.xaml
+++ b/Elinor/AboutWindow.xaml
@@ -26,7 +26,7 @@
-
\ No newline at end of file
diff --git a/Elinor/ApiImportSelectFactionWindow.xaml b/Elinor/ApiImportSelectFactionWindow.xaml
deleted file mode 100644
index 604a246..0000000
--- a/Elinor/ApiImportSelectFactionWindow.xaml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- The Broker's fee depends partially on your standing towards the corporation owning
- the station you're in and the faction that corporation belongs to.
- The corporation that owns the station is displayed at the top of the
- "Station Services" window on the right when docked.
-
-
-
-
-
\ No newline at end of file
diff --git a/Elinor/ApiImportSelectFactionWindow.xaml.cs b/Elinor/ApiImportSelectFactionWindow.xaml.cs
deleted file mode 100644
index 2f1455a..0000000
--- a/Elinor/ApiImportSelectFactionWindow.xaml.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-using System.Globalization;
-using System.Windows;
-using System.Windows.Controls;
-using EVE.Net.Character;
-
-namespace Elinor
-{
- ///
- /// Interaction logic for ApiImportSelectFactionWindow.xaml
- ///
- public partial class ApiImportSelectFactionWindow
- {
- private readonly CharWrapper _chara;
- public double corpStanding;
- public double factionStanding;
- public string corpName;
- public string factionName;
-
- internal ApiImportSelectFactionWindow(CharWrapper chr)
- {
- InitializeComponent();
- _chara = chr;
- }
-
- private void WindowLoaded(object sender, RoutedEventArgs e)
- {
- var none = new StandingWrapper("", .0);
- cbCorp.Items.Add(none);
- cbFaction.Items.Add(none);
- cbCorp.SelectedIndex = 0;
- cbFaction.SelectedIndex = 0;
-
- var standings = new NPCStandings(
- _chara.KeyId,
- _chara.VCode,
- _chara.CharId.ToString(CultureInfo.InvariantCulture)
- );
-
- standings.Query();
-
- foreach (NPCStandings.Standing standing in standings.standings.NPCCorporations)
- {
- var wrap = new StandingWrapper(standing.fromName, standing.standing);
- cbCorp.Items.Add(wrap);
- }
-
- foreach (NPCStandings.Standing standing in standings.standings.factions)
- {
- var wrap = new StandingWrapper(standing.fromName, standing.standing);
- cbFaction.Items.Add(wrap);
- }
-
- ToolTipService.SetShowDuration(imgHelp, int.MaxValue);
- }
-
- private void BtnOkClick(object sender, RoutedEventArgs e)
- {
-
- corpStanding = ((StandingWrapper)cbCorp.SelectedItem).standing;
-
- if (corpStanding == 0)
- {
- corpName = null;
- }
- else
- {
- corpName = ((StandingWrapper)cbCorp.SelectedItem).name;
- }
-
- factionStanding = ((StandingWrapper) cbFaction.SelectedItem).standing;
-
- if (factionStanding == 0)
- {
- factionName = null;
- }
- else
- {
- factionName = ((StandingWrapper)cbFaction.SelectedItem).name;
- }
-
- DialogResult = true;
- Close();
- }
- }
-}
\ No newline at end of file
diff --git a/Elinor/ApiImportWindow.xaml b/Elinor/ApiImportWindow.xaml
deleted file mode 100644
index f59bdbd..0000000
--- a/Elinor/ApiImportWindow.xaml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Elinor/ApiImportWindow.xaml.cs b/Elinor/ApiImportWindow.xaml.cs
deleted file mode 100644
index 57b29c8..0000000
--- a/Elinor/ApiImportWindow.xaml.cs
+++ /dev/null
@@ -1,169 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Globalization;
-using System.Windows;
-using EVE.Net;
-using EVE.Net.Character;
-
-namespace Elinor
-{
- ///
- /// Interaction logic for ApiImportWindow.xaml
- ///
- public partial class ApiImportWindow
- {
- public Profile profile = new Profile();
- private bool? _getStandingAccess;
-
- public ApiImportWindow()
- {
- InitializeComponent();
- profile.accounting = 0;
- profile.brokerRelations = 0;
- profile.keyId = null;
- profile.vcode = null;
- profile.charName = null;
- profile.isAPI = true;
- }
-
- private void BtnGetCharsClick(object sender, RoutedEventArgs e)
- {
- cbChars.Items.Clear();
-
- try
- {
- profile.keyId = tbKeyId.Text;
- profile.vcode = tbVCode.Text;
-
- var info = new APIKeyInfo(profile.keyId.ToString(CultureInfo.InvariantCulture), profile.vcode);
- info.Query();
-
- if (info.characters.Count == 0)
- {
- MessageBox.Show(
- "No characters for this API information.\nPlease check you API information",
- "No characters found",
- MessageBoxButton.OK,
- MessageBoxImage.Warning
- );
- }
- else
- {
- lblChar.Visibility = Visibility.Visible;
- cbChars.Visibility = Visibility.Visible;
-
- foreach (APIKeyInfo.Character chr in info.characters)
- {
- var chara = new CharWrapper
- {
- KeyId = profile.keyId,
- VCode = profile.vcode,
- Charname = chr.characterName,
- CharId = chr.characterID
- };
-
- cbChars.Items.Add(chara);
- cbChars.SelectedIndex = 0;
- }
- if (cbChars.Items.Count > 0)
- {
- btnOk.IsEnabled = true;
- }
- }
- }
- catch (FormatException)
- {
- MessageBox.Show(
- "Key ID must be a number",
- "Invalid Key ID",
- MessageBoxButton.OK,
- MessageBoxImage.Warning
- );
- }
- }
-
- private void WindowLoaded(object sender, RoutedEventArgs e)
- {
- tbKeyId.Focus();
- }
-
- private void BtnCancelClick(object sender, RoutedEventArgs e)
- {
- Close();
- }
-
- private void BtnOkClick(object sender, RoutedEventArgs e)
- {
- btnOk.IsEnabled = false;
- pbLoading.Visibility = Visibility.Visible;
- var chara = (CharWrapper) cbChars.SelectedItem;
-
- var worker = new BackgroundWorker();
- _getStandingAccess = true;
-
- worker.RunWorkerCompleted += delegate
- {
- if (_getStandingAccess == true) DialogResult = true;
- else Dispatcher.Invoke(new Action(Close));
- };
-
- worker.DoWork += delegate
- {
- var sheet = new CharacterSheet(chara.KeyId, chara.VCode, chara.CharId.ToString(CultureInfo.InvariantCulture));
- sheet.Query();
-
- foreach (CharacterSheet.Skill skill in sheet.skills)
- {
- if (skill.typeID == 3446) //"Broker Relations"
- profile.brokerRelations = skill.level;
- if (skill.typeID == 16622) //"Accounting"
- profile.accounting = skill.level;
- }
-
- Dispatcher.Invoke(new Action(delegate
- {
- var aisfw = new ApiImportSelectFactionWindow(chara)
- {
- Topmost = true,
- Top = Top + 10,
- Left = Left + 10,
- };
-
- _getStandingAccess = aisfw.ShowDialog();
-
- if (_getStandingAccess == true)
- {
- profile.corpStanding = aisfw.corpStanding;
- profile.factionStanding = aisfw.factionStanding;
- profile.corporation = aisfw.corpName;
- profile.faction = aisfw.factionName;
- }
- else
- {
- _getStandingAccess = false;
- }
- }));
-
- profile.charName = chara.Charname;
- profile.charId = chara.CharId;
-
- if (profile.corporation != null)
- {
- profile.profileName = chara.Charname + " - " + profile.corporation;
- }
- else
- {
- profile.profileName = chara.Charname + " - no corporation";
- }
- };
-
- worker.RunWorkerAsync();
- }
-
- private void BtnCreateKeyClick(object sender, RoutedEventArgs e)
- {
- Process.Start(@"https://community.eveonline.com/support/api-key/CreatePredefined?accessMask=1099431944");
- }
- }
-}
\ No newline at end of file
diff --git a/Elinor/CharWrapper.cs b/Elinor/CharWrapper.cs
deleted file mode 100644
index 0d331cd..0000000
--- a/Elinor/CharWrapper.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace Elinor
-{
- internal class CharWrapper
- {
- internal long CharId { get; set; }
- internal string KeyId { get; set; }
- internal string Charname { get; set; }
- internal string VCode { get; set; }
-
- public override string ToString()
- {
- return Charname;
- }
- }
-}
\ No newline at end of file
diff --git a/Elinor/ClipboardTools.cs b/Elinor/ClipboardTools.cs
index 335b3d8..992ff3e 100644
--- a/Elinor/ClipboardTools.cs
+++ b/Elinor/ClipboardTools.cs
@@ -38,17 +38,7 @@ internal static double GetSellPrice(double sell, Profile settings)
if (settings == null) return .0;
double result = sell;
-
- if (settings.advancedStepSettings)
- {
- result -= (result*settings.sellPercentage > settings.sellThreshold)
- ? settings.sellThreshold
- : settings.sellPercentage*result;
- }
- else
- {
- result -= Math.Max(Math.Pow(10, Math.Floor(Math.Log10(result / 1000))), 0.01);
- }
+ result -= Math.Max(Math.Pow(10, Math.Floor(Math.Log10(result / 1000))), 0.01);
return result;
}
@@ -58,17 +48,7 @@ internal static double GetBuyPrice(double buy, Profile settings)
if (settings == null) return .0;
double result = buy;
-
- if (settings.advancedStepSettings)
- {
- result += result*settings.buyPercentage > settings.buyThreshold
- ? settings.buyThreshold
- : settings.buyPercentage*result;
- }
- else
- {
- result += Math.Max(Math.Pow(10, Math.Floor(Math.Log10(result / 1000))), 0.01);
- }
+ result += Math.Max(Math.Pow(10, Math.Floor(Math.Log10(result / 1000))), 0.01);
return result;
}
diff --git a/Elinor/Elinor reloaded.csproj b/Elinor/Elinor reloaded.csproj
index 1e66ec6..28ba21f 100644
--- a/Elinor/Elinor reloaded.csproj
+++ b/Elinor/Elinor reloaded.csproj
@@ -106,14 +106,7 @@
AboutWindow.xaml
-
- ApiImportSelectFactionWindow.xaml
-
-
- ApiImportWindow.xaml
-
-
@@ -124,28 +117,16 @@
SelectLogPathWindow.xaml
-
ProfileNameWindow.xaml
-
- NewProfileWindows.xaml
-
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
MSBuild:Compile
Designer
@@ -167,10 +148,6 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
diff --git a/Elinor/MainWindow.xaml b/Elinor/MainWindow.xaml
index 77426e5..9dc5443 100644
--- a/Elinor/MainWindow.xaml
+++ b/Elinor/MainWindow.xaml
@@ -235,38 +235,26 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
@@ -304,37 +292,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -393,14 +350,11 @@
ToolTip="Click to delete logs" />
-
+
-
-
+ HorizontalAlignment="Right" Margin="0,12,70,0" Name="btnNew" VerticalAlignment="Top" Width="51" Click="BtnNewClick" />