1
0
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:
chylex 2015-04-29 17:26:39 +02:00
parent a64f4574a6
commit 72f55ef045
3 changed files with 18 additions and 3 deletions

View File

@ -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();
}
}
}
}

View File

@ -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>

View File

@ -0,0 +1,5 @@
namespace BackupEssentials.Pages{
interface IPageResetUI{
void OnReset();
}
}