1
This commit is contained in:
parent
c76c8ada14
commit
b31eb505e4
@ -21,7 +21,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
using Prism.DryIoc;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using Prism.DryIoc;
|
||||||
using Prism.Events;
|
using Prism.Events;
|
||||||
using Prism.Ioc;
|
using Prism.Ioc;
|
||||||
using Prism.Services.Dialogs;
|
using Prism.Services.Dialogs;
|
||||||
@ -9,6 +13,7 @@ using SWS.Commons;
|
|||||||
using SWS.Service;
|
using SWS.Service;
|
||||||
using SWS.WPF.ViewModels;
|
using SWS.WPF.ViewModels;
|
||||||
using SWS.WPF.Views;
|
using SWS.WPF.Views;
|
||||||
|
using Telerik.Windows.Controls;
|
||||||
using Unity;
|
using Unity;
|
||||||
namespace SWS.CAD
|
namespace SWS.CAD
|
||||||
{
|
{
|
||||||
@ -17,67 +22,82 @@ namespace SWS.CAD
|
|||||||
|
|
||||||
public static void RegisterTypes()
|
public static void RegisterTypes()
|
||||||
{
|
{
|
||||||
GlobalObject.container = new UnityContainer();
|
try
|
||||||
GlobalObject.container.RegisterSingleton<IEventAggregator, EventAggregator>();
|
{
|
||||||
|
GlobalObject.container = new UnityContainer();
|
||||||
|
// 启用诊断
|
||||||
|
GlobalObject.container.AddExtension(new Diagnostic());
|
||||||
|
GlobalObject.container.RegisterSingleton<IEventAggregator, EventAggregator>();
|
||||||
|
|
||||||
GlobalObject.container.RegisterSingleton<HttpService>();
|
GlobalObject.container.RegisterSingleton<HttpService>();
|
||||||
GlobalObject.container.RegisterSingleton<ConfigService>();
|
GlobalObject.container.RegisterSingleton<ConfigService>();
|
||||||
|
|
||||||
GlobalObject.container.RegisterSingleton<AnnexesService>();
|
GlobalObject.container.RegisterSingleton<AnnexesService>();
|
||||||
GlobalObject.container.RegisterSingleton<DataItemService>();
|
GlobalObject.container.RegisterSingleton<DataItemService>();
|
||||||
GlobalObject.container.RegisterSingleton<DrawingServce>();
|
GlobalObject.container.RegisterSingleton<DrawingServce>();
|
||||||
GlobalObject.container.RegisterSingleton<LoginService>();
|
GlobalObject.container.RegisterSingleton<LoginService>();
|
||||||
GlobalObject.container.RegisterSingleton<NotificationService>();
|
GlobalObject.container.RegisterSingleton<NotificationService>();
|
||||||
GlobalObject.container.RegisterSingleton<ObjectTypeService>();
|
GlobalObject.container.RegisterSingleton<ObjectTypeService>();
|
||||||
GlobalObject.container.RegisterSingleton<ProjectService>();
|
GlobalObject.container.RegisterSingleton<ProjectService>();
|
||||||
GlobalObject.container.RegisterSingleton<TemplateFileService>();
|
GlobalObject.container.RegisterSingleton<TemplateFileService>();
|
||||||
GlobalObject.container.RegisterSingleton<UserService>();
|
GlobalObject.container.RegisterSingleton<UserService>();
|
||||||
GlobalObject.container.RegisterSingleton<EnginedataService>();
|
GlobalObject.container.RegisterSingleton<EnginedataService>();
|
||||||
//GlobalObject.container.RegisterSingleton<ResourceService>();
|
//GlobalObject.container.RegisterSingleton<ResourceService>();
|
||||||
GlobalObject.container.RegisterSingleton<DrawingCatalogueService>();
|
GlobalObject.container.RegisterSingleton<DrawingCatalogueService>();
|
||||||
GlobalObject.container.RegisterSingleton<WireGroupService>();
|
GlobalObject.container.RegisterSingleton<WireGroupService>();
|
||||||
GlobalObject.container.RegisterSingleton<IOModuleService>();
|
GlobalObject.container.RegisterSingleton<IOModuleService>();
|
||||||
GlobalObject.container.RegisterSingleton<PDBService>();
|
GlobalObject.container.RegisterSingleton<PDBService>();
|
||||||
GlobalObject.container.RegisterSingleton<RelService>();
|
GlobalObject.container.RegisterSingleton<RelService>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GlobalObject._prismContainer = new DryIocContainerExtension();
|
|
||||||
GlobalObject._prismContainer.Register<IDialogService, DialogService>();
|
|
||||||
GlobalObject._prismContainer.Register<IDialogWindow, Views.Dialog.CustomDialogWindow>();
|
GlobalObject._prismContainer = new DryIocContainerExtension();
|
||||||
//后者类似于一个容器。给所有需要的dialog所用
|
GlobalObject._prismContainer.Register<IDialogService, DialogService>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<NewDrawing, NewDrawingViewModel>();
|
GlobalObject._prismContainer.Register<IDialogWindow, Views.Dialog.CustomDialogWindow>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<Dialog2Select, Dialog2SelectViewModel>();
|
//后者类似于一个容器。给所有需要的dialog所用
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogUnitSelect, DialogUnitSelectViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<NewDrawing, NewDrawingViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogInput, DialogInputViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<Dialog2Select, Dialog2SelectViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogTagSelect, DialogTagSelectViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogUnitSelect, DialogUnitSelectViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogNewTagNumber, DialogNewTagNumberViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogInput, DialogInputViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogParallelCable, DialogParallelCableViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogTagSelect, DialogTagSelectViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogPreCheckIn, DialogPreCheckInViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogNewTagNumber, DialogNewTagNumberViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogDrawingCatalogue, DialogDrawingCatalogueViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogParallelCable, DialogParallelCableViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogCheckInRecord, DialogCheckInRecordViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogPreCheckIn, DialogPreCheckInViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogPublishRecord, DialogPublishRecordViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogDrawingCatalogue, DialogDrawingCatalogueViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<SWS.WPF.Views.DialogSignalManagement,SWS.WPF.ViewModels.DialogSignalManagementViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogCheckInRecord, DialogCheckInRecordViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogAllOutputSignal, DialogAllOutputSignalViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogPublishRecord, DialogPublishRecordViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogAssociatedSignal, DialogAssociatedSignalViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<SWS.WPF.Views.DialogSignalManagement, SWS.WPF.ViewModels.DialogSignalManagementViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogOperateRecord, DialogOperateRecordViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogAllOutputSignal, DialogAllOutputSignalViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogPropertyHistory, DialogPropertyHistoryViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogAssociatedSignal, DialogAssociatedSignalViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalNotice, DialogSignalNoticeViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogOperateRecord, DialogOperateRecordViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalPropertyhisAndLogs, DialogSignalPropertyhisAndLogsViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogPropertyHistory, DialogPropertyHistoryViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalSelect, DialogSignalSelectViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogSignalNotice, DialogSignalNoticeViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogIODistribution, DialogIODistributionViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogSignalPropertyhisAndLogs, DialogSignalPropertyhisAndLogsViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogNewPositional, DialogNewPositionalViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogSignalSelect, DialogSignalSelectViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogNewStrip, DialogNewStripViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogIODistribution, DialogIODistributionViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogCablePreAssignPreview, DialogCablePreAssignPreviewViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogNewPositional, DialogNewPositionalViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogCablePreAssignResult, DialogCablePreAssignResultViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogNewStrip, DialogNewStripViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogNewComponent, DialogNewComponentViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogCablePreAssignPreview, DialogCablePreAssignPreviewViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogCableConfig, DialogCableConfigViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogCablePreAssignResult, DialogCablePreAssignResultViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogBusbarManagement, DialogBusbarManagementViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogNewComponent, DialogNewComponentViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogChannelMigration, DialogChannelMigrationViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogCableConfig, DialogCableConfigViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogCableConnection, DialogCableConnectionViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogBusbarManagement, DialogBusbarManagementViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogCableConnection_NewStrip, DialogCableConnection_NewStripViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogChannelMigration, DialogChannelMigrationViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalPredistribution, DialogSignalPredistributionViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogCableConnection, DialogCableConnectionViewModel>();
|
||||||
GlobalObject._prismContainer.RegisterDialog<DialogSectionBox, DialogSectionBoxViewModel>();
|
GlobalObject._prismContainer.RegisterDialog<DialogCableConnection_NewStrip, DialogCableConnection_NewStripViewModel>();
|
||||||
|
GlobalObject._prismContainer.RegisterDialog<DialogSignalPredistribution, DialogSignalPredistributionViewModel>();
|
||||||
|
GlobalObject._prismContainer.RegisterDialog<DialogSectionBox, DialogSectionBoxViewModel>();
|
||||||
|
}
|
||||||
|
catch (System.Exception ex)
|
||||||
|
{
|
||||||
|
// 记录异常详细信息
|
||||||
|
MessageBox.Show($"启动时发生错误: {ex.ToString()}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1954,7 +1954,7 @@ namespace SWS.CAD.ViewModels
|
|||||||
var historyDrawingsTree = await _dwgService.GetDrawingCatalogue();
|
var historyDrawingsTree = await _dwgService.GetDrawingCatalogue();
|
||||||
historyDrawingsTree = CheckInOutStatus(historyDrawingsTree);
|
historyDrawingsTree = CheckInOutStatus(historyDrawingsTree);
|
||||||
var listHistory = await _dwgService.GetPublishedDwg();
|
var listHistory = await _dwgService.GetPublishedDwg();
|
||||||
if (listHistory.Any())
|
if (listHistory!=null&& listHistory.Any())
|
||||||
{
|
{
|
||||||
//历史树1
|
//历史树1
|
||||||
//historyDrawings = FilterHistoryTree(historyDrawingsTree, listHistory);
|
//historyDrawings = FilterHistoryTree(historyDrawingsTree, listHistory);
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
x:Class="SWS.CAD.Views.LeftPanel"
|
x:Class="SWS.CAD.Views.LeftPanel"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:Behaviors="clr-namespace:SWS.Commons.Helper.Behaviours;assembly=SWS.Commons"
|
||||||
xmlns:converter="clr-namespace:SWS.CAD.Converter"
|
xmlns:converter="clr-namespace:SWS.CAD.Converter"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
xmlns:local="clr-namespace:SWS.CAD.Views"
|
xmlns:local="clr-namespace:SWS.CAD.Views"
|
||||||
xmlns:local2="clr-namespace:SWS.Model;assembly=SWS.Model"
|
xmlns:local2="clr-namespace:SWS.Model;assembly=SWS.Model"
|
||||||
xmlns:Behaviors="clr-namespace:SWS.Commons.Helper.Behaviours;assembly=SWS.Commons"
|
|
||||||
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
||||||
Width="250"
|
Width="250"
|
||||||
Loaded="UserControl_Loaded">
|
Loaded="UserControl_Loaded">
|
||||||
@ -188,12 +188,12 @@
|
|||||||
x:Name="radTreeView"
|
x:Name="radTreeView"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Background="Transparent"
|
|
||||||
Margin="-5,0,0,0"
|
Margin="-5,0,0,0"
|
||||||
|
Behaviors:TreeViewSelectedItemBehavior.SelectedItem="{Binding selectedNode, Mode=TwoWay}"
|
||||||
|
Background="Transparent"
|
||||||
FontSize="11"
|
FontSize="11"
|
||||||
ItemsSource="{Binding Drawings}"
|
ItemsSource="{Binding Drawings}"
|
||||||
PreviewMouseRightButtonDown="RadTreeView_PreviewMouseRightButtonDown"
|
PreviewMouseRightButtonDown="RadTreeView_PreviewMouseRightButtonDown">
|
||||||
Behaviors:TreeViewSelectedItemBehavior.SelectedItem="{Binding selectedNode, Mode=TwoWay}">
|
|
||||||
<TreeView.ItemTemplate>
|
<TreeView.ItemTemplate>
|
||||||
<HierarchicalDataTemplate DataType="{x:Type local2:TreeModel}" ItemsSource="{Binding ChildNodes}">
|
<HierarchicalDataTemplate DataType="{x:Type local2:TreeModel}" ItemsSource="{Binding ChildNodes}">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
@ -230,8 +230,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
FontSize="11"
|
FontSize="11"
|
||||||
ItemsSource="{Binding historyDrawings}"
|
ItemsSource="{Binding historyDrawings}"
|
||||||
PreviewMouseRightButtonDown="treeDwgHistory_PreviewMouseRightButtonDown"
|
PreviewMouseRightButtonDown="treeDwgHistory_PreviewMouseRightButtonDown">
|
||||||
Behaviors:TreeViewSelectedItemBehavior.SelectedItem="{Binding selectedHistoryDwg, Mode=TwoWay}">
|
|
||||||
<TreeView.ItemContainerStyle>
|
<TreeView.ItemContainerStyle>
|
||||||
<Style TargetType="telerik:RadTreeViewItem">
|
<Style TargetType="telerik:RadTreeViewItem">
|
||||||
<Setter Property="IsExpanded" Value="{Binding isexpand, Mode=TwoWay, Converter={StaticResource expandConverter}}" />
|
<Setter Property="IsExpanded" Value="{Binding isexpand, Mode=TwoWay, Converter={StaticResource expandConverter}}" />
|
||||||
@ -341,10 +340,10 @@
|
|||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Margin="-5,0,0,0"
|
Margin="-5,0,0,0"
|
||||||
|
Behaviors:TreeViewSelectedItemBehavior.SelectedItem="{Binding selectType, Mode=TwoWay}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
FontSize="11"
|
FontSize="11"
|
||||||
ItemsSource="{Binding objectTypeTree}"
|
ItemsSource="{Binding objectTypeTree}">
|
||||||
Behaviors:TreeViewSelectedItemBehavior.SelectedItem="{Binding selectType, Mode=TwoWay}">
|
|
||||||
<TreeView.ItemTemplate>
|
<TreeView.ItemTemplate>
|
||||||
<HierarchicalDataTemplate DataType="{x:Type local2:TreeModel}" ItemsSource="{Binding ChildNodes}">
|
<HierarchicalDataTemplate DataType="{x:Type local2:TreeModel}" ItemsSource="{Binding ChildNodes}">
|
||||||
<StackPanel Height="16" Orientation="Horizontal">
|
<StackPanel Height="16" Orientation="Horizontal">
|
||||||
@ -354,7 +353,7 @@
|
|||||||
Foreground="{Binding FontColor}"
|
Foreground="{Binding FontColor}"
|
||||||
Glyph="{Binding Glyph, Converter={StaticResource StringToGlyphConverter1}}" />
|
Glyph="{Binding Glyph, Converter={StaticResource StringToGlyphConverter1}}" />
|
||||||
<!-- 文本 -->
|
<!-- 文本 -->
|
||||||
<TextBlock VerticalAlignment="Center" Text="{Binding Text}" />
|
<TextBlock VerticalAlignment="Center" Text="{Binding Text}" Foreground="{Binding FontColor}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</HierarchicalDataTemplate>
|
</HierarchicalDataTemplate>
|
||||||
</TreeView.ItemTemplate>
|
</TreeView.ItemTemplate>
|
||||||
@ -387,10 +386,10 @@
|
|||||||
</i:Interaction.Triggers>-->
|
</i:Interaction.Triggers>-->
|
||||||
<telerik:EventToCommandBehavior.EventBindings>
|
<telerik:EventToCommandBehavior.EventBindings>
|
||||||
<telerik:EventBinding
|
<telerik:EventBinding
|
||||||
Command="{Binding Command_TagDoubleClick}"
|
Command="{Binding Command_TagDoubleClick}"
|
||||||
EventName="MouseDoubleClick"
|
CommandParameter="{Binding ElementName=tagListBox, Path=SelectedItem}"
|
||||||
CommandParameter="{Binding ElementName=tagListBox, Path=SelectedItem}"
|
EventName="MouseDoubleClick"
|
||||||
PassEventArgsToCommand="True" />
|
PassEventArgsToCommand="True" />
|
||||||
</telerik:EventToCommandBehavior.EventBindings>
|
</telerik:EventToCommandBehavior.EventBindings>
|
||||||
<telerik:RadListBox.GroupStyle>
|
<telerik:RadListBox.GroupStyle>
|
||||||
<GroupStyle>
|
<GroupStyle>
|
||||||
@ -441,10 +440,10 @@
|
|||||||
<TreeView
|
<TreeView
|
||||||
x:Name="designTreeView"
|
x:Name="designTreeView"
|
||||||
Margin="-5,0,0,0"
|
Margin="-5,0,0,0"
|
||||||
|
Behaviors:TreeViewSelectedItemBehavior.SelectedItem="{Binding selectDesign, Mode=TwoWay}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
FontSize="11"
|
FontSize="11"
|
||||||
ItemsSource="{Binding designTree}"
|
ItemsSource="{Binding designTree}">
|
||||||
Behaviors:TreeViewSelectedItemBehavior.SelectedItem="{Binding selectDesign, Mode=TwoWay}">
|
|
||||||
<!--<i:Interaction.Triggers>
|
<!--<i:Interaction.Triggers>
|
||||||
<i:EventTrigger EventName="SelectionChanged">
|
<i:EventTrigger EventName="SelectionChanged">
|
||||||
<i:InvokeCommandAction
|
<i:InvokeCommandAction
|
||||||
@ -461,15 +460,15 @@
|
|||||||
</i:Interaction.Triggers>-->
|
</i:Interaction.Triggers>-->
|
||||||
<telerik:EventToCommandBehavior.EventBindings>
|
<telerik:EventToCommandBehavior.EventBindings>
|
||||||
<telerik:EventBinding
|
<telerik:EventBinding
|
||||||
Command="{Binding Common_SelectedDesign}"
|
Command="{Binding Common_SelectedDesign}"
|
||||||
EventName="SelectedItemChanged"
|
CommandParameter="{Binding ElementName=designTreeView, Path=SelectedItem}"
|
||||||
CommandParameter="{Binding ElementName=designTreeView, Path=SelectedItem}"
|
EventName="SelectedItemChanged"
|
||||||
PassEventArgsToCommand="True" />
|
PassEventArgsToCommand="True" />
|
||||||
<telerik:EventBinding
|
<telerik:EventBinding
|
||||||
Command="{Binding Common_DoubleClickDesign}"
|
Command="{Binding Common_DoubleClickDesign}"
|
||||||
EventName="MouseDoubleClick"
|
CommandParameter="{Binding ElementName=designTreeView, Path=SelectedItem}"
|
||||||
CommandParameter="{Binding ElementName=designTreeView, Path=SelectedItem}"
|
EventName="MouseDoubleClick"
|
||||||
PassEventArgsToCommand="True" />
|
PassEventArgsToCommand="True" />
|
||||||
</telerik:EventToCommandBehavior.EventBindings>
|
</telerik:EventToCommandBehavior.EventBindings>
|
||||||
<TreeView.ItemContainerStyle>
|
<TreeView.ItemContainerStyle>
|
||||||
<Style TargetType="TreeViewItem">
|
<Style TargetType="TreeViewItem">
|
||||||
@ -488,7 +487,7 @@
|
|||||||
Foreground="{Binding FontColor}"
|
Foreground="{Binding FontColor}"
|
||||||
Glyph="{Binding Glyph, Converter={StaticResource StringToGlyphConverter1}}" />
|
Glyph="{Binding Glyph, Converter={StaticResource StringToGlyphConverter1}}" />
|
||||||
<!-- 文本 -->
|
<!-- 文本 -->
|
||||||
<TextBlock VerticalAlignment="Center" Text="{Binding Text}" />
|
<TextBlock VerticalAlignment="Center" Text="{Binding Text}" Foreground="{Binding FontColor}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</HierarchicalDataTemplate>
|
</HierarchicalDataTemplate>
|
||||||
</TreeView.ItemTemplate>
|
</TreeView.ItemTemplate>
|
||||||
|
@ -57,7 +57,7 @@ namespace SWS.Service
|
|||||||
{
|
{
|
||||||
var uri = new Uri(GlobalObject.client.BaseAddress + requestUri);
|
var uri = new Uri(GlobalObject.client.BaseAddress + requestUri);
|
||||||
var funName = uri.Segments.Last();
|
var funName = uri.Segments.Last();
|
||||||
//LoggerHelper.Current.WriteJson(funName, strJson);
|
LoggerHelper.Current.WriteJson(funName, strJson);
|
||||||
}
|
}
|
||||||
catch (Exception ex){ }
|
catch (Exception ex){ }
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ namespace SWS.Service
|
|||||||
if (response.StatusCode != HttpStatusCode.OK)
|
if (response.StatusCode != HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] 获取数据失败, 返回HTTP代码:" + response.StatusCode;
|
string errorMsg = $"服务器地址 [{requestUri}] 获取数据失败, 返回HTTP代码:" + response.StatusCode;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
throw new HttpRequestException(errorMsg);
|
throw new HttpRequestException(errorMsg);
|
||||||
}
|
}
|
||||||
result = await response.Content.ReadAsStringAsync();
|
result = await response.Content.ReadAsStringAsync();
|
||||||
@ -89,14 +89,14 @@ namespace SWS.Service
|
|||||||
catch (JsonException)
|
catch (JsonException)
|
||||||
{
|
{
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] 解析为{typeof(T).Name}失败,原始返回数据为: " + result;
|
string errorMsg = $"服务器地址 [{requestUri}] 解析为{typeof(T).Name}失败,原始返回数据为: " + result;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
resultObj = new learunHttpRes<T>() { code = -100, info = errorMsg };
|
resultObj = new learunHttpRes<T>() { code = -100, info = errorMsg };
|
||||||
return resultObj;
|
return resultObj;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
string errorMsg = $"接口:{requestUri}失败,异常:{ex.Message} ";
|
string errorMsg = $"接口:{requestUri}失败,异常:{ex.Message} ";
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
resultObj = new learunHttpRes<T>() { code = -100, info=errorMsg };
|
resultObj = new learunHttpRes<T>() { code = -100, info=errorMsg };
|
||||||
return resultObj;
|
return resultObj;
|
||||||
}
|
}
|
||||||
@ -111,12 +111,12 @@ namespace SWS.Service
|
|||||||
//业务错误,不是http本质错误
|
//业务错误,不是http本质错误
|
||||||
default:
|
default:
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] Get失败, 返回自定义代码:" + resultObj.code;
|
string errorMsg = $"服务器地址 [{requestUri}] Get失败, 返回自定义代码:" + resultObj.code;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
throw new HttpRequestException(errorMsg);
|
throw new HttpRequestException(errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
////LoggerHelper.Current.Info($"Get成功:{requestUri}");
|
LoggerHelper.Current.Info($"Get成功:{requestUri}");
|
||||||
return resultObj;
|
return resultObj;
|
||||||
|
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ namespace SWS.Service
|
|||||||
if (response.StatusCode != HttpStatusCode.OK)
|
if (response.StatusCode != HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] 获取数据失败, 返回HTTP代码:" + response.StatusCode;
|
string errorMsg = $"服务器地址 [{requestUri}] 获取数据失败, 返回HTTP代码:" + response.StatusCode;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
throw new HttpRequestException(errorMsg);
|
throw new HttpRequestException(errorMsg);
|
||||||
}
|
}
|
||||||
result = await response.Content.ReadAsStringAsync();
|
result = await response.Content.ReadAsStringAsync();
|
||||||
@ -143,17 +143,17 @@ namespace SWS.Service
|
|||||||
catch (JsonException)
|
catch (JsonException)
|
||||||
{
|
{
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] 解析为{typeof(T).Name}失败,原始返回数据为: " + result;
|
string errorMsg = $"服务器地址 [{requestUri}] 解析为{typeof(T).Name}失败,原始返回数据为: " + result;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
throw new JsonException(errorMsg);
|
throw new JsonException(errorMsg);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
string errorMsg = $"接口:{requestUri}失败,异常:{ex.Message} ";
|
string errorMsg = $"接口:{requestUri}失败,异常:{ex.Message} ";
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
throw new JsonException(errorMsg);
|
throw new JsonException(errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
//LoggerHelper.Current.Info($"Get成功:{requestUri}");
|
LoggerHelper.Current.Info($"Get成功:{requestUri}");
|
||||||
return resultObj;
|
return resultObj;
|
||||||
|
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ namespace SWS.Service
|
|||||||
if (response.StatusCode != HttpStatusCode.OK)
|
if (response.StatusCode != HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] Post数据失败, 返回HTTP代码:" + response.StatusCode;
|
string errorMsg = $"服务器地址 [{requestUri}] Post数据失败, 返回HTTP代码:" + response.StatusCode;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
throw new HttpRequestException(errorMsg);
|
throw new HttpRequestException(errorMsg);
|
||||||
}
|
}
|
||||||
result = await response.Content.ReadAsStringAsync();
|
result = await response.Content.ReadAsStringAsync();
|
||||||
@ -194,14 +194,14 @@ namespace SWS.Service
|
|||||||
catch (JsonException)
|
catch (JsonException)
|
||||||
{
|
{
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] 解析为{typeof(T).Name}失败,原始返回数据为: " + result;
|
string errorMsg = $"服务器地址 [{requestUri}] 解析为{typeof(T).Name}失败,原始返回数据为: " + result;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
resultObj = new learunHttpRes<T>() { code = -100, info = errorMsg };
|
resultObj = new learunHttpRes<T>() { code = -100, info = errorMsg };
|
||||||
return resultObj;
|
return resultObj;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
string errorMsg = $"接口:{requestUri}失败,参数数据为:{strContent},异常:{ex.Message} ";
|
string errorMsg = $"接口:{requestUri}失败,参数数据为:{strContent},异常:{ex.Message} ";
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
resultObj = new learunHttpRes<T>() { code = -100, info = errorMsg };
|
resultObj = new learunHttpRes<T>() { code = -100, info = errorMsg };
|
||||||
return resultObj;
|
return resultObj;
|
||||||
}
|
}
|
||||||
@ -216,12 +216,12 @@ namespace SWS.Service
|
|||||||
//业务错误,不是http本质错误
|
//业务错误,不是http本质错误
|
||||||
default:
|
default:
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] Post失败, 返回自定义代码:" + resultObj.code;
|
string errorMsg = $"服务器地址 [{requestUri}] Post失败, 返回自定义代码:" + resultObj.code;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
throw new HttpRequestException(errorMsg);
|
throw new HttpRequestException(errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//LoggerHelper.Current.Info($"Post成功:{requestUri}");
|
LoggerHelper.Current.Info($"Post成功:{requestUri}");
|
||||||
return resultObj;
|
return resultObj;
|
||||||
|
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ namespace SWS.Service
|
|||||||
if (response.StatusCode != HttpStatusCode.OK)
|
if (response.StatusCode != HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] Post数据失败, 返回HTTP代码:" + response.StatusCode;
|
string errorMsg = $"服务器地址 [{requestUri}] Post数据失败, 返回HTTP代码:" + response.StatusCode;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
throw new HttpRequestException(errorMsg);
|
throw new HttpRequestException(errorMsg);
|
||||||
}
|
}
|
||||||
var result = await response.Content.ReadAsStringAsync();
|
var result = await response.Content.ReadAsStringAsync();
|
||||||
@ -257,10 +257,10 @@ namespace SWS.Service
|
|||||||
catch (JsonException)
|
catch (JsonException)
|
||||||
{
|
{
|
||||||
string errorMsg = $"服务器地址 [{requestUri}] 解析为 string 失败,原始返回数据为: " + result;
|
string errorMsg = $"服务器地址 [{requestUri}] 解析为 string 失败,原始返回数据为: " + result;
|
||||||
//LoggerHelper.Current.Error(errorMsg);
|
LoggerHelper.Current.Error(errorMsg);
|
||||||
throw new JsonException(errorMsg);
|
throw new JsonException(errorMsg);
|
||||||
}
|
}
|
||||||
//LoggerHelper.Current.Info($"Post上传文件成功:{requestUri}");
|
LoggerHelper.Current.Info($"Post上传文件成功:{requestUri}");
|
||||||
return resultObj;
|
return resultObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,10 @@ namespace SWS.Share
|
|||||||
/// system
|
/// system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string TagNumber_Lower { get; set; } = "";
|
public string TagNumber_Lower { get; set; } = "";
|
||||||
|
/// <summary>
|
||||||
|
/// 房间号
|
||||||
|
/// </summary>
|
||||||
|
public string RoomNo { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图元文件Id
|
/// 图元文件Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user