Merge branch 'main' of http://27.154.35.18:7053/yuxingheng/009_DI-Elec
This commit is contained in:
commit
28f0461113
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
################################################################################
|
||||
################################################################################
|
||||
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
|
||||
################################################################################
|
||||
# 忽略所有bin文件夹及其内容
|
||||
@ -1099,3 +1099,4 @@ bin/release/
|
||||
/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Util/Learun.Util/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
|
||||
newFront/c#前端/.vs/
|
||||
|
BIN
.vs/Di-Electrical/v17/.wsuo
Normal file
BIN
.vs/Di-Electrical/v17/.wsuo
Normal file
Binary file not shown.
41
.vs/Di-Electrical/v17/DocumentLayout.json
Normal file
41
.vs/Di-Electrical/v17/DocumentLayout.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "E:\\Di-Electrical\\",
|
||||
"Documents": [],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 203,
|
||||
"SelectedChildIndex": -1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{f2e84780-2af1-11d1-a7fa-00a0c9110051}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:1787071360:0:{81164725-9a96-4ece-a4cb-440d8fd285e5}"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DockedWidth": 197,
|
||||
"SelectedChildIndex": -1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:1:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/DI-Electrical;component/Style/CustomStyles.xaml" />
|
||||
<ResourceDictionary Source="/SWS.WPF;component/Style/CustomStyles.xaml" />
|
||||
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
using System.Windows;
|
||||
using DI_Electrical.Helper;
|
||||
using DI_Electrical.Services;
|
||||
using DI_Electrical.ViewModels;
|
||||
using DI_Electrical.Views;
|
||||
using DI_Electrical.Views.Dialog;
|
||||
using DI_Electrical.Views.Dialog.DialogSignalManagements;
|
||||
using Prism.Events;
|
||||
using Prism.Ioc;
|
||||
using Prism.Services.Dialogs;
|
||||
using Prism.Unity;
|
||||
using SWS.Commons;
|
||||
using SWS.Service;
|
||||
using SWS.WPF.ViewModels;
|
||||
using SWS.WPF.Views;
|
||||
using Unity;
|
||||
|
||||
namespace DI_Electrical
|
||||
@ -16,23 +16,23 @@ namespace DI_Electrical
|
||||
/// <summary>
|
||||
/// App.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class App : PrismApplication
|
||||
public partial class App : Prism.Unity.PrismApplication
|
||||
{
|
||||
protected override Window CreateShell()
|
||||
{
|
||||
return Container.Resolve<MainWindow>();
|
||||
return GlobalObject._prismContainer.Resolve<MainWindow>();
|
||||
}
|
||||
|
||||
protected override void InitializeShell(Window shell)
|
||||
{
|
||||
var login = Container.Resolve<Login>();
|
||||
var login = GlobalObject._prismContainer.Resolve<Login>();
|
||||
login.ShowDialog();
|
||||
if (GlobalObject.userInfo == null)
|
||||
{
|
||||
Application.Current?.Shutdown();
|
||||
return;
|
||||
}
|
||||
var project = Container.Resolve<Project>();
|
||||
var project = GlobalObject._prismContainer.Resolve<Views.Project>();
|
||||
project.ShowDialog();
|
||||
if (GlobalObject.curProject == null)
|
||||
{
|
||||
@ -45,26 +45,32 @@ namespace DI_Electrical
|
||||
|
||||
protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
containerRegistry.RegisterForNavigation<MainWindow, MainWindowViewModel>();
|
||||
containerRegistry.RegisterForNavigation<Login, LoginViewModel>();
|
||||
containerRegistry.RegisterForNavigation<Config, ConfigViewModel>();
|
||||
containerRegistry.RegisterForNavigation<Project, ProjectViewModel>();
|
||||
containerRegistry.RegisterDialog<DialogTest, DialogTestViewModel>();
|
||||
containerRegistry.RegisterDialog<DialogSignalManagement, DialogSignalManagementViewModel>();
|
||||
containerRegistry.RegisterDialog<DialogSignalNotice, DialogSignalNoticeViewModel>();
|
||||
containerRegistry.RegisterDialog<DialogSignalPropertyhisAndLogs, DialogSignalPropertyhisAndLogsViewModel>();
|
||||
containerRegistry.RegisterDialog<DialogSignalSelect, DialogSignalSelectViewModel>();
|
||||
containerRegistry.RegisterDialog<DialogInput, DialogInputViewModel>();
|
||||
//GlobalObject._prismContainer = new DryIocContainerExtension();
|
||||
GlobalObject._prismContainer = (IContainerExtension)containerRegistry;
|
||||
|
||||
containerRegistry.Register<IDialogService, DialogService>();
|
||||
GlobalObject._prismContainer.RegisterForNavigation<MainWindow, MainWindowViewModel>();
|
||||
GlobalObject._prismContainer.RegisterForNavigation<Login, LoginViewModel>();
|
||||
GlobalObject._prismContainer.RegisterForNavigation<Config, ConfigViewModel>();
|
||||
GlobalObject._prismContainer.RegisterForNavigation<Views.Project, ViewModels.ProjectViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogTest, DialogTestViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalManagement, DialogSignalManagementViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalNotice, DialogSignalNoticeViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalPropertyhisAndLogs, DialogSignalPropertyhisAndLogsViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalSelect, DialogSignalSelectViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogAllOutputSignal, DialogAllOutputSignalViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogInput, DialogInputViewModel>();
|
||||
|
||||
containerRegistry.RegisterSingleton<IEventAggregator, EventAggregator>();
|
||||
containerRegistry.RegisterSingleton<HttpService>();
|
||||
containerRegistry.RegisterSingleton<ConfigService>();
|
||||
containerRegistry.RegisterSingleton<LoginService>();
|
||||
containerRegistry.RegisterSingleton<UserService>();
|
||||
containerRegistry.RegisterSingleton<DataItemService>();
|
||||
containerRegistry.RegisterSingleton<WireGroupService>();
|
||||
GlobalObject._prismContainer.Register<IDialogService, DialogService>();
|
||||
|
||||
GlobalObject.container = new UnityContainer();
|
||||
GlobalObject.container.RegisterSingleton<IEventAggregator, EventAggregator>();
|
||||
GlobalObject.container.RegisterSingleton<HttpService>();
|
||||
GlobalObject.container.RegisterSingleton<ConfigService>();
|
||||
GlobalObject.container.RegisterSingleton<LoginService>();
|
||||
GlobalObject.container.RegisterSingleton<UserService>();
|
||||
GlobalObject.container.RegisterSingleton<ProjectService>();
|
||||
GlobalObject.container.RegisterSingleton<DataItemService>();
|
||||
GlobalObject.container.RegisterSingleton<WireGroupService>();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,8 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DryIoc, Version=5.4.3.0, Culture=neutral, PublicKeyToken=dfbf2bd50fcf7768, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DryIoc.dll.5.4.3\lib\net45\DryIoc.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\DryIoc.dll.4.7.7\lib\net45\DryIoc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EasyEncryption">
|
||||
<HintPath>..\packages\EasyEncryption.1.0.2\lib\EasyEncryption.dll</HintPath>
|
||||
@ -140,40 +141,9 @@
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Event\loginEvent.cs" />
|
||||
<Compile Include="GlobalObject.cs" />
|
||||
<Compile Include="Helper\ConfigService.cs" />
|
||||
<Compile Include="Helper\Converter\CollectionToStringConverter.cs" />
|
||||
<Compile Include="Helper\Converter\RadGridViewRowToBoolConverter.cs" />
|
||||
<Compile Include="Helper\Converter\StatusToColourConverter.cs" />
|
||||
<Compile Include="Helper\FileHelper.cs" />
|
||||
<Compile Include="Helper\LoggerHelper.cs" />
|
||||
<Compile Include="Model\ec_dataitemdetail.cs" />
|
||||
<Compile Include="Model\ec_project.cs" />
|
||||
<Compile Include="Model\ec_Wire_Group.cs" />
|
||||
<Compile Include="Model\ec_wire_group_log.cs" />
|
||||
<Compile Include="Model\ec_wire_group_notice.cs" />
|
||||
<Compile Include="Model\ec_wire_group_propertyhis.cs" />
|
||||
<Compile Include="Model\NoEntity\ConfigIni.cs" />
|
||||
<Compile Include="Model\NoEntity\learunHttpRes.cs" />
|
||||
<Compile Include="Model\NoEntity\loginRes.cs" />
|
||||
<Compile Include="Model\NoEntity\PageModel.cs" />
|
||||
<Compile Include="Model\user.cs" />
|
||||
<Compile Include="Services\DataItemService.cs" />
|
||||
<Compile Include="Services\HttpService.cs" />
|
||||
<Compile Include="Services\LoginService.cs" />
|
||||
<Compile Include="Services\ProjectService.cs" />
|
||||
<Compile Include="Services\UserService.cs" />
|
||||
<Compile Include="Services\WireGroupService.cs" />
|
||||
<Compile Include="Style\StyleSelectors\ConditionalStyleSelector.cs" />
|
||||
<Compile Include="Style\StyleSelectors\SignalNoticeStyleSelector.cs" />
|
||||
<Compile Include="GlobalObj.cs" />
|
||||
<Compile Include="ViewModels\ConfigViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogInputViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogSignalManagementVM\DialogSignalManagementViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogSignalManagementVM\DialogSignalNoticeViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogSignalManagementVM\DialogSignalPropertyhisAndLogsViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogSignalManagementVM\DialogSignalSelectViewModel.cs" />
|
||||
<Compile Include="ViewModels\LoginViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogTestViewModel.cs" />
|
||||
<Compile Include="ViewModels\myViewModelBase\DialogBase.cs" />
|
||||
<Compile Include="ViewModels\ProjectViewModel.cs" />
|
||||
<Compile Include="Views\Config.xaml.cs">
|
||||
@ -182,7 +152,6 @@
|
||||
<Compile Include="Views\CustomControl\customWindowTitleBar.xaml.cs">
|
||||
<DependentUpon>customWindowTitleBar.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helper\PasswordHelper.cs" />
|
||||
<Compile Include="ViewModels\MainWindowViewModel.cs" />
|
||||
<Compile Include="Views\CustomControl\IconButton\IconButton.cs" />
|
||||
<Compile Include="Views\CustomControl\MultiSelectSearchComboBox\CollectionToStringConverter.cs" />
|
||||
@ -195,24 +164,6 @@
|
||||
<Compile Include="Views\CustomControl\MultiSelectSearchComboBox\SmallPanel.cs" />
|
||||
<Compile Include="Views\CustomControl\MultiSelectSearchComboBox\WDBorder.cs" />
|
||||
<Compile Include="Views\CustomControl\MultiSelectSearchComboBox\Win32.cs" />
|
||||
<Compile Include="Views\Dialog\DialogInput.xaml.cs">
|
||||
<DependentUpon>DialogInput.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Dialog\DialogSignalManagements\DialogSignalManagement.xaml.cs">
|
||||
<DependentUpon>DialogSignalManagement.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Dialog\DialogSignalManagements\DialogSignalNotice.xaml.cs">
|
||||
<DependentUpon>DialogSignalNotice.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Dialog\DialogSignalManagements\DialogSignalPropertyhisAndLogs.xaml.cs">
|
||||
<DependentUpon>DialogSignalPropertyhisAndLogs.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Dialog\DialogSignalManagements\DialogSignalSelect.xaml.cs">
|
||||
<DependentUpon>DialogSignalSelect.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Dialog\DialogTest.xaml.cs">
|
||||
<DependentUpon>DialogTest.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Login.xaml.cs">
|
||||
<DependentUpon>Login.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -253,7 +204,28 @@
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SWS.Commons\SWS.Commons.csproj">
|
||||
<Project>{9ac724f6-883d-4357-9422-602748f25b69}</Project>
|
||||
<Name>SWS.Commons</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SWS.CustomControl\SWS.CustomControl.csproj">
|
||||
<Project>{2dcf996e-063b-4b95-8530-28f6df0da58a}</Project>
|
||||
<Name>SWS.CustomControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SWS.Model\SWS.Model.csproj">
|
||||
<Project>{1995385b-d1b0-4c55-835e-d3e769972a6a}</Project>
|
||||
<Name>SWS.Model</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SWS.Service\SWS.Service.csproj">
|
||||
<Project>{51cb6f5b-16e9-4ee0-baa4-144dd1ec8580}</Project>
|
||||
<Name>SWS.Service</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SWS.WPF\SWS.WPF.csproj">
|
||||
<Project>{7aff9117-78e7-4395-9f23-6dcfe09f9299}</Project>
|
||||
<Name>SWS.WPF</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="Views\Config.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
@ -263,34 +235,6 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Style\CustomStyles.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Dialog\DialogInput.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\Dialog\DialogSignalManagements\DialogSignalManagement.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\Dialog\DialogSignalManagements\DialogSignalNotice.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Dialog\DialogSignalManagements\DialogSignalPropertyhisAndLogs.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Dialog\DialogSignalManagements\DialogSignalSelect.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Dialog\DialogTest.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\Login.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
55
newFront/c#前端/DI-Electrical/GlobalObj.cs
Normal file
55
newFront/c#前端/DI-Electrical/GlobalObj.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using IniParser;
|
||||
using Prism.Ioc;
|
||||
using SWS.Model;
|
||||
using Unity;
|
||||
|
||||
namespace DI_Electrical
|
||||
{
|
||||
public class GlobalObj
|
||||
{
|
||||
public static loginRes userInfo;
|
||||
public static HttpClient client;
|
||||
public static bool isConfigIniCreateBySys = true;
|
||||
public static List<User> Users;
|
||||
public static ec_project curProject;
|
||||
public static string ConfigPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Config.ini");
|
||||
public static IUnityContainer container;
|
||||
#region 本地文件目录
|
||||
static string _LocalFileDirectory;
|
||||
/// <summary>
|
||||
/// 获取本地目录文件夹
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetLocalFileDirectory()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_LocalFileDirectory))
|
||||
{
|
||||
FileIniDataParser parser = new FileIniDataParser();
|
||||
var data = parser.ReadFile(ConfigPath);
|
||||
_LocalFileDirectory = data["Profile"]["Directory"];
|
||||
return _LocalFileDirectory;
|
||||
}
|
||||
else
|
||||
{ return _LocalFileDirectory; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置本地目录文件夹
|
||||
/// </summary>
|
||||
/// <param name="dir">文件夹目录</param>
|
||||
public static void SetLocalFileDirectory(string dir)
|
||||
{ _LocalFileDirectory = dir; }
|
||||
#endregion
|
||||
public enum dialogPar
|
||||
{
|
||||
id,
|
||||
title,
|
||||
info,
|
||||
para1,
|
||||
para2
|
||||
}
|
||||
}
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using DI_Electrical.Services;
|
||||
using IniParser;
|
||||
|
||||
namespace DI_Electrical.Helper
|
||||
{
|
||||
public class ConfigService
|
||||
{
|
||||
//public string path = Environment.ExpandEnvironmentVariables(@"%USERPROFILE%\AppData\Roaming\SWS\Config.ini");
|
||||
public string path = GlobalObject.ConfigPath;// Path.Combine(AppDomain.CurrentDomain.BaseDirectory,@"\Config.ini");
|
||||
public FileIniDataParser parser = new FileIniDataParser();
|
||||
public HttpService _httpService;
|
||||
/// <summary>
|
||||
/// config.ini 给默认值,且创建出来
|
||||
/// </summary>
|
||||
void SetDefaultConfigValue()
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
//默认值
|
||||
var data = parser.Parser.Parse("");
|
||||
data["Profile"]["Address"] = "1.117.161.11";
|
||||
data["Profile"]["Port"] = "8080";
|
||||
string userProfilePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||
|
||||
data["Profile"]["Directory"] = $"{userProfilePath}\\AppData\\Roaming\\SWS";
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
parser.WriteFile(path, data);
|
||||
GlobalObject.isConfigIniCreateBySys = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalObject.isConfigIniCreateBySys = false;
|
||||
}
|
||||
}
|
||||
public ConfigService(HttpService httpService)
|
||||
{
|
||||
_httpService = httpService;
|
||||
SetDefaultConfigValue();
|
||||
string address;
|
||||
int port;
|
||||
string locDrawingPath;
|
||||
Read(out address, out port,out locDrawingPath);
|
||||
_httpService.Init(address, port);
|
||||
}
|
||||
public void Read(out string address, out int port, out string directory)
|
||||
{
|
||||
var data = parser.ReadFile(path);
|
||||
address = data["Profile"]["Address"];
|
||||
port = int.Parse(data["Profile"]["Port"]);
|
||||
directory = data["Profile"]["Directory"];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询某个
|
||||
/// </summary>
|
||||
/// <param name="keyName"></param>
|
||||
/// <returns></returns>
|
||||
public string Read(string keyName)
|
||||
{
|
||||
var data = parser.ReadFile(path);
|
||||
return data["Profile"][keyName];
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询某个
|
||||
/// </summary>
|
||||
/// <param name="session">节点</param>
|
||||
/// <param name="keyName">key名称</param>
|
||||
/// <returns></returns>
|
||||
public string Read(string session,string keyName)
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = parser.ReadFile(path);
|
||||
return data[session][keyName];
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存某个
|
||||
/// </summary>
|
||||
/// <param name="keyName"></param>
|
||||
/// <param name="value"></param>
|
||||
public void Save(string keyName, string value)
|
||||
{
|
||||
var data = parser.ReadFile(path);
|
||||
data["Profile"][keyName] = value;
|
||||
parser.WriteFile(path, data);
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存某个值
|
||||
/// </summary>
|
||||
/// <param name="session">节点</param>
|
||||
/// <param name="keyName">key名称</param>
|
||||
/// <param name="value">值</param>
|
||||
public void Save(string session, string keyName, string value)
|
||||
{
|
||||
var data = parser.ReadFile(path);
|
||||
data[session][keyName] = value;
|
||||
parser.WriteFile(path, data);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using DI_Electrical.Models;
|
||||
|
||||
namespace DI_Electrical.Helper.Converter
|
||||
{
|
||||
public class CollectionToStringConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
ObservableCollection<ec_dataitemdetail> WHCPUs = value as ObservableCollection<ec_dataitemdetail>;
|
||||
if (WHCPUs != null)
|
||||
{
|
||||
string sWHCPU = "";
|
||||
for (int i = 0; i < WHCPUs.Count; i++)
|
||||
{
|
||||
if (i!= WHCPUs.Count-1)
|
||||
{
|
||||
if (WHCPUs[i] != null)
|
||||
{
|
||||
sWHCPU = sWHCPU + WHCPUs[i].DataItemCode + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (WHCPUs[i] != null)
|
||||
{
|
||||
sWHCPU = sWHCPU + WHCPUs[i].DataItemCode;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return sWHCPU;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using DI_Electrical.ViewModels;
|
||||
|
||||
namespace DI_Electrical.Helper.Converter
|
||||
{
|
||||
public class RadGridViewRowToBoolConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
SignalManagementInfo smif = value as SignalManagementInfo;
|
||||
if (smif != null)
|
||||
{
|
||||
if (smif.Status.Equals("deleted") || smif.Status.Equals("Confirmed"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (smif.type.Equals("信号"))
|
||||
{
|
||||
switch (parameter.ToString())
|
||||
{
|
||||
case "关联的电缆信息":
|
||||
case "关联的通道信息":
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (parameter.ToString())
|
||||
{
|
||||
case "组别":
|
||||
case "编码":
|
||||
case "信号类型":
|
||||
case "Min":
|
||||
case "Max":
|
||||
case "单位":
|
||||
case "CODE":
|
||||
case "设备名":
|
||||
case "关联的电缆信息":
|
||||
case "关联的通道信息":
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using DI_Electrical.ViewModels;
|
||||
|
||||
namespace DI_Electrical.Helper.Converter
|
||||
{
|
||||
internal class StatusToColourConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
SignalManagementInfo smif = value as SignalManagementInfo;
|
||||
if (smif != null)
|
||||
{
|
||||
return smif.Status;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,118 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Dl_Electrical.Helper
|
||||
{
|
||||
public static class FileHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// dwg等文件名是否合法。不带后缀
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsValidFileName(string fileName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// 获取 Windows 文件系统中不允许出现在文件名中的字符数组
|
||||
char[] invalidChars = Path.GetInvalidFileNameChars();
|
||||
|
||||
// 检查文件名中是否包含非法字符
|
||||
foreach (char c in invalidChars)
|
||||
{
|
||||
if (fileName.IndexOf(c) >= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 检查是否为保留文件名
|
||||
string[] reservedNames = { "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9" };
|
||||
string trimmedFileName = Path.GetFileNameWithoutExtension(fileName).Trim().ToUpper();
|
||||
foreach (string reservedName in reservedNames)
|
||||
{
|
||||
if (trimmedFileName == reservedName)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 检查文件名是否以空格或句点结尾
|
||||
if (fileName.TrimEnd().Length != fileName.Length || fileName.TrimEnd('.').Length != fileName.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public static string GetFileMD5(string filePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath) || !File.Exists(filePath))
|
||||
{
|
||||
throw new ArgumentException("文件路径无效或文件不存在", nameof(filePath));
|
||||
}
|
||||
|
||||
using (var md5 = MD5.Create()) // 创建 MD5 哈希算法实例
|
||||
using (var stream = File.OpenRead(filePath)) // 打开文件流
|
||||
{
|
||||
// 计算文件的 MD5 值
|
||||
byte[] hashBytes = md5.ComputeHash(stream);
|
||||
|
||||
// 将字节数组转换为十六进制字符串
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (var b in hashBytes)
|
||||
{
|
||||
sb.Append(b.ToString("x2")); // x2 格式化为两位小写十六进制数
|
||||
}
|
||||
|
||||
return sb.ToString(); // 返回 MD5 值的字符串
|
||||
}
|
||||
}
|
||||
|
||||
#region 检查文件是否被其他进程占用
|
||||
/// <summary>
|
||||
/// 检查文件是否被其他进程占用
|
||||
/// </summary>
|
||||
public static bool IsFileLocked(string filePath)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 尝试以独占模式打开文件
|
||||
using (FileStream fs = File.Open(
|
||||
filePath,
|
||||
FileMode.Open,
|
||||
FileAccess.ReadWrite,
|
||||
FileShare.None)) // FileShare.None 表示禁止共享
|
||||
{
|
||||
return false; // 成功打开则未被占用
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// 检查特定错误码
|
||||
int errorCode = Marshal.GetHRForException(ex) & 0xFFFF;
|
||||
return errorCode == 32 || errorCode == 33; // 32: 共享冲突, 33: 进程锁定
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
return true; // 无权限访问(可能被占用)
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false; // 其他异常视为未被占用
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,145 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Dl_Electrical.Helper;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace DI_Electrical.Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// nLog使用帮助类
|
||||
/// </summary>
|
||||
public class LoggerHelper
|
||||
{
|
||||
private static readonly log4net.ILog loginfo = log4net.LogManager.GetLogger("loginfo");
|
||||
private static readonly log4net.ILog logerror = log4net.LogManager.GetLogger("logerror");
|
||||
private static readonly log4net.ILog logdebug = log4net.LogManager.GetLogger("logdebug");
|
||||
private static readonly log4net.ILog logwarn = log4net.LogManager.GetLogger("logwarn");
|
||||
private static readonly log4net.ILog logfatal = log4net.LogManager.GetLogger("logfatal");
|
||||
|
||||
private static LoggerHelper _obj = null;
|
||||
private static string logPath = string.Empty;
|
||||
private LoggerHelper()
|
||||
{
|
||||
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
|
||||
string dllPath = codeBase.Replace("file:///", "");
|
||||
dllPath = Path.GetDirectoryName(dllPath);
|
||||
logPath = Path.Combine(dllPath, "Logs\\");
|
||||
var configFile = new FileInfo(Path.Combine(dllPath, "log4net.config"));
|
||||
log4net.Config.XmlConfigurator.ConfigureAndWatch(configFile);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取当前的日志记录<see cref="LoggerHelper"/>对象。
|
||||
/// </summary>
|
||||
public static LoggerHelper Current
|
||||
{
|
||||
get => _obj ?? (new LoggerHelper());
|
||||
set => _obj = value;
|
||||
}
|
||||
|
||||
#region Debug,调试
|
||||
/// <summary>
|
||||
/// 调试信息输出。
|
||||
/// </summary>
|
||||
/// <param name="msg">需要记录的信息。</param>
|
||||
public void Debug(string msg)
|
||||
{
|
||||
logdebug.Debug(msg);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Info,信息
|
||||
/// <summary>
|
||||
/// 普通信息输出。
|
||||
/// </summary>
|
||||
/// <param name="msg">需要记录的信息。</param>
|
||||
public void Info(string msg)
|
||||
{
|
||||
loginfo.Info(msg);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Warn,警告
|
||||
/// <summary>
|
||||
/// 警告级别信息输出。
|
||||
/// </summary>
|
||||
/// <param name="msg">需要记录的信息。</param>
|
||||
public void Warn(string msg)
|
||||
{
|
||||
logwarn.Warn(msg);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Error,错误
|
||||
/// <summary>
|
||||
/// 错误级别信息输出。
|
||||
/// </summary>
|
||||
/// <param name="msg">需要记录的信息。</param>
|
||||
public void Error(string msg)
|
||||
{
|
||||
logerror.Error("----------------------------Error BEGIN------------------------------");
|
||||
logerror.Error(msg);
|
||||
logerror.Error("-----------------------------Error END-------------------------------");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Fatal,致命错误
|
||||
/// <summary>
|
||||
/// 致命错误级别信息输出。
|
||||
/// </summary>
|
||||
/// <param name="msg">需要记录的信息。</param>
|
||||
/// <param name="err">需要记录的系统异常。</param>
|
||||
public void Fatal(string msg)
|
||||
{
|
||||
logfatal.Fatal("----------------------------Fatal BEGIN------------------------------");
|
||||
logerror.Fatal(msg);
|
||||
logerror.Fatal("-----------------------------Fatal END-------------------------------");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 输出json日志
|
||||
|
||||
/// <summary>
|
||||
/// 输出json日志
|
||||
/// </summary>
|
||||
/// <param name="funName">json方法名</param>
|
||||
/// <param name="json">json数据</param>
|
||||
public void WriteJson(string funName, string json)
|
||||
{
|
||||
try
|
||||
{
|
||||
//json路径文件名 Environment.ExpandEnvironmentVariables(@"%USERPROFILE%\AppData\Roaming\SWS\Logs\"
|
||||
string filename = Path.Combine(logPath, funName + ".json");
|
||||
//判断文件是否被打开占用
|
||||
if (!FileHelper.IsFileLocked(filename))
|
||||
{
|
||||
File.Delete(filename);
|
||||
string strJson = string.Empty;
|
||||
if (json.StartsWith("["))
|
||||
{
|
||||
//格式化json数据 当前为组类型
|
||||
JArray jobj = JArray.Parse(json);
|
||||
strJson = jobj.ToString();
|
||||
}
|
||||
else if (json.StartsWith("{"))
|
||||
{
|
||||
//格式化json数据 当前为类类型
|
||||
JObject jobj = JObject.Parse(json);
|
||||
strJson = jobj.ToString();
|
||||
}
|
||||
//创建json文件,并输出数据
|
||||
FileStream fs = new FileStream(filename, FileMode.Append);
|
||||
StreamWriter wr = null;
|
||||
wr = new StreamWriter(fs);
|
||||
wr.WriteLine(strJson);
|
||||
wr.Close();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DI_Electrical.Model
|
||||
{
|
||||
public class ConfigIni
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
public string UserName { get; set; }
|
||||
/// <summary>
|
||||
/// 用户密码
|
||||
/// </summary>
|
||||
public string UserPs { get; set; }
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectID { get; set; }
|
||||
/// <summary>
|
||||
/// 服务器ip
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
/// <summary>
|
||||
/// 端口
|
||||
/// </summary>
|
||||
public string Port { get; set; }
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DI_Electrical.Model
|
||||
{
|
||||
public class PageModel<T>
|
||||
{
|
||||
public List<T> Rows { get; set; }
|
||||
public int Total { get; set; }
|
||||
public int Records { get; set; }
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
namespace DI_Electrical.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// learun mvc标准的http返回结果
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class learunHttpRes<T>
|
||||
{
|
||||
public int code { get; set; }
|
||||
public string info { get; set; }
|
||||
public T data { get; set; }
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DI_Electrical.Model
|
||||
{
|
||||
public class loginRes
|
||||
{
|
||||
public string token { get; set; }
|
||||
public string loginMark { get; set; }
|
||||
public string account { get; set; }
|
||||
public string userId { get; set; }
|
||||
public string RealName { get; set; }
|
||||
|
||||
public string userPs { get; set; }
|
||||
public string IsIOModuleAdmin { get; set; }
|
||||
public string isFirstLogin { get; set; }
|
||||
public string Department { get; set; }
|
||||
}
|
||||
}
|
@ -1,438 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DI_Electrical.Models
|
||||
{
|
||||
public class ec_Wire_Group
|
||||
{
|
||||
public ec_Wire_Group()
|
||||
{
|
||||
//SoftTags = new List<ec_SofttagEntity>();
|
||||
NewSoftTags = new List<ec_Wire_Group>();
|
||||
//Status = WireGroupStatusEnum.New;
|
||||
}
|
||||
#region 实体成员
|
||||
/// <summary>
|
||||
/// 状态。比如“待删除的”。默认为New
|
||||
/// 去找lr base dataitem数据字典的be_signalstate
|
||||
/// </summary>
|
||||
//[JsonConverter(typeof(SignalStatusConverter))]
|
||||
public WireGroupStatusEnum Status { get; set; } = WireGroupStatusEnum.New;
|
||||
|
||||
/// <summary>
|
||||
/// 某一个输出的信号,可以关联多个输入的信号。关联的是<see cref="Wire_Group_ID"/>
|
||||
/// </summary>
|
||||
public string LinkedID { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
public string Wire_Group_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 信号名称(CH. No.)。
|
||||
/// 1462,C列。
|
||||
/// 8600,A列。
|
||||
/// 如果是虚拟点。就是主信号+<see cref="Code"/>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Group_Name { get; set; } = "";
|
||||
/// <summary>
|
||||
/// ChannelID。ec_panel_channel里。
|
||||
/// 如果为空,说明这个信号是关联前的状态(或者说未关联的状态)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ChannelID { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 英文描述(Description)。
|
||||
/// 1462,D列。
|
||||
/// 8600,B列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Group_Desc_EN { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 中文描述。
|
||||
/// 8600,B列(第二行)。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Group_Desc { get; set; } = "";
|
||||
/// <summary>
|
||||
/// (Signal_Type)信号类型,如4-20mA。
|
||||
/// 1462,I列。
|
||||
/// 8600,E列(模拟量)或F列(开关量)。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string IO_Type { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 信号的分组(组成Group Name的第一部分)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Signal_Group { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 信号的序号(组成Group Name的第二部分)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Signal_SeqNo { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 信号组模板ID(平台上,savesignal时,不会带出这个)。
|
||||
/// 只是公司级上才有意义。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string WireGroupTemplateID { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 代码。
|
||||
/// 1462,H列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Code { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Range_Min。
|
||||
/// 1462,J列。
|
||||
/// 8600,G列(111~222)。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Range_Min { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Range_Max.
|
||||
/// 1462,k列。
|
||||
/// 8600,G列(111~222)。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Range_Max { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Range_Min和Range_Max的单位。
|
||||
/// 1462,L列。
|
||||
/// 8600,H列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Unit { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Alarm_LL。
|
||||
/// 1462,m列。
|
||||
/// 8600,J列(第一行或第二行不确定)。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Alarm_LL { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Alarm_L。
|
||||
/// 1462,n列。
|
||||
/// 8600,I列(第一行或第二行不确定)。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Alarm_L { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Alarm_H。
|
||||
/// 1462,o列。
|
||||
/// 8600,I列(第一行或第二行不确定)。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Alarm_H { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Alarm_HH。
|
||||
/// 1462,p列。
|
||||
/// 8600,J列(第一行或第二行不确定)。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Alarm_HH { get; set; } = "";
|
||||
/// <summary>
|
||||
/// AL_GRP 延申报警组。
|
||||
/// 1462,S列。
|
||||
/// 8600,U列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string AL_GRP { get; set; } = "";
|
||||
/// <summary>
|
||||
/// BL_GRP 抑制报警。
|
||||
/// 1462,T列。
|
||||
/// 8600,T列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string BL_GRP { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 延时。
|
||||
/// 1462,U列。
|
||||
/// 8600,S列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Time_Delay { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 供应商。
|
||||
/// 1463,V列。
|
||||
/// 8600,L列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Supplier { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 设备名
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string EquipName { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 传感器代码。
|
||||
/// 1462,W列。
|
||||
/// 8600,K列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string SENSOR_CODE { get; set; } = "";
|
||||
/// <summary>
|
||||
/// VDR_Record。
|
||||
/// 1462,X列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool VDR_Record { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否为slow down信号。
|
||||
/// 1462,Q列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool SLD { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否为shut down信号。
|
||||
/// 1462,R列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool SHD { get; set; } = false;
|
||||
/// <summary>
|
||||
/// Remarks。
|
||||
/// 1462,Y列。
|
||||
/// 8600,X列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Remarks { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 信号归属
|
||||
/// true,代表该信号是电气进行最终审核确认;
|
||||
/// false,代表该信号是轮机进行最终审核确认;
|
||||
/// </summary>
|
||||
public bool ElecOnly { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否为通讯点。
|
||||
/// 1462,通过<see cref="ec_Wire_GroupEntity.Remarks"/>里的文字判断
|
||||
/// 8600,通过K列里的文字判断
|
||||
/// </summary>
|
||||
public bool CommunicationPoint { get; set; } = false;
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// ECC 。Bool类型数据库要么是int要么是bool
|
||||
///// </summary>
|
||||
//public bool ECC { get; set; } = false;
|
||||
|
||||
///// <summary>
|
||||
///// WCC
|
||||
///// </summary>
|
||||
//public bool WCC { get; set; } = false;
|
||||
///// <summary>
|
||||
///// BCC
|
||||
///// </summary>
|
||||
//public bool BCC { get; set; } = false;
|
||||
/// <summary>
|
||||
/// IO类型,AI AO DI DO
|
||||
/// </summary>
|
||||
public string InOrOut { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 驾驶室(控制台)。
|
||||
/// 8600,M列。导入时,如果2行都有值,中间会|分开
|
||||
/// </summary>
|
||||
public string WHConsole { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 驾驶室(计算机)。
|
||||
/// 8600,N列。导入时,如果2行都有值,中间会|分开
|
||||
/// </summary>
|
||||
public string WHCPU { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 集控室(控制台)。
|
||||
/// 8600,O列。导入时,如果2行都有值,中间会|分开
|
||||
/// </summary>
|
||||
public string ECRConsole { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 集控室(计算机)。
|
||||
/// 8600,P列(excel中,两行均有值时,以|分开)
|
||||
/// </summary>
|
||||
public string ECRCPU { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 船舶办公室(控制台)。
|
||||
/// 8600,Q列。导入时,如果2行都有值,中间会|分开
|
||||
/// </summary>
|
||||
public string ShipOfficeConsole { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 船舶办公室(计算机)。
|
||||
/// 8600,R列。导入时,如果2行都有值,中间会|分开
|
||||
/// </summary>
|
||||
public string ShipOfficeCPU { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 安全保护。(和<see cref="SLD"/> <see cref="SHD"/>列有关系)
|
||||
/// 8600,V列。
|
||||
/// </summary>
|
||||
public string SafetyProt { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 安全保护延时。
|
||||
/// 8600,V列下。
|
||||
/// </summary>
|
||||
public string SafetyDelay { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// SeriousType
|
||||
/// 1462,AG列。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string SeriousType { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 自动控制。
|
||||
/// 8600,W列。
|
||||
/// </summary>
|
||||
public string AutoCtrl { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 爸爸。如果有值,则代表其为虚拟点的概念
|
||||
/// <see cref="Wire_Group_ID"/>
|
||||
/// </summary>
|
||||
public string ParentID { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 删除标记。因为哪怕是删除了,也要保留数据,以便日后查看。
|
||||
/// </summary>
|
||||
public bool DeleteFlg { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 电缆位号(某些项目的<see cref="ec_projectSettingsEntity"/>里,是允许编辑的IO_allowManualAssign)
|
||||
/// </summary>
|
||||
public string CableName { get; set; }
|
||||
/// <summary>
|
||||
/// 通讯类信号<see cref="ec_CableEntity.CableClass"/>的母线ID<see cref="ec_CableEntity.CableID"/>
|
||||
/// </summary>
|
||||
public string CableId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CreateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string UpdateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
#endregion
|
||||
|
||||
|
||||
#region 扩展字段
|
||||
///// <summary>
|
||||
///// 虚拟点 集合
|
||||
///// </summary>
|
||||
////[SugarColumn(IsIgnore = true)]
|
||||
//[Obsolete]
|
||||
//[Navigate(NavigateType.OneToMany, nameof(ec_SofttagEntity.Wire_Group_ID))] //配置了导航,方便DeleteNav,ec_softtag表中的wiregroupid
|
||||
//public List<ec_SofttagEntity> SoftTags { get; set; }
|
||||
|
||||
|
||||
|
||||
public List<ec_Wire_Group> NewSoftTags { get; set; }
|
||||
/// <summary>
|
||||
/// 柜子
|
||||
/// </summary>
|
||||
|
||||
public string PanelName { get; set; }
|
||||
/// <summary>
|
||||
/// 通道号
|
||||
/// </summary>
|
||||
|
||||
public string ChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// 端子排
|
||||
/// </summary>
|
||||
|
||||
public string StripName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电缆对
|
||||
/// </summary>
|
||||
|
||||
public string CableSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// status的具体文字描述
|
||||
/// </summary>
|
||||
|
||||
public string StatusValue { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 操作历史(因为现在插件端的保存是一次性的。哪怕有多个动作,也只是一次提交)
|
||||
/// </summary>
|
||||
|
||||
public List<ActionHistory> ActionHistorys { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 信号属性变更历史
|
||||
/// </summary>
|
||||
|
||||
public List<ec_wire_group_propertyhis> Propertyhis { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 信号日志
|
||||
/// </summary>
|
||||
|
||||
public List<ec_wire_group_log> Logs { get; set; }
|
||||
#endregion
|
||||
}
|
||||
public enum WireGroupStatusEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 待删除
|
||||
/// </summary>
|
||||
[Description("待删除")]
|
||||
ToDelete = 01,
|
||||
/// <summary>
|
||||
/// 新增的
|
||||
/// </summary>
|
||||
[Description("新增的")]
|
||||
New = 02,
|
||||
/// <summary>
|
||||
/// 已关联
|
||||
/// </summary>
|
||||
[Description("已使用(关联)")]
|
||||
Used = 03,
|
||||
/// <summary>
|
||||
/// 已审核
|
||||
/// </summary>
|
||||
[Description("已确认(审核)")]
|
||||
Confirmed = 04,
|
||||
/// <summary>
|
||||
/// 重新打开
|
||||
/// </summary>
|
||||
[Description("重新打开")]
|
||||
Reopen = 05,
|
||||
/// <summary>
|
||||
/// 彻底删除
|
||||
/// </summary>
|
||||
[Description("彻底删除")]
|
||||
deleted = 06
|
||||
}
|
||||
public class ActionHistory
|
||||
{
|
||||
public DateTime? ActionTime { get; set; }
|
||||
public Action ActionType { get; set; }
|
||||
public string reason { get; set; }
|
||||
}
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
using DryIoc.ImTools;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DI_Electrical.Models
|
||||
{
|
||||
public class ec_dataitemdetail
|
||||
{
|
||||
#region 实体成员
|
||||
/// <summary>
|
||||
/// 字典明细ID
|
||||
/// </summary>
|
||||
|
||||
public string DataItemDetailID { get; set; }
|
||||
/// <summary>
|
||||
/// 字典分类ID(存的是<see cref="ec_dataitemEntity.DataItemID"/>
|
||||
/// </summary>
|
||||
public string DataItemID { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 上级字典明细ID。<see cref="DataItemDetailID"/>
|
||||
/// </summary>
|
||||
public string UpDataItemDetailID { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 字典明细名称
|
||||
/// </summary>
|
||||
public string DataItemName { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 字典明细名称(英文)
|
||||
/// </summary>
|
||||
public string DataItemNameEN { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 字典明细编号
|
||||
/// </summary>
|
||||
public string DataItemCode { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int? OrderID { get; set; }
|
||||
/// <summary>
|
||||
/// 是否有效
|
||||
/// </summary>
|
||||
public int? IsEnabled { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public string CreateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
public string UpdateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
#endregion
|
||||
|
||||
#region 扩展字段
|
||||
/// <summary>
|
||||
/// 字典编号<see cref="ec_dataitemEntity.DataItemCode"/>。如Be_signal_group
|
||||
/// </summary>
|
||||
|
||||
public string ItemCode { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 信号
|
||||
/// </summary>
|
||||
|
||||
public List<ec_Wire_Group> Signals { get; set; }
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace DI_Electrical.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目
|
||||
/// </summary>
|
||||
public class ec_project
|
||||
{
|
||||
#region 实体成员
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ProjectId { get; set; }
|
||||
/// <summary>
|
||||
/// 项目名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ProjectName { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 项目代号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ProjectCode { get; set; } = "";
|
||||
|
||||
///// <summary>
|
||||
///// 船检
|
||||
///// </summary>
|
||||
//public string ShipCheck { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 船名(中文)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ShipNameCN { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 船名(英文)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ShipNameEN { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 船型(中文)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ShipTypeCN { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 船型(英文)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ShipTypeEN { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 船级社(id)。和船检的概念有些冲突
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ShipSociety { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 船东
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ShipOwner { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 挂旗国(船籍国)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string FlagState { get; set; } = "";
|
||||
/// <summary>
|
||||
/// IMO编号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string IMONumber { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 项目更多描述一
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Describe1 { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 项目更多描述二
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Describe2 { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 项目更多描述三
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Describe3 { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 项目更多描述四
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Describe4 { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 项目更多描述五
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Describe5 { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 项目序号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int? ProjectIndex { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CreateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string UpdateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DI_Electrical.Models
|
||||
{
|
||||
public class ec_wire_group_log
|
||||
{
|
||||
public ec_wire_group_log()
|
||||
{
|
||||
|
||||
}
|
||||
public ec_wire_group_log(Action OperateType, string WireGroupID)
|
||||
{
|
||||
this.OperateType = OperateType;
|
||||
this.WireGroupID = WireGroupID;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="OperateType"></param>
|
||||
/// <param name="WireGroupID"></param>
|
||||
/// <param name="createtime">因为<see cref="ec_Wire_GroupEntity.ActionHistorys"/>的关系,所以时间是有值的</param>
|
||||
public ec_wire_group_log(Action OperateType, string WireGroupID, DateTime? createtime)
|
||||
{
|
||||
this.OperateType = OperateType;
|
||||
this.WireGroupID = WireGroupID;
|
||||
|
||||
if (createtime != null)
|
||||
{
|
||||
this.CreateTime = createtime;
|
||||
}
|
||||
|
||||
}
|
||||
#region 实体成员
|
||||
/// <summary>
|
||||
/// 操作日志ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
public string WireGroupLogID { get; set; }
|
||||
/// <summary>
|
||||
/// 信号ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string WireGroupID { get; set; }
|
||||
/// <summary>
|
||||
/// 操作类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public Action OperateType { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ExtraMsg { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CreateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string UpdateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
#endregion
|
||||
|
||||
|
||||
#region 扩展字段
|
||||
/// <summary>
|
||||
/// 创建人名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
public string CreateUserName { get; set; }
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,130 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace DI_Electrical.Models
|
||||
|
||||
{
|
||||
/// <summary>
|
||||
/// 动作。和状态是两码事情。
|
||||
/// </summary>
|
||||
public enum Action
|
||||
{
|
||||
|
||||
新增 = 0,
|
||||
修改 = 1,
|
||||
准备删除 = 2,
|
||||
撤销删除 = 3,
|
||||
删除 = 4,
|
||||
关联通道 = 5,
|
||||
审核 = 6,
|
||||
重新打开 = 7,
|
||||
关联解除 = 8,
|
||||
回收站恢复 = 9
|
||||
}
|
||||
|
||||
public enum Department
|
||||
{
|
||||
轮机 = 0,
|
||||
电气 = 1
|
||||
}
|
||||
|
||||
public class ec_wire_group_notice
|
||||
{
|
||||
public ec_wire_group_notice()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
/// <param name="departmentRetrieveNotice">接收方</param>
|
||||
/// <param name="WireGroupID"></param>
|
||||
public ec_wire_group_notice(Action action, Department departmentRetrieveNotice, string WireGroupID)
|
||||
{
|
||||
ActionID = action;
|
||||
CompanyID = departmentRetrieveNotice;
|
||||
this.WireGroupID = WireGroupID;
|
||||
|
||||
}
|
||||
|
||||
#region 实体成员
|
||||
/// <summary>
|
||||
/// 信号表通知ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string WireGroupNoticeID { get; set; }
|
||||
/// <summary>
|
||||
/// 信号ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string WireGroupID { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 动作
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Action ActionID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 额外的消息(如删除时,必须要给一个删除理由)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Message { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 是否被确认。false未读。true已读。
|
||||
/// </summary>
|
||||
public bool CheckFLG { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 接收者的部门
|
||||
/// </summary>
|
||||
public Department CompanyID { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人(也就是发起通知的人)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CreateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人(也就是确认这个消息已阅的人)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string UpdateUserID { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
#endregion
|
||||
|
||||
#region 扩展字段
|
||||
|
||||
/// <summary>
|
||||
/// 动作(描述)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Action { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CreateUserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批准人名字
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string UpdateUserName { get; set; }
|
||||
#region 用于前端UI渲染,对应的信号的内容
|
||||
public string Group_Name { get; set; }
|
||||
public string Group_Desc { get; set; }
|
||||
public string Group_Desc_EN { get; set; }
|
||||
public string IO_Type { get; set; }
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,199 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace DI_Electrical.Model
|
||||
{
|
||||
public class User
|
||||
{
|
||||
#region 实体成员
|
||||
/// <summary>
|
||||
/// 用户主键
|
||||
/// </summary>
|
||||
public string F_UserId { get; set; }
|
||||
/// <summary>
|
||||
/// 工号
|
||||
/// </summary>
|
||||
public string F_EnCode { get; set; }
|
||||
/// <summary>
|
||||
/// 账户
|
||||
/// </summary>
|
||||
public string F_Account { get; set; }
|
||||
/// <summary>
|
||||
/// 登录密码
|
||||
/// </summary>
|
||||
public string F_Password { get; set; }
|
||||
/// <summary>
|
||||
/// 密码秘钥
|
||||
/// </summary>
|
||||
public string F_Secretkey { get; set; }
|
||||
/// <summary>
|
||||
/// 真实姓名
|
||||
/// </summary>
|
||||
public string F_RealName { get; set; }
|
||||
/// <summary>
|
||||
/// 呢称
|
||||
/// </summary>
|
||||
public string F_NickName { get; set; }
|
||||
/// <summary>
|
||||
/// 头像
|
||||
/// </summary>
|
||||
public string F_HeadIcon { get; set; }
|
||||
/// <summary>
|
||||
/// 快速查询
|
||||
/// </summary>
|
||||
public string F_QuickQuery { get; set; }
|
||||
/// <summary>
|
||||
/// 简拼
|
||||
/// </summary>
|
||||
public string F_SimpleSpelling { get; set; }
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
public int? F_Gender { get; set; }
|
||||
/// <summary>
|
||||
/// 生日
|
||||
/// </summary>
|
||||
public DateTime? F_Birthday { get; set; }
|
||||
/// <summary>
|
||||
/// 手机
|
||||
/// </summary>
|
||||
public string F_Mobile { get; set; }
|
||||
/// <summary>
|
||||
/// 电话
|
||||
/// </summary>
|
||||
public string F_Telephone { get; set; }
|
||||
/// <summary>
|
||||
/// 电子邮件
|
||||
/// </summary>
|
||||
public string F_Email { get; set; }
|
||||
/// <summary>
|
||||
/// QQ号
|
||||
/// </summary>
|
||||
public string F_OICQ { get; set; }
|
||||
/// <summary>
|
||||
/// 微信号
|
||||
/// </summary>
|
||||
public string F_WeChat { get; set; }
|
||||
/// <summary>
|
||||
/// MSN
|
||||
/// </summary>
|
||||
public string F_MSN { get; set; }
|
||||
/// <summary>
|
||||
/// 公司或部门的主键<see cref="CompanyEntity.F_CompanyId"/>
|
||||
/// </summary>
|
||||
public string F_CompanyId { get; set; }
|
||||
/// <summary>
|
||||
/// 部门主键
|
||||
/// </summary>
|
||||
public string F_DepartmentId { get; set; }
|
||||
/// <summary>
|
||||
/// 安全级别
|
||||
/// </summary>
|
||||
public int? F_SecurityLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 单点登录标识
|
||||
/// </summary>
|
||||
public int? F_OpenId { get; set; }
|
||||
/// <summary>
|
||||
/// 密码提示问题
|
||||
/// </summary>
|
||||
public string F_Question { get; set; }
|
||||
/// <summary>
|
||||
/// 密码提示答案
|
||||
/// </summary>
|
||||
public string F_AnswerQuestion { get; set; }
|
||||
/// <summary>
|
||||
/// 允许多用户同时登录
|
||||
/// </summary>
|
||||
public int? F_CheckOnLine { get; set; }
|
||||
/// <summary>
|
||||
/// 允许登录时间开始
|
||||
/// </summary>
|
||||
public DateTime? F_AllowStartTime { get; set; }
|
||||
/// <summary>
|
||||
/// 允许登录时间结束
|
||||
/// </summary>
|
||||
public DateTime? F_AllowEndTime { get; set; }
|
||||
/// <summary>
|
||||
/// 暂停用户开始日期
|
||||
/// </summary>
|
||||
public DateTime? F_LockStartDate { get; set; }
|
||||
/// <summary>
|
||||
/// 暂停用户结束日期
|
||||
/// </summary>
|
||||
public DateTime? F_LockEndDate { get; set; }
|
||||
/// <summary>
|
||||
/// 排序码
|
||||
/// </summary>
|
||||
public int? F_SortCode { get; set; }
|
||||
/// <summary>
|
||||
/// 删除标记
|
||||
/// </summary>
|
||||
public int? F_DeleteMark { get; set; }
|
||||
/// <summary>
|
||||
/// 有效标志
|
||||
/// </summary>
|
||||
public int? F_EnabledMark { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string F_Description { get; set; }
|
||||
/// <summary>
|
||||
/// 创建日期
|
||||
/// </summary>
|
||||
public DateTime? F_CreateDate { get; set; }
|
||||
/// <summary>
|
||||
/// 创建用户主键
|
||||
/// </summary>
|
||||
public string F_CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
public string F_CreateUserName { get; set; }
|
||||
/// <summary>
|
||||
/// 修改日期
|
||||
/// </summary>
|
||||
public DateTime? F_ModifyDate { get; set; }
|
||||
/// <summary>
|
||||
/// 修改用户主键
|
||||
/// </summary>
|
||||
public string F_ModifyUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 修改用户
|
||||
/// </summary>
|
||||
public string F_ModifyUserName { get; set; }
|
||||
/// <summary>
|
||||
/// 密码更新时间
|
||||
/// </summary>
|
||||
public DateTime? PasswordUpdateTime { get; set; }//add by chenkai 20210322
|
||||
/// <summary>
|
||||
/// 微信OpenId
|
||||
/// </summary>
|
||||
public string WX_OpenId { get; set; }
|
||||
#endregion
|
||||
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>
|
||||
/// 登录信息
|
||||
/// </summary>
|
||||
public string LoginMsg { get; set; }
|
||||
/// <summary>
|
||||
/// 登录状态
|
||||
/// </summary>
|
||||
public bool LoginOk { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司名称
|
||||
/// </summary>
|
||||
public string F_FullName { get; set; }
|
||||
/// <summary>
|
||||
/// 岗位名称
|
||||
/// </summary>
|
||||
public string F_PostName { get; set; }
|
||||
/// <summary>
|
||||
/// 单位名称
|
||||
/// </summary>
|
||||
public string F_CompanyName { get { return F_FullName; } }
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using DI_Electrical.Models;
|
||||
|
||||
namespace DI_Electrical.Services
|
||||
{
|
||||
public class DataItemService : HttpService
|
||||
{
|
||||
public DataItemService( ) : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async Task<List<ec_dataitemdetail>> GetDetails(string itemCode)
|
||||
{
|
||||
var res = await this.GetAsync<List<ec_dataitemdetail>>($"DataItemApi/GetDetails?projectId={GlobalObject.curProject.ProjectId}&itemCode={itemCode}");
|
||||
//OnRefresh();
|
||||
if (res.code == 200)
|
||||
{
|
||||
|
||||
return res.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;//ERROR INFO
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,263 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DI_Electrical.Helper;
|
||||
using DI_Electrical.Model;
|
||||
using Newtonsoft.Json;
|
||||
namespace DI_Electrical.Services
|
||||
{
|
||||
public class HttpService
|
||||
{
|
||||
public HttpService()
|
||||
{
|
||||
}
|
||||
public void Init(string address, int port)
|
||||
{
|
||||
// 如果 GlobalObject.client 已经是 null,初始化一个新的 HttpClient 实例
|
||||
//if (GlobalObject.client == null)
|
||||
//{
|
||||
GlobalObject.client = new HttpClient()
|
||||
{
|
||||
BaseAddress = new Uri($"http://{address}:{port}/api/"),
|
||||
Timeout = TimeSpan.FromSeconds(120)
|
||||
};
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// // 如果已经有 client 实例,则更新它的 BaseAddress
|
||||
// GlobalObject.client.BaseAddress = new Uri($"http://{address}:{port}/api/");
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 带入授权码。
|
||||
/// </summary>
|
||||
/// <param name="httpClient"></param>
|
||||
protected virtual void OnInitAuthorizationCode()
|
||||
{
|
||||
//httpClient.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows 10.0.22621.1265; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/110.0.835.163 Safari/535.1");
|
||||
|
||||
//if (AuthorizationCode.IsNullOrEmpty() || httpClient == null) return;
|
||||
//httpClient.DefaultRequestHeaders.Add("Authorization", "Bearer " + AuthorizationCode);
|
||||
}
|
||||
protected virtual void OnInitRequestHeader(HttpClient httpClient, string mediaType)
|
||||
{
|
||||
//httpClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue(mediaType));
|
||||
httpClient.DefaultRequestHeaders.Add("Accept", mediaType);
|
||||
httpClient.DefaultRequestHeaders.Add("ContentType", mediaType);
|
||||
}
|
||||
|
||||
private void WriteLog(string requestUri, string strJson)
|
||||
{
|
||||
try
|
||||
{
|
||||
var uri = new Uri(GlobalObject.client.BaseAddress + requestUri);
|
||||
var funName = uri.Segments.Last();
|
||||
LoggerHelper.Current.WriteJson(funName, strJson);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public async Task<learunHttpRes<T>> GetAsync<T>(string requestUri)
|
||||
{
|
||||
//httpClient.Timeout = TimeSpan.FromSeconds(3000);
|
||||
OnInitAuthorizationCode();
|
||||
string result = string.Empty;
|
||||
learunHttpRes<T> resultObj = null;
|
||||
try
|
||||
{
|
||||
var response = await GlobalObject.client.GetAsync(requestUri);
|
||||
if (response.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
string errorMsg = $"服务器地址 [{requestUri}] 获取数据失败, 返回HTTP代码:" + response.StatusCode;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
throw new HttpRequestException(errorMsg);
|
||||
}
|
||||
result = await response.Content.ReadAsStringAsync();
|
||||
WriteLog(requestUri, result);
|
||||
resultObj = JsonConvert.DeserializeObject<learunHttpRes<T>>(result);
|
||||
}
|
||||
catch (JsonException)
|
||||
{
|
||||
string errorMsg = $"服务器地址 [{requestUri}] 解析为{typeof(T).Name}失败,原始返回数据为: " + result;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
resultObj = new learunHttpRes<T>() { code = -100, info = errorMsg };
|
||||
return resultObj;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string errorMsg = $"接口:{requestUri}失败,异常:{ex.Message} ";
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
resultObj = new learunHttpRes<T>() { code = -100, info=errorMsg };
|
||||
return resultObj;
|
||||
}
|
||||
|
||||
if (resultObj.code != 200)
|
||||
{
|
||||
switch (resultObj.code)
|
||||
{
|
||||
case 400:
|
||||
case 500:
|
||||
break;
|
||||
//业务错误,不是http本质错误
|
||||
default:
|
||||
string errorMsg = $"服务器地址 [{requestUri}] Get失败, 返回自定义代码:" + resultObj.code;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
throw new HttpRequestException(errorMsg);
|
||||
}
|
||||
|
||||
}
|
||||
LoggerHelper.Current.Info($"Get成功:{requestUri}");
|
||||
return resultObj;
|
||||
|
||||
|
||||
}
|
||||
public async Task<T> GetAsyncByOnlyData<T>(string requestUri)
|
||||
{
|
||||
//httpClient.Timeout = TimeSpan.FromSeconds(3000);
|
||||
OnInitAuthorizationCode();
|
||||
string result = string.Empty;
|
||||
T resultObj;
|
||||
try
|
||||
{
|
||||
var response = await GlobalObject.client.GetAsync(requestUri);
|
||||
if (response.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
string errorMsg = $"服务器地址 [{requestUri}] 获取数据失败, 返回HTTP代码:" + response.StatusCode;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
throw new HttpRequestException(errorMsg);
|
||||
}
|
||||
result = await response.Content.ReadAsStringAsync();
|
||||
WriteLog(requestUri, result);
|
||||
resultObj = JsonConvert.DeserializeObject<T>(result);
|
||||
}
|
||||
catch (JsonException)
|
||||
{
|
||||
string errorMsg = $"服务器地址 [{requestUri}] 解析为{typeof(T).Name}失败,原始返回数据为: " + result;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
throw new JsonException(errorMsg);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string errorMsg = $"接口:{requestUri}失败,异常:{ex.Message} ";
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
throw new JsonException(errorMsg);
|
||||
}
|
||||
|
||||
LoggerHelper.Current.Info($"Get成功:{requestUri}");
|
||||
return resultObj;
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T">响应后的返回数据的类型</typeparam>
|
||||
/// <typeparam name="T1">POST数据对象的类型</typeparam>
|
||||
/// <param name="requestUri"></param>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="HttpRequestException"></exception>
|
||||
/// <exception cref="JsonException"></exception>
|
||||
public async Task<learunHttpRes<T>> PostBodyAsync<T, T1>(string requestUri, T1 postObj)
|
||||
{
|
||||
OnInitAuthorizationCode();
|
||||
|
||||
string contentType = "application/json";
|
||||
string strContent = postObj != null ? JsonConvert.SerializeObject(postObj) : "";
|
||||
var content = new StringContent(strContent, Encoding.UTF8, contentType);
|
||||
OnInitRequestHeader(GlobalObject.client, contentType);
|
||||
learunHttpRes<T> resultObj = null;
|
||||
string result = string.Empty;
|
||||
try
|
||||
{
|
||||
var response = await GlobalObject.client.PostAsync(requestUri, content);
|
||||
if (response.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
string errorMsg = $"服务器地址 [{requestUri}] Post数据失败, 返回HTTP代码:" + response.StatusCode;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
throw new HttpRequestException(errorMsg);
|
||||
}
|
||||
result = await response.Content.ReadAsStringAsync();
|
||||
WriteLog(requestUri, result);
|
||||
resultObj = JsonConvert.DeserializeObject<learunHttpRes<T>>(result);
|
||||
}
|
||||
catch (JsonException)
|
||||
{
|
||||
string errorMsg = $"服务器地址 [{requestUri}] 解析为{typeof(T).Name}失败,原始返回数据为: " + result;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
resultObj = new learunHttpRes<T>() { code = -100, info = errorMsg };
|
||||
return resultObj;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string errorMsg = $"接口:{requestUri}失败,参数数据为:{strContent},异常:{ex.Message} ";
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
resultObj = new learunHttpRes<T>() { code = -100, info = errorMsg };
|
||||
return resultObj;
|
||||
}
|
||||
|
||||
if (resultObj.code != 200)
|
||||
{
|
||||
switch (resultObj.code)
|
||||
{
|
||||
case 400:
|
||||
case 500:
|
||||
break;
|
||||
//业务错误,不是http本质错误
|
||||
default:
|
||||
string errorMsg = $"服务器地址 [{requestUri}] Post失败, 返回自定义代码:" + resultObj.code;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
throw new HttpRequestException(errorMsg);
|
||||
}
|
||||
|
||||
}
|
||||
LoggerHelper.Current.Info($"Post成功:{requestUri}");
|
||||
return resultObj;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<T> PostFileAsync<T>(string requestUri, Stream stream, string fileName)
|
||||
{
|
||||
OnInitAuthorizationCode();
|
||||
|
||||
string contentType = "multipart/form-data";
|
||||
var streamContent = new StreamContent(stream, (int)stream.Length);
|
||||
streamContent.Headers.Add("Content-Type", "application/octet-stream");
|
||||
var content = new MultipartFormDataContent
|
||||
{
|
||||
{ streamContent, "file", fileName }
|
||||
};
|
||||
OnInitRequestHeader(GlobalObject.client, contentType);
|
||||
var response = await GlobalObject.client.PostAsync(requestUri, content);
|
||||
if (response.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
string errorMsg = $"服务器地址 [{requestUri}] Post数据失败, 返回HTTP代码:" + response.StatusCode;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
throw new HttpRequestException(errorMsg);
|
||||
}
|
||||
var result = await response.Content.ReadAsStringAsync();
|
||||
T resultObj;
|
||||
try
|
||||
{
|
||||
resultObj = JsonConvert.DeserializeObject<T>(result);
|
||||
}
|
||||
catch (JsonException)
|
||||
{
|
||||
string errorMsg = $"服务器地址 [{requestUri}] 解析为 string 失败,原始返回数据为: " + result;
|
||||
LoggerHelper.Current.Error(errorMsg);
|
||||
throw new JsonException(errorMsg);
|
||||
}
|
||||
LoggerHelper.Current.Info($"Post上传文件成功:{requestUri}");
|
||||
return resultObj;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using DI_Electrical.Model;
|
||||
using EasyEncryption;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace DI_Electrical.Services
|
||||
{
|
||||
public class LoginService : HttpService
|
||||
{
|
||||
public LoginService() : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async Task<string> Login(string userName, string passwordOrigin)
|
||||
{
|
||||
|
||||
var password = MD5.ComputeMD5Hash(passwordOrigin); //B156525AFDB610B9D6830A1E9D0A1024
|
||||
try
|
||||
{
|
||||
var res = await this.GetAsync<object>($"LoginApi/CheckLogin?username={userName}&password={password}");
|
||||
//OnRefresh();
|
||||
if (res.code == 200)
|
||||
{
|
||||
GlobalObject.userInfo = JsonConvert.DeserializeObject<loginRes>(res.data.ToString());// as loginRes;
|
||||
GlobalObject.userInfo.userPs = passwordOrigin;
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return res.info;//ERROR INFO
|
||||
}
|
||||
|
||||
}
|
||||
catch (HttpRequestException EX)
|
||||
{
|
||||
return "http错误。无法连接上服务器。请检查服务器 和 端口。" + EX.Message;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
return E.Message;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
using System.Threading.Tasks;
|
||||
using DI_Electrical.Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace DI_Electrical.Services
|
||||
{
|
||||
public class ProjectService : HttpService
|
||||
{
|
||||
public ProjectService() : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async Task<PageModel<ec_project>> GetProjects(int pageNo, int pageSize)
|
||||
{
|
||||
|
||||
var res = await this.GetAsync<PageModel<ec_project>>($"ProjectApi/GetProjectSelectPageList?pageNo={pageNo}&pageSize={pageSize}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 插件端选择项目后,统一、整合加载左侧面板里的数据
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<JToken> InitProjInfo(string projectId, string userName)
|
||||
{
|
||||
var res = await this.GetAsync<object>($"ProjectApi/InitProjInfo?ProjId={projectId}&User={userName}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
var o = res.data as JToken;
|
||||
|
||||
return o;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using DI_Electrical.Model;
|
||||
|
||||
namespace DI_Electrical.Services
|
||||
{
|
||||
public class UserService : HttpService
|
||||
{
|
||||
public UserService() : base()
|
||||
{
|
||||
|
||||
}
|
||||
public async Task GetList()
|
||||
{
|
||||
|
||||
var res = await this.GetAsync<List<User>>($"UserApi/GetList");
|
||||
if (res.code == 200)
|
||||
{
|
||||
GlobalObject.Users = res.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,170 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using DI_Electrical.Models;
|
||||
|
||||
namespace DI_Electrical.Services
|
||||
{
|
||||
public class WireGroupService : HttpService
|
||||
{
|
||||
#region 辅助类
|
||||
/// <summary>
|
||||
/// SaveSignals 专用
|
||||
/// </summary>
|
||||
public class WireGroups
|
||||
{
|
||||
public string ID { get; set; }
|
||||
public List<ec_Wire_Group> Signals { get; set; }
|
||||
}
|
||||
#endregion
|
||||
public WireGroupService() : base()
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取所有的信号
|
||||
/// </summary>
|
||||
/// <param name="projId"></param>
|
||||
/// <param name="Assigned"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ec_Wire_Group>> GetSignals(string projId, bool Assigned)
|
||||
{
|
||||
|
||||
var res = await this.GetAsync<List<ec_Wire_Group>>($"WireGroupApi/GetSignals?projId={projId}&Assigned={Assigned}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取当前组可用的编码
|
||||
/// </summary>
|
||||
/// <param name="group"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetNextAvailableSeq(string group)
|
||||
{
|
||||
var res = await this.GetAsync<object>($"WireGroupApi/GetNextAvailableSeq?projId={GlobalObject.curProject?.ProjectId}&group={group}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.info;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证是否可以保存
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> CanSaveSignals(WireGroups entity ,Models.Action ActionType)
|
||||
{
|
||||
var res = await this.PostBodyAsync<List<ec_Wire_Group>, WireGroups>($"WireGroupApi/CanSaveSignals?projId={GlobalObject.curProject?.ProjectId}&ActionType={ActionType}", entity);
|
||||
if (res.code == 200)
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
else
|
||||
{
|
||||
return res.info;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ec_Wire_Group>> SaveSignals(WireGroups entity)
|
||||
{
|
||||
var res = await this.PostBodyAsync<List<ec_Wire_Group>, WireGroups>($"WireGroupApi/SaveSignals?projId={GlobalObject.curProject?.ProjectId}&mode=0", entity);
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询信号信息
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ec_wire_group_notice>> GetNotification()
|
||||
{
|
||||
var res = await this.GetAsync<List<ec_wire_group_notice>>($"WireGroupApi/GetNotification?projId={GlobalObject.curProject?.ProjectId}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询信号历史
|
||||
/// </summary>
|
||||
/// <param name="projId">项目ID</param>
|
||||
/// <param name="wireGroupIds">信号ID,多个用都逗号隔开</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ec_wire_group_propertyhis>> GetSignalPropertyhis(string wireGroupIds)
|
||||
{
|
||||
var res = await this.GetAsync<List<ec_wire_group_propertyhis>>($"WireGroupApi/GetSignalPropertyhis?projId={GlobalObject.curProject?.ProjectId}&wireGroupIds={wireGroupIds}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询信号日志
|
||||
/// </summary>
|
||||
/// <param name="projId">项目ID</param>
|
||||
/// <param name="wireGroupIds">信号ID,多个用都逗号隔开</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ec_wire_group_log>> GetSignalLogs(string wireGroupIds)
|
||||
{
|
||||
var res = await this.GetAsync<List<ec_wire_group_log>>($"WireGroupApi/GetSignalLogs?projId={GlobalObject.curProject?.ProjectId}&wireGroupIds={wireGroupIds}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读信号通知
|
||||
/// </summary>
|
||||
/// <param name="NoticeIds"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ec_wire_group_notice>> ReadNotification(List<string> NoticeIds)
|
||||
{
|
||||
var res = await this.PostBodyAsync<List<ec_wire_group_notice>,List<string>>($"WireGroupApi/ReadNotification?projId={GlobalObject.curProject?.ProjectId}", NoticeIds);
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,552 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:DI_Electrical.Views.CustomControl"
|
||||
xmlns:po="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
|
||||
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
|
||||
<!-- 系统颜色 -->
|
||||
<SolidColorBrush x:Key="ColorPrimary" Color="#026BE3" />
|
||||
<SolidColorBrush x:Key="ColorSecond" Color="#02ADFF" />
|
||||
<SolidColorBrush x:Key="ColorOther" Color="#DBE0E4" />
|
||||
|
||||
<!-- style放后面,单纯的属性放前面,否则解析顺序不对 -->
|
||||
<!-- modalwindow -->
|
||||
<Style x:Key="CustomWindowStyle" TargetType="Window">
|
||||
<Setter Property="AllowsTransparency" Value="True" />
|
||||
<Setter Property="Background" Value="White" />
|
||||
<Setter Property="ResizeMode" Value="NoResize" />
|
||||
<Setter Property="WindowStyle" Value="None" />
|
||||
</Style>
|
||||
<!-- 系统按钮风格 -->
|
||||
<Style x:Key="sysBtn" TargetType="Button">
|
||||
<Setter Property="Width" Value="65" />
|
||||
<Setter Property="Height" Value="26" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Background" Value="{StaticResource ColorSecond}" />
|
||||
<Style.Triggers>
|
||||
<!-- 鼠标滑过时的背景颜色和前景颜色 -->
|
||||
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
|
||||
<Setter Property="Background" Value="Red" />
|
||||
<!-- 高亮背景色 -->
|
||||
|
||||
<Setter Property="Foreground" Value="Black" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="sysBtn2" TargetType="Button">
|
||||
<Setter Property="Width" Value="65" />
|
||||
<Setter Property="Height" Value="26" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="Foreground" Value="Black" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Background" Value="{StaticResource ColorOther}" />
|
||||
<Style.Triggers>
|
||||
<!-- 鼠标滑过时的背景颜色和前景颜色 -->
|
||||
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
|
||||
<Setter Property="Background" Value="Red" />
|
||||
<!-- 高亮背景色 -->
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="sysBtn3" TargetType="Button">
|
||||
<Setter Property="Width" Value="120" />
|
||||
<Setter Property="Height" Value="40" />
|
||||
<Setter Property="Margin" Value="5,2,5,2" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Foreground" Value="Black" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Background" Value="{StaticResource ColorOther}" />
|
||||
<Style.Triggers>
|
||||
<!-- 鼠标滑过时的背景颜色和前景颜色 -->
|
||||
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource ColorOther}" />
|
||||
<!-- 高亮背景色 -->
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<!-- 系统textblock -->
|
||||
<Style x:Key="sysLabel" TargetType="TextBlock">
|
||||
<Setter Property="Height" Value="20" />
|
||||
<Setter Property="Margin" Value="0,5,0,0" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<!-- 系统textbox -->
|
||||
<Style x:Key="sysTextBox" TargetType="TextBox">
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Margin" Value="5,5,5,0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style x:Key="sysTextAreaInfo" TargetType="TextBox">
|
||||
<Setter Property="Height" Value="100" />
|
||||
<Setter Property="Width" Value="300" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
<Setter Property="AcceptsReturn" Value="True" />
|
||||
<Setter Property="Margin" Value="10,5,10,5" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
</Style>
|
||||
<!-- 全局 RadFilePathPicker 样式 -->
|
||||
<Style x:Key="sysFilePathPicker" TargetType="telerik:RadFilePathPicker">
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Margin" Value="5,0,5,0" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<!-- 图标按钮 -->
|
||||
<Style TargetType="{x:Type local:IconButton}">
|
||||
<Setter Property="Padding" Value="5" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type local:IconButton}">
|
||||
<Grid>
|
||||
<!-- 背景层 -->
|
||||
<Border
|
||||
x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="3" />
|
||||
|
||||
<DockPanel>
|
||||
|
||||
|
||||
<!-- 图标层 -->
|
||||
<Path
|
||||
x:Name="PART_Icon"
|
||||
Width="{TemplateBinding IconSize}"
|
||||
Height="{TemplateBinding IconSize}"
|
||||
Margin="{TemplateBinding IconMargin}"
|
||||
Data="{TemplateBinding IconData}"
|
||||
DockPanel.Dock="{TemplateBinding IconPlacement}"
|
||||
Fill="{TemplateBinding Foreground}"
|
||||
Stretch="Uniform" />
|
||||
<!-- 内容层 -->
|
||||
<ContentPresenter
|
||||
x:Name="PART_Content"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
RecognizesAccessKey="True" />
|
||||
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<!-- 鼠标悬停效果 -->
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" />
|
||||
</Trigger>
|
||||
|
||||
<!-- 按下效果 -->
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- 多选搜索 Combox Start -->
|
||||
<ExponentialEase x:Key="ExponentialEaseOut" EasingMode="EaseOut" />
|
||||
<DropShadowEffect
|
||||
x:Key="PopupShadowDepth"
|
||||
BlurRadius="12"
|
||||
Opacity="0.1"
|
||||
ShadowDepth="2"
|
||||
Color="Transparent" />
|
||||
<ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
|
||||
<Border Background="{TemplateBinding Background}" Focusable="False">
|
||||
<ScrollViewer
|
||||
x:Name="PART_ContentHost"
|
||||
Background="Transparent"
|
||||
Focusable="False"
|
||||
HorizontalScrollBarVisibility="Hidden"
|
||||
VerticalScrollBarVisibility="Hidden" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
<Color x:Key="PlaceholderTextColor" po:Freeze="True">#C0C4CC</Color>
|
||||
<Geometry x:Key="ChevronDownGeometry" po:Freeze="True">M998 352c0 -8 -4 -17 -10 -23l-50 -50c-6 -6 -14 -10 -23 -10c-8 0 -17 4 -23 10l-393 393l-393 -393c-6 -6 -15 -10 -23 -10s-17 4 -23 10l-50 50c-6 6 -10 15 -10 23s4 17 10 23l466 466c6 6 15 10 23 10s17 -4 23 -10l466 -466c6 -6 10 -15 10 -23z</Geometry>
|
||||
|
||||
<ControlTemplate x:Key="ComboBoxToggleButton1" TargetType="{x:Type ToggleButton}">
|
||||
<Border
|
||||
x:Name="PART_Border"
|
||||
Padding="6,1.2"
|
||||
BorderThickness="0"
|
||||
SnapsToDevicePixels="true">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="30" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Rectangle
|
||||
Grid.Column="1"
|
||||
Width="30"
|
||||
Height="Auto"
|
||||
Margin="0,1"
|
||||
Fill="{TemplateBinding Background}" />
|
||||
<Path
|
||||
x:Name="PART_Arrow"
|
||||
Grid.Column="1"
|
||||
Width="10"
|
||||
Height="6"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="{StaticResource ChevronDownGeometry}"
|
||||
RenderTransformOrigin=".5,.5"
|
||||
Stretch="Fill">
|
||||
<Path.Fill>
|
||||
<SolidColorBrush Color="{DynamicResource PlaceholderTextColor}" />
|
||||
</Path.Fill>
|
||||
<Path.RenderTransform>
|
||||
<RotateTransform Angle="0" />
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Grid>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="MouseOver" />
|
||||
<VisualState x:Name="Pressed" />
|
||||
<VisualState x:Name="Disabled" />
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="CheckStates">
|
||||
<VisualState x:Name="Checked">
|
||||
<Storyboard>
|
||||
<DoubleAnimation
|
||||
EasingFunction="{StaticResource ExponentialEaseOut}"
|
||||
Storyboard.TargetName="PART_Arrow"
|
||||
Storyboard.TargetProperty="(Path.RenderTransform).(RotateTransform.Angle)"
|
||||
To="-180"
|
||||
Duration="00:00:.3" />
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Unchecked">
|
||||
<Storyboard>
|
||||
<DoubleAnimation
|
||||
EasingFunction="{StaticResource ExponentialEaseOut}"
|
||||
Storyboard.TargetName="PART_Arrow"
|
||||
Storyboard.TargetProperty="(Path.RenderTransform).(RotateTransform.Angle)"
|
||||
To="0"
|
||||
Duration="00:00:.3" />
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Indeterminate" />
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
<Style x:Key="DefaultListBox" TargetType="{x:Type ListBox}">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBox}">
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
Padding="0,0,0,.1"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SnapsToDevicePixels="True">
|
||||
<ScrollViewer Clip="{Binding RelativeSource={RelativeSource AncestorType=local:WDBorder}, Path=ContentClip}" Focusable="False">
|
||||
<VirtualizingStackPanel IsItemsHost="True" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsGrouping" Value="True">
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="DefaultMultiSelectComboBoxItem" TargetType="{x:Type local:MultiSelectComboBoxItem}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource RegularTextSolidColorBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Height" Value="34" />
|
||||
<Setter Property="Margin" Value="1,0" />
|
||||
<Setter Property="Padding" Value="6,0" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type local:MultiSelectComboBoxItem}">
|
||||
|
||||
<Border
|
||||
x:Name="PART_Border"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="true">
|
||||
<CheckBox
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
|
||||
|
||||
<ContentPresenter
|
||||
x:Name="PART_ContentPresenter"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
TextElement.Foreground="{TemplateBinding Foreground}" />
|
||||
</CheckBox>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource DefaultBackgroundSolidColorBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
<Style TargetType="{x:Type local:MultiSelectSearchComboBox}">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BaseSolidColorBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Background" Value="{DynamicResource BackgroundSolidColorBrush}" />
|
||||
<Setter Property="Padding" Value="14.5,3,30,3" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type local:MultiSelectSearchComboBox}">
|
||||
<ControlTemplate.Resources>
|
||||
<Storyboard x:Key="OpenStoryboard">
|
||||
<DoubleAnimation
|
||||
EasingFunction="{StaticResource ExponentialEaseOut}"
|
||||
Storyboard.TargetName="PART_DropDown"
|
||||
Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleY)"
|
||||
To="1"
|
||||
Duration="00:00:.2" />
|
||||
</Storyboard>
|
||||
<Storyboard x:Key="CloseStoryboard">
|
||||
<DoubleAnimation
|
||||
EasingFunction="{StaticResource ExponentialEaseOut}"
|
||||
Storyboard.TargetName="PART_DropDown"
|
||||
Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleY)"
|
||||
To="0"
|
||||
Duration="00:00:.2" />
|
||||
</Storyboard>
|
||||
</ControlTemplate.Resources>
|
||||
<Border
|
||||
Name="PART_Border"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SnapsToDevicePixels="True">
|
||||
<Grid Grid.IsSharedSizeScope="true">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="ComboBoxButton" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox
|
||||
Name="PART_EditableTextBox"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Panel.ZIndex="1"
|
||||
Background="Transparent"
|
||||
Focusable="True"
|
||||
Foreground="{DynamicResource PrimaryTextSolidColorBrush}"
|
||||
IsReadOnly="True"
|
||||
SelectionBrush="{DynamicResource WindowBorderBrushSolidColorBrush}"
|
||||
Style="{x:Null}"
|
||||
Template="{StaticResource ComboBoxTextBox}"
|
||||
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
|
||||
<TextBlock
|
||||
x:Name="PART_Watermark"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="Transparent"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
Foreground="{DynamicResource RegularTextSolidColorBrush}"
|
||||
IsHitTestVisible="False"
|
||||
Text="{Binding Path=(local:ElementHelper.Watermark), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
Visibility="Collapsed" />
|
||||
<ToggleButton
|
||||
x:Name="PART_ToggleButton"
|
||||
Grid.ColumnSpan="2"
|
||||
Panel.ZIndex="2"
|
||||
Background="{TemplateBinding Background}"
|
||||
ClickMode="Release"
|
||||
Focusable="False"
|
||||
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Style="{x:Null}"
|
||||
Template="{StaticResource ComboBoxToggleButton1}" />
|
||||
<Popup
|
||||
x:Name="PART_Popup"
|
||||
AllowsTransparency="True"
|
||||
IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
Placement="Bottom"
|
||||
PlacementTarget="{Binding ElementName=PART_Border}"
|
||||
StaysOpen="False">
|
||||
<local:SmallPanel
|
||||
x:Name="PART_DropDown"
|
||||
MinWidth="{TemplateBinding FrameworkElement.ActualWidth}"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||
Margin="24,2,24,24"
|
||||
RenderTransformOrigin=".5,0"
|
||||
SnapsToDevicePixels="True">
|
||||
<local:SmallPanel.RenderTransform>
|
||||
<ScaleTransform ScaleY="0" />
|
||||
</local:SmallPanel.RenderTransform>
|
||||
<Border
|
||||
Name="PART_DropDownBorder"
|
||||
Background="White"
|
||||
BorderBrush="Blue"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Effect="{StaticResource PopupShadowDepth}"
|
||||
SnapsToDevicePixels="True"
|
||||
UseLayoutRounding="True" />
|
||||
<Grid Margin="0,8" ClipToBounds="False">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox
|
||||
x:Name="PART_TextBox"
|
||||
Height="{Binding ElementName=PART_EditableTextBox, Path=Height}"
|
||||
Margin="6,0"
|
||||
local:ElementHelper.CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
local:ElementHelper.IsClear="True"
|
||||
local:ElementHelper.Watermark="{Binding SearchWatermark, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
FontSize="{Binding ElementName=PART_EditableTextBox, Path=FontSize}" />
|
||||
<CheckBox
|
||||
x:Name="PART_SelectAll"
|
||||
Grid.Row="1"
|
||||
Margin="4"
|
||||
local:ElementHelper.CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Content="{TemplateBinding SelectAllContent}"
|
||||
Visibility="{TemplateBinding IsSelectAllActive}" />
|
||||
<local:MultiSelectListBox
|
||||
x:Name="PART_Selector"
|
||||
Grid.Row="2"
|
||||
Margin="1,0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
local:ElementHelper.CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="0"
|
||||
DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
|
||||
ItemContainerStyle="{StaticResource DefaultMultiSelectComboBoxItem}"
|
||||
ItemsSource="{TemplateBinding ItemsSource}"
|
||||
ScrollViewer.CanContentScroll="{Binding ScrollViewer.CanContentScroll, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="{Binding ScrollViewer.HorizontalScrollBarVisibility, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SelectedValuePath="{TemplateBinding SelectedValuePath}"
|
||||
SelectionMode="Multiple"
|
||||
Style="{StaticResource DefaultListBox}" />
|
||||
<local:MultiSelectListBox
|
||||
x:Name="PART_SearchSelector"
|
||||
Grid.Row="2"
|
||||
Margin="1,0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
local:ElementHelper.CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="0"
|
||||
DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
|
||||
ItemContainerStyle="{StaticResource DefaultMultiSelectComboBoxItem}"
|
||||
ItemsSource="{TemplateBinding ItemsSourceSearch}"
|
||||
ScrollViewer.CanContentScroll="{Binding ScrollViewer.CanContentScroll, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="{Binding ScrollViewer.HorizontalScrollBarVisibility, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SelectedValuePath="{TemplateBinding SelectedValuePath}"
|
||||
SelectionMode="Multiple"
|
||||
Style="{StaticResource DefaultListBox}"
|
||||
Visibility="Collapsed" />
|
||||
</Grid>
|
||||
</local:SmallPanel>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger SourceName="PART_ToggleButton" Property="IsChecked" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard x:Name="BeginStoryboardOpenStoryboard" Storyboard="{StaticResource OpenStoryboard}" />
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<StopStoryboard BeginStoryboardName="BeginStoryboardOpenStoryboard" />
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
<Trigger SourceName="PART_ToggleButton" Property="IsChecked" Value="False">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard x:Name="BeginStoryboardCloseStoryboard" Storyboard="{StaticResource CloseStoryboard}" />
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<StopStoryboard BeginStoryboardName="BeginStoryboardCloseStoryboard" />
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="PART_Border" Property="BorderBrush" Value="{DynamicResource PrimaryNormalSolidColorBrush}" />
|
||||
</Trigger>
|
||||
<Trigger SourceName="PART_Popup" Property="AllowsTransparency" Value="True">
|
||||
<Setter TargetName="PART_DropDownBorder" Property="Margin" Value="0,2,0,0" />
|
||||
</Trigger>
|
||||
<Trigger Property="Text" Value="">
|
||||
<Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<Trigger Property="Text" Value="{x:Null}">
|
||||
<Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelectAllActive" Value="False">
|
||||
<Setter TargetName="PART_TextBox" Property="Margin" Value="6,2" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<!-- 多选搜索 Combox End -->
|
||||
</ResourceDictionary>
|
@ -1,82 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DI_Electrical.Style
|
||||
{
|
||||
internal class ConditionalStyleSelector:StyleSelector
|
||||
{
|
||||
public override System.Windows.Style SelectStyle(object item, System.Windows.DependencyObject container)
|
||||
{
|
||||
//获取到转换器返回的值
|
||||
object conditionValue = this.ConditionConverter.Convert(item, null, null, null);
|
||||
foreach (ConditionalStyleRule rule in this.Rules)
|
||||
{
|
||||
//值相同则返回当前样式
|
||||
if (Equals(rule.Value, conditionValue))
|
||||
{
|
||||
return rule.Style;
|
||||
}
|
||||
}
|
||||
|
||||
return base.SelectStyle(item, container);
|
||||
}
|
||||
|
||||
List<ConditionalStyleRule> _Rules;
|
||||
public List<ConditionalStyleRule> Rules
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._Rules == null)
|
||||
{
|
||||
this._Rules = new List<ConditionalStyleRule>();
|
||||
}
|
||||
|
||||
return this._Rules;
|
||||
}
|
||||
}
|
||||
|
||||
IValueConverter _ConditionConverter;
|
||||
public IValueConverter ConditionConverter
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ConditionConverter;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._ConditionConverter = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ConditionalStyleRule
|
||||
{
|
||||
object _Value;
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
System.Windows.Style _Style;
|
||||
public System.Windows.Style Style
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Style;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._Style = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using DI_Electrical.ViewModels;
|
||||
|
||||
namespace DI_Electrical.Style
|
||||
{
|
||||
internal class SignalNoticeStyleSelector:StyleSelector
|
||||
{
|
||||
public override System.Windows.Style SelectStyle(object item, DependencyObject container)
|
||||
{
|
||||
SignalNotice conditionValue = item as SignalNotice;
|
||||
string value = conditionValue.CheckFLG.ToString();
|
||||
foreach (ConditionalStyleRule rule in this.Rules)
|
||||
{
|
||||
//值相同则返回当前样式
|
||||
if (Equals(rule.Value, value))
|
||||
{
|
||||
return rule.Style;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return base.SelectStyle(item, container);
|
||||
}
|
||||
|
||||
List<ConditionalStyleRule> _Rules;
|
||||
public List<ConditionalStyleRule> Rules
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._Rules == null)
|
||||
{
|
||||
this._Rules = new List<ConditionalStyleRule>();
|
||||
}
|
||||
|
||||
return this._Rules;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
using System.Windows;
|
||||
using DI_Electrical.Helper;
|
||||
using DI_Electrical.Services;
|
||||
using SWS.Commons;
|
||||
using SWS.Service;
|
||||
|
||||
namespace DI_Electrical.ViewModels
|
||||
{
|
||||
|
@ -1,17 +1,12 @@
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using DI_Electrical.Helper;
|
||||
using DI_Electrical.Model;
|
||||
using DI_Electrical.Services;
|
||||
using DI_Electrical.Views;
|
||||
using Prism.Events;
|
||||
using Prism.Ioc;
|
||||
using Prism.Mvvm;
|
||||
using Prism.Services.Dialogs;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using SWS.Service;
|
||||
using Telerik.Windows.Controls;
|
||||
using Unity;
|
||||
using DialogParameters = Prism.Services.Dialogs.DialogParameters;
|
||||
|
||||
namespace DI_Electrical.ViewModels
|
||||
{
|
||||
@ -121,7 +116,7 @@ namespace DI_Electrical.ViewModels
|
||||
else
|
||||
{
|
||||
IsBusy = true; BusyContent = "登录中...";
|
||||
var res = await _Service.Login(UserName, Userpass);
|
||||
var res = await _Service.Login(UserName, Userpass);
|
||||
IsBusy = false;
|
||||
if (string.IsNullOrEmpty(res))
|
||||
{
|
||||
|
@ -1,16 +1,12 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using DI_Electrical.Event;
|
||||
using DI_Electrical.Views.Dialog;
|
||||
using DI_Electrical.Views.Dialog.DialogSignalManagements;
|
||||
using DryIoc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using Prism.Ioc;
|
||||
using Prism.Mvvm;
|
||||
using Prism.Services.Dialogs;
|
||||
using SWS.Commons;
|
||||
using SWS.WPF.Views;
|
||||
using Telerik.Windows.Controls;
|
||||
using DialogParameters = Prism.Services.Dialogs.DialogParameters;
|
||||
|
||||
namespace DI_Electrical.ViewModels
|
||||
{
|
||||
@ -54,7 +50,7 @@ namespace DI_Electrical.ViewModels
|
||||
}
|
||||
public void onShowDialogTest(object o)
|
||||
{
|
||||
IDialogParameters par = new DialogParameters();
|
||||
IDialogParameters par = new Prism.Services.Dialogs.DialogParameters();
|
||||
par.Add(GlobalObject.dialogPar.para1.ToString(), "abc你我他");
|
||||
_dialogService.ShowDialog(nameof(DialogTest), par, (result) =>
|
||||
{
|
||||
@ -72,7 +68,7 @@ namespace DI_Electrical.ViewModels
|
||||
}
|
||||
public void onShowDialogSignalManagement(object o)
|
||||
{
|
||||
IDialogParameters par = new DialogParameters();
|
||||
IDialogParameters par = new Prism.Services.Dialogs.DialogParameters();
|
||||
_dialogService.ShowDialog(nameof(DialogSignalManagement), par, (result) =>
|
||||
{
|
||||
var res = result.Parameters.GetValue<string>(GlobalObject.dialogPar.para1.ToString());
|
||||
|
@ -1,11 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using DI_Electrical.Event;
|
||||
using DI_Electrical.Helper;
|
||||
using DI_Electrical.Model;
|
||||
using DI_Electrical.Services;
|
||||
using Prism.Events;
|
||||
using Prism.Ioc;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using SWS.Service;
|
||||
using Unity;
|
||||
|
||||
namespace DI_Electrical.ViewModels
|
||||
{
|
||||
@ -32,12 +33,13 @@ namespace DI_Electrical.ViewModels
|
||||
ProjectService _Service;
|
||||
ConfigService _configService;
|
||||
IEventAggregator _eventAggregator;
|
||||
public ProjectViewModel(IContainerProvider container) : base()
|
||||
public ProjectViewModel() : base()
|
||||
{
|
||||
title = "项目选择";
|
||||
_Service = container.Resolve<ProjectService>();
|
||||
_configService = container.Resolve<ConfigService>();
|
||||
_eventAggregator= container.Resolve<IEventAggregator>();
|
||||
|
||||
_Service = GlobalObject.container.Resolve<ProjectService>();
|
||||
_configService = GlobalObject.container.Resolve<ConfigService>();
|
||||
_eventAggregator= GlobalObject.container.Resolve<IEventAggregator>();
|
||||
}
|
||||
public async override void onWindow_loaded(object para)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using DI_Electrical.Models;
|
||||
using SWS.Model;
|
||||
|
||||
namespace DI_Electrical.Views.CustomControl
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:DI_Electrical.Views"
|
||||
xmlns:local2="clr-namespace:DI_Electrical.Helper"
|
||||
xmlns:local2="clr-namespace:SWS.Commons;assembly=SWS.Commons"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
||||
Width="300"
|
||||
|
@ -1,14 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="DryIoc.dll" version="5.4.3" targetFramework="net48" />
|
||||
<package id="DryIoc.dll" version="4.7.7" targetFramework="net48" />
|
||||
<package id="log4net" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.1" targetFramework="net48" />
|
||||
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.122" targetFramework="net48" />
|
||||
<package id="Prism.Container.Abstractions" version="9.0.107" targetFramework="net48" />
|
||||
<package id="Prism.Container.DryIoc" version="9.0.107" targetFramework="net48" />
|
||||
<package id="Prism.Container.Unity" version="9.0.106" targetFramework="net48" />
|
||||
<package id="Prism.Core" version="8.1.97" targetFramework="net48" />
|
||||
<package id="Prism.DryIoc" version="8.1.97" targetFramework="net48" />
|
||||
<package id="Prism.Unity" version="8.1.97" targetFramework="net48" />
|
||||
<package id="Prism.Wpf" version="8.1.97" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net48" />
|
||||
|
@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34221.43
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.CAD", "SWS.CAD\SWS.CAD.csproj", "{6BD9B3FC-7D55-4762-AF68-A50183342537}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CAD.Extend", "CAD.Extend\CAD.Extend.csproj", "{8740B023-B585-4E69-8521-4F62FA754A1B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.Model", "SWS.Model\SWS.Model.csproj", "{1995385B-D1B0-4C55-835E-D3E769972A6A}"
|
||||
@ -27,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DI-Electrical", "DI-Electri
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.WPF", "SWS.WPF\SWS.WPF.csproj", "{7AFF9117-78E7-4395-9F23-6DCFE09F9299}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.CAD", "SWS.CAD\SWS.CAD.csproj", "{6BD9B3FC-7D55-4762-AF68-A50183342537}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -39,22 +39,6 @@ Global
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|x64.Build.0 = Debug|x64
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|x86.Build.0 = Debug|x86
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x64.ActiveCfg = Release|x64
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x64.Build.0 = Release|x64
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x86.ActiveCfg = Release|x86
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x86.Build.0 = Release|x86
|
||||
{8740B023-B585-4E69-8521-4F62FA754A1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8740B023-B585-4E69-8521-4F62FA754A1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8740B023-B585-4E69-8521-4F62FA754A1B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
@ -215,15 +199,31 @@ Global
|
||||
{7AFF9117-78E7-4395-9F23-6DCFE09F9299}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7AFF9117-78E7-4395-9F23-6DCFE09F9299}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7AFF9117-78E7-4395-9F23-6DCFE09F9299}.Release|x86.Build.0 = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x64.Build.0 = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537} = {00C64D96-E9F1-4525-A542-C7D23206B2E4}
|
||||
{8740B023-B585-4E69-8521-4F62FA754A1B} = {00C64D96-E9F1-4525-A542-C7D23206B2E4}
|
||||
{A399B5A6-0E27-417B-BF2A-6B1FF89EB6A0} = {00C64D96-E9F1-4525-A542-C7D23206B2E4}
|
||||
{924A2824-BE62-42A7-81A8-49BEFCB3801F} = {00C64D96-E9F1-4525-A542-C7D23206B2E4}
|
||||
{6BD9B3FC-7D55-4762-AF68-A50183342537} = {00C64D96-E9F1-4525-A542-C7D23206B2E4}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {819AA00B-0A09-49DD-AC3A-2AC6041E0524}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Bricscad.ApplicationServices;
|
||||
using SWS.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -2,34 +2,28 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Threading;
|
||||
using Aspose.Cells.Charts;
|
||||
using Bricscad.ApplicationServices;
|
||||
using Bricscad.EditorInput;
|
||||
using Bricscad.Ribbon;
|
||||
using Bricscad.Windows;
|
||||
using Prism.Dialogs;
|
||||
using Prism.Events;
|
||||
using Prism.Ioc;
|
||||
using Prism.Services.Dialogs;
|
||||
using SWS.CAD;
|
||||
using SWS.CAD.CADFunc;
|
||||
using SWS.CAD.Event;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Services;
|
||||
using SWS.CAD.Views;
|
||||
using SWS.CAD.Views.CustomControl;
|
||||
using SWS.CAD.Views.Dialog;
|
||||
using SWS.CAD.Views.SignalManagementViews;
|
||||
using Teigha.DatabaseServices;
|
||||
using Teigha.Runtime;
|
||||
using Telerik.Windows.Controls;
|
||||
using Unity;
|
||||
using Application = Bricscad.ApplicationServices.Application;
|
||||
using Panel = Bricscad.Windows.Panel;
|
||||
using GlobalObject = SWS.Commons.GlobalObject;
|
||||
using SWS.Model;
|
||||
using SWS.Service;
|
||||
|
||||
|
||||
[assembly: CommandClass(typeof(Commands))]
|
||||
@ -56,7 +50,7 @@ namespace SWS.CAD
|
||||
var drawingView = GlobalObject.container.Resolve<LeftPanel>();
|
||||
Panel panel = new Panel(nameof(LeftPanel), dockTemplate, drawingView);
|
||||
panel.Title = "DI_左面板";
|
||||
panel.Icon = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.CSharp.ico");
|
||||
panel.Icon = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"CSharp.ico");
|
||||
panel.Visible = true;
|
||||
|
||||
AddTab();
|
||||
@ -69,7 +63,7 @@ namespace SWS.CAD
|
||||
var drawingView2 = GlobalObject.container.Resolve<RightPanel>();
|
||||
panel = new Panel(nameof(RightPanel), dockTemplate2, drawingView2);
|
||||
panel.Title = "DI_右面板";
|
||||
panel.Icon = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.CSharp.ico");
|
||||
panel.Icon = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"CSharp.ico");
|
||||
panel.Visible = true;
|
||||
|
||||
}
|
||||
@ -116,7 +110,7 @@ namespace SWS.CAD
|
||||
|
||||
ObservableCollection<propertyModel> ReslistPro = new ObservableCollection<propertyModel>();
|
||||
//打开窗体
|
||||
Prism.Dialogs.DialogParameters para = new Prism.Dialogs.DialogParameters();
|
||||
var para = new Prism.Services.Dialogs.DialogParameters();
|
||||
para.Add(GlobalObject.dialogPar.title.ToString(), title);
|
||||
para.Add(GlobalObject.dialogPar.para1.ToString(), listPropertys);
|
||||
var _dialogService = GlobalObject._prismContainer.Resolve<IDialogService>();
|
||||
@ -167,7 +161,7 @@ namespace SWS.CAD
|
||||
}
|
||||
|
||||
});
|
||||
project.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.OpenProject.png");
|
||||
project.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"OpenProject.png");
|
||||
project.Id = "选择项目";
|
||||
userSource.Items.Add(project);
|
||||
#endregion
|
||||
@ -180,7 +174,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnRefresh.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.RefreshProject.png");
|
||||
btnRefresh.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"RefreshProject.png");
|
||||
btnRefresh.Id = "刷新项目";
|
||||
userSource.Items.Add(btnRefresh);
|
||||
#endregion
|
||||
@ -200,7 +194,7 @@ namespace SWS.CAD
|
||||
//Application.ShowModalDialog(Application.MainWindow,);// 用来显示WinForms对话框
|
||||
Application.ShowModalWindow(Application.MainWindow.Handle, loginView);//用来显示WPF的对话框,任务栏里可以看到2个Windows
|
||||
});
|
||||
login.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.Login.png");
|
||||
login.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"Login.png");
|
||||
login.Id = "用户登录";
|
||||
//userSource.Items.Add(login);
|
||||
ribbonRowPanel.Items.Add(login);
|
||||
@ -215,7 +209,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnProperty.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.Message.png");
|
||||
btnProperty.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"Message.png");
|
||||
btnProperty.Id = "属性窗口";
|
||||
ribbonRowPanel.Items.Add(btnProperty);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -236,7 +230,7 @@ namespace SWS.CAD
|
||||
{
|
||||
var View = GlobalObject.container.Resolve<UserNotification>();
|
||||
var eventAggregator = GlobalObject.container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<SelectProjectEvent>().Publish(new System.Collections.Generic.List<Models.ec_notification>());
|
||||
eventAggregator.GetEvent<SelectProjectEvent>().Publish(new List<SWS.Model.ec_notification>());
|
||||
Application.ShowModalWindow(Application.MainWindow.Handle, View);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
@ -245,7 +239,7 @@ namespace SWS.CAD
|
||||
}
|
||||
|
||||
});
|
||||
UserNotification.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.Message.png");
|
||||
UserNotification.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"Message.png");
|
||||
UserNotification.Id = "项目消息";
|
||||
//userSource.Items.Add(UserNotification);
|
||||
ribbonRowPanel.Items.Add(UserNotification);
|
||||
@ -273,7 +267,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnCableDrop.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.CalCable.png");
|
||||
btnCableDrop.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"CalCable.png");
|
||||
btnCableDrop.Id = "电缆压降";
|
||||
ribbonRowPanel.Items.Add(btnCableDrop);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -287,7 +281,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnCalBoot.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.CalBoot.png");
|
||||
btnCalBoot.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"CalBoot.png");
|
||||
btnCalBoot.Id = "启动顺序";
|
||||
ribbonRowPanel.Items.Add(btnCalBoot);
|
||||
#endregion
|
||||
@ -311,7 +305,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnLightLine.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.lightLine.png");
|
||||
btnLightLine.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"lightLine.png");
|
||||
btnLightLine.Id = "绘照明线路";
|
||||
designSource.Items.Add(btnLightLine);
|
||||
#endregion
|
||||
@ -326,7 +320,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnEquipmentjoin.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.Equipmentjoin.png");
|
||||
btnEquipmentjoin.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"Equipmentjoin.png");
|
||||
btnEquipmentjoin.Id = "生成端子图";
|
||||
ribbonRowPanel.Items.Add(btnEquipmentjoin);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -340,7 +334,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnJoinSys.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.joinsys.png");
|
||||
btnJoinSys.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"joinsys.png");
|
||||
btnJoinSys.Id = "生成系统图";
|
||||
ribbonRowPanel.Items.Add(btnJoinSys);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -354,7 +348,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnOPC.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.OPC.png");
|
||||
btnOPC.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"OPC.png");
|
||||
btnOPC.Id = "生成OPC";
|
||||
ribbonRowPanel.Items.Add(btnOPC);
|
||||
#endregion
|
||||
@ -370,7 +364,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnPlaneLayout.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.PlaneLayout.png");
|
||||
btnPlaneLayout.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"PlaneLayout.png");
|
||||
btnPlaneLayout.Id = "生成布置图";
|
||||
ribbonRowPanel.Items.Add(btnPlaneLayout);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -384,7 +378,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnEquipmentSys.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.EquipmentSys.png");
|
||||
btnEquipmentSys.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"EquipmentSys.png");
|
||||
btnEquipmentSys.Id = "生成链路系统图";
|
||||
ribbonRowPanel.Items.Add(btnEquipmentSys);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -398,7 +392,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnBatchSwitch.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.BatchSwitch.png");
|
||||
btnBatchSwitch.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"BatchSwitch.png");
|
||||
btnBatchSwitch.Id = "照明回路开关";
|
||||
ribbonRowPanel.Items.Add(btnBatchSwitch);
|
||||
#endregion
|
||||
@ -423,7 +417,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnSwitchbox.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.Switchbox.png");
|
||||
btnSwitchbox.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"Switchbox.png");
|
||||
btnSwitchbox.Id = "分电箱";
|
||||
dataSource.Items.Add(btnSwitchbox);
|
||||
#endregion
|
||||
@ -501,7 +495,7 @@ namespace SWS.CAD
|
||||
};
|
||||
|
||||
//打开窗体
|
||||
Prism.Dialogs.DialogParameters para = new Prism.Dialogs.DialogParameters();
|
||||
var para = new Prism.Services.Dialogs.DialogParameters();
|
||||
para.Add(GlobalObject.dialogPar.info.ToString(), res[0]);
|
||||
para.Add(GlobalObject.dialogPar.para1.ToString(), model1);
|
||||
para.Add(GlobalObject.dialogPar.para2.ToString(), model2);
|
||||
@ -517,7 +511,7 @@ namespace SWS.CAD
|
||||
});
|
||||
#endregion
|
||||
});
|
||||
btnParallel.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.Parallel.png");
|
||||
btnParallel.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"Parallel.png");
|
||||
btnParallel.Id = "平行电缆";
|
||||
ribbonRowPanel.Items.Add(btnParallel);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -544,7 +538,7 @@ namespace SWS.CAD
|
||||
Database db = doc.Database;
|
||||
Editor ed = doc.Editor;
|
||||
//选择的元素返回的属性信息
|
||||
var ResTagInfosByPixels = new ec_objecttype();
|
||||
var ResTagInfosByPixels = new Model.ec_objecttype();
|
||||
var listPropertys = new List<propertyModel>();
|
||||
// 持续选择直到获取有效电缆
|
||||
bool isValidCable = false;
|
||||
@ -759,7 +753,7 @@ namespace SWS.CAD
|
||||
|
||||
IntPtr cadHandle = Bricscad.ApplicationServices.Application.MainWindow.Handle;
|
||||
//打开窗体
|
||||
Prism.Dialogs.DialogParameters para = new Prism.Dialogs.DialogParameters();
|
||||
var para = new Prism.Services.Dialogs.DialogParameters();
|
||||
//para.Add(GlobalObject.dialogPar.para1.ToString(), "6e2919e4-28cd-4fb6-9035-10b2ff0e30fb");
|
||||
para.Add(GlobalObject.dialogPar.info.ToString(), cadHandle);
|
||||
|
||||
@ -788,7 +782,7 @@ namespace SWS.CAD
|
||||
|
||||
#endregion
|
||||
});
|
||||
btnCableConnect.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.CableConnect.png");
|
||||
btnCableConnect.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"CableConnect.png");
|
||||
btnCableConnect.Id = "电缆连接";
|
||||
ribbonRowPanel.Items.Add(btnCableConnect);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -801,7 +795,7 @@ namespace SWS.CAD
|
||||
btnIO.CommandHandler = new DelegateCommand(x =>
|
||||
{
|
||||
//打开窗体
|
||||
Prism.Dialogs.DialogParameters para = new Prism.Dialogs.DialogParameters();
|
||||
var para = new Prism.Services.Dialogs.DialogParameters();
|
||||
var _dialogService = GlobalObject._prismContainer.Resolve<IDialogService>();
|
||||
_dialogService.ShowDialog(nameof(DialogIODistribution), para, (RES) =>
|
||||
{
|
||||
@ -813,7 +807,7 @@ namespace SWS.CAD
|
||||
{ }
|
||||
});
|
||||
});
|
||||
btnIO.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.IO.png");
|
||||
btnIO.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"IO.png");
|
||||
btnIO.Id = "IO分配";
|
||||
ribbonRowPanel.Items.Add(btnIO);
|
||||
#endregion
|
||||
@ -827,10 +821,15 @@ namespace SWS.CAD
|
||||
btnSinalManage.ButtonStyle = RibbonButtonStyle.SmallWithText;
|
||||
btnSinalManage.CommandHandler = new DelegateCommand(x =>
|
||||
{
|
||||
if (GlobalObject.userInfo == null || GlobalObject.curProject == null)
|
||||
{
|
||||
MessageBox.Show("请先登录系统并选择项目!");
|
||||
return;
|
||||
}
|
||||
//打开窗体
|
||||
Prism.Dialogs.DialogParameters para = new Prism.Dialogs.DialogParameters();
|
||||
var para = new Prism.Services.Dialogs.DialogParameters();
|
||||
var _dialogService = GlobalObject._prismContainer.Resolve<IDialogService>();
|
||||
_dialogService.ShowDialog(nameof(DialogSignalManagement), para, (RES) =>
|
||||
_dialogService.ShowDialog(nameof(SWS.WPF.Views.DialogSignalManagement), para, (RES) =>
|
||||
{
|
||||
if (RES.Result == ButtonResult.Yes)
|
||||
{
|
||||
@ -840,7 +839,7 @@ namespace SWS.CAD
|
||||
{ }
|
||||
});
|
||||
});
|
||||
btnSinalManage.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.SinalManage.png");
|
||||
btnSinalManage.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SinalManage.png");
|
||||
btnSinalManage.Id = "信号管理";
|
||||
ribbonRowPanel.Items.Add(btnSinalManage);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -854,7 +853,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnCableSinal.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.CableSinal.png");
|
||||
btnCableSinal.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"CableSinal.png");
|
||||
btnCableSinal.Id = "信号预分配";
|
||||
ribbonRowPanel.Items.Add(btnCableSinal);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -868,7 +867,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnRelevancy.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.relevancy.png");
|
||||
btnRelevancy.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"relevancy.png");
|
||||
btnRelevancy.Id = "批量反向关联";
|
||||
ribbonRowPanel.Items.Add(btnRelevancy);
|
||||
#endregion
|
||||
@ -884,7 +883,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnGraphRec.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.GraphRec.png");
|
||||
btnGraphRec.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"GraphRec.png");
|
||||
btnGraphRec.Id = "系统图识别";
|
||||
ribbonRowPanel.Items.Add(btnGraphRec);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -898,7 +897,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnVerticalRec.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.VerticalRec.png");
|
||||
btnVerticalRec.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"VerticalRec.png");
|
||||
btnVerticalRec.Id = "竖向图识别";
|
||||
ribbonRowPanel.Items.Add(btnVerticalRec);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -912,7 +911,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnLightLineRec.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.lightLine.png");
|
||||
btnLightLineRec.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"lightLine.png");
|
||||
btnLightLineRec.Id = "链路图识别";
|
||||
ribbonRowPanel.Items.Add(btnLightLineRec);
|
||||
#endregion
|
||||
@ -936,7 +935,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnRefreshText.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.RefreshText.png");
|
||||
btnRefreshText.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"RefreshText.png");
|
||||
btnRefreshText.Id = "刷新标注";
|
||||
dwgRefreshSource.Items.Add(btnRefreshText);
|
||||
#endregion
|
||||
@ -951,7 +950,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnRefreshBlock.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.RefreshBlock.png");
|
||||
btnRefreshBlock.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"RefreshBlock.png");
|
||||
btnRefreshBlock.Id = "刷新元件";
|
||||
ribbonRowPanel.Items.Add(btnRefreshBlock);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -965,7 +964,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnRefreshFrame.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.RefreshFrame.png");
|
||||
btnRefreshFrame.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"RefreshFrame.png");
|
||||
btnRefreshFrame.Id = "刷新图框";
|
||||
ribbonRowPanel.Items.Add(btnRefreshFrame);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -980,7 +979,7 @@ namespace SWS.CAD
|
||||
var configView = GlobalObject.container.Resolve<Config>();
|
||||
Application.ShowModalWindow(Application.MainWindow.Handle, configView);
|
||||
});
|
||||
btnRefreshLink.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.RefreshLink.png");
|
||||
btnRefreshLink.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"RefreshLink.png");
|
||||
btnRefreshLink.Id = "刷新连接";
|
||||
ribbonRowPanel.Items.Add(btnRefreshLink);
|
||||
#endregion
|
||||
@ -996,7 +995,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnShowLink.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.ShowLink.png");
|
||||
btnShowLink.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"ShowLink.png");
|
||||
btnShowLink.Id = "查看链路";
|
||||
ribbonRowPanel.Items.Add(btnShowLink);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -1010,7 +1009,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnUpdatePosition.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.UpdatePosition.png");
|
||||
btnUpdatePosition.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"UpdatePosition.png");
|
||||
btnUpdatePosition.Id = "刷新位置";
|
||||
ribbonRowPanel.Items.Add(btnUpdatePosition);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -1024,7 +1023,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnRefreshPosition.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.RefreshPosition.png");
|
||||
btnRefreshPosition.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"RefreshPosition.png");
|
||||
btnRefreshPosition.Id = "刷新坐标";
|
||||
ribbonRowPanel.Items.Add(btnRefreshPosition);
|
||||
#endregion
|
||||
@ -1040,7 +1039,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnActiveObject.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.ActiveObject.png");
|
||||
btnActiveObject.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"ActiveObject.png");
|
||||
btnActiveObject.Id = "图元高亮";
|
||||
ribbonRowPanel.Items.Add(btnActiveObject);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -1066,7 +1065,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnImput.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.Imput.png");
|
||||
btnImput.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"Imput.png");
|
||||
btnImput.Id = "元件导入";
|
||||
ribbonRowPanel.Items.Add(btnImput);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -1080,7 +1079,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnExport.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.Export.png");
|
||||
btnExport.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"Export.png");
|
||||
btnExport.Id = "元件导出";
|
||||
ribbonRowPanel.Items.Add(btnExport);
|
||||
#endregion
|
||||
@ -1096,7 +1095,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnCheckCable.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.CheckCable.png");
|
||||
btnCheckCable.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"CheckCable.png");
|
||||
btnCheckCable.Id = "电缆检查";
|
||||
ribbonRowPanel.Items.Add(btnCheckCable);
|
||||
ribbonRowPanel.Items.Add(new RibbonRowBreak());//换行,这样可以使按钮多行排列
|
||||
@ -1110,7 +1109,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnPropertyCheck.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.Property.png");
|
||||
btnPropertyCheck.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"Property.png");
|
||||
btnPropertyCheck.Id = "属性检查";
|
||||
ribbonRowPanel.Items.Add(btnPropertyCheck);
|
||||
#endregion
|
||||
@ -1140,7 +1139,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnDwgConfig.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.DConfig.png");
|
||||
btnDwgConfig.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"DConfig.png");
|
||||
btnDwgConfig.Id = "绘图配置";
|
||||
splitButton.Items.Add(btnDwgConfig);
|
||||
#endregion
|
||||
@ -1153,7 +1152,7 @@ namespace SWS.CAD
|
||||
{
|
||||
MessageBox.Show("功能开发中...");
|
||||
});
|
||||
btnAaConfig.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.TConfig.png");
|
||||
btnAaConfig.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"TConfig.png");
|
||||
btnAaConfig.Id = "标注配置";
|
||||
splitButton.Items.Add(btnAaConfig);
|
||||
#endregion
|
||||
@ -1167,7 +1166,7 @@ namespace SWS.CAD
|
||||
var configView = GlobalObject.container.Resolve<Config>();
|
||||
Application.ShowModalWindow(Application.MainWindow.Handle, configView);
|
||||
});
|
||||
btnSystemConfig.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SWS.CAD.Images.SConfig.png");
|
||||
btnSystemConfig.Image = GlobalObject.ImageSourceFromEmbeddedResourceStream(@"SConfig.png");
|
||||
btnSystemConfig.Id = "系统配置";
|
||||
splitButton.Items.Add(btnSystemConfig);
|
||||
#endregion
|
||||
|
@ -1,11 +1,5 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using System;
|
||||
using Prism.Events;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,11 +1,4 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Prism.Events;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,11 +1,5 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,12 +1,6 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Views.CustomControl;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,12 +1,6 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Views.CustomControl;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,12 +1,6 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Views.CustomControl;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,12 +1,5 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Prism.Events;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,12 +1,4 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Prism.Events;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -1,11 +1,5 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using System;
|
||||
using Prism.Events;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,12 +1,6 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Views.CustomControl;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,11 +1,5 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
|
@ -1,15 +1,9 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
public class tagChangeEvent : PubSubEvent<TreeModel>
|
||||
public class tagChangeEvent : PubSubEvent<Model.TreeModel>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,9 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Prism.Events;
|
||||
using SWS.CAD.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SWS.CAD.Event
|
||||
{
|
||||
public class treeNodeChangeEvent : PubSubEvent<TreeModel>
|
||||
public class treeNodeChangeEvent : PubSubEvent<Model.TreeModel>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -1,29 +1,23 @@
|
||||
using IniParser;
|
||||
using Prism.Ioc;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.CAD.Services;
|
||||
using SWS.Model;
|
||||
using SWS.Service;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Media;
|
||||
using Unity;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||
|
||||
namespace SWS.CAD
|
||||
{
|
||||
public class GlobalObject
|
||||
public class GlobalObje
|
||||
{
|
||||
public static string templateForDrawing = "普通图框";
|
||||
public static string editorPre = "DI_Electrical ";
|
||||
@ -54,18 +48,18 @@ namespace SWS.CAD
|
||||
}
|
||||
|
||||
#region 图纸类型
|
||||
static List<ec_dataitemdetail> _dwgType;
|
||||
static List<SWS.Model.ec_dataitemdetail> _dwgType;
|
||||
/// <summary>
|
||||
/// 初始化图纸类型列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<ec_dataitemdetail> DwgType()
|
||||
public static List<SWS.Model.ec_dataitemdetail> DwgType()
|
||||
{
|
||||
var res0 = new ec_dataitem { DataItemName = "图纸类型", DataItemCode = DBConst.Be_DrawingType.ToString() };
|
||||
|
||||
if (_dwgType == null)
|
||||
{
|
||||
var serv = GlobalObject.container.Resolve<DataItemService>();
|
||||
var serv = GlobalObje.container.Resolve<DataItemService>();
|
||||
var res = Task.Run(() => serv.GetDetails(DBConst.Be_DrawingType.ToString()));
|
||||
var res2 = res.Result;
|
||||
return res2;
|
||||
@ -78,18 +72,18 @@ namespace SWS.CAD
|
||||
#endregion
|
||||
|
||||
#region 材料范围
|
||||
static List<ec_dataitemdetail> _dwgMaterialRange;
|
||||
static List<SWS.Model.ec_dataitemdetail> _dwgMaterialRange;
|
||||
/// <summary>
|
||||
/// 初始化材料材料范围
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<ec_dataitemdetail> DwgMaterialRange()
|
||||
public static List<SWS.Model.ec_dataitemdetail> DwgMaterialRange()
|
||||
{
|
||||
var res0 = new ec_dataitem { DataItemName = "材料范围", DataItemCode = DBConst.Be_MaterialRange.ToString() };
|
||||
|
||||
if (_dwgMaterialRange == null)
|
||||
{
|
||||
var serv = GlobalObject.container.Resolve<DataItemService>();
|
||||
var serv = GlobalObje.container.Resolve<DataItemService>();
|
||||
var res = Task.Run(() => serv.GetDetails(DBConst.Be_MaterialRange.ToString()));
|
||||
var res2 = res.Result;
|
||||
return res2;
|
||||
@ -102,18 +96,18 @@ namespace SWS.CAD
|
||||
#endregion
|
||||
|
||||
#region 材料统计
|
||||
static List<ec_dataitemdetail> _dwgMaterialCensus;
|
||||
static List<SWS.Model.ec_dataitemdetail> _dwgMaterialCensus;
|
||||
/// <summary>
|
||||
/// 初始化材料统计列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<ec_dataitemdetail> DwgMaterialCensus()
|
||||
public static List<SWS.Model.ec_dataitemdetail> DwgMaterialCensus()
|
||||
{
|
||||
var res0 = new ec_dataitem { DataItemName = "材料统计", DataItemCode = DBConst.Be_MaterialCensus.ToString() };
|
||||
|
||||
if (_dwgMaterialCensus == null)
|
||||
{
|
||||
var serv = GlobalObject.container.Resolve<DataItemService>();
|
||||
var serv = GlobalObje.container.Resolve<DataItemService>();
|
||||
var res = Task.Run(() => serv.GetDetails(DBConst.Be_MaterialCensus.ToString()));
|
||||
var res2 = res.Result;
|
||||
return res2;
|
||||
@ -126,18 +120,18 @@ namespace SWS.CAD
|
||||
#endregion
|
||||
|
||||
#region 图纸阶段
|
||||
static List<ec_dataitemdetail> _dwgStage;
|
||||
static List<SWS.Model.ec_dataitemdetail> _dwgStage;
|
||||
/// <summary>
|
||||
/// 初始化图纸阶段列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<ec_dataitemdetail> DwgStage()
|
||||
public static List<SWS.Model.ec_dataitemdetail> DwgStage()
|
||||
{
|
||||
var res0 = new ec_dataitem { DataItemName = "图纸阶段", DataItemCode = DBConst.Be_DrawingStage.ToString() };
|
||||
|
||||
if (_dwgStage == null)
|
||||
{
|
||||
var serv = GlobalObject.container.Resolve<DataItemService>();
|
||||
var serv = GlobalObje.container.Resolve<DataItemService>();
|
||||
var res = Task.Run(() => serv.GetDetails(DBConst.Be_DrawingStage.ToString()));
|
||||
var res2 = res.Result;
|
||||
return res2;
|
||||
@ -150,18 +144,18 @@ namespace SWS.CAD
|
||||
#endregion
|
||||
|
||||
#region 图纸系统
|
||||
static ObservableCollection<TreeModel> _dwgSystem;
|
||||
static ObservableCollection<Model.TreeModel> _dwgSystem;
|
||||
/// <summary>
|
||||
/// 初始化图纸系统列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ObservableCollection<TreeModel> DwgSystem()
|
||||
public static ObservableCollection<Model.TreeModel> DwgSystem()
|
||||
{
|
||||
var res0 = new ec_dataitem { DataItemName = "图纸系统", DataItemCode = DBConst.Be_DrawingSystem.ToString() };
|
||||
|
||||
if (_dwgSystem == null)
|
||||
{
|
||||
var serv = GlobalObject.container.Resolve<DataItemService>();
|
||||
var serv = GlobalObje.container.Resolve<DataItemService>();
|
||||
var res = Task.Run(() => serv.GetDetails(DBConst.Be_DrawingSystem.ToString()));
|
||||
var res2 = res.Result;
|
||||
var res3 = DataItemDetailsToTree(res2);
|
||||
@ -181,10 +175,10 @@ namespace SWS.CAD
|
||||
/// <param name="listData">列表数据</param>
|
||||
/// <param name="isChildres">是否子节点遍历添加</param>
|
||||
/// <returns></returns>
|
||||
public static ObservableCollection<TreeModel> DataItemDetailsToTree(List<ec_dataitemdetail> listData, bool isChildres = false)
|
||||
public static ObservableCollection<Model.TreeModel> DataItemDetailsToTree(List<SWS.Model.ec_dataitemdetail> listData, bool isChildres = false)
|
||||
{
|
||||
ObservableCollection<TreeModel> result = new ObservableCollection<TreeModel>();
|
||||
List<ec_dataitemdetail> list = new List<ec_dataitemdetail>();
|
||||
ObservableCollection<Model.TreeModel> result = new ObservableCollection<Model.TreeModel>();
|
||||
List<SWS.Model.ec_dataitemdetail> list = new List<SWS.Model.ec_dataitemdetail>();
|
||||
if (isChildres)
|
||||
{ list = listData; }
|
||||
else
|
||||
@ -200,7 +194,7 @@ namespace SWS.CAD
|
||||
{
|
||||
//获取子节点
|
||||
var childrens = DataItemDetailsToTree(details, true);
|
||||
result.Add(new TreeModel
|
||||
result.Add(new Model.TreeModel
|
||||
{
|
||||
ID = data.DataItemDetailID,
|
||||
Text = data.DataItemName,
|
||||
@ -210,7 +204,7 @@ namespace SWS.CAD
|
||||
else
|
||||
{
|
||||
//没有子节点就添加当前节点Node
|
||||
result.Add(new TreeModel
|
||||
result.Add(new Model.TreeModel
|
||||
{
|
||||
ID = data.DataItemDetailID,
|
||||
Text = data.DataItemName,
|
||||
@ -226,14 +220,14 @@ namespace SWS.CAD
|
||||
/// <summary>
|
||||
/// 对象类型树
|
||||
/// </summary>
|
||||
public static List<TreeModel> objectTypeTree = new List<TreeModel>();
|
||||
public static List<Model.TreeModel> objectTypeTree = new List<Model.TreeModel>();
|
||||
#endregion
|
||||
|
||||
#region 设计浏览树
|
||||
/// <summary>
|
||||
/// 设计浏览树
|
||||
/// </summary>
|
||||
public static List<TreeModel> designTree = new List<TreeModel>();
|
||||
public static List<Model.TreeModel> designTree = new List<Model.TreeModel>();
|
||||
#endregion
|
||||
|
||||
public enum dialogPar
|
@ -1,8 +1,8 @@
|
||||
using IniParser;
|
||||
using SWS.CAD.Services;
|
||||
using SWS.Commons;
|
||||
using SWS.Service;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Media.Animation;
|
||||
|
||||
namespace SWS.CAD.Helper
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Helper.Converter
|
||||
{
|
||||
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using SWS.CAD.Models;
|
||||
using static OfficeOpenXml.ExcelErrorValue;
|
||||
|
||||
namespace SWS.CAD.Helper.Converter
|
||||
|
@ -6,6 +6,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using SWS.CAD.ViewModels;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Helper.Converter
|
||||
{
|
||||
|
@ -1,14 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.ViewModels;
|
||||
using Teigha.GraphicsSystem;
|
||||
|
||||
namespace SWS.CAD.Helper.Converter
|
||||
{
|
||||
@ -20,7 +12,7 @@ namespace SWS.CAD.Helper.Converter
|
||||
if (values[0] != null)
|
||||
{
|
||||
|
||||
TreeModel c = (TreeModel)values[0];
|
||||
Model.TreeModel c = (Model.TreeModel)values[0];
|
||||
dynamic dynamicObj = c.NodeExtData;
|
||||
string PanelIDValue = dynamicObj.PanelID;
|
||||
if (c.NodeType.Equals("0"))
|
||||
|
@ -6,6 +6,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using SWS.CAD.ViewModels;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Helper.Converter
|
||||
{
|
||||
|
@ -3,7 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
|
||||
namespace SWS.CAD.Helper
|
||||
{
|
||||
@ -14,7 +15,7 @@ namespace SWS.CAD.Helper
|
||||
/// <summary>
|
||||
/// 获取树节点
|
||||
/// </summary>
|
||||
public static TreeModel GetTreeModel(TreeModel node, string id)
|
||||
public static Model.TreeModel GetTreeModel(TreeModel node, string id)
|
||||
{
|
||||
// 如果根节点为空,则返回null
|
||||
if (node == null) return null;
|
||||
@ -41,9 +42,9 @@ namespace SWS.CAD.Helper
|
||||
/// <summary>
|
||||
/// 获取树节点
|
||||
/// </summary>
|
||||
public static TreeModel GetTreeModel(List<TreeModel> nodes, string id)
|
||||
public static Model.TreeModel GetTreeModel(List<Model.TreeModel> nodes, string id)
|
||||
{
|
||||
TreeModel node = null;
|
||||
Model.TreeModel node = null;
|
||||
foreach (var dto in GlobalObject.objectTypeTree)
|
||||
{
|
||||
//获取节点下的图纸
|
||||
@ -62,7 +63,7 @@ namespace SWS.CAD.Helper
|
||||
/// <summary>
|
||||
/// 获取树节点所有图纸名
|
||||
/// </summary>
|
||||
public static void GetTreeText(TreeModel node)
|
||||
public static void GetTreeText(Model.TreeModel node)
|
||||
{
|
||||
// 如果根节点为空,则返回null
|
||||
if (node == null) return ;
|
||||
|
34
newFront/c#前端/SWS.CAD/Models/NoEntity/Debouncer.cs
Normal file
34
newFront/c#前端/SWS.CAD/Models/NoEntity/Debouncer.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SWS.CAD.Models.NoEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 搜索框防抖类
|
||||
/// </summary>
|
||||
public class Debouncer
|
||||
{
|
||||
private readonly int _delayMilliseconds;
|
||||
private CancellationTokenSource _cancellationTokenSource;
|
||||
|
||||
public Debouncer(int delayMilliseconds = 300)
|
||||
{
|
||||
_delayMilliseconds = delayMilliseconds;
|
||||
}
|
||||
|
||||
public void Debounce(System.Action action)
|
||||
{
|
||||
_cancellationTokenSource?.Cancel();
|
||||
_cancellationTokenSource = new CancellationTokenSource();
|
||||
|
||||
Task.Delay(_delayMilliseconds, _cancellationTokenSource.Token)
|
||||
.ContinueWith(t =>
|
||||
{
|
||||
if (t.IsCompleted && !t.IsCanceled)
|
||||
{
|
||||
action?.Invoke();
|
||||
}
|
||||
}, TaskScheduler.FromCurrentSynchronizationContext());
|
||||
}
|
||||
}
|
||||
}
|
@ -92,11 +92,11 @@ namespace SWS.CAD.Models
|
||||
}
|
||||
}
|
||||
}
|
||||
private ObservableCollection<propertyModel> _listProperty = new ObservableCollection<propertyModel>();
|
||||
private ObservableCollection<Model.propertyModel> _listProperty = new ObservableCollection<Model.propertyModel>();
|
||||
/// <summary>
|
||||
/// 常用属性列表
|
||||
/// </summary>
|
||||
public ObservableCollection<propertyModel> listBasicTypeP
|
||||
public ObservableCollection<Model.propertyModel> listBasicTypeP
|
||||
{
|
||||
get { return _listProperty; }
|
||||
set
|
||||
@ -125,6 +125,6 @@ namespace SWS.CAD.Models
|
||||
/// <summary>
|
||||
/// 属性数据,修改属性值时进行比对是否有修改
|
||||
/// </summary>
|
||||
public List<ec_enginedata> listEnginedata = new List<ec_enginedata>();
|
||||
public List<SWS.Model.ec_enginedata> listEnginedata = new List<SWS.Model.ec_enginedata>();
|
||||
}
|
||||
}
|
||||
|
@ -1,107 +1,107 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Media;
|
||||
using Telerik.Windows.Controls;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TreeView;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Collections.ObjectModel;
|
||||
//using System.Windows.Media;
|
||||
//using Telerik.Windows.Controls;
|
||||
//using static System.Windows.Forms.VisualStyles.VisualStyleElement.TreeView;
|
||||
|
||||
namespace SWS.CAD.Models
|
||||
{
|
||||
public class TreeModel : ViewModelBase, System.ICloneable
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private string _Text;
|
||||
/// <summary>
|
||||
/// 节点显示数据
|
||||
/// </summary>
|
||||
public string Text
|
||||
{
|
||||
get { return _Text; }
|
||||
set
|
||||
{
|
||||
_Text = value;
|
||||
if (_Text.ToLower().EndsWith(".dwg"))
|
||||
{
|
||||
Glyph = "";
|
||||
}
|
||||
OnPropertyChanged(nameof(Text));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 父级节点ID。比如某个目录下有什么文件
|
||||
/// </summary>
|
||||
public string parentId { get; set; }
|
||||
private bool _isexpand;
|
||||
/// <summary>
|
||||
/// 控制展开/折叠状态
|
||||
/// </summary>
|
||||
public bool isexpand
|
||||
{
|
||||
get { return _isexpand; }
|
||||
set { _isexpand = value; OnPropertyChanged(nameof(isexpand)); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 节点类型
|
||||
/// </summary>
|
||||
public string NodeType { get; set; }
|
||||
//namespace SWS.CAD.Models
|
||||
//{
|
||||
// public class Model.TreeModel : ViewModelBase, System.ICloneable
|
||||
// {
|
||||
// public string ID { get; set; }
|
||||
// private string _Text;
|
||||
// /// <summary>
|
||||
// /// 节点显示数据
|
||||
// /// </summary>
|
||||
// public string Text
|
||||
// {
|
||||
// get { return _Text; }
|
||||
// set
|
||||
// {
|
||||
// _Text = value;
|
||||
// if (_Text.ToLower().EndsWith(".dwg"))
|
||||
// {
|
||||
// Glyph = "";
|
||||
// }
|
||||
// OnPropertyChanged(nameof(Text));
|
||||
// }
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 父级节点ID。比如某个目录下有什么文件
|
||||
// /// </summary>
|
||||
// public string parentId { get; set; }
|
||||
// private bool _isexpand;
|
||||
// /// <summary>
|
||||
// /// 控制展开/折叠状态
|
||||
// /// </summary>
|
||||
// public bool isexpand
|
||||
// {
|
||||
// get { return _isexpand; }
|
||||
// set { _isexpand = value; OnPropertyChanged(nameof(isexpand)); }
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 节点类型
|
||||
// /// </summary>
|
||||
// public string NodeType { get; set; }
|
||||
|
||||
string _ToolTipText;
|
||||
/// <summary>
|
||||
/// 鼠标悬停提示词
|
||||
/// </summary>
|
||||
public string ToolTipText
|
||||
{
|
||||
get { return _ToolTipText; }
|
||||
set { _ToolTipText = value; OnPropertyChanged(nameof(ToolTipText)); }
|
||||
}
|
||||
// string _ToolTipText;
|
||||
// /// <summary>
|
||||
// /// 鼠标悬停提示词
|
||||
// /// </summary>
|
||||
// public string ToolTipText
|
||||
// {
|
||||
// get { return _ToolTipText; }
|
||||
// set { _ToolTipText = value; OnPropertyChanged(nameof(ToolTipText)); }
|
||||
// }
|
||||
|
||||
Brush _fontColor = new SolidColorBrush(Colors.White);
|
||||
/// <summary>
|
||||
/// 节点字体颜色
|
||||
/// </summary>
|
||||
public Brush FontColor
|
||||
{
|
||||
get { return _fontColor; }
|
||||
set { _fontColor = value; OnPropertyChanged(nameof(FontColor)); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int? OrderNo { get; set; }
|
||||
// Brush _fontColor = new SolidColorBrush(Colors.White);
|
||||
// /// <summary>
|
||||
// /// 节点字体颜色
|
||||
// /// </summary>
|
||||
// public Brush FontColor
|
||||
// {
|
||||
// get { return _fontColor; }
|
||||
// set { _fontColor = value; OnPropertyChanged(nameof(FontColor)); }
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 排序
|
||||
// /// </summary>
|
||||
// public int? OrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0:检入, 1:自己检出, 2:别人检出
|
||||
/// </summary>
|
||||
public int CheckInOutStatus { get; set; }
|
||||
// /// <summary>
|
||||
// /// 状态 0:检入, 1:自己检出, 2:别人检出
|
||||
// /// </summary>
|
||||
// public int CheckInOutStatus { get; set; }
|
||||
|
||||
private ObservableCollection<TreeModel> _ChildNodes=new ObservableCollection<TreeModel>();
|
||||
// private ObservableCollection<Model.TreeModel> _ChildNodes=new ObservableCollection<Model.TreeModel>();
|
||||
|
||||
public ObservableCollection<TreeModel> ChildNodes
|
||||
{
|
||||
get { return _ChildNodes; }
|
||||
set { _ChildNodes = value; RaisePropertyChanged(nameof(ChildNodes)); }
|
||||
}
|
||||
// public ObservableCollection<Model.TreeModel> ChildNodes
|
||||
// {
|
||||
// get { return _ChildNodes; }
|
||||
// set { _ChildNodes = value; RaisePropertyChanged(nameof(ChildNodes)); }
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// 扩展数据。比如具体对象的实体类信息
|
||||
/// </summary>
|
||||
public object NodeExtData { get; set; }
|
||||
// /// <summary>
|
||||
// /// 扩展数据。比如具体对象的实体类信息
|
||||
// /// </summary>
|
||||
// public object NodeExtData { get; set; }
|
||||
|
||||
string _Glyph = "";
|
||||
/// <summary>
|
||||
/// 节点图标
|
||||
/// </summary>
|
||||
public string Glyph
|
||||
{
|
||||
get { return _Glyph; }
|
||||
set { _Glyph = value; OnPropertyChanged(nameof(Glyph)); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 克隆实体类
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public object Clone()
|
||||
{
|
||||
return this.MemberwiseClone();
|
||||
}
|
||||
}
|
||||
}
|
||||
// string _Glyph = "";
|
||||
// /// <summary>
|
||||
// /// 节点图标
|
||||
// /// </summary>
|
||||
// public string Glyph
|
||||
// {
|
||||
// get { return _Glyph; }
|
||||
// set { _Glyph = value; OnPropertyChanged(nameof(Glyph)); }
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 克隆实体类
|
||||
// /// </summary>
|
||||
// /// <returns></returns>
|
||||
// public object Clone()
|
||||
// {
|
||||
// return this.MemberwiseClone();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
@ -90,7 +90,7 @@ namespace SWS.CAD.Models
|
||||
/// <summary>
|
||||
/// 关联的通讯点
|
||||
/// </summary>
|
||||
public IEnumerable<ec_Wire_Group> WireGroups { set; get; }
|
||||
public IEnumerable<SWS.Model.ec_Wire_Group> WireGroups { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 对应到<see cref="ec_Archive_enginedata.TagNumber"/>
|
||||
|
@ -111,7 +111,7 @@ namespace SWS.CAD.Models
|
||||
/// </summary>
|
||||
public List<ec_PanelStripTerm> Terms { set; get; }
|
||||
|
||||
public ec_Wire_Group Signal { set; get; }
|
||||
public SWS.Model.ec_Wire_Group Signal { set; get; }
|
||||
/// <summary>
|
||||
/// 如果是母线,则直接体现在通道上
|
||||
/// </summary>
|
||||
|
@ -1,5 +1,4 @@
|
||||
using DryIoc.ImTools;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -36,10 +36,11 @@
|
||||
<HintPath>..\packages\Aspose.Cells.25.3.0\lib\net40\Aspose.Cells.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BrxMgd">
|
||||
<HintPath>..\..\..\..\..\..\Program Files\KunHeng\KunHengCAD V21 zh_CN\BrxMgd.dll</HintPath>
|
||||
<HintPath>D:\Program Files\KunHeng\KunHengCAD V21 zh_CN\BrxMgd.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DryIoc, Version=5.4.3.0, Culture=neutral, PublicKeyToken=dfbf2bd50fcf7768, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DryIoc.dll.5.4.3\lib\net45\DryIoc.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\DryIoc.dll.4.7.7\lib\net45\DryIoc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EasyEncryption, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EasyEncryption.1.0.2\lib\EasyEncryption.dll</HintPath>
|
||||
@ -71,28 +72,20 @@
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="Prism, Version=9.0.537.60525, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Core.9.0.537\lib\net47\Prism.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Container.Abstractions, Version=9.0.106.9543, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Container.Abstractions.9.0.106\lib\net47\Prism.Container.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Container.DryIoc, Version=9.0.106.9543, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Container.DryIoc.9.0.106\lib\net47\Prism.Container.DryIoc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Container.Unity, Version=9.0.106.9543, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Container.Unity.9.0.106\lib\net462\Prism.Container.Unity.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Prism.Core.8.1.97\lib\net47\Prism.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.DryIoc.Wpf, Version=9.0.537.60525, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.DryIoc.9.0.537\lib\net47\Prism.DryIoc.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Events, Version=9.0.537.60525, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Events.9.0.537\lib\net47\Prism.Events.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Prism.DryIoc.8.1.97\lib\net47\Prism.DryIoc.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Unity.Wpf, Version=9.0.537.60525, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Unity.9.0.537\lib\net47\Prism.Unity.Wpf.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Prism.Unity.8.1.97\lib\net47\Prism.Unity.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Wpf, Version=9.0.537.60525, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Wpf.9.0.537\lib\net47\Prism.Wpf.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Prism.Wpf.8.1.97\lib\net47\Prism.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
@ -119,7 +112,7 @@
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="TD_Mgd">
|
||||
<HintPath>..\..\..\..\..\..\Program Files\KunHeng\KunHengCAD V21 zh_CN\TD_Mgd.dll</HintPath>
|
||||
<HintPath>D:\Program Files\KunHeng\KunHengCAD V21 zh_CN\TD_Mgd.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Controls, Version=2023.2.718.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@ -190,75 +183,10 @@
|
||||
<Compile Include="Helper\FileHelper.cs" />
|
||||
<Compile Include="Helper\Behavior\PasswordHelper.cs" />
|
||||
<Compile Include="Helper\TreeHelper.cs" />
|
||||
<Compile Include="Models\ec_Cable.cs" />
|
||||
<Compile Include="Models\ec_CableSet.cs" />
|
||||
<Compile Include="Models\ec_CableSetWire.cs" />
|
||||
<Compile Include="Models\ec_CircuitBreaker.cs" />
|
||||
<Compile Include="Models\ec_drawing_catalogue.cs" />
|
||||
<Compile Include="Models\ec_PanelChannel.cs" />
|
||||
<Compile Include="Models\ec_Panel.cs" />
|
||||
<Compile Include="Models\ec_PanelStrip.cs" />
|
||||
<Compile Include="Models\ec_PanelStripTerm.cs" />
|
||||
<Compile Include="Models\ec_projectSettings.cs" />
|
||||
<Compile Include="Models\ec_WireTerminal.cs" />
|
||||
<Compile Include="Models\ec_wire_group_notice.cs" />
|
||||
<Compile Include="Models\ec_enginedata_propertyhis.cs" />
|
||||
<Compile Include="Models\ec_operate_log.cs" />
|
||||
<Compile Include="Models\NoEntity\CheckInLogNeedApproveModel.cs" />
|
||||
<Compile Include="Models\NoEntity\CheckInModel.cs" />
|
||||
<Compile Include="Models\NoEntity\DrawingOpened.cs" />
|
||||
<Compile Include="Models\annexesfile.cs" />
|
||||
<Compile Include="Models\ec_dataitem.cs" />
|
||||
<Compile Include="Models\ec_dataitemdetail.cs" />
|
||||
<Compile Include="Models\ec_drawing_file.cs" />
|
||||
<Compile Include="Models\ec_drawing_publish.cs" />
|
||||
<Compile Include="Models\ec_drawing_syn.cs" />
|
||||
<Compile Include="Models\ec_enginedata.cs" />
|
||||
<Compile Include="Models\ec_enginedata_pixel.cs" />
|
||||
<Compile Include="Models\ec_enginedata_property.cs" />
|
||||
<Compile Include="Models\ec_library_file.cs" />
|
||||
<Compile Include="Models\ec_measuring_unit.cs" />
|
||||
<Compile Include="Models\ec_notification.cs" />
|
||||
<Compile Include="Models\ec_objecttype.cs" />
|
||||
<Compile Include="Models\ec_objecttypeP.cs" />
|
||||
<Compile Include="Models\ec_parallel_Cable.cs" />
|
||||
<Compile Include="Models\ec_property.cs" />
|
||||
<Compile Include="Models\ec_template_file.cs" />
|
||||
<Compile Include="Models\NoEntity\ConfigIni.cs" />
|
||||
<Compile Include="Models\NoEntity\ContextOperationModel.cs" />
|
||||
<Compile Include="Models\ec_Wire_Group.cs" />
|
||||
<Compile Include="Models\ec_wire_group_log.cs" />
|
||||
<Compile Include="Models\ec_wire_group_propertyhis.cs" />
|
||||
<Compile Include="Models\NoEntity\GroupAttribute.cs" />
|
||||
<Compile Include="Models\NoEntity\PropertyObjectModel.cs" />
|
||||
<Compile Include="Models\NoEntity\Unit.cs" />
|
||||
<Compile Include="Models\user.cs" />
|
||||
<Compile Include="Services\DataItemService.cs" />
|
||||
<Compile Include="Services\AnnexesService.cs" />
|
||||
<Compile Include="Services\SettingsService.cs" />
|
||||
<Compile Include="Services\NotificationService.cs" />
|
||||
<Compile Include="Services\EnginedataService.cs" />
|
||||
<Compile Include="Services\ObjectTypeService.cs" />
|
||||
<Compile Include="Services\IOModuleService.cs" />
|
||||
<Compile Include="Services\WireGroupService.cs" />
|
||||
<Compile Include="Services\ResourceService.cs" />
|
||||
<Compile Include="Services\TemplateFileService.cs" />
|
||||
<Compile Include="Services\DrawingCatalogueService.cs" />
|
||||
<Compile Include="Services\UserService.cs" />
|
||||
<Compile Include="Start.cs" />
|
||||
<Compile Include="GlobalObject.cs" />
|
||||
<Compile Include="GlobalObje.cs" />
|
||||
<Compile Include="Helper\LoggerHelper.cs" />
|
||||
<Compile Include="Models\NoEntity\loginRes.cs" />
|
||||
<Compile Include="Models\NoEntity\PageModel.cs" />
|
||||
<Compile Include="Models\ec_project.cs" />
|
||||
<Compile Include="Models\NoEntity\learunHttpRes.cs" />
|
||||
<Compile Include="Models\NoEntity\TreeModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Helper\ConfigService.cs" />
|
||||
<Compile Include="Services\DrawingServce.cs" />
|
||||
<Compile Include="Services\HttpService.cs" />
|
||||
<Compile Include="Services\ProjectService.cs" />
|
||||
<Compile Include="Services\LoginService.cs" />
|
||||
<Compile Include="ViewModels\CheckInApproveViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogCableConnectionVM\DialogCableConnection_NewStripViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogCableConnectionVM\DialogCableConnectionViewModel.cs" />
|
||||
@ -277,15 +205,10 @@
|
||||
<Compile Include="ViewModels\DialogCheckInRecordViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogDrawingCatalogueViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogPublishRecordViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogSignalPropertyhisAndLogsViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogSignalNoticeViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogPreCheckInViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogParallelCableViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogInputViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogNewTagNumberViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogSignalManagementViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogTagSelectViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogSignalSelectViewModel.cs" />
|
||||
<Compile Include="ViewModels\DialogUnitSelectViewModel.cs" />
|
||||
<Compile Include="ViewModels\Dialog2SelectViewModel.cs" />
|
||||
<Compile Include="ViewModels\LeftPanelViewModel.cs" />
|
||||
@ -395,9 +318,6 @@
|
||||
<Compile Include="Views\Dialog\DialogTagSelect.xaml.cs">
|
||||
<DependentUpon>DialogTagSelect.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Dialog\DialogInput.xaml.cs">
|
||||
<DependentUpon>DialogInput.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Dialog\DialogUnitSelect.xaml.cs">
|
||||
<DependentUpon>DialogUnitSelect.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -419,21 +339,9 @@
|
||||
<Compile Include="Views\RightPanel.xaml.cs">
|
||||
<DependentUpon>RightPanel.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\SignalManagementViews\DialogSignalManagement.xaml.cs">
|
||||
<DependentUpon>DialogSignalManagement.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\CheckInApprove.xaml.cs">
|
||||
<DependentUpon>CheckInApprove.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\SignalManagementViews\DialogSignalNotice.xaml.cs">
|
||||
<DependentUpon>DialogSignalNotice.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\SignalManagementViews\DialogSignalPropertyhisAndLogs.xaml.cs">
|
||||
<DependentUpon>DialogSignalPropertyhisAndLogs.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\SignalManagementViews\DialogSignalSelect.xaml.cs">
|
||||
<DependentUpon>DialogSignalSelect.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\UserNotification.xaml.cs">
|
||||
<DependentUpon>UserNotification.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -454,9 +362,6 @@
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\CSharp.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="Views\Dialog\DialogCableConnections\DialogCableConnection.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
@ -546,10 +451,6 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Dialog\DialogInput.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Dialog\DialogUnitSelect.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@ -578,26 +479,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\SignalManagementViews\DialogSignalManagement.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\CheckInApprove.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\SignalManagementViews\DialogSignalNotice.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\SignalManagementViews\DialogSignalPropertyhisAndLogs.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\SignalManagementViews\DialogSignalSelect.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\UserNotification.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@ -620,71 +505,30 @@
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\File.png" />
|
||||
<EmbeddedResource Include="Images\Folder.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\user.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\Login.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\ActiveObject.png" />
|
||||
<EmbeddedResource Include="Images\BatchSwitch.png" />
|
||||
<EmbeddedResource Include="Images\CableConnect.png" />
|
||||
<EmbeddedResource Include="Images\CableSinal.png" />
|
||||
<EmbeddedResource Include="Images\CalBoot.png" />
|
||||
<EmbeddedResource Include="Images\CalCable.png" />
|
||||
<EmbeddedResource Include="Images\CheckCable.png" />
|
||||
<EmbeddedResource Include="Images\DConfig.png" />
|
||||
<EmbeddedResource Include="Images\Equipmentjoin.png" />
|
||||
<EmbeddedResource Include="Images\EquipmentSys.png" />
|
||||
<EmbeddedResource Include="Images\Export.png" />
|
||||
<EmbeddedResource Include="Images\GraphRec.png" />
|
||||
<EmbeddedResource Include="Images\Group.png" />
|
||||
<EmbeddedResource Include="Images\Imput.png" />
|
||||
<EmbeddedResource Include="Images\IO.png" />
|
||||
<EmbeddedResource Include="Images\joinsys.png" />
|
||||
<EmbeddedResource Include="Images\lightLine.png" />
|
||||
<EmbeddedResource Include="Images\Message.png" />
|
||||
<EmbeddedResource Include="Images\OPC.png" />
|
||||
<EmbeddedResource Include="Images\OpenProject.png" />
|
||||
<EmbeddedResource Include="Images\Parallel.png" />
|
||||
<EmbeddedResource Include="Images\PlaneLayout.png" />
|
||||
<EmbeddedResource Include="Images\Property.png" />
|
||||
<EmbeddedResource Include="Images\RefreshBlock.png" />
|
||||
<EmbeddedResource Include="Images\RefreshFrame.png" />
|
||||
<EmbeddedResource Include="Images\RefreshLink.png" />
|
||||
<EmbeddedResource Include="Images\RefreshPosition.png" />
|
||||
<EmbeddedResource Include="Images\RefreshProject.png" />
|
||||
<EmbeddedResource Include="Images\RefreshText.png" />
|
||||
<EmbeddedResource Include="Images\relevancy.png" />
|
||||
<EmbeddedResource Include="Images\SConfig.png" />
|
||||
<EmbeddedResource Include="Images\ShowLink.png" />
|
||||
<EmbeddedResource Include="Images\SinalManage.png" />
|
||||
<EmbeddedResource Include="Images\Switchbox.png" />
|
||||
<EmbeddedResource Include="Images\TConfig.png" />
|
||||
<EmbeddedResource Include="Images\UpdatePosition.png" />
|
||||
<EmbeddedResource Include="Images\VerticalRec.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\history.png" />
|
||||
<EmbeddedResource Include="Images\Lock.png" />
|
||||
<EmbeddedResource Include="Images\UnLock.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\Lock2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\history2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\qiehuan.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\guanlian.png" />
|
||||
<EmbeddedResource Include="Images\guanlian2.png" />
|
||||
<ProjectReference Include="..\SWS.CAD.Base\SWS.CAD.Base.csproj">
|
||||
<Project>{d4a15774-1469-45a0-9eff-771271764a00}</Project>
|
||||
<Name>SWS.CAD.Base</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SWS.Commons\SWS.Commons.csproj">
|
||||
<Project>{9ac724f6-883d-4357-9422-602748f25b69}</Project>
|
||||
<Name>SWS.Commons</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SWS.CustomControl\SWS.CustomControl.csproj">
|
||||
<Project>{2dcf996e-063b-4b95-8530-28f6df0da58a}</Project>
|
||||
<Name>SWS.CustomControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SWS.Model\SWS.Model.csproj">
|
||||
<Project>{1995385b-d1b0-4c55-835e-d3e769972a6a}</Project>
|
||||
<Name>SWS.Model</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SWS.Service\SWS.Service.csproj">
|
||||
<Project>{51cb6f5b-16e9-4ee0-baa4-144dd1ec8580}</Project>
|
||||
<Name>SWS.Service</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SWS.WPF\SWS.WPF.csproj">
|
||||
<Project>{7aff9117-78e7-4395-9f23-6dcfe09f9299}</Project>
|
||||
<Name>SWS.WPF</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
@ -1,8 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Helper;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Documents;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using Teigha.DatabaseServices;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Security.Policy;
|
||||
using System.Threading.Tasks;
|
||||
using SWS.CAD.Helper;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.Commons;
|
||||
|
||||
namespace SWS.CAD.Services
|
||||
{
|
||||
|
@ -2,8 +2,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using SWS.CAD.Helper;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.Commons;
|
||||
|
||||
namespace SWS.CAD.Services
|
||||
{
|
||||
@ -34,9 +34,9 @@ namespace SWS.CAD.Services
|
||||
/// </summary>
|
||||
/// <param name="onlyFolderFlag">是否只查询文件夹。1代表只查询文件夹</param>
|
||||
/// <returns></returns>
|
||||
public async Task<ObservableCollection<TreeModel>> GetDrawingCatalogue(string onlyFolderFlag = "0")
|
||||
public async Task<ObservableCollection<Model.TreeModel>> GetDrawingCatalogue(string onlyFolderFlag = "0")
|
||||
{
|
||||
var res = await this.GetAsync<ObservableCollection<TreeModel>>($"DrawingFileApi/GetDrawingCatalogue?projectId={GlobalObject.curProject.ProjectId}&onlyFolderFlag={onlyFolderFlag}");
|
||||
var res = await this.GetAsync<ObservableCollection<Model.TreeModel>>($"DrawingFileApi/GetDrawingCatalogue?projectId={GlobalObject.curProject.ProjectId}&onlyFolderFlag={onlyFolderFlag}");
|
||||
//OnRefresh();
|
||||
if (res.code == 200)
|
||||
{
|
||||
@ -53,9 +53,9 @@ namespace SWS.CAD.Services
|
||||
/// 查询所属系统树
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<ObservableCollection<TreeModel>> GetDrawingSystem()
|
||||
public async Task<ObservableCollection<Model.TreeModel>> GetDrawingSystem()
|
||||
{
|
||||
var res = await this.GetAsync<ObservableCollection<TreeModel>>($"DrawingFileApi/GetDrawingCatalogueBySystem?projectId={GlobalObject.curProject.ProjectId}");
|
||||
var res = await this.GetAsync<ObservableCollection<Model.TreeModel>>($"DrawingFileApi/GetDrawingCatalogueBySystem?projectId={GlobalObject.curProject.ProjectId}");
|
||||
//OnRefresh();
|
||||
if (res.code == 200)
|
||||
{
|
||||
|
@ -2,8 +2,9 @@
|
||||
using EasyEncryption;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -6,8 +6,8 @@ using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using SWS.CAD.Helper;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.Commons;
|
||||
namespace SWS.CAD.Services
|
||||
{
|
||||
public class HttpService
|
||||
|
@ -4,6 +4,7 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -24,10 +25,10 @@ namespace SWS.CAD.Services
|
||||
/// <param name="projId"></param>
|
||||
/// <param name="Assigned"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<TreeModel>> GetPanelTree()
|
||||
public async Task<List<Model.TreeModel>> GetPanelTree()
|
||||
{
|
||||
|
||||
var res = await this.GetAsync<List<TreeModel>>($"IOModuleApi/GetPanelTree?projectId={GlobalObject.curProject?.ProjectId}");
|
||||
var res = await this.GetAsync<List<Model.TreeModel>>($"IOModuleApi/GetPanelTree?projectId={GlobalObject.curProject?.ProjectId}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
|
@ -1,9 +1,8 @@
|
||||
|
||||
using EasyEncryption;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -1,10 +1,8 @@
|
||||
|
||||
using EasyEncryption;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Helper;
|
||||
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -2,8 +2,9 @@
|
||||
using EasyEncryption;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -58,16 +59,16 @@ namespace SWS.CAD.Services
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取对象类型。根据datatype,有3种方式。返回TreeModel。
|
||||
/// 获取对象类型。根据datatype,有3种方式。返回Model.TreeModel。
|
||||
/// 插件端里的设计浏览会用
|
||||
/// </summary>
|
||||
/// <param name="dataType">节点类型 0:对象类型、1:位号、2:图纸</param>
|
||||
/// <param name="KeyWord">关键字。同时搜索类型、位号</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<TreeModel>> GetObjectTypeData(string dataType = "0", string KeyWord = "")
|
||||
public async Task<List<Model.TreeModel>> GetObjectTypeData(string dataType = "0", string KeyWord = "")
|
||||
{
|
||||
|
||||
var res = await this.GetAsync<List<TreeModel>>($"ObjectTypeApi/GetObjectTypeData?projectId={GlobalObject.curProject.ProjectId}&dataType={dataType}&KeyWord={KeyWord}");
|
||||
var res = await this.GetAsync<List<Model.TreeModel>>($"ObjectTypeApi/GetObjectTypeData?projectId={GlobalObject.curProject.ProjectId}&dataType={dataType}&KeyWord={KeyWord}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
@ -85,10 +86,10 @@ namespace SWS.CAD.Services
|
||||
/// <param name="objectTypeID">对象类型ID</param>
|
||||
/// <param name="KeyWord">关键字</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<TreeModel>> GetTagNumberById_Brief(string objectTypeID, string KeyWord = "", string system = "")
|
||||
public async Task<List<Model.TreeModel>> GetTagNumberById_Brief(string objectTypeID, string KeyWord = "", string system = "")
|
||||
{
|
||||
|
||||
var res = await this.GetAsync<List<TreeModel>>($"ObjectTypeApi/GetTagNumberById_Brief?projectId={GlobalObject.curProject.ProjectId}&objectTypeID={objectTypeID}&KeyWord={KeyWord}&system={system}");
|
||||
var res = await this.GetAsync<List<Model.TreeModel>>($"ObjectTypeApi/GetTagNumberById_Brief?projectId={GlobalObject.curProject.ProjectId}&objectTypeID={objectTypeID}&KeyWord={KeyWord}&system={system}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
@ -104,10 +105,10 @@ namespace SWS.CAD.Services
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="Tags">Tag Number的集合(用,连接)</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ec_objecttype>> GetTagInfosByTags(string Tags, string caseID = "")
|
||||
public async Task<List<SWS.Model.ec_objecttype>> GetTagInfosByTags(string Tags, string caseID = "")
|
||||
{
|
||||
|
||||
var res = await this.GetAsync<List<ec_objecttype>>($"ObjectTypeApi/GetTagInfosByTags?projectId={GlobalObject.curProject.ProjectId}&Tags={Tags}&caseID={caseID}");
|
||||
var res = await this.GetAsync<List<SWS.Model.ec_objecttype>>($"ObjectTypeApi/GetTagInfosByTags?projectId={GlobalObject.curProject.ProjectId}&Tags={Tags}&caseID={caseID}");
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
@ -141,10 +142,10 @@ namespace SWS.CAD.Services
|
||||
/// 图元属性批量修改
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<string> UpdatePixelAndPropBatch(List<ec_enginedata> entitys)
|
||||
public async Task<string> UpdatePixelAndPropBatch(List<SWS.Model.ec_enginedata> entitys)
|
||||
{
|
||||
string url = $"ObjectTypeApi/UpdatePixelAndPropBatch?projectId={GlobalObject.curProject?.ProjectId}";
|
||||
var res = await this.PostBodyAsync<object, List<ec_enginedata>>(url, entitys);
|
||||
var res = await this.PostBodyAsync<object, List<SWS.Model.ec_enginedata>>(url, entitys);
|
||||
if (res.code==200)
|
||||
{
|
||||
return "";
|
||||
|
@ -4,6 +4,7 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -2,6 +2,7 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -25,9 +26,9 @@ namespace SWS.CAD.Services
|
||||
/// 查询模板文件目录树
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<TreeModel>> GetTemplateCatalogue()
|
||||
public async Task<List<Model.TreeModel>> GetTemplateCatalogue()
|
||||
{
|
||||
var res = await this.GetAsync<List<TreeModel>>($"TemplateFileApi/GetTemplateCatalogue?projectId={GlobalObject.curProject.ProjectId}");
|
||||
var res = await this.GetAsync<List<Model.TreeModel>>($"TemplateFileApi/GetTemplateCatalogue?projectId={GlobalObject.curProject.ProjectId}");
|
||||
//OnRefresh();
|
||||
if (res.code == 200)
|
||||
{
|
||||
|
@ -1,9 +1,6 @@
|
||||
|
||||
using EasyEncryption;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -1,9 +1,6 @@
|
||||
|
||||
using EasyEncryption;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -87,9 +84,9 @@ namespace SWS.CAD.Services
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ec_Wire_Group>> SaveSignals(WireGroups entity)
|
||||
public async Task<List<ec_Wire_Group>> SaveSignals(SWS.Model.WireGroups entity)
|
||||
{
|
||||
var res = await this.PostBodyAsync<List<ec_Wire_Group>, WireGroups>($"WireGroupApi/SaveSignals?projId={GlobalObject.curProject?.ProjectId}&mode=0", entity);
|
||||
var res = await this.PostBodyAsync<List<ec_Wire_Group>, Model.WireGroups>($"WireGroupApi/SaveSignals?projId={GlobalObject.curProject?.ProjectId}&mode=0", entity);
|
||||
if (res.code == 200)
|
||||
{
|
||||
return res.data;
|
||||
|
@ -1,22 +1,15 @@
|
||||
using Prism.Container.DryIoc;
|
||||
using Prism.Dialogs;
|
||||
using Prism.DryIoc;
|
||||
using Prism.Events;
|
||||
using Prism.Ioc;
|
||||
using SWS.CAD.Helper;
|
||||
using SWS.CAD.Models.NoEntity;
|
||||
using SWS.CAD.Services;
|
||||
using Prism.Services.Dialogs;
|
||||
using SWS.CAD.ViewModels;
|
||||
using SWS.CAD.Views;
|
||||
using SWS.CAD.Views.Dialog;
|
||||
using SWS.CAD.Views.SignalManagementViews;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SWS.Commons;
|
||||
using SWS.Service;
|
||||
using SWS.WPF.ViewModels;
|
||||
using SWS.WPF.Views;
|
||||
using Unity;
|
||||
|
||||
namespace SWS.CAD
|
||||
{
|
||||
public class Start
|
||||
@ -40,14 +33,14 @@ namespace SWS.CAD
|
||||
GlobalObject.container.RegisterSingleton<TemplateFileService>();
|
||||
GlobalObject.container.RegisterSingleton<UserService>();
|
||||
GlobalObject.container.RegisterSingleton<EnginedataService>();
|
||||
GlobalObject.container.RegisterSingleton<ResourceService>();
|
||||
//GlobalObject.container.RegisterSingleton<ResourceService>();
|
||||
GlobalObject.container.RegisterSingleton<DrawingCatalogueService>();
|
||||
GlobalObject.container.RegisterSingleton<WireGroupService>();
|
||||
GlobalObject.container.RegisterSingleton<IOModuleService>();
|
||||
|
||||
GlobalObject._prismContainer = new DryIocContainerExtension();
|
||||
GlobalObject._prismContainer.Register<IDialogService, DialogService>();
|
||||
GlobalObject._prismContainer.Register<IDialogWindow, CustomDialogWindow>();
|
||||
GlobalObject._prismContainer.Register<IDialogWindow, Views.Dialog.CustomDialogWindow>();
|
||||
//后者类似于一个容器。给所有需要的dialog所用
|
||||
GlobalObject._prismContainer.RegisterDialog<NewDrawing, NewDrawingViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<Dialog2Select, Dialog2SelectViewModel>();
|
||||
@ -60,7 +53,8 @@ namespace SWS.CAD
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogDrawingCatalogue, DialogDrawingCatalogueViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogCheckInRecord, DialogCheckInRecordViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogPublishRecord, DialogPublishRecordViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalManagement, DialogSignalManagementViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<SWS.WPF.Views.DialogSignalManagement,SWS.WPF.ViewModels.DialogSignalManagementViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogAllOutputSignal, DialogAllOutputSignalViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogOperateRecord, DialogOperateRecordViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogPropertyHistory, DialogPropertyHistoryViewModel>();
|
||||
GlobalObject._prismContainer.RegisterDialog<DialogSignalNotice, DialogSignalNoticeViewModel>();
|
||||
|
@ -1,18 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using Prism.Commands;
|
||||
using Prism.Dialogs;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Services;
|
||||
using Prism.Services.Dialogs;
|
||||
using SWS.CAD.ViewModels.myViewModelBase;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using SWS.Service;
|
||||
using Unity;
|
||||
using DialogResult = System.Windows.Forms.DialogResult;
|
||||
using MessageBox = System.Windows.Forms.MessageBox;
|
||||
|
||||
namespace SWS.CAD.ViewModels
|
||||
@ -97,7 +95,9 @@ namespace SWS.CAD.ViewModels
|
||||
Commad_ClearChecked = new DelegateCommand(onClearChecked);
|
||||
}
|
||||
|
||||
public DialogCloseListener RequestClose { get; }
|
||||
public string Title => "";
|
||||
|
||||
public event Action<IDialogResult> RequestClose;
|
||||
public override void onWindow_loaded(object para)
|
||||
{
|
||||
GetAllData();
|
||||
|
@ -1,14 +1,7 @@
|
||||
using Bricscad.ApplicationServices;
|
||||
using Bricscad.Windows;
|
||||
using SWS.CAD.Helper;
|
||||
using SWS.CAD.Services;
|
||||
using SWS.CAD.ViewModels.myViewModelBase;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Telerik.Windows.Controls;
|
||||
using Unity;
|
||||
using SWS.Commons;
|
||||
using SWS.Service;
|
||||
|
||||
namespace SWS.CAD.ViewModels
|
||||
{
|
||||
|
@ -1,15 +1,7 @@
|
||||
using Prism.Dialogs;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Services;
|
||||
using Prism.Services.Dialogs;
|
||||
using SWS.CAD.ViewModels.myViewModelBase;
|
||||
using SWS.CAD.Views;
|
||||
using SWS.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Unity;
|
||||
|
||||
namespace SWS.CAD.ViewModels
|
||||
{
|
||||
@ -21,7 +13,9 @@ namespace SWS.CAD.ViewModels
|
||||
title = "选择对话框";
|
||||
}
|
||||
|
||||
public DialogCloseListener RequestClose { get; }
|
||||
public string Title => "";
|
||||
|
||||
public event Action<IDialogResult> RequestClose;
|
||||
|
||||
public bool CanCloseDialog()
|
||||
{
|
||||
@ -38,21 +32,24 @@ namespace SWS.CAD.ViewModels
|
||||
title = parameters.GetValue<string>(GlobalObject.dialogPar.title.ToString());
|
||||
textYes = parameters.GetValue<string>(GlobalObject.dialogPar.textYes.ToString());
|
||||
textNo = parameters.GetValue<string>(GlobalObject.dialogPar.textNo.ToString());
|
||||
|
||||
|
||||
}
|
||||
public override void ExecuteOKCommandAsync(object para)
|
||||
{
|
||||
RequestClose.Invoke(ButtonResult.Yes);
|
||||
DialogResult res = new DialogResult(ButtonResult.Yes);
|
||||
RequestClose.Invoke(res);
|
||||
}
|
||||
public override void ExecuteCloseCommand(object parameter)
|
||||
{
|
||||
if (parameter as string == "ClickNo")
|
||||
{
|
||||
RequestClose.Invoke(ButtonResult.No);
|
||||
DialogResult res = new DialogResult(ButtonResult.No);
|
||||
RequestClose.Invoke(res);
|
||||
}
|
||||
else
|
||||
{
|
||||
RequestClose.Invoke(ButtonResult.Cancel);
|
||||
DialogResult res = new DialogResult(ButtonResult.Cancel);
|
||||
RequestClose.Invoke(res);
|
||||
}
|
||||
this.Dispose();
|
||||
}
|
||||
|
@ -2,26 +2,19 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
using Bricscad.Ifc;
|
||||
using Prism.Dialogs;
|
||||
using Prism.Ioc;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Services;
|
||||
using Prism.Services.Dialogs;
|
||||
using SWS.CAD.ViewModels.myViewModelBase;
|
||||
using SWS.CAD.Views.CustomControl;
|
||||
using SWS.CAD.Views.Dialog;
|
||||
using Teigha.Geometry;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using SWS.Service;
|
||||
using Telerik.Windows.Controls;
|
||||
using Telerik.Windows.Controls.VirtualKeyboard;
|
||||
using Unity;
|
||||
using static SWS.CAD.Services.IOModuleService;
|
||||
|
||||
namespace SWS.CAD.ViewModels
|
||||
{
|
||||
@ -31,11 +24,11 @@ namespace SWS.CAD.ViewModels
|
||||
public class DialogCableConnectionViewModel : DialogBase, IDialogAware
|
||||
{
|
||||
#region 页面渲染字段
|
||||
private ObservableCollection<ec_enginedata_pixel> _AllTagPixels = new ObservableCollection<ec_enginedata_pixel>();
|
||||
private ObservableCollection<Model.ec_enginedata_pixel> _AllTagPixels = new ObservableCollection<Model.ec_enginedata_pixel>();
|
||||
/// <summary>
|
||||
/// 图纸所有的电缆
|
||||
/// </summary>
|
||||
public ObservableCollection<ec_enginedata_pixel> AllTagPixels
|
||||
public ObservableCollection<Model.ec_enginedata_pixel> AllTagPixels
|
||||
{
|
||||
get { return _AllTagPixels; }
|
||||
set
|
||||
@ -44,11 +37,11 @@ namespace SWS.CAD.ViewModels
|
||||
RaisePropertyChanged(nameof(AllTagPixels));
|
||||
}
|
||||
}
|
||||
private ec_enginedata_pixel _SelectedTagPixels;
|
||||
private Model.ec_enginedata_pixel _SelectedTagPixels;
|
||||
/// <summary>
|
||||
/// 选择的电缆位号
|
||||
/// </summary>
|
||||
public ec_enginedata_pixel SelectedTagPixels
|
||||
public Model.ec_enginedata_pixel SelectedTagPixels
|
||||
{
|
||||
get { return _SelectedTagPixels; }
|
||||
set
|
||||
@ -100,7 +93,9 @@ namespace SWS.CAD.ViewModels
|
||||
_iOModuleService = GlobalObject.container.Resolve<IOModuleService>();
|
||||
_objectTypeService = GlobalObject.container.Resolve<ObjectTypeService>();
|
||||
}
|
||||
public DialogCloseListener RequestClose { get; }
|
||||
public string Title => "";
|
||||
|
||||
public event Action<IDialogResult> RequestClose;
|
||||
|
||||
public bool CanCloseDialog()
|
||||
{
|
||||
@ -138,9 +133,9 @@ namespace SWS.CAD.ViewModels
|
||||
}
|
||||
public override void ExecuteOKCommandAsync(object para)
|
||||
{
|
||||
Prism.Dialogs.DialogParameters res = new Prism.Dialogs.DialogParameters();
|
||||
IDialogParameters res = new Prism.Services.Dialogs.DialogParameters();
|
||||
//res.Add(GlobalObject.dialogPar.info.ToString(), $"{TextInfo}");
|
||||
RequestClose.Invoke(res, ButtonResult.Yes);
|
||||
RequestClose.Invoke(new DialogResult(ButtonResult.Yes, res));
|
||||
}
|
||||
public override void ExecuteCloseCommand(object parameter)
|
||||
{
|
||||
@ -154,11 +149,12 @@ namespace SWS.CAD.ViewModels
|
||||
//}
|
||||
if (parameter as string == "ClickNo")
|
||||
{
|
||||
RequestClose.Invoke(ButtonResult.No);
|
||||
DialogResult res = new DialogResult(ButtonResult.No);
|
||||
RequestClose.Invoke(res);
|
||||
}
|
||||
else
|
||||
{
|
||||
RequestClose.Invoke(ButtonResult.Cancel);
|
||||
RequestClose.Invoke(new DialogResult(ButtonResult.Cancel));
|
||||
}
|
||||
this.Dispose();
|
||||
}
|
||||
@ -173,7 +169,7 @@ namespace SWS.CAD.ViewModels
|
||||
|
||||
ObservableCollection<propertyModel> ReslistPro = new ObservableCollection<propertyModel>();
|
||||
//打开窗体
|
||||
Prism.Dialogs.DialogParameters para = new Prism.Dialogs.DialogParameters();
|
||||
IDialogParameters para = new Prism.Services.Dialogs.DialogParameters();
|
||||
para.Add(GlobalObject.dialogPar.title.ToString(), title);
|
||||
para.Add(GlobalObject.dialogPar.para1.ToString(), listPropertys);
|
||||
var _dialogService = GlobalObject._prismContainer.Resolve<IDialogService>();
|
||||
@ -193,7 +189,7 @@ namespace SWS.CAD.ViewModels
|
||||
|
||||
#region 图中电缆下拉改变
|
||||
private ec_Cable ResCableEngID;
|
||||
public async void UpdaTagPixels(ec_enginedata_pixel ec_Enginedata_Pixel)
|
||||
public async void UpdaTagPixels(Model.ec_enginedata_pixel ec_Enginedata_Pixel)
|
||||
{
|
||||
IsBusy = true;
|
||||
try
|
||||
@ -212,20 +208,20 @@ namespace SWS.CAD.ViewModels
|
||||
listPropertys = new List<propertyModel>();
|
||||
Dictionary<string, string> pulldownlist;
|
||||
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电缆对数", GroupName = "基本参数", PropertyValue = "1", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "每电缆对芯数", GroupName = "基本参数", PropertyValue = "2", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电缆对编号前缀", GroupName = "基本参数", PropertyValue = "Set", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电缆对数", GroupName = "基本参数", PropertyValue = "1", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "每电缆对芯数", GroupName = "基本参数", PropertyValue = "2", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电缆对编号前缀", GroupName = "基本参数", PropertyValue = "Set", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
pulldownlist = new Dictionary<string, string>();
|
||||
pulldownlist.Add("数字", "数字");
|
||||
pulldownlist.Add("字母", "字母");
|
||||
pulldownlist.Add("电缆对序号", "电缆对序号");
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "编号类型", GroupName = "电芯参数", PropertyValue = "数字", ControlTypeName = PROPERTYType.ComboBox, Item = pulldownlist, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "编号类型", GroupName = "电芯参数", PropertyValue = "数字", ControlTypeName = Model.PROPERTYType.ComboBox, Item = pulldownlist, });
|
||||
pulldownlist = new Dictionary<string, string>();
|
||||
pulldownlist.Add("按电缆编号", "按电缆编号");
|
||||
pulldownlist.Add("按电缆对编号", "按电缆对编号");
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "编号规则", GroupName = "电芯参数", PropertyValue = "按电缆对编号", ControlTypeName = PROPERTYType.ComboBox, Item = pulldownlist, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电芯编号前缀", GroupName = "电芯参数", PropertyValue = "C", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "极性", GroupName = "电芯参数", PropertyValue = "+,-,s", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "编号规则", GroupName = "电芯参数", PropertyValue = "按电缆对编号", ControlTypeName = Model.PROPERTYType.ComboBox, Item = pulldownlist, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电芯编号前缀", GroupName = "电芯参数", PropertyValue = "C", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "极性", GroupName = "电芯参数", PropertyValue = "+,-,s", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
//显示属性弹窗
|
||||
var ReslistPro = ShowPropertyMessage("新建" + ec_Enginedata_Pixel.TagNumber + "电缆配置", listPropertys);
|
||||
if (ReslistPro == null || ReslistPro.Count() == 0) return;
|
||||
@ -282,20 +278,20 @@ namespace SWS.CAD.ViewModels
|
||||
listPropertys = new List<propertyModel>();
|
||||
Dictionary<string, string> pulldownlist;
|
||||
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电缆对数", GroupName = "基本参数", PropertyValue = "10", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "每电缆对芯数", GroupName = "基本参数", PropertyValue = "2", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电缆对编号前缀", GroupName = "基本参数", PropertyValue = "Set", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电缆对数", GroupName = "基本参数", PropertyValue = "10", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "每电缆对芯数", GroupName = "基本参数", PropertyValue = "2", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电缆对编号前缀", GroupName = "基本参数", PropertyValue = "Set", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
pulldownlist = new Dictionary<string, string>();
|
||||
pulldownlist.Add("数字", "数字");
|
||||
pulldownlist.Add("字母", "字母");
|
||||
pulldownlist.Add("电缆对序号", "电缆对序号");
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "编号类型", GroupName = "电芯参数", PropertyValue = "数字", ControlTypeName = PROPERTYType.ComboBox, Item = pulldownlist, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "编号类型", GroupName = "电芯参数", PropertyValue = "数字", ControlTypeName = Model.PROPERTYType.ComboBox, Item = pulldownlist, });
|
||||
pulldownlist = new Dictionary<string, string>();
|
||||
pulldownlist.Add("按电缆编号", "按电缆编号");
|
||||
pulldownlist.Add("按电缆对编号", "按电缆对编号");
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "编号规则", GroupName = "电芯参数", PropertyValue = "按电缆对编号", ControlTypeName = PROPERTYType.ComboBox, Item = pulldownlist, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电芯编号前缀", GroupName = "电芯参数", PropertyValue = "C", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "极性", GroupName = "电芯参数", PropertyValue = "+,-,s", ControlTypeName = PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "编号规则", GroupName = "电芯参数", PropertyValue = "按电缆对编号", ControlTypeName = Model.PROPERTYType.ComboBox, Item = pulldownlist, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "电芯编号前缀", GroupName = "电芯参数", PropertyValue = "C", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
listPropertys.Add(new propertyModel() { Id = "1", DisplayText = "极性", GroupName = "电芯参数", PropertyValue = "+,-,s", ControlTypeName = Model.PROPERTYType.TextBox, });
|
||||
//显示属性弹窗
|
||||
var ReslistPro = ShowPropertyMessage("新建" + ec_Enginedata_Pixel.TagNumber + "电缆配置", listPropertys);
|
||||
if (ReslistPro == null || ReslistPro.Count == 0) return;
|
||||
@ -519,7 +515,7 @@ namespace SWS.CAD.ViewModels
|
||||
MessageBox.Show("左右(From,To)端子必须对称连接(不能一个空白一个连接)", "KunHengCAD", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return;
|
||||
}
|
||||
Connections saveConnections = new Connections();
|
||||
Service.IOModuleService.Connections saveConnections = new Service.IOModuleService.Connections();
|
||||
saveConnections.Conns = new List<ec_WireTerminal>();
|
||||
|
||||
//左边修改的端子
|
||||
@ -611,7 +607,7 @@ namespace SWS.CAD.ViewModels
|
||||
#region 关闭
|
||||
if (parameter.ToString().Equals("关闭"))
|
||||
{
|
||||
RequestClose.Invoke(ButtonResult.Cancel);
|
||||
RequestClose.Invoke(new DialogResult(ButtonResult.Cancel));
|
||||
this.Dispose();
|
||||
|
||||
return;
|
||||
@ -624,7 +620,7 @@ namespace SWS.CAD.ViewModels
|
||||
|
||||
var Pannel = ResCableEngID.FromPanel;
|
||||
//打开窗体
|
||||
Prism.Dialogs.DialogParameters para = new Prism.Dialogs.DialogParameters();
|
||||
IDialogParameters para = new Prism.Services.Dialogs.DialogParameters();
|
||||
para.Add(GlobalObject.dialogPar.info.ToString(), "Fo");
|
||||
para.Add(GlobalObject.dialogPar.para1.ToString(), ResCableEngID);
|
||||
var _dialogService = GlobalObject._prismContainer.Resolve<IDialogService>();
|
||||
@ -647,7 +643,7 @@ namespace SWS.CAD.ViewModels
|
||||
{
|
||||
var Pannel = ResCableEngID.ToPanel;
|
||||
//打开窗体
|
||||
Prism.Dialogs.DialogParameters para = new Prism.Dialogs.DialogParameters();
|
||||
IDialogParameters para = new Prism.Services.Dialogs.DialogParameters();
|
||||
para.Add(GlobalObject.dialogPar.info.ToString(), "To");
|
||||
para.Add(GlobalObject.dialogPar.para1.ToString(), ResCableEngID);
|
||||
var _dialogService = GlobalObject._prismContainer.Resolve<IDialogService>();
|
||||
|
@ -2,25 +2,16 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
using DryIoc;
|
||||
using Prism.Dialogs;
|
||||
using SWS.CAD.Models;
|
||||
using SWS.CAD.Services;
|
||||
using Prism.Services.Dialogs;
|
||||
using SWS.CAD.ViewModels.myViewModelBase;
|
||||
using SWS.CAD.Views.CustomControl;
|
||||
using SWS.CAD.Views.Dialog;
|
||||
using SWS.Commons;
|
||||
using SWS.Model;
|
||||
using SWS.Service;
|
||||
using Telerik.Windows.Controls;
|
||||
using Telerik.Windows.Controls.VirtualKeyboard;
|
||||
using Unity;
|
||||
using static SWS.CAD.Services.IOModuleService;
|
||||
|
||||
namespace SWS.CAD.ViewModels
|
||||
{
|
||||
@ -111,7 +102,9 @@ namespace SWS.CAD.ViewModels
|
||||
_enginedataService = GlobalObject.container.Resolve<EnginedataService>();
|
||||
_iOModuleService = GlobalObject.container.Resolve<IOModuleService>();
|
||||
}
|
||||
public DialogCloseListener RequestClose { get; }
|
||||
public string Title => "";
|
||||
|
||||
public event Action<IDialogResult> RequestClose;
|
||||
|
||||
public bool CanCloseDialog()
|
||||
{
|
||||
@ -151,9 +144,9 @@ namespace SWS.CAD.ViewModels
|
||||
}
|
||||
public override void ExecuteOKCommandAsync(object para)
|
||||
{
|
||||
Prism.Dialogs.DialogParameters res = new Prism.Dialogs.DialogParameters();
|
||||
IDialogParameters res = new Prism.Services.Dialogs.DialogParameters();
|
||||
//res.Add(GlobalObject.dialogPar.info.ToString(), $"{TextInfo}");
|
||||
RequestClose.Invoke(res, ButtonResult.Yes);
|
||||
RequestClose.Invoke(new DialogResult(ButtonResult.Yes, res));
|
||||
}
|
||||
public override void ExecuteCloseCommand(object parameter)
|
||||
{
|
||||
@ -167,11 +160,12 @@ namespace SWS.CAD.ViewModels
|
||||
//}
|
||||
if (parameter as string == "ClickNo")
|
||||
{
|
||||
RequestClose.Invoke(ButtonResult.No);
|
||||
DialogResult res = new DialogResult(ButtonResult.No);
|
||||
RequestClose.Invoke(res);
|
||||
}
|
||||
else
|
||||
{
|
||||
RequestClose.Invoke(ButtonResult.Cancel);
|
||||
RequestClose.Invoke(new DialogResult(ButtonResult.Cancel));
|
||||
}
|
||||
this.Dispose();
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user