File tree Expand file tree Collapse file tree 8 files changed +39
-3
lines changed
MahMaterialDragablzMashUp Expand file tree Collapse file tree 8 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 4545 MDIXColorsVersion : ${{ inputs.mdix-colors-version }}
4646 MDIXMahAppsVersion : ${{ inputs.mdix-mahapps-version }}
4747
48+ - name : Generate Version File
49+ run : echo ${{ inputs.mdix-version }} > src/MainDemo.Wpf/version.txt
50+
4851 - name : Test
4952 timeout-minutes : 20
5053 run : dotnet test ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-build --blame-crash --logger GitHubActions
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Setup Versions
22
33on :
44 workflow_call :
5- inputs :
5+ inputs :
66 is-full-release :
77 required : false
88 type : boolean
Original file line number Diff line number Diff line change 3636 <Button Content =" Hello World" />
3737 <Button Content =" Nice Popup" />
3838 <Button Content =" Goodbye" />
39+ <Button Content =" Version" />
3940 </StackPanel >
4041 </wpf : PopupBox >
4142 </controls : WindowCommands >
Original file line number Diff line number Diff line change 3838 <ListBoxItem Content =" Hello World" />
3939 <ListBoxItem Content =" Nice Popup" />
4040 <ListBoxItem Content =" Goodbye" />
41+ <ListBoxItem Content =" Version" />
4142 </ListBox >
4243 </materialDesign : PopupBox >
4344
Original file line number Diff line number Diff line change 186186 <Separator />
187187
188188 <Button Click =" MenuPopupButton_OnClick" Content =" Goodbye" />
189+
190+ <Separator />
191+
192+ <TextBlock x : Name =" VersionText" HorizontalAlignment =" Left" VerticalAlignment =" Bottom" Margin =" 10" />
193+
189194 </StackPanel >
190195 </materialDesign : PopupBox >
191196
Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ public partial class MainWindow
1212 public MainWindow ( )
1313 {
1414 InitializeComponent ( ) ;
15+ LoadVersion ( ) ;
16+
1517
1618 Task . Factory . StartNew ( ( ) => Thread . Sleep ( 2500 ) ) . ContinueWith ( t =>
1719 {
18- //note you can use the message queue from any thread, but just for the demo here we
20+ //note you can use the message queue from any thread, but just for the demo here we
1921 //need to get the message queue from the snackbar, so need to be on the dispatcher
2022 MainSnackbar . MessageQueue ? . Enqueue ( "Welcome to Material Design In XAML Toolkit" ) ;
2123 } , TaskScheduler . FromCurrentSynchronizationContext ( ) ) ;
@@ -114,4 +116,24 @@ private static void ModifyTheme(bool isDarkTheme)
114116
115117 private void OnSelectedItemChanged ( object sender , DependencyPropertyChangedEventArgs e )
116118 => MainScrollViewer . ScrollToHome ( ) ;
119+ private void LoadVersion ( )
120+ {
121+ try
122+ {
123+ string versionFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) , "version.txt" ) ;
124+ if ( File . Exists ( versionFilePath ) )
125+ {
126+ string version = File . ReadAllText ( versionFilePath ) . Trim ( ) ;
127+ VersionText . Text = $ "Version: { version } ";
128+ }
129+ else
130+ {
131+ VersionText . Text = "Version file not found" ;
132+ }
133+ }
134+ catch ( Exception ex )
135+ {
136+ VersionText . Text = $ "Error reading version: { ex . Message } ";
137+ }
138+ }
117139}
Original file line number Diff line number Diff line change 4949 <PackageReference Include =" ShowMeTheXAML.AvalonEdit" />
5050 <PackageReference Include =" ShowMeTheXAML.MSBuild" />
5151 </ItemGroup >
52- </Project >
52+ </Project >
Original file line number Diff line number Diff line change 1+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+ # yarn lockfile v1
3+
4+
You can’t perform that action at this time.
0 commit comments