This commit is contained in:
Rene Schwarz
2021-04-11 23:29:13 +02:00
parent ca432897af
commit cf7b9abcf0
52 changed files with 1281 additions and 142 deletions

View File

@@ -1,50 +0,0 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
namespace Server_Dashboard {
class DashboardModuleViewModel : BaseViewModel {
private ObservableCollection<DashboardModule> modules;
public ObservableCollection<DashboardModule> Modules {
get { return modules; }
set {
if (modules != value)
modules = value;
OnPropertyChanged(nameof(modules));
}
}
public DashboardModuleViewModel() {
Modules = new ObservableCollection<DashboardModule>();
for (int i = 0; i < 1; i++) {
Modules.Add(new DashboardModule() {
Creator = "Ersteller TestUser",
ModulName = "TestName",
ModuleIcon = "../../Assets/Images/PlaceHolderModuleLight.png",
Width = new Random().Next(300, 400),
Height = new Random().Next(100, 400),
});
}
var sort = Modules.OrderBy(h => h.Height).ThenBy(w => w.Width).ToList();
Modules = new ObservableCollection<DashboardModule>(sort);
}
#region Dashboard CRUD
private void CreateDashboard() {
}
private void UpdateDashboard() {
}
private void GetDashboardInformation() {
}
private void DeleteDashboard() {
}
#endregion
}
}

View File

@@ -0,0 +1,26 @@
using Server_Dashboard.Views.DashboardPages.ModuleCRUD;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
namespace Server_Dashboard {
class DashboardModuleViewModel : BaseViewModel {
public string ModuleName { get; set; }
public string StatusIndicator { get; set; }
public string StatusIndicatorBG { get; set; }
public string ServerName { get; set; }
public string HostName { get; set; }
public string CpuTemp { get; set; }
public string GpuTemp { get; set; }
public string Uptime { get; set; }
public string DeployDate { get; set; }
public string PublicIpAdress { get; set; }
public string PrivateIpAdress { get; set; }
public string OSHostName { get; set; }
}
}