將寫死改成活讀
This commit is contained in:
@@ -1,29 +1,23 @@
|
||||
using CMM.Library.Base;
|
||||
using CMM.Library.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CMM.Library.Method
|
||||
namespace CMM.Library.Method;
|
||||
|
||||
public class CMMMgr : PropertyBase
|
||||
{
|
||||
public class CMMMgr : PropertyBase
|
||||
public ObservableRangeCollection<XMonitor> Monitors
|
||||
{
|
||||
public ObservableRangeCollection<XMonitor> Monitors
|
||||
{
|
||||
get => _Monitors;
|
||||
set { SetProperty(ref _Monitors, value); }
|
||||
}
|
||||
ObservableRangeCollection<XMonitor> _Monitors = new ();
|
||||
get => _Monitors;
|
||||
set { SetProperty(ref _Monitors, value); }
|
||||
}
|
||||
ObservableRangeCollection<XMonitor> _Monitors = new ();
|
||||
|
||||
public async Task Init()
|
||||
{
|
||||
await CMMCommand.ScanMonitor();
|
||||
var monColle = new ObservableRangeCollection<XMonitor>();
|
||||
monColle.AddRange(await CMMCommand.ReadMonitorsData());
|
||||
Monitors = monColle;
|
||||
await CMMCommand.ScanMonitorInterfaces(monColle);
|
||||
}
|
||||
public async Task Init()
|
||||
{
|
||||
await CMMCommand.ScanMonitor();
|
||||
var monColle = new ObservableRangeCollection<XMonitor>();
|
||||
monColle.AddRange(await CMMCommand.ReadMonitorsData());
|
||||
Monitors = monColle;
|
||||
await CMMCommand.ScanMonitorStatus(monColle);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user