diff --git a/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref b/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref index 2fe5958e..84466716 100644 --- a/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref +++ b/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref @@ -1,5 +1,5 @@  -FD:\陈进步\项目\009\SWSDBSchemeUpgradeTool\MainWindow.xaml;; -FD:\陈进步\项目\009\SWSDBSchemeUpgradeTool\SQLPreview.xaml;; +FE:\Di-Electrical\SWSDBSchemeUpgradeTool\MainWindow.xaml;; +FE:\Di-Electrical\SWSDBSchemeUpgradeTool\SQLPreview.xaml;; diff --git a/newFront/c#前端/SWS.CAD/CADFunc/General.cs b/newFront/c#前端/SWS.CAD/CADFunc/General.cs index 4f85ae1d..21a66224 100644 --- a/newFront/c#前端/SWS.CAD/CADFunc/General.cs +++ b/newFront/c#前端/SWS.CAD/CADFunc/General.cs @@ -5,6 +5,7 @@ using Bricscad.Global; using SWS.CAD.CADFunc.Editor; using SWS.CAD.Helper; using SWS.CAD.Views.CustomControl; +using SWS.Commons; using System; using System.Collections.Generic; using System.Drawing; diff --git a/newFront/c#前端/SWS.CAD/SWS.CAD.csproj b/newFront/c#前端/SWS.CAD/SWS.CAD.csproj index 1419120f..109ea715 100644 --- a/newFront/c#前端/SWS.CAD/SWS.CAD.csproj +++ b/newFront/c#前端/SWS.CAD/SWS.CAD.csproj @@ -181,12 +181,8 @@ - - - - @@ -534,11 +530,17 @@ {51cb6f5b-16e9-4ee0-baa4-144dd1ec8580} SWS.Service + + {87E71797-E60A-4637-BA32-C8B57154ABC3} + SWS.Share + {7aff9117-78e7-4395-9f23-6dcfe09f9299} SWS.WPF - + + + \ No newline at end of file diff --git a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignPreviewViewModel.cs b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignPreviewViewModel.cs index c70099f6..559e4fb0 100644 --- a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignPreviewViewModel.cs +++ b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignPreviewViewModel.cs @@ -53,7 +53,7 @@ namespace SWS.CAD.ViewModels } private List CablePreAssigns; - public async void OnDialogOpened(IDialogParameters parameters) + public void OnDialogOpened(IDialogParameters parameters) { //title = parameters.GetValue(GlobalObject.dialogPar.title.ToString()); title = "待分配的信号预览和统计"; @@ -128,7 +128,7 @@ namespace SWS.CAD.ViewModels IDialogParameters para = new Prism.Services.Dialogs.DialogParameters(); para.Add(GlobalObject.dialogPar.para1.ToString(), PreAssignCables); var _dialogService = GlobalObject._prismContainer.Resolve(); - _dialogService.ShowDialog(nameof(DialogCablePreAssignResult), para, async (RES) => + _dialogService.ShowDialog(nameof(DialogCablePreAssignResult), para, (RES) => { if (RES.Result == ButtonResult.Yes) { @@ -182,7 +182,7 @@ namespace SWS.CAD.ViewModels /// 页面左侧按钮 /// /// - public virtual async void Button_Click(object parameter) + public virtual void Button_Click(object parameter) { if (parameter.ToString().Equals("全选")) { @@ -288,7 +288,7 @@ namespace SWS.CAD.ViewModels TagNumber = ec_Cable.TagNumber; PreAssignIOType = ec_Cable.PreAssignIOType; CableClass = ec_Cable.CableClass.Equals("homerun") ? "是" : "否"; - ToPanel_TagNumber = ec_Cable.ToPanel != null ? ec_Cable.ToPanel.TagNumber : null; + ToPanel_TagNumber = ec_Cable.AssignedPanel != null ? ec_Cable.AssignedPanel.TagNumber : null; } #endregion diff --git a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignResultViewModel.cs b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignResultViewModel.cs index a7b1498b..af171f8f 100644 --- a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignResultViewModel.cs +++ b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignResultViewModel.cs @@ -108,6 +108,7 @@ namespace SWS.CAD.ViewModels public override async void ExecuteOKCommandAsync(object para) { + //只传入分配成功的电缆 var Cables = new List(); if (AllPreAssignCables != null) { @@ -153,7 +154,7 @@ namespace SWS.CAD.ViewModels { foreach (var PreAssignCable in AllPreAssignCables) { - if (PreAssignCable.Sets != null && !string.IsNullOrEmpty(PreAssignCable.Sets.FirstOrDefault().ConnectionInfo)) + if (PreAssignCable.AssignedPanel!=null) { PreAssignCables.Add(PreAssignCable); } @@ -163,7 +164,7 @@ namespace SWS.CAD.ViewModels { foreach (var PreAssignCable in AllPreAssignCables) { - if (PreAssignCable.Sets == null || string.IsNullOrEmpty(PreAssignCable.Sets.FirstOrDefault().ConnectionInfo)) + if (PreAssignCable.AssignedPanel == null) { PreAssignCables.Add(PreAssignCable); } @@ -179,14 +180,14 @@ namespace SWS.CAD.ViewModels PreAllocationResultls = new ObservableCollection(); if (cable == null) return; - if (cable.Sets != null) + if (cable.AssignedPanel != null) { foreach (var Set in cable.Sets) { PreAllocationResult preAllocationResult = new PreAllocationResult(); preAllocationResult.CablePair = Set.CableSetName; preAllocationResult.IOType = cable.PreAssignIOType; - preAllocationResult.ToPanel_TagNumber = cable.ToPanel == null ? "" : cable.ToPanel.TagNumber; + preAllocationResult.ToPanel_TagNumber = cable.AssignedPanel == null ? "" : cable.AssignedPanel.TagNumber; preAllocationResult.Panel_TagNumber = string.IsNullOrEmpty(Set.ConnectionInfo) ? "" : Set.ConnectionInfo.Split('/')[0].Split(':')[1].Trim(); preAllocationResult.StripName = string.IsNullOrEmpty(Set.ConnectionInfo) ? "" : Set.ConnectionInfo.Split('/')[1].Split(':')[1].Trim(); preAllocationResult.Terms = new ObservableCollection(Set.AssignedTerms); @@ -220,7 +221,9 @@ namespace SWS.CAD.ViewModels public string CablePair { get { return _CablePair; } - set { _CablePair = value; } + set { _CablePair = value; + RaisePropertyChanged(nameof(CablePair)); + } } private string _IOType; @@ -230,7 +233,9 @@ namespace SWS.CAD.ViewModels public string IOType { get { return _IOType; } - set { _IOType = value; } + set { _IOType = value; + RaisePropertyChanged(nameof(IOType)); + } } @@ -241,7 +246,9 @@ namespace SWS.CAD.ViewModels public string ToPanel_TagNumber { get { return _ToPanel_TagNumber; } - set { _ToPanel_TagNumber = value; } + set { _ToPanel_TagNumber = value; + RaisePropertyChanged(nameof(ToPanel_TagNumber)); + } } private string _Panel_TagNumber; @@ -251,7 +258,9 @@ namespace SWS.CAD.ViewModels public string Panel_TagNumber { get { return _Panel_TagNumber; } - set { _Panel_TagNumber = value; } + set { _Panel_TagNumber = value; + RaisePropertyChanged(nameof(Panel_TagNumber)); + } } private string _StripName; @@ -261,7 +270,9 @@ namespace SWS.CAD.ViewModels public string StripName { get { return _StripName; } - set { _StripName = value; } + set { _StripName = value; + RaisePropertyChanged(nameof(StripName)); + } } private ObservableCollection _Terms; @@ -271,7 +282,9 @@ namespace SWS.CAD.ViewModels public ObservableCollection Terms { get { return _Terms; } - set { _Terms = value; } + set { _Terms = value; + RaisePropertyChanged(nameof(Terms)); + } } diff --git a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogIODistributionViewModel.cs b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogIODistributionViewModel.cs index f0f93dd9..935edecd 100644 --- a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogIODistributionViewModel.cs +++ b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogIODistributionViewModel.cs @@ -410,7 +410,7 @@ namespace SWS.CAD.ViewModels #endregion #region 改变关联和解除信号按钮的可用状态 - private async void UpdateButtonEnabled() + private void UpdateButtonEnabled() { if (SelectedChannelInfo != null) { @@ -2723,7 +2723,7 @@ namespace SWS.CAD.ViewModels IDialogParameters para = new Prism.Services.Dialogs.DialogParameters(); para.Add(GlobalObject.dialogPar.para1.ToString(), PreAssignCables); var _dialogService = GlobalObject._prismContainer.Resolve(); - _dialogService.ShowDialog(nameof(DialogCablePreAssignPreview), para, async (RES) => + _dialogService.ShowDialog(nameof(DialogCablePreAssignPreview), para, (RES) => { if (RES.Result == ButtonResult.Yes) { diff --git a/newFront/c#前端/SWS.CAD/ViewModels/DialogSignalPredistributionViewModel.cs b/newFront/c#前端/SWS.CAD/ViewModels/DialogSignalPredistributionViewModel.cs index 8f100e4e..5b96a500 100644 --- a/newFront/c#前端/SWS.CAD/ViewModels/DialogSignalPredistributionViewModel.cs +++ b/newFront/c#前端/SWS.CAD/ViewModels/DialogSignalPredistributionViewModel.cs @@ -22,6 +22,9 @@ using Unity; namespace SWS.CAD.ViewModels { + /// + /// 信号预分配页面的模型类 + /// public class DialogSignalPredistributionViewModel : DialogBase, IDialogAware { #region 字段 diff --git a/newFront/c#前端/SWS.CAD/ViewModels/LeftPanelViewModel.cs b/newFront/c#前端/SWS.CAD/ViewModels/LeftPanelViewModel.cs index ec98813f..89930e29 100644 --- a/newFront/c#前端/SWS.CAD/ViewModels/LeftPanelViewModel.cs +++ b/newFront/c#前端/SWS.CAD/ViewModels/LeftPanelViewModel.cs @@ -506,7 +506,7 @@ namespace SWS.CAD.ViewModels foreach (var id in listObjectTypeId) { //获取节点 - Model.TreeModel node = Helper.TreeHelper.GetTreeModel(GlobalObject.objectTypeTree, id); + Model.TreeModel node = TreeHelper.GetTreeModel(GlobalObject.objectTypeTree, id); if (node != null) { var node1 = (Model.TreeModel)node.Clone(); @@ -531,7 +531,7 @@ namespace SWS.CAD.ViewModels GlobalObject.AllDwgName.Clear(); foreach (var dwg in Drawings) { - Helper.TreeHelper.GetTreeText(dwg); + TreeHelper.GetTreeText(dwg); } #endregion @@ -1975,7 +1975,7 @@ namespace SWS.CAD.ViewModels foreach (var dto in historyDrawingsTree) { //获取节点下的图纸 - node = Helper.TreeHelper.GetTreeModel(dto, item.DrawingFileID); + node = TreeHelper.GetTreeModel(dto, item.DrawingFileID); if (node != null) { break; @@ -2283,7 +2283,7 @@ namespace SWS.CAD.ViewModels if (string.IsNullOrEmpty(strRecentObjectType)) { //获取节点 - Model.TreeModel node = Helper.TreeHelper.GetTreeModel(GlobalObject.objectTypeTree, selectType.ID); + Model.TreeModel node = TreeHelper.GetTreeModel(GlobalObject.objectTypeTree, selectType.ID); var addNode = (Model.TreeModel)node.Clone(); var firstNode = objectTypeTree[0]; //UI添加到最近使用 @@ -2304,7 +2304,7 @@ namespace SWS.CAD.ViewModels } listObjectTypeId.Insert(0, selectType.ID); //获取节点 - Model.TreeModel node = Helper.TreeHelper.GetTreeModel(GlobalObject.objectTypeTree, selectType.ID); + Model.TreeModel node = TreeHelper.GetTreeModel(GlobalObject.objectTypeTree, selectType.ID); var addNode = (Model.TreeModel)node.Clone(); firstNode.ChildNodes.Insert(0, addNode);//UI添加到最近使用 ids = string.Join(",", listObjectTypeId); diff --git a/newFront/c#前端/SWS.CAD/ViewModels/NewDrawingViewModel.cs b/newFront/c#前端/SWS.CAD/ViewModels/NewDrawingViewModel.cs index 72fc86f9..8c032e26 100644 --- a/newFront/c#前端/SWS.CAD/ViewModels/NewDrawingViewModel.cs +++ b/newFront/c#前端/SWS.CAD/ViewModels/NewDrawingViewModel.cs @@ -254,7 +254,7 @@ namespace SWS.CAD.ViewModels //所属系统下拉框 foreach (var item in dwgSystem) { - var node = Helper.TreeHelper.GetTreeModel(item, dwgFile.DrawingSystem); + var node = TreeHelper.GetTreeModel(item, dwgFile.DrawingSystem); if (node != null) { SelectedSystemItem = node; @@ -264,7 +264,7 @@ namespace SWS.CAD.ViewModels //图纸目录下拉框 foreach (var item in dwgCatalogueID) { - var node = Helper.TreeHelper.GetTreeModel(item, dwgFile.DrawingCatalogueID); + var node = TreeHelper.GetTreeModel(item, dwgFile.DrawingCatalogueID); if (node != null) { SelectedCatalogueIDItem = node; @@ -476,7 +476,7 @@ namespace SWS.CAD.ViewModels foreach (var catalogueId in tempCatalogueID) { //遍历获取当前节点数据 - node = Helper.TreeHelper.GetTreeModel(catalogueId, dwgNode.ID); + node = TreeHelper.GetTreeModel(catalogueId, dwgNode.ID); if (node != null) { break; } } diff --git a/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogCablePreAssignResult.xaml b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogCablePreAssignResult.xaml index 27116793..b7e290ff 100644 --- a/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogCablePreAssignResult.xaml +++ b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogCablePreAssignResult.xaml @@ -92,7 +92,13 @@ ShowGroupPanel="False" telerik:StyleManager.Theme="Office_Blue" ItemsSource="{Binding PreAllocationResultls}" SelectedItem="{Binding SelectedChannelInfo, Mode=TwoWay}" > - + + + + diff --git a/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogIODistribution.xaml b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogIODistribution.xaml index d9d29926..2efec14a 100644 --- a/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogIODistribution.xaml +++ b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogIODistribution.xaml @@ -241,7 +241,7 @@ - + @@ -364,135 +364,135 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + - - - + + + + + - - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + - - - - + + + - - - - + + + + - - - + + + diff --git a/newFront/c#前端/SWS.CAD/Views/Dialog/DialogSectionBox.xaml b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogSectionBox.xaml new file mode 100644 index 00000000..df6bae5f --- /dev/null +++ b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogSectionBox.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/newFront/c#前端/SWS.CAD/Views/Dialog/DialogSectionBox.xaml.cs b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogSectionBox.xaml.cs new file mode 100644 index 00000000..c608167c --- /dev/null +++ b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogSectionBox.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace SWS.CAD.Views.Dialog +{ + /// + /// DialogSectionBox.xaml 的交互逻辑 + /// + public partial class DialogSectionBox : UserControl + { + public DialogSectionBox() + { + InitializeComponent(); + } + } +} diff --git a/newFront/c#前端/SWS.CAD/Views/Login.xaml b/newFront/c#前端/SWS.CAD/Views/Login.xaml index d78fbf72..c7c8fc51 100644 --- a/newFront/c#前端/SWS.CAD/Views/Login.xaml +++ b/newFront/c#前端/SWS.CAD/Views/Login.xaml @@ -4,8 +4,8 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:local="clr-namespace:SWS.CAD.Views.CustomControl" - xmlns:local2="clr-namespace:SWS.CAD.Helper" - xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" + xmlns:local2="clr-namespace:SWS.Commons;assembly=SWS.Commons" + xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Width="300" Height="250" AllowsTransparency="True" diff --git a/newFront/c#前端/SWS.CAD/Views/Style/CustomStyles.xaml b/newFront/c#前端/SWS.CAD/Views/Style/CustomStyles.xaml index 223f6291..0a8922b5 100644 --- a/newFront/c#前端/SWS.CAD/Views/Style/CustomStyles.xaml +++ b/newFront/c#前端/SWS.CAD/Views/Style/CustomStyles.xaml @@ -39,6 +39,10 @@ + + + +