Skip to content

Commit 14ef50e

Browse files
committed
Feat: implement show project in github
1 parent 771d967 commit 14ef50e

File tree

2 files changed

+36
-16
lines changed

2 files changed

+36
-16
lines changed

DebitExpress.VatRelief/MainWindow.xaml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,36 @@
1919
attached:WindowElement.ExtendContentToNonClientArea="True"
2020
attached:WindowElement.SaveWindowPosition="True"
2121
Height="500" Width="350">
22+
<ctrl:Window.NonClientAreaContent>
23+
<StackPanel
24+
Orientation="Horizontal"
25+
HorizontalAlignment="Right">
26+
<Button
27+
x:Name="GithubButton"
28+
Width="46"
29+
Height="29"
30+
ToolTip="Open project on Github"
31+
Style="{StaticResource MaterialDesignTitleBarButton}">
32+
<materialDesign:PackIcon
33+
Kind="Github"
34+
Height="20"
35+
Width="20"
36+
Foreground="{StaticResource PrimaryHueMidBrush}" />
37+
</Button>
38+
<Button
39+
x:Name="DownloadButton"
40+
Width="46"
41+
Height="29"
42+
ToolTip="Download excel template"
43+
Style="{StaticResource MaterialDesignTitleBarButton}">
44+
<materialDesign:PackIcon
45+
Kind="Download"
46+
Height="20"
47+
Width="20"
48+
Foreground="{StaticResource PrimaryHueMidBrush}" />
49+
</Button>
50+
</StackPanel>
51+
</ctrl:Window.NonClientAreaContent>
2252
<ctrl:Window.IconContent>
2353
<Image
2454
Margin="7,5,0,5"
@@ -92,21 +122,5 @@
92122
Style="{StaticResource MaterialDesignFlatMidBgButton}"
93123
Content="Generate" />
94124
</StackPanel>
95-
<StackPanel
96-
Margin="10,40,10,10"
97-
Orientation="Horizontal"
98-
VerticalAlignment="Top"
99-
HorizontalAlignment="Right">
100-
<Button
101-
x:Name="DownloadButton"
102-
ToolTip="Download excel template"
103-
Style="{StaticResource MaterialDesignFlatButton}">
104-
<materialDesign:PackIcon
105-
Kind="Download"
106-
Height="20"
107-
Width="20"
108-
Foreground="{StaticResource PrimaryHueMidBrush}"/>
109-
</Button>
110-
</StackPanel>
111125
</Grid>
112126
</ctrl:Window>

DebitExpress.VatRelief/MainWindow.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public MainWindow()
3333

3434
GenerateButton.Click += OnGenerate;
3535
DownloadButton.Click += OnDownload;
36+
GithubButton.Click+= OnGithub;
3637
}
3738

3839
#region Drag and drop
@@ -193,4 +194,9 @@ private static void OpenExcelFile(string excelFile)
193194
}
194195

195196
#endregion
197+
198+
private void OnGithub(object sender, RoutedEventArgs e)
199+
{
200+
new Process { StartInfo = new ProcessStartInfo("https://github.com/cpa-coder/vat-relief") { UseShellExecute = true } }.Start();
201+
}
196202
}

0 commit comments

Comments
 (0)