Skip to content

Commit

Permalink
Add saved property.
Browse files Browse the repository at this point in the history
  • Loading branch information
peymanr34 committed Sep 8, 2024
1 parent 33c9cf2 commit c271398
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/InstallerStudio/Pages/DetailsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@
</StackPanel>
</Button>
</StackPanel>
<StackPanel
Grid.Column="1"
Orientation="Horizontal"
Visibility="{x:Bind ViewModel.IsSaved, Mode=OneWay}">
<SymbolIcon
Margin="5,0"
Symbol="Accept"
ToolTipService.ToolTip="Project details has been saved." />
</StackPanel>
</Grid>
</Grid>
</Page>
4 changes: 4 additions & 0 deletions Source/InstallerStudio/ViewModels/EditProjectViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public partial class EditProjectViewModel
[Property]
private SetupType _setupType;

[Property]
private bool _isSaved;

public void Load()
{
var model = Context.Projects
Expand Down Expand Up @@ -55,6 +58,7 @@ public void Save(object args)
model.Description = Description;

Context.SaveChanges();
IsSaved = true;
}

[CommandInvalidate(nameof(Name))]
Expand Down

0 comments on commit c271398

Please sign in to comment.