105040 Update 增加异常提示
This commit is contained in:
parent
9d1d9f4fab
commit
78c2ba4261
|
|
@ -21,6 +21,10 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.Utils
|
||||||
var bytes = File.ReadAllBytes(file);
|
var bytes = File.ReadAllBytes(file);
|
||||||
dataFileStream = new MemoryStream(bytes);
|
dataFileStream = new MemoryStream(bytes);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new FileNotFoundException(file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public List<LectotypeModel> GetCableDatas(string brand = Brands.SANLING_HK_KT)
|
public List<LectotypeModel> GetCableDatas(string brand = Brands.SANLING_HK_KT)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ using EPLAN.Harness.Core.Utils;
|
||||||
using EPLAN.Harness.ProjectCore;
|
using EPLAN.Harness.ProjectCore;
|
||||||
using EPLAN.Harness.ProjectCore.Occurrences;
|
using EPLAN.Harness.ProjectCore.Occurrences;
|
||||||
using EPLAN.Harness.ProjectCore.Occurrences.Designer;
|
using EPLAN.Harness.ProjectCore.Occurrences.Designer;
|
||||||
|
using HandyControl.Controls;
|
||||||
using HandyControl.Tools.Extension;
|
using HandyControl.Tools.Extension;
|
||||||
using Sinvo.EplanHpD.Plugin.Service;
|
using Sinvo.EplanHpD.Plugin.Service;
|
||||||
using Sinvo.EplanHpD.Plugin.Service.Model;
|
using Sinvo.EplanHpD.Plugin.Service.Model;
|
||||||
|
|
@ -176,6 +177,10 @@ public class LectotypeViewModel(string docId) : INotifyPropertyChanged
|
||||||
|
|
||||||
public Task LoadData()
|
public Task LoadData()
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(docId))
|
if (string.IsNullOrEmpty(docId))
|
||||||
{
|
{
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
@ -245,6 +250,16 @@ public class LectotypeViewModel(string docId) : INotifyPropertyChanged
|
||||||
designer.SelectSet.NodeSelected += SelectSet_NodeSelected;
|
designer.SelectSet.NodeSelected += SelectSet_NodeSelected;
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
HandyControl.Controls.MessageBox.Show(ex.ToString());
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void SelectSet_NodeSelected(object sender, EPLAN.Harness.Common.Events.EventArgs<BaseOccurrence> e)
|
private void SelectSet_NodeSelected(object sender, EPLAN.Harness.Common.Events.EventArgs<BaseOccurrence> e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue