Base windows UI is working.
* No joining/leaving networks yet, but they do display. * Nothing is updated yet after first load of the app. Need to set up a background task to run updates.
This commit is contained in:
parent
6471c1f4e2
commit
5b6ddaa2d7
14 changed files with 329 additions and 58 deletions
|
@ -20,9 +20,30 @@ namespace WinUI
|
|||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
APIHandler handler = new APIHandler();
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
updateStatus();
|
||||
updateNetworks();
|
||||
}
|
||||
|
||||
private void updateStatus()
|
||||
{
|
||||
var status = handler.getStatus();
|
||||
|
||||
this.networkId.Content = status.address;
|
||||
this.versionString.Content = status.version;
|
||||
this.onlineStatus.Content = (status.online ? "ONLINE" : "OFFLINE");
|
||||
}
|
||||
|
||||
private void updateNetworks()
|
||||
{
|
||||
var networks = handler.getNetworks();
|
||||
|
||||
networksPage.setNetworks(networks);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue