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 @@ - + + + + - + + + +