消除所有错误,重新构建
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using DMS.Helper;
|
||||
using DMS.WPF.Models;
|
||||
using DMS.WPF.Models;
|
||||
|
||||
namespace DMS.WPF.ViewModels.Dialogs;
|
||||
|
||||
@@ -12,23 +9,23 @@ public partial class ImportExcelDialogViewModel : ObservableObject
|
||||
private string? _filePath;
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<Variable> _variables = new();
|
||||
private ObservableCollection<DMS.Core.Models.Variable> _variables = new();
|
||||
|
||||
partial void OnFilePathChanged(string? value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var data = ExcelHelper.ImprotFromTiaVariableTable(value);
|
||||
Variables = new ObservableCollection<Variable>(data);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
// Handle exception
|
||||
}
|
||||
// if (string.IsNullOrEmpty(value))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// var data = ExcelHelper.ImprotFromTiaVariableTable(value);
|
||||
// Variables = new ObservableCollection<DMS.Core.Models.Variable>(data);
|
||||
// }
|
||||
// catch (System.Exception ex)
|
||||
// {
|
||||
// // Handle exception
|
||||
// }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user