mirror of
https://github.com/chylex/Backup-Essentials.git
synced 2025-06-02 15:34:06 +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.Collections.Generic;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
@ -22,8 +24,15 @@ namespace BackupEssentials{
|
|||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ResetCache(){
|
public static void ResetUI(){
|
||||||
cached.Clear();
|
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">
|
<Compile Include="Pages\History.xaml.cs">
|
||||||
<DependentUpon>History.xaml</DependentUpon>
|
<DependentUpon>History.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Pages\IPageResetUI.cs" />
|
||||||
<Compile Include="Pages\IPageShowData.cs" />
|
<Compile Include="Pages\IPageShowData.cs" />
|
||||||
<Compile Include="Pages\Home.xaml.cs">
|
<Compile Include="Pages\Home.xaml.cs">
|
||||||
<DependentUpon>Home.xaml</DependentUpon>
|
<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