Skip to content

Commit

Permalink
Remove branding properties that no longer exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Aug 21, 2023
1 parent 583c870 commit 137db6a
Show file tree
Hide file tree
Showing 15 changed files with 3,976 additions and 214 deletions.
19 changes: 2 additions & 17 deletions Agent.Installer.Win/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
xmlns:ViewModels="clr-namespace:Remotely.Agent.Installer.Win.ViewModels"
xmlns:local="clr-namespace:Remotely.Agent.Installer.Win"
mc:Ignorable="d"
WindowStyle="None"
ResizeMode="CanResizeWithGrip"
AllowsTransparency="True"
MouseLeftButtonDown="Window_MouseLeftButtonDown"
Expand All @@ -21,25 +20,11 @@
</Window.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<Border Height="50" Background="{Binding TitleBackgroundColor}">
<DockPanel Margin="10,0,0,0">
<DockPanel>
<Image Height="50" Width="50" Margin="0,0,10,0" Source="{Binding Icon}"></Image>
<TextBlock Foreground="{Binding TitleForegroundColor}" FontWeight="Bold" FontSize="20" VerticalAlignment="Center">
<Run Text="{Binding ProductName}"></Run>
<Run Text="Installer"></Run>
</TextBlock>
</DockPanel>
<Button Style="{StaticResource TitlebarButton}" Click="CloseButton_Click" Content="X" Foreground="{Binding TitleButtonForegroundColor}" Background="{Binding TitleBackgroundColor}" />
<Button Style="{StaticResource TitlebarButton}" Click="MinimizeButton_Click" Content="____" Foreground="{Binding TitleButtonForegroundColor}" Background="{Binding TitleBackgroundColor}"/>
</DockPanel>
</Border>
<Grid Grid.Row="1" Margin="10,15,10,0">
<Grid Grid.Row="0" Margin="10,15,10,0">

<StackPanel>
<TextBlock Style="{StaticResource SectionHeader}" Text="{Binding HeaderMessage}" Margin="0,0,0,10"></TextBlock>
Expand Down Expand Up @@ -122,7 +107,7 @@

</Grid>

<DockPanel Margin="10" Grid.Row="2">
<DockPanel Margin="10" Grid.Row="1">
<Button DockPanel.Dock="Left"
HorizontalAlignment="Left"
Style="{StaticResource NormalButton}"
Expand Down
18 changes: 0 additions & 18 deletions Agent.Installer.Win/Models/BrandingInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,4 @@ public class BrandingInfo
public string Product { get; set; } = "Remotely";

public string? Icon { get; set; }

public byte TitleForegroundRed { get; set; } = 29;

public byte TitleForegroundGreen { get; set; } = 144;

public byte TitleForegroundBlue { get; set; } = 241;

public byte TitleBackgroundRed { get; set; } = 70;

public byte TitleBackgroundGreen { get; set; } = 70;

public byte TitleBackgroundBlue { get; set; } = 70;

public byte ButtonForegroundRed { get; set; } = 255;

public byte ButtonForegroundGreen { get; set; } = 255;

public byte ButtonForegroundBlue { get; set; } = 255;
}
22 changes: 0 additions & 22 deletions Agent.Installer.Win/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ public string? StatusMessage
}
}

public SolidColorBrush? TitleBackgroundColor { get; set; }
public SolidColorBrush? TitleButtonForegroundColor { get; set; }
public SolidColorBrush? TitleForegroundColor { get; set; }
public ICommand UninstallCommand => new RelayCommand(async (param) => { await Uninstall(); });
private string? DeviceAlias { get; set; }
private string? DeviceGroup { get; set; }
Expand Down Expand Up @@ -280,25 +277,6 @@ private void ApplyBranding(BrandingInfo? brandingInfo)
ProductName = brandingInfo.Product;
}

TitleBackgroundColor = new SolidColorBrush(Color.FromRgb(
brandingInfo?.TitleBackgroundRed ?? 70,
brandingInfo?.TitleBackgroundGreen ?? 70,
brandingInfo?.TitleBackgroundBlue ?? 70));

TitleForegroundColor = new SolidColorBrush(Color.FromRgb(
brandingInfo?.TitleForegroundRed ?? 29,
brandingInfo?.TitleForegroundGreen ?? 144,
brandingInfo?.TitleForegroundBlue ?? 241));

TitleButtonForegroundColor = new SolidColorBrush(Color.FromRgb(
brandingInfo?.ButtonForegroundRed ?? 255,
brandingInfo?.ButtonForegroundGreen ?? 255,
brandingInfo?.ButtonForegroundBlue ?? 255));

TitleBackgroundColor.Freeze();
TitleForegroundColor.Freeze();
TitleButtonForegroundColor.Freeze();

Icon = GetBitmapImageIcon(brandingInfo);
}
catch (Exception ex)
Expand Down
Loading

0 comments on commit 137db6a

Please sign in to comment.