mirror of
https://github.com/chylex/Backup-Essentials.git
synced 2025-05-22 19:34:05 +02:00
Added UI reset for main window and pages
This commit is contained in:
parent
a64f4574a6
commit
72f55ef045
BackupEssentials
@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using BackupEssentials.Pages;
|
||||
using BackupEssentials.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Controls;
|
||||
|
||||
@ -22,8 +24,15 @@ namespace BackupEssentials{
|
||||
return page;
|
||||
}
|
||||
|
||||
public static void ResetCache(){
|
||||
cached.Clear();
|
||||
public static void ResetUI(){
|
||||
App.Current.MainWindow.UpdateBindings();
|
||||
|
||||
foreach(Page page in cached.Values){
|
||||
page.UpdateBindings();
|
||||
|
||||
IPageResetUI reset = page as IPageResetUI;
|
||||
if (reset != null)reset.OnReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +116,7 @@
|
||||
<Compile Include="Pages\History.xaml.cs">
|
||||
<DependentUpon>History.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\IPageResetUI.cs" />
|
||||
<Compile Include="Pages\IPageShowData.cs" />
|
||||
<Compile Include="Pages\Home.xaml.cs">
|
||||
<DependentUpon>Home.xaml</DependentUpon>
|
||||
|
5
BackupEssentials/Pages/IPageResetUI.cs
Normal file
5
BackupEssentials/Pages/IPageResetUI.cs
Normal file
@ -0,0 +1,5 @@
|
||||
namespace BackupEssentials.Pages{
|
||||
interface IPageResetUI{
|
||||
void OnReset();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user