Skip to content

Commit

Permalink
Update Credits & CreditsView, Testing release to see if auto-update f…
Browse files Browse the repository at this point in the history
…unctionality works.
  • Loading branch information
sirdoombox committed Mar 11, 2020
1 parent 5508f33 commit 9ad7997
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 65 deletions.
12 changes: 12 additions & 0 deletions PostScriptumMortarCalculator/Assets/Data/CreditsData.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
"ContributionDescription": "Extracted map images from the game files for use in the tool.",
"URL": "https://www.gildor.org/en/projects/umodel"
},
{
"Name": "AppVeyor",
"ContributionType": "Build & Deployment",
"ContributionDescription": "Builds, patches and deploys releases to GitHub.",
"URL": "https://www.appveyor.com/"
},
{
"Name": "MahApps.Metro",
"ContributionType": "UI & Controls",
Expand All @@ -36,6 +42,12 @@
"ContributionType": "Assembly Weaver",
"ContributionDescription": "Embeds resources and external libraries into the assembly, implements PropertyChanged at compile time.",
"URL": "https://github.com/Fody/Fody"
},
{
"Name": "OctoKit.NET",
"ContributionType": "GitHub API Wrapper",
"ContributionDescription": "Provides the ability to check for new releases.",
"URL": "https://github.com/octokit/octokit.net"
}
]
}
136 changes: 71 additions & 65 deletions PostScriptumMortarCalculator/Views/CreditsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,74 @@
x:Name="RootControl"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance viewModels:CreditsViewModel}">
<StackPanel>
<StackPanel.Resources>
<Thickness x:Key="ControlMargin">0 10 0 0</Thickness>
<Style TargetType="Label">
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Accent}"/>
<Setter Property="FontWeight" Value="Black"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="FontSize" Value="18"/>
</Style>
<Style TargetType="DockPanel" x:Key="DockPanelStyle">
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Style.Resources>
<Style TargetType="Label">
<Setter Property="DockPanel.Dock" Value="Left"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Accent}"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Chromeless}">
<Setter Property="DockPanel.Dock" Value="Right"/>
<Setter Property="Margin" Value="10 0 0 0"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
</Style.Resources>
</Style>
</StackPanel.Resources>
<Label Content="Contributors"/>
<ItemsControl ItemsSource="{Binding Contributors}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<DockPanel Style="{StaticResource DockPanelStyle}">
<Label Content="{Binding ContributionType}"
ToolTip="{Binding ContributionDescription}"/>
<Button Content="{Binding Name}"
ToolTip="{Binding URL}"
Command="{Binding ElementName=RootControl, Path=DataContext.OpenUrlCommand}"
CommandParameter="{Binding URL}"/>
</DockPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Separator Background="{DynamicResource MahApps.Brushes.Accent}"
Margin="{StaticResource ControlMargin}"/>
<Label Content="External Tools &amp; Libraries"
Margin="{StaticResource ControlMargin}"/>
<ItemsControl ItemsSource="{Binding ExternalTools}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<DockPanel Style="{StaticResource DockPanelStyle}">
<Label Content="{Binding ContributionType}"
ToolTip="{Binding ContributionDescription}"/>
<Button Content="{Binding Name}"
Command="{Binding ElementName=RootControl, Path=DataContext.OpenUrlCommand}"
ToolTip="{Binding URL}"
CommandParameter="{Binding URL}"/>
</DockPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</UserControl>
<ScrollViewer HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
CanContentScroll="True">
<StackPanel>
<StackPanel.Resources>
<Thickness x:Key="ControlMargin">0 10 0 0</Thickness>
<Style TargetType="Label">
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Accent}" />
<Setter Property="FontWeight" Value="Black" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="18" />
</Style>
<Style TargetType="DockPanel" x:Key="DockPanelStyle">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="Margin" Value="{StaticResource ControlMargin}" />
<Style.Resources>
<Style TargetType="Label">
<Setter Property="DockPanel.Dock" Value="Left" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Accent}" />
<Setter Property="FontWeight" Value="Bold" />
</Style>
<Style TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Chromeless}">
<Setter Property="DockPanel.Dock" Value="Right" />
<Setter Property="Margin" Value="10 0 0 0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</Style.Resources>
</Style>
</StackPanel.Resources>
<Label Content="Contributors" />
<ItemsControl ItemsSource="{Binding Contributors}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<DockPanel Style="{StaticResource DockPanelStyle}">
<Label Content="{Binding ContributionType}"
ToolTip="{Binding ContributionDescription}" />
<Button Content="{Binding Name}"
ToolTip="{Binding URL}"
Command="{Binding ElementName=RootControl, Path=DataContext.OpenUrlCommand}"
CommandParameter="{Binding URL}" />
</DockPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Separator Background="{DynamicResource MahApps.Brushes.Accent}"
Margin="{StaticResource ControlMargin}" />
<Label Content="External Tools &amp; Libraries"
Margin="{StaticResource ControlMargin}" />
<ItemsControl ItemsSource="{Binding ExternalTools}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<DockPanel Style="{StaticResource DockPanelStyle}">
<Label Content="{Binding ContributionType}"
ToolTip="{Binding ContributionDescription}" />
<Button Content="{Binding Name}"
Command="{Binding ElementName=RootControl, Path=DataContext.OpenUrlCommand}"
ToolTip="{Binding URL}"
CommandParameter="{Binding URL}" />
</DockPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</ScrollViewer>
</UserControl>

0 comments on commit 9ad7997

Please sign in to comment.