diff --git a/SquadForger/Converter/TextToVisibilityConverter.cs b/SquadForger/Converter/TextToVisibilityConverter.cs
new file mode 100644
index 0000000..6f0a79f
--- /dev/null
+++ b/SquadForger/Converter/TextToVisibilityConverter.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace SquadForger.Converter
+{
+ public class TextToVisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return string.IsNullOrEmpty(value as string) ? Visibility.Visible : Visibility.Collapsed;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SquadForger/MainWindow.xaml b/SquadForger/MainWindow.xaml
index 8e60cf8..dff0cbe 100644
--- a/SquadForger/MainWindow.xaml
+++ b/SquadForger/MainWindow.xaml
@@ -19,9 +19,6 @@
-
-
-
diff --git a/SquadForger/SquadForger.csproj b/SquadForger/SquadForger.csproj
index db2790f..cb238ae 100644
--- a/SquadForger/SquadForger.csproj
+++ b/SquadForger/SquadForger.csproj
@@ -126,6 +126,7 @@
MSBuild:Compile
Designer
+
@@ -140,16 +141,12 @@
-
DiscordView.xaml
SquadView.xaml
-
- VisualizeView.xaml
-
MSBuild:Compile
Designer
@@ -167,7 +164,6 @@
MSBuild:Compile
-
diff --git a/SquadForger/SquadForger.sln b/SquadForger/SquadForger.sln
index b645042..5a6b31c 100644
--- a/SquadForger/SquadForger.sln
+++ b/SquadForger/SquadForger.sln
@@ -15,6 +15,7 @@ Global
{B390DD8F-015F-483E-9913-B7EF1B10A89E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B390DD8F-015F-483E-9913-B7EF1B10A89E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B390DD8F-015F-483E-9913-B7EF1B10A89E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B390DD8F-015F-483E-9913-B7EF1B10A89E}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SquadForger/View/SquadView.xaml b/SquadForger/View/SquadView.xaml
index 4ef4570..ec51470 100644
--- a/SquadForger/View/SquadView.xaml
+++ b/SquadForger/View/SquadView.xaml
@@ -5,12 +5,16 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SquadForger.View"
xmlns:vm="clr-namespace:SquadForger.ViewModel"
+ xmlns:converter="clr-namespace:SquadForger.Converter"
mc:Ignorable="d"
d:DesignWidth="800" d:DesignHeight="450"
Title="Squad View">
+
+
+
@@ -25,7 +29,12 @@
-
+
+
+
+
@@ -34,7 +43,12 @@
-
+
+
+
+
diff --git a/SquadForger/View/VisualizeView.xaml b/SquadForger/View/VisualizeView.xaml
deleted file mode 100644
index bdda9c9..0000000
--- a/SquadForger/View/VisualizeView.xaml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SquadForger/View/VisualizeView.xaml.cs b/SquadForger/View/VisualizeView.xaml.cs
deleted file mode 100644
index 973b5cb..0000000
--- a/SquadForger/View/VisualizeView.xaml.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System.Windows.Controls;
-
-namespace SquadForger.View
-{
- public partial class VisualizeView : Page
- {
- public VisualizeView()
- {
- InitializeComponent();
- }
- }
-}
\ No newline at end of file
diff --git a/SquadForger/ViewModel/MainVM.cs b/SquadForger/ViewModel/MainVM.cs
index c4fd40d..60f1e11 100644
--- a/SquadForger/ViewModel/MainVM.cs
+++ b/SquadForger/ViewModel/MainVM.cs
@@ -10,7 +10,6 @@ public class MainVM : ObservableObject
public string WindowTitle { get; private set; } = $"Squad Forger v0.0.1";
public RelayCommand OpenGithubRepoCommand { get; private set; }
public SquadView SquadPage { get; private set; } = new SquadView();
- public VisualizeView VisualizePage { get; private set; } = new VisualizeView();
public DiscordView DiscordPage { get; private set; } = new DiscordView();
public MainVM()
diff --git a/SquadForger/ViewModel/SquadVM.cs b/SquadForger/ViewModel/SquadVM.cs
index 0da697f..0038d3a 100644
--- a/SquadForger/ViewModel/SquadVM.cs
+++ b/SquadForger/ViewModel/SquadVM.cs
@@ -29,8 +29,10 @@ public class SquadVM : ObservableObject
private LeagueVersion _lastVersionUsed;
public RelayCommand CustomGenerateCommand { get; private set; }
+ public string LeagueVersionText { get; set; }
public RelayCommand SafeGenerateCommand { get; private set; }
- public string LeagueVersionText { get; set; } = "Enter valid season and patch (ie 14.1.1)";
+
+
private readonly IRandomPicker _randomPicker = new DefaultChampionPicker();
@@ -39,7 +41,6 @@ public SquadVM()
SelectFileCommand = new RelayCommand(ReadTeamsFromCsv);
AddTeamsCommand = new RelayCommand(AddTeams);
ClearTeamsCommand = new RelayCommand(ClearTeams);
- TeamsInput = "Enter team names, separated by commas";
CustomGenerateCommand = new RelayCommand(CustomGenerate);
SafeGenerateCommand = new RelayCommand(SafeGenerate);
@@ -163,6 +164,8 @@ private void ReadTeamsFromCsv()
private void AddTeams()
{
+ if (TeamsInput == null) return;
+ if (!TeamsInput.Any()) return;
// Split the input by commas and remove empty entries
List teamNames = TeamsInput.Split(',').Select(s => s.Trim()).Where(s => !string.IsNullOrWhiteSpace(s)).ToList();
diff --git a/SquadForger/ViewModel/VisualizeVM.cs b/SquadForger/ViewModel/VisualizeVM.cs
deleted file mode 100644
index 53cc031..0000000
--- a/SquadForger/ViewModel/VisualizeVM.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace SquadForger.ViewModel
-{
- public class VisualizeVM
- {
-
- }
-}
\ No newline at end of file