Backup
This commit is contained in:
parent
39f3516b2e
commit
db8075b8f3
@ -45,6 +45,8 @@ public partial class ServerViewModel : ViewModelBase, IViewModelBase
|
|||||||
public ReactiveCommand<Unit, Unit> AptUpdate { get; }
|
public ReactiveCommand<Unit, Unit> AptUpdate { get; }
|
||||||
public ReactiveCommand<Unit, Unit> ReScan { get; }
|
public ReactiveCommand<Unit, Unit> ReScan { get; }
|
||||||
public ReactiveCommand<Unit, Unit> Reboot { get; }
|
public ReactiveCommand<Unit, Unit> Reboot { get; }
|
||||||
|
public ReactiveCommand<Unit, Unit> SelectAll { get; }
|
||||||
|
public ReactiveCommand<Unit, Unit> DeSelectAll { get; }
|
||||||
|
|
||||||
protected readonly ReadOnlyObservableCollection<Server> _server;
|
protected readonly ReadOnlyObservableCollection<Server> _server;
|
||||||
public ReadOnlyObservableCollection<Server> Server => _server;
|
public ReadOnlyObservableCollection<Server> Server => _server;
|
||||||
@ -60,6 +62,8 @@ public partial class ServerViewModel : ViewModelBase, IViewModelBase
|
|||||||
AptUpdate = ReactiveCommand.Create(doAptUpdate);
|
AptUpdate = ReactiveCommand.Create(doAptUpdate);
|
||||||
ReScan = ReactiveCommand.Create(doReScan);
|
ReScan = ReactiveCommand.Create(doReScan);
|
||||||
Reboot = ReactiveCommand.Create(doReboot);
|
Reboot = ReactiveCommand.Create(doReboot);
|
||||||
|
SelectAll = ReactiveCommand.Create(selectAll);
|
||||||
|
DeSelectAll = ReactiveCommand.Create(deSelectAll);
|
||||||
_settingsManager = (SettingsManager)Ioc.Default.GetService<ISettingsManager>();
|
_settingsManager = (SettingsManager)Ioc.Default.GetService<ISettingsManager>();
|
||||||
ServerService.SourceCache.Connect()
|
ServerService.SourceCache.Connect()
|
||||||
// Sort Ascending on the OrderIndex property
|
// Sort Ascending on the OrderIndex property
|
||||||
@ -177,4 +181,19 @@ public partial class ServerViewModel : ViewModelBase, IViewModelBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void selectAll()
|
||||||
|
{
|
||||||
|
foreach (var serv in Server)
|
||||||
|
{
|
||||||
|
serv.IsChecked = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void deSelectAll()
|
||||||
|
{
|
||||||
|
foreach (var serv in Server)
|
||||||
|
{
|
||||||
|
serv.IsChecked = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -27,6 +27,8 @@
|
|||||||
<Button Content="ReScan" Command="{Binding ReScan}"></Button>
|
<Button Content="ReScan" Command="{Binding ReScan}"></Button>
|
||||||
<Button Content="Apt Upgrade" Command="{Binding AptUpdate}"></Button>
|
<Button Content="Apt Upgrade" Command="{Binding AptUpdate}"></Button>
|
||||||
<Button Content="Reboot" Command="{Binding Reboot}"></Button>
|
<Button Content="Reboot" Command="{Binding Reboot}"></Button>
|
||||||
|
<Button Content="Select ALL" Command="{Binding SelectAll}"></Button>
|
||||||
|
<Button Content="DeSelect ALL" Command="{Binding DeSelectAll}"></Button>
|
||||||
<!-- <TextBox Grid.Row="1" Text="{Binding Json}"></TextBox>-->
|
<!-- <TextBox Grid.Row="1" Text="{Binding Json}"></TextBox>-->
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user