init: 导入项目到 meswork Gitea
This commit is contained in:
226
DataMirrorTools_Simulator/ModelBasic/20-06BasicOperation.csproj
Normal file
226
DataMirrorTools_Simulator/ModelBasic/20-06BasicOperation.csproj
Normal file
@@ -0,0 +1,226 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B258F56F-59E9-4C6F-BCC0-04A151D51251}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BasicOperation</RootNamespace>
|
||||
<AssemblyName>BasicOperation</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\WebAppDll\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BasicData, Version=20.20.3.15, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\DLL\BasicData.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ConLink">
|
||||
<HintPath>..\DLL\ConLink.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib">
|
||||
<HintPath>..\DLL\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.JScript" />
|
||||
<Reference Include="MQTTnet">
|
||||
<HintPath>..\..\Common\dll\MQTTnet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MQTTnet.Extensions.ManagedClient">
|
||||
<HintPath>..\..\SyUpLoad\dll\MQTTnet.Extensions.ManagedClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI">
|
||||
<HintPath>..\DLL\NPOI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OOXML">
|
||||
<HintPath>..\DLL\NPOI.OOXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXml4Net">
|
||||
<HintPath>..\DLL\NPOI.OpenXml4Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXmlFormats">
|
||||
<HintPath>..\DLL\NPOI.OpenXmlFormats.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite">
|
||||
<HintPath>..\DLL\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WeifenLuo.WinFormsUI.Docking, Version=2.3.7916.19896, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\DLL\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2015">
|
||||
<HintPath>..\DLL\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Base\MM.RecordJointData.cs" />
|
||||
<Compile Include="Base\CopyFilesHandler.cs" />
|
||||
<Compile Include="Base\MM.Virtual.cs" />
|
||||
<Compile Include="Base\MM.MesWorkOpc.cs" />
|
||||
<Compile Include="Base\MM.B_C_ExportModel.cs" />
|
||||
<Compile Include="Base\MM.ToUiPushData.cs" />
|
||||
<Compile Include="Base\CallBackCollections.cs" />
|
||||
<Compile Include="Base\ExtendMethod.cs" />
|
||||
<Compile Include="Base\MM.Brush.Class.cs" />
|
||||
<Compile Include="Base\MM.TransferProject.cs" />
|
||||
<Compile Include="Base\MM.SimDeviceSignal.cs" />
|
||||
<Compile Include="BasicClass\A_BAK_1 - 复制%282%29.cs" />
|
||||
<Compile Include="BasicClass\A_BAK_1 - 复制%286%29.cs" />
|
||||
<Compile Include="BasicClass\A_BAK_1 - 复制.cs" />
|
||||
<Compile Include="BasicClass\AutoMessageBox.cs" />
|
||||
<Compile Include="BasicClass\DelayAction.cs" />
|
||||
<Compile Include="BasicClass\CONVERT_Import.cs" />
|
||||
<Compile Include="BasicClass\CONVERT_TABLE.cs" />
|
||||
<Compile Include="BasicClass\CONVERT_JSON.cs" />
|
||||
<Compile Include="BasicClass\SortBindingHelper.cs" />
|
||||
<Compile Include="BasicClass\CopyFilesHandler.cs" />
|
||||
<Compile Include="BasicClass\CreateTable.cs" />
|
||||
<Compile Include="BasicClass\ExtendMethod.cs" />
|
||||
<Compile Include="BasicClass\A_BAK_1.cs" />
|
||||
<Compile Include="BasicClass\Judge.cs" />
|
||||
<Compile Include="BasicClass\CONVERT.cs" />
|
||||
<Compile Include="BasicClass\ParsingData.cs" />
|
||||
<Compile Include="ExecScript\ExecScript.cs" />
|
||||
<Compile Include="ExportModelHandler\Cmd.cs" />
|
||||
<Compile Include="ExportModelHandler\GetSystemIcon.cs" />
|
||||
<Compile Include="IBase\IMM.cs" />
|
||||
<Compile Include="IBase\IMM.Move.Actual.cs" />
|
||||
<Compile Include="IBase\IMM.Move.Direct.cs" />
|
||||
<Compile Include="IBase\IMM.Move.Load.cs" />
|
||||
<Compile Include="IBase\IMM.OutputPlayData.cs" />
|
||||
<Compile Include="IBase\IMM.P_PathEditor.cs" />
|
||||
<Compile Include="IBase\IMM.SignalDrive.cs" />
|
||||
<Compile Include="IBase\IMM.Socket.cs" />
|
||||
<Compile Include="IBase.Form\IMM.MainF.cs" />
|
||||
<Compile Include="IBase.Form\IMM.P_SignalViewer.cs" />
|
||||
<Compile Include="Base\MM.cs" />
|
||||
<Compile Include="Base\MM.ExecSignalScript.cs" />
|
||||
<Compile Include="Base\MM.Define.cs" />
|
||||
<Compile Include="Expression.TagName\Expression.TagName.cs" />
|
||||
<Compile Include="KinematicsEditor\Exception\InnerApplicationException.cs" />
|
||||
<Compile Include="ModelActControlLib\ActControl.cs" />
|
||||
<Compile Include="OExcel\OExcel.cs" />
|
||||
<Compile Include="Process\ProcessData.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="BasicClass\TransitionalClass.cs" />
|
||||
<Compile Include="TreeNodeUtils\TreeNodeHelper.cs" />
|
||||
<Compile Include="Version\VersionDescription.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Version\VersionDescription.Designer.cs">
|
||||
<DependentUpon>VersionDescription.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Version\VersionsInformation.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Version\VersionsInformation.Designer.cs">
|
||||
<DependentUpon>VersionsInformation.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WriteVersion.cs" />
|
||||
<Compile Include="WinForm\T_ProgressBar_2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WinForm\T_ProgressBar_2.Designer.cs">
|
||||
<DependentUpon>T_ProgressBar_2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WinForm\T_ProgressBar.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WinForm\T_ProgressBar.Designer.cs">
|
||||
<DependentUpon>T_ProgressBar.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\00-1Json8.3\Json8.3\00-0Json8.3.1.csproj">
|
||||
<Project>{1a10fdb2-1a6a-44a8-ab4d-33387563247e}</Project>
|
||||
<Name>00-0Json8.3.1</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\00MesWorkMqtt\MesWorkMqtt\00MesWorkMqtt.csproj">
|
||||
<Project>{f55da1a0-a982-4479-8c47-0d9a5aaf3e18}</Project>
|
||||
<Name>00MesWorkMqtt</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\01DoWhatPlc\01_01DoWhatPlc.csproj">
|
||||
<Project>{0d1af432-439a-4920-8692-43ae139f5530}</Project>
|
||||
<Name>01_01DoWhatPlc</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\02WebApiCall\02_02WebApiCallPLC.csproj">
|
||||
<Project>{3e6d1dd5-01c9-435f-9941-61f906ce35bb}</Project>
|
||||
<Name>02_02WebApiCallPLC</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\MisDataFun\SendMessageToWebMqtt\12SendMessageToWeb.csproj">
|
||||
<Project>{E4EB6420-906D-4672-947A-CA33DDCDADFC}</Project>
|
||||
<Name>12SendMessageToWeb</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\BasicOperation.OSql\20-05Function.BasicOperation.OSql.csproj">
|
||||
<Project>{d3b3af58-7d7c-47c3-a406-f4e0ebdd6ec7}</Project>
|
||||
<Name>20-05Function.BasicOperation.OSql</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Foundation\20-04Foundation.csproj">
|
||||
<Project>{152517a0-d320-45aa-ad1b-382a8b8b5a8b}</Project>
|
||||
<Name>20-04Foundation</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LogNet\20-01LogNet.csproj">
|
||||
<Project>{4b777069-a494-40ff-8e88-e3d815ed80cb}</Project>
|
||||
<Name>20-01LogNet</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Version\VersionDescription.resx">
|
||||
<DependentUpon>VersionDescription.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Version\VersionsInformation.resx">
|
||||
<DependentUpon>VersionsInformation.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="WinForm\T_ProgressBar_2.resx">
|
||||
<DependentUpon>T_ProgressBar_2.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="WinForm\T_ProgressBar.resx">
|
||||
<DependentUpon>T_ProgressBar.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="KinematicsEditor\Resources\ToolBarIcon\NewJoint.png" />
|
||||
<Content Include="KinematicsEditor\Resources\ToolBarIcon\NewLink.png" />
|
||||
<Content Include="KinematicsEditor\Resources\ToolBarIcon\PoseEditor.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,43 @@
|
||||
using Global;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
//using static SqlManage.ExecSql;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace DTTest
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class E { }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class ModelManagement
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ar"></param>
|
||||
private void TheEnd(IAsyncResult ar)
|
||||
{
|
||||
var dn = (GeneralFunction)ar.AsyncState;
|
||||
dn.EndInvoke(ar);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ar"></param>
|
||||
public void SignalWriteTask_0(IAsyncResult ar)
|
||||
{
|
||||
var dn = (Func)ar.AsyncState;
|
||||
dn.EndInvoke(ar);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
103
DataMirrorTools_Simulator/ModelBasic/Base/CopyFilesHandler.cs
Normal file
103
DataMirrorTools_Simulator/ModelBasic/Base/CopyFilesHandler.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace CopyFiles
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CopyFilesHandler
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="strSouPath"></param>
|
||||
/// <param name="strDesPath"></param>
|
||||
public void CopyFiles(string strSouPath, string strDesPath)
|
||||
{
|
||||
Directory.CreateDirectory(strDesPath);
|
||||
|
||||
if (!Directory.Exists(strSouPath)) return;
|
||||
|
||||
string[] directories = Directory.GetDirectories(strSouPath);
|
||||
|
||||
if (directories.Length > 0)
|
||||
{
|
||||
foreach (string d in directories)
|
||||
{
|
||||
CopyFiles(d, strDesPath + d.Substring(d.LastIndexOf("\\")));
|
||||
}
|
||||
}
|
||||
|
||||
string[] files = Directory.GetFiles(strSouPath);
|
||||
|
||||
if (files.Length > 0)
|
||||
{
|
||||
foreach (string s in files)
|
||||
{
|
||||
string targetPath = strDesPath + s.Substring(s.LastIndexOf("\\"));
|
||||
|
||||
if (File.Exists(targetPath))
|
||||
{
|
||||
File.Delete(targetPath);
|
||||
}
|
||||
File.Copy(s, targetPath);
|
||||
currCount++;
|
||||
Console.WriteLine("" + currCount.ToString() + " / " + maxCount + " -> " + targetPath);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int currCount = 0;
|
||||
|
||||
int maxCount = 0;
|
||||
|
||||
List<String> fileNameLiat = new List<String>();
|
||||
|
||||
|
||||
public void GetFileCount(string strSouPath)
|
||||
{
|
||||
if (!Directory.Exists(strSouPath)) return ;
|
||||
|
||||
string[] directories = Directory.GetDirectories(strSouPath);
|
||||
|
||||
if (directories.Length > 0)
|
||||
{
|
||||
foreach (string d in directories)
|
||||
{
|
||||
GetFileCount(d);
|
||||
}
|
||||
}
|
||||
|
||||
string[] files = Directory.GetFiles(strSouPath);
|
||||
|
||||
if (files.Length > 0)
|
||||
{
|
||||
foreach (string s in files)
|
||||
{
|
||||
fileNameLiat.Add(s);
|
||||
}
|
||||
}
|
||||
maxCount = fileNameLiat.Count();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
191
DataMirrorTools_Simulator/ModelBasic/Base/ExtendMethod.cs
Normal file
191
DataMirrorTools_Simulator/ModelBasic/Base/ExtendMethod.cs
Normal file
@@ -0,0 +1,191 @@
|
||||
using Global;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
//using static DataLinkMesWork.SQLCommon;
|
||||
//using static SqlManage.ExecSql;
|
||||
using System.Reflection;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace DTTest
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class E { }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class ModelManagement
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace BT.Preservation.Models
|
||||
{
|
||||
public static class ExtendMethod
|
||||
{
|
||||
/// <summary>
|
||||
/// DataTable转成List
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public static List<T> ToDataList<T>(this DataTable dt)
|
||||
{
|
||||
var list = new List<T>();
|
||||
var plist = new List<PropertyInfo>(typeof(T).GetProperties());
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
T s = Activator.CreateInstance<T>();
|
||||
for (int i = 0; i < dt.Columns.Count; i++)
|
||||
{
|
||||
PropertyInfo info = plist.Find(p => p.Name == dt.Columns[i].ColumnName);
|
||||
if (info != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Convert.IsDBNull(item[i]))
|
||||
{
|
||||
object v = null;
|
||||
if (info.PropertyType.ToString().Contains("System.Nullable"))
|
||||
{
|
||||
v = Convert.ChangeType(item[i], Nullable.GetUnderlyingType(info.PropertyType));
|
||||
}
|
||||
else
|
||||
{
|
||||
v = Convert.ChangeType(item[i], info.PropertyType);
|
||||
}
|
||||
info.SetValue(s, v, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ExtendMethod), ex);
|
||||
|
||||
throw new Exception("字段[" + info.Name + "]转换出错," + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
list.Add(s);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DataTable转成Dto
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public static T ToDataDto<T>(this DataTable dt)
|
||||
{
|
||||
T s = Activator.CreateInstance<T>();
|
||||
if (dt == null || dt.Rows.Count == 0)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
var plist = new List<PropertyInfo>(typeof(T).GetProperties());
|
||||
for (int i = 0; i < dt.Columns.Count; i++)
|
||||
{
|
||||
PropertyInfo info = plist.Find(p => p.Name == dt.Columns[i].ColumnName);
|
||||
if (info != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Convert.IsDBNull(dt.Rows[0][i]))
|
||||
{
|
||||
object v = null;
|
||||
if (info.PropertyType.ToString().Contains("System.Nullable"))
|
||||
{
|
||||
v = Convert.ChangeType(dt.Rows[0][i], Nullable.GetUnderlyingType(info.PropertyType));
|
||||
}
|
||||
else
|
||||
{
|
||||
v = Convert.ChangeType(dt.Rows[0][i], info.PropertyType);
|
||||
}
|
||||
info.SetValue(s, v, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ExtendMethod), ex);
|
||||
|
||||
|
||||
throw new Exception("字段[" + info.Name + "]转换出错," + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将实体集合转换为DataTable
|
||||
/// </summary>
|
||||
/// <typeparam name="T">实体类型</typeparam>
|
||||
/// <param name="entities">实体集合</param>
|
||||
public static DataTable ToDataTable<T>(List<T> entities)
|
||||
{
|
||||
var result = CreateTable<T>();
|
||||
FillData(result, entities);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建表
|
||||
/// </summary>
|
||||
private static DataTable CreateTable<T>()
|
||||
{
|
||||
var result = new DataTable();
|
||||
var type = typeof(T);
|
||||
foreach (var property in type.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance))
|
||||
{
|
||||
var propertyType = property.PropertyType;
|
||||
if ((propertyType.IsGenericType) && (propertyType.GetGenericTypeDefinition() == typeof(Nullable<>)))
|
||||
propertyType = propertyType.GetGenericArguments()[0];
|
||||
result.Columns.Add(property.Name, propertyType);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 填充数据
|
||||
/// </summary>
|
||||
private static void FillData<T>(DataTable dt, IEnumerable<T> entities)
|
||||
{
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
dt.Rows.Add(CreateRow(dt, entity));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建行
|
||||
/// </summary>
|
||||
private static DataRow CreateRow<T>(DataTable dt, T entity)
|
||||
{
|
||||
DataRow row = dt.NewRow();
|
||||
var type = typeof(T);
|
||||
foreach (var property in type.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance))
|
||||
{
|
||||
row[property.Name] = property.GetValue(entity) ?? DBNull.Value;
|
||||
}
|
||||
return row;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
using FileExplorer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
//using System.Threading.Tasks;
|
||||
//using static SqlManage.ExecSql;
|
||||
//using System.Windows.Forms;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial class ModelManagement
|
||||
{
|
||||
public void B_C_ExportModel(string modelName, string modelData)
|
||||
{
|
||||
// // ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("【收到的文件名】 = " + modelName);
|
||||
|
||||
var filepathGltf = PP.PCP.ModelFilePath + modelName + ".gltf";
|
||||
var filepathGlb = PP.PCP.ModelFilePath + modelName + ".glb";
|
||||
var cmd = " gltf-pipeline -i " + filepathGltf + " -o " + filepathGlb + " -b -d"+ " && del "+ filepathGltf;
|
||||
|
||||
if (File.Exists(filepathGltf))
|
||||
{
|
||||
File.Delete(filepathGltf);
|
||||
}
|
||||
|
||||
System.IO.File.WriteAllText(filepathGltf, modelData);
|
||||
|
||||
Thread tExec = new Thread(new ParameterizedThreadStart(ExecCmd));
|
||||
tExec.IsBackground = true;
|
||||
tExec.Start(cmd);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void ExecCmd(object cmd)
|
||||
{
|
||||
Cmd.InvokeCmd((string)cmd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
1015
DataMirrorTools_Simulator/ModelBasic/Base/MM.Brush.Class.cs
Normal file
1015
DataMirrorTools_Simulator/ModelBasic/Base/MM.Brush.Class.cs
Normal file
File diff suppressed because it is too large
Load Diff
104
DataMirrorTools_Simulator/ModelBasic/Base/MM.Define.cs
Normal file
104
DataMirrorTools_Simulator/ModelBasic/Base/MM.Define.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using Global;
|
||||
using ModelBasic;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial class ModelManagement : DockContent//,IModelManagement,IModelManagement3
|
||||
{
|
||||
/// <summary>
|
||||
/// 客户端对象
|
||||
/// </summary>
|
||||
private static ConLink.Enthernet.NetComplexClient clientLocal
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
/// <summary>
|
||||
/// 行为对应对象
|
||||
/// </summary>
|
||||
Dictionary<String, ActControl> dc_ActCode_Object = new Dictionary<String, ActControl>();
|
||||
|
||||
#region 协议说明20200915,
|
||||
/*20200605 C->B发送播放协议 协议 DT|Robot|Subjection|ModelCode|00&-48&64&00&73&00&3
|
||||
DT|Device|Subjection|ModelCode|00&-48&64&00&73&00&1
|
||||
DT|FirstPosition|Subjection|ModelCode|00&-48&64&00&73&00&1
|
||||
DT|Frames|[{"i":ModelCode,"tx":-3669.57,"ty":843.59,"tz":885.98,"rx":0,"ry":90,"rz":0}]
|
||||
协议说明 0 数据类型 DT:数字孪生数据
|
||||
1 设备类型(如何驱动) Robot:机器人类型的设备,Device:普通设备,FirstPosition:普通设备运动无过程
|
||||
2 设备名字(模型隶属于,即父级)
|
||||
3 设备运动部件名称
|
||||
4 设备运动部件数据 普通设备 机器人设备
|
||||
0 X 0 J1
|
||||
1 Y 1 J2
|
||||
2 Z 2 J3
|
||||
3 RX 3 J4
|
||||
4 RY 4 J5
|
||||
5 RZ 5 J6
|
||||
6 预留 6 夹手状态
|
||||
20200605 C->B->C请求模型位置 协议 DT|Position|ModelCode
|
||||
DT|Position|ModelCode|00&-48&64&00&73&00
|
||||
协议说明 0 数据类型 DT:数字孪生数据
|
||||
1 指令 Position:表示请求位置
|
||||
2 设备运动部件名称
|
||||
3 设备运动部件返回的数据 0 X 0 J1
|
||||
1 Y 1 J2
|
||||
2 Z 2 J3
|
||||
3 RX 3 J4
|
||||
4 RY 4 J5
|
||||
5 RZ 5 J6
|
||||
6 预留 6 夹手状态
|
||||
20200605 C->B请求选中模型 协议 DT|Select|ModelCode
|
||||
协议说明 1 指令 Select:表示显示选中的模型
|
||||
2 设备运动部件名称
|
||||
20200713 C->B请求拖拽模型 协议 DT|DragMove|ModelCode
|
||||
DT|DragRotate|ModelCode
|
||||
协议说明 1 指令 Drag:表示模型出现操作标,可以拖拽(平移DragMove、旋转DragRotate)
|
||||
2 设备运动部件名称
|
||||
20200706 C->B通知模型显示(隐藏) 协议 DT|Visible|ModelCode|1
|
||||
协议说明 1 指令 Visible:表示模型显示、隐藏
|
||||
2 设备运动部件名称
|
||||
3 显示、隐藏 0、隐藏;1、显示
|
||||
20200714设计20200810废弃 B->C->B请求模型名称 协议 DT|RequestModelName
|
||||
DT|RequestModelName|{二维JSON}
|
||||
DT|RequestModelVisible
|
||||
DT|RequestModelVisible|{二维JSON}
|
||||
协议说明 1 指令 Request:表示请求模型名称、模型可见
|
||||
2 设备运动部件名称
|
||||
20200810 C->B通知行为播放 协议 DT|PlayAct|ActCode|1
|
||||
DT|PlayAct|ActCode|0
|
||||
协议说明 1 指令 PlayAct:表示播放行为
|
||||
2 设备运动部件名称
|
||||
3 播放、暂停 0、暂停;1、播放
|
||||
20200810 C->B通知重新加载播放数据 协议 DT|ReLoadAct
|
||||
协议说明 1 指令 ReLoadAct:表示重新加载行为数据
|
||||
20200812设计20200911废弃 C->B通知行为播放 协议 DT|PlayTagID|TagID|1
|
||||
DT|PlayTagID|TagID|0
|
||||
协议说明 1 指令 PlayTagID:表示用TagID播放行为
|
||||
2 设备运动部件名称
|
||||
3 播放、暂停 0、暂停;1、播放
|
||||
20200824 C->B绘制工艺路径 协议 DT|DrawPath|{}
|
||||
协议说明 1 指令 DrawPath:表示绘制路径指令
|
||||
2 {} [{"CraftCode": 1,"Visible": 1,"Point": [1,2,3.4,5,6,7,8,9,1.2]}]
|
||||
20200827 B->C网页选中模型后返回模型信息 协议 DT|ClickModel|{}
|
||||
协议说明 1 指令 ClickModel:表示点击模型后触发
|
||||
2 {} [{"ModelCode": 1,"ModelName": 1,"Visible": 1,"x": 11,"y": 11,"z": 11,"rx": 11,"ry": 11,"rz": 11}]
|
||||
3 说明 网页收到选择模型的指令(第29行:DT|Select|ModelCode),也应当返回此内容
|
||||
20200829 C->B请求改变模型透明度 协议 DT|ModelTransparent|ModelCode|1
|
||||
协议说明 1 指令 ModelTransparent:表示模型透明, 0-1:表示透明度 0完全透明 1 不透明
|
||||
2 设备运动部件名称
|
||||
20200831 C->B请求模型进行自转 协议 DT|ModelRotation|ModelCode|1
|
||||
协议说明 1 指令 ModelRotation:表示模型旋转, 0暂停 1 旋转
|
||||
2 设备运动部件名称
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using ExecJavaScript;
|
||||
using ModelBasic;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
//using WeifenLuo.WinFormsUI.Docking;
|
||||
//using static SqlManage.ExecSql;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial class ModelManagement
|
||||
{
|
||||
|
||||
//static Dictionary<String, String> dc_Craft_Script = null;
|
||||
//ExecScript execScript = null;
|
||||
|
||||
//public void ReLoad_CraftAndScript()
|
||||
//{
|
||||
// dc_Craft_Script = SqlOperation.SqlCraft.Load_CraftAndScript();
|
||||
// execScript = new ExecScript();
|
||||
//}
|
||||
|
||||
|
||||
//public void RunScript(Dictionary<String, String> dc_TagID_PlcValue,string changedTagID)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// if (dc_TagID_PlcValue == null)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// foreach (KeyValuePair<String, String> item in dc_Craft_Script)
|
||||
// {
|
||||
// var craftCode = item.Key;
|
||||
// var scriptText = item.Value;
|
||||
// if (scriptText.Contains(changedTagID))
|
||||
// {
|
||||
// var result = execScript.RunScript(dc_TagID_PlcValue, scriptText);
|
||||
// if (result == "1")
|
||||
// {
|
||||
// S_PlayAct(craftCode, "1");
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
// catch (Exception err)
|
||||
// {
|
||||
// // ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit($"执行脚本错误!:{err.Message}");
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
298
DataMirrorTools_Simulator/ModelBasic/Base/MM.MesWorkOpc.cs
Normal file
298
DataMirrorTools_Simulator/ModelBasic/Base/MM.MesWorkOpc.cs
Normal file
@@ -0,0 +1,298 @@
|
||||
using ModelBasic;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
//using WeifenLuo.WinFormsUI.Docking;
|
||||
//using static SqlManage.ExecSql;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace DTTest
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class E { }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class ModelManagement
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="dt_Signal"></param>
|
||||
/// <param name="dt_Device"></param>
|
||||
/// <returns></returns>
|
||||
public bool GetSignalTable(out DataTable dt_Signal, out DataTable dt_Device)
|
||||
{
|
||||
var b = false;
|
||||
|
||||
dt_Signal = CreateOpcSignalTable();
|
||||
dt_Device = CreateOpcDeviceTable();
|
||||
var dc_TagType_TypeIDAndLong = new Dictionary<String, String>();
|
||||
dc_TagType_TypeIDAndLong.Add("INT16","2,2");
|
||||
dc_TagType_TypeIDAndLong.Add("INT32","3,4");
|
||||
dc_TagType_TypeIDAndLong.Add("FLOAT", "4,4");
|
||||
dc_TagType_TypeIDAndLong.Add("UINT64", "7,8");
|
||||
dc_TagType_TypeIDAndLong.Add("STRING", "8,?");
|
||||
dc_TagType_TypeIDAndLong.Add("BOOL", "11,1");
|
||||
dc_TagType_TypeIDAndLong.Add("BYTE", "17,1");
|
||||
dc_TagType_TypeIDAndLong.Add("UINT16", "18,2");
|
||||
dc_TagType_TypeIDAndLong.Add("DOUBLE", "19,8");
|
||||
dc_TagType_TypeIDAndLong.Add("INT", "2,2");
|
||||
dc_TagType_TypeIDAndLong.Add("DINT", "3,4");
|
||||
dc_TagType_TypeIDAndLong.Add("WORD", "18,2");
|
||||
dc_TagType_TypeIDAndLong.Add("DWORD", "3,4");
|
||||
dc_TagType_TypeIDAndLong.Add("REAL", "4,4");
|
||||
dc_TagType_TypeIDAndLong.Add("LREAL", "19,8");
|
||||
|
||||
//[DeviceCode],[Name],[IP],[DeviceType],[IsEnable],[Explain]
|
||||
var deviceTable = SqlOperation.SqlSignalTree.Select_Connect();
|
||||
var countDeviceTable = deviceTable.Rows.Count;
|
||||
for (int i = 0; i < countDeviceTable; i++)
|
||||
{
|
||||
//[ID],[IP],[DeviceType],[IsEnable]
|
||||
var ip = deviceTable.Rows[i]["IP"].ToString();
|
||||
var deviceType = deviceTable.Rows[i]["DeviceType"].ToString();
|
||||
var isEnable = Convert.ToInt32(deviceTable.Rows[i]["IsEnable"]).ToString();
|
||||
|
||||
dt_Device.Rows.Add(ip, deviceType, isEnable);
|
||||
}
|
||||
|
||||
var opcDataTable = SqlOperation.SqlSignalTree.SelectSignalForOpc(PP.ProjectCode);
|
||||
var count = opcDataTable.Rows.Count;
|
||||
for(int i = 0; i < count; i++)
|
||||
{
|
||||
var Region = opcDataTable.Rows[i]["Region"].ToString();
|
||||
var addr = opcDataTable.Rows[i]["Address"].ToString();
|
||||
var addr1 = "";
|
||||
var addr2 = "";
|
||||
if (addr.Contains("."))
|
||||
{
|
||||
addr1 = addr.Split('.')[0];
|
||||
addr2 = "."+addr.Split('.')[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
addr1 = addr;
|
||||
addr2 = "";
|
||||
}
|
||||
|
||||
var tagType = opcDataTable.Rows[i]["Type"].ToString().ToUpper();
|
||||
var tagTypeID = dc_TagType_TypeIDAndLong[tagType].Split(',')[0];
|
||||
|
||||
var tagLong = dc_TagType_TypeIDAndLong[tagType].Split(',')[1];
|
||||
|
||||
//if (tagType == "STRING")
|
||||
//{
|
||||
// tagLong = (Convert.ToInt32(addr2) + 2).ToString();
|
||||
//}
|
||||
if (tagType == "STRING")
|
||||
{
|
||||
var length_1 = "";
|
||||
if (addr2.Contains("."))
|
||||
{
|
||||
length_1 = addr2.Replace(".", "");
|
||||
}
|
||||
tagLong = (Convert.ToInt32(length_1) + 2).ToString();
|
||||
}
|
||||
|
||||
var tagID = opcDataTable.Rows[i]["DeviceCode"].ToString();
|
||||
var tagName = opcDataTable.Rows[i]["Name"].ToString();
|
||||
|
||||
var isEnable = Convert.ToInt32(opcDataTable.Rows[i]["IsEnable"]).ToString();
|
||||
var devicePid = opcDataTable.Rows[i]["DevicePid"].ToString();
|
||||
var ip = "127.0.0.1";
|
||||
var dr_Connect = deviceTable.Select($"DeviceCode = '{devicePid}'");
|
||||
if (dr_Connect.Length > 0)
|
||||
{
|
||||
ip = dr_Connect[0]["IP"].ToString();
|
||||
}
|
||||
|
||||
var opName = "OP_"+ ip;
|
||||
|
||||
var isMonitor = opcDataTable.Rows[i]["IsMonitor"].ToString ();
|
||||
switch (isMonitor)
|
||||
{
|
||||
case "1":
|
||||
case "True":
|
||||
case "TRUE":
|
||||
case "true":
|
||||
isMonitor = "1";
|
||||
break;
|
||||
default:
|
||||
isMonitor = "0";
|
||||
break;
|
||||
}
|
||||
var resourcesCode = opcDataTable.Rows[i]["Resources"].ToString();
|
||||
|
||||
|
||||
dt_Signal.Rows.Add(
|
||||
tagID,//TagID
|
||||
tagName,//TagName
|
||||
opName, //工位号
|
||||
opName, //数据来源
|
||||
ip, //IP
|
||||
tagTypeID, //TagTypeID
|
||||
tagLong, //TagLong
|
||||
Region, //DbName
|
||||
tagType, //变量类型
|
||||
addr1, //变量地址
|
||||
addr2, //变量其它
|
||||
"0",//演示偏移
|
||||
"2",//列位置
|
||||
resourcesCode,//测量位置
|
||||
tagName,//测量项目
|
||||
"",//测量单位
|
||||
"3",//变量类型代码
|
||||
"数字孪生变量",//变量类型名称
|
||||
"127",//机体类型
|
||||
"",//线体类型
|
||||
"无",//"S7:[127.0.0.1|VFD1|S7ONLINE|01.00,127.0.0.1,02.02,1]DB411,B1",//TagAdr
|
||||
"无",//"S7:[@LOCALSERVER]DB411,INT1",//TagAdrDemo
|
||||
isEnable,//是否启用
|
||||
"Group1",//监控组
|
||||
"100",//监控时间间隔
|
||||
"0",//OpcServer_OPNAME
|
||||
"0",//变量特点
|
||||
isMonitor,//是否监控
|
||||
"0",//变量排序
|
||||
"0",//工序能力
|
||||
"1",//监控属性代码
|
||||
"0",//测量位置短
|
||||
"100",//上限值
|
||||
"0",//下限值
|
||||
"50",//理论值
|
||||
"1",//IsGoodBad
|
||||
"0",//IsSaveToSql
|
||||
"0"//IsWebSocket
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return b;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private DataTable CreateOpcSignalTable()
|
||||
{
|
||||
//TagID TagName 工位号 数据来源 IP TagTypeID TagLong DbName 变量类型 变量地址 变量其它 演示偏移 列位置 测量位置 测量项目 测量单位 变量类型代码 变量类型名称 机体类型 线体类型 TagAdr TagAdrDemo 是否启用 监控组 监控时间间隔 OpcServer_OPNAME 变量特点 是否监控 变量排序 工序能力 监控属性代码 测量位置短 上限值 下限值 理论值 IsGoodBad IsSaveToSql IsWebSocket
|
||||
var dt = new DataTable();
|
||||
dt.Columns.Add("TagID");
|
||||
dt.Columns.Add("TagName");
|
||||
dt.Columns.Add("工位号");
|
||||
dt.Columns.Add("数据来源");
|
||||
dt.Columns.Add("IP");
|
||||
dt.Columns.Add("TagTypeID");
|
||||
dt.Columns.Add("TagLong");
|
||||
dt.Columns.Add("DbName");
|
||||
dt.Columns.Add("变量类型");
|
||||
dt.Columns.Add("变量地址");
|
||||
dt.Columns.Add("变量其它");
|
||||
dt.Columns.Add("演示偏移");
|
||||
dt.Columns.Add("列位置");
|
||||
dt.Columns.Add("测量位置");
|
||||
dt.Columns.Add("测量项目");
|
||||
dt.Columns.Add("测量单位");
|
||||
dt.Columns.Add("变量类型代码");
|
||||
dt.Columns.Add("变量类型名称");
|
||||
dt.Columns.Add("机体类型");
|
||||
dt.Columns.Add("线体类型");
|
||||
dt.Columns.Add("TagAdr");
|
||||
dt.Columns.Add("TagAdrDemo");
|
||||
dt.Columns.Add("是否启用");
|
||||
dt.Columns.Add("监控组");
|
||||
dt.Columns.Add("监控时间间隔");
|
||||
dt.Columns.Add("OpcServer_OPNAME");
|
||||
dt.Columns.Add("变量特点");
|
||||
dt.Columns.Add("是否监控");
|
||||
dt.Columns.Add("变量排序");
|
||||
dt.Columns.Add("工序能力");
|
||||
dt.Columns.Add("监控属性代码");
|
||||
dt.Columns.Add("测量位置短");
|
||||
dt.Columns.Add("上限值");
|
||||
dt.Columns.Add("下限值");
|
||||
dt.Columns.Add("理论值");
|
||||
dt.Columns.Add("IsGoodBad");
|
||||
dt.Columns.Add("IsSaveToSql");
|
||||
dt.Columns.Add("IsWebSocket");
|
||||
|
||||
return dt;
|
||||
|
||||
}
|
||||
|
||||
private DataTable CreateOpcDeviceTable()
|
||||
{
|
||||
//设备IP 设备类型 是否启用
|
||||
|
||||
var dt = new DataTable();
|
||||
dt.Columns.Add("设备IP");
|
||||
dt.Columns.Add("设备类型");
|
||||
dt.Columns.Add("是否启用");
|
||||
|
||||
return dt;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void GetSignalTableForAdvanced( DataTable dt_Signal
|
||||
, out Dictionary<String, String> dc_IP_InstanceName
|
||||
, out Dictionary<String,String> dc_TagID_InstanceName
|
||||
, out Dictionary<String, String> dc_TagID_Addr
|
||||
, out Dictionary<String, Int32> dc_TagID_TagTypeCode)
|
||||
{
|
||||
|
||||
dc_IP_InstanceName = new Dictionary<String, String>();
|
||||
var dt_Device = SqlOperation.SqlSignalTree.Select_Connect();
|
||||
foreach (DataRow dr in dt_Device.Rows)
|
||||
{
|
||||
var ip = dr["IP"].ToString();
|
||||
var name = dr["Name"].ToString();
|
||||
dc_IP_InstanceName.Add(ip, name);
|
||||
}
|
||||
|
||||
dc_TagID_InstanceName = new Dictionary<String, String>();
|
||||
dc_TagID_Addr = new Dictionary<String, String>();
|
||||
dc_TagID_TagTypeCode = new Dictionary<String, Int32>();
|
||||
for (int i = 0; i < dt_Signal.Rows.Count; i++)
|
||||
{
|
||||
var tagID = dt_Signal.Rows[i]["TagID"].ToString();
|
||||
var ip = dt_Signal.Rows[i]["IP"].ToString();
|
||||
var dbName = dt_Signal.Rows[i]["DbName"].ToString();
|
||||
var 变量地址 = dt_Signal.Rows[i]["变量地址"].ToString();
|
||||
var 变量其它 = dt_Signal.Rows[i]["变量其它"].ToString();
|
||||
var addr = dbName + 变量地址 + 变量其它;
|
||||
var tagTypeCode = Convert.ToInt32(dt_Signal.Rows[i]["TagTypeID"]);
|
||||
if (addr.Contains("I") | addr.Contains("Q"))
|
||||
{
|
||||
dc_TagID_InstanceName.Add(tagID, dc_IP_InstanceName[ip]);
|
||||
dc_TagID_Addr.Add(tagID, addr);
|
||||
dc_TagID_TagTypeCode.Add(tagID, tagTypeCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
//using Global;
|
||||
//using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
//using static DataLinkMesWork.SQLCommon;
|
||||
//using static SqlManage.ExecSql;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace DTTest
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class E { }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class ModelManagement
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="processList"></param>
|
||||
/// <param name="useTimeList"></param>
|
||||
/// <param name="jList"></param>
|
||||
private void RecordJointData(List<String> processList, List<Int32> useTimeList, List<List<double>> jList)
|
||||
{
|
||||
useTimeList[0] = 0;
|
||||
var dc_ProcessCode_Joint = new Dictionary<String, List<double>>();
|
||||
var jointIndex = 0;
|
||||
for (int i = 0; i < processList.Count ; i++)
|
||||
{
|
||||
var index = jointIndex += useTimeList[i] / PP.PCP.FrameValue;
|
||||
var ii = index >= jList.Count ? index - 1 : index;
|
||||
dc_ProcessCode_Joint.Add(processList[i], jList[ii]);
|
||||
}
|
||||
ExecToSQL(dc_ProcessCode_Joint);
|
||||
}
|
||||
|
||||
|
||||
private void ExecToSQL(Dictionary<String, List<double>> dc_ProcessCode_Joint)
|
||||
{
|
||||
var sqls = "";
|
||||
|
||||
foreach (var item in dc_ProcessCode_Joint)
|
||||
{
|
||||
var tagId = item.Key;
|
||||
var tagJointValue = item.Value;
|
||||
var sql = " UPDATE [ModelProcess] SET [J1] = " + tagJointValue[0] + ", [J2] = " + tagJointValue[1] + ", [J3] = " + tagJointValue[2] + ", [J4] = " + tagJointValue[3] + ", [J5] = " + tagJointValue[4] + ", [J6] = " + tagJointValue[5] + " WHERE [ProjectCode] = '" + PP.ProjectCode + "' AND [ProcessCode] = '" + tagId + "' ;\n";
|
||||
sqls += sql;
|
||||
}
|
||||
|
||||
SqlOperation.SqlCraft.ExecSqlStrNoQuery(sqls);
|
||||
|
||||
//foreach (var ProcessCode_JointDic in dc_ProcessCode_Joint)
|
||||
//{
|
||||
// var currProcessCode = ProcessCode_JointDic.Key;
|
||||
// var currJoint = JsonConvert.SerializeObject(ProcessCode_JointDic.Value);
|
||||
|
||||
// SqlOperation.SqlProcess.UpdateProcessRobotCurrJoint(currProcessCode, currJoint);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
237
DataMirrorTools_Simulator/ModelBasic/Base/MM.SimDeviceSignal.cs
Normal file
237
DataMirrorTools_Simulator/ModelBasic/Base/MM.SimDeviceSignal.cs
Normal file
@@ -0,0 +1,237 @@
|
||||
using Global;
|
||||
using MesServerFunctions;
|
||||
using ModelBasic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public class DeviceSignalSimGanttBase : ModelManagement
|
||||
{
|
||||
static string MqttTargetTopicPLC = System.Configuration.ConfigurationManager.AppSettings["MqttTargetTopicPLC"];
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static int playIndex;
|
||||
/// <summary>
|
||||
/// 循环播放
|
||||
/// 2021.3.31
|
||||
/// </summary>
|
||||
public static bool LoopPlay = false;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private Thread t_PlayCurrDeviceSignalSimTask = null;
|
||||
/// <summary>
|
||||
/// 播放当前的信号仿真的任务
|
||||
/// 2020.12.10
|
||||
/// </summary>
|
||||
public void PlayCurrDeviceSignalSimTask(string deviceSignalSimCode)
|
||||
{
|
||||
if (t_PlayCurrDeviceSignalSimTask == null)
|
||||
{
|
||||
t_PlayCurrDeviceSignalSimTask = new Thread(new ParameterizedThreadStart(PlayDeviceSignalSim));
|
||||
t_PlayCurrDeviceSignalSimTask.IsBackground = true;
|
||||
t_PlayCurrDeviceSignalSimTask.Name = deviceSignalSimCode.ToString();
|
||||
t_PlayCurrDeviceSignalSimTask.Start(deviceSignalSimCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
// // ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("当前存在播放的信号仿真!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static public bool IsCanPlay(string deviceSignalSimCode)
|
||||
{
|
||||
var dt_DeviceSignalSim = SqlOperation.SqlDeviceSignalSim.Select_DeviceSignalSim(deviceSignalSimCode);
|
||||
if (dt_DeviceSignalSim.Rows.Count < 1)
|
||||
{
|
||||
// // ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("当前不存在播放的信号仿真!");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void PlayDeviceSignalSim(object obj)
|
||||
{
|
||||
var deviceSignalSimCode = (string)obj;
|
||||
var dt_DeviceSignalSim = SqlOperation.SqlDeviceSignalSim.Select_DeviceSignalSim(deviceSignalSimCode);
|
||||
if (dt_DeviceSignalSim.Rows.Count < 1)
|
||||
{
|
||||
// // ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("当前不存在播放的信号仿真!");
|
||||
return;
|
||||
}
|
||||
var dt_DeviceSignalSim_Count = dt_DeviceSignalSim.Rows.Count;
|
||||
var list_TagStartTime_TagID_TagValue = new List<OperationResultMesDtSim<Int32, String, String,Int32,string,string>>();
|
||||
var timeList = new List<int>();
|
||||
|
||||
for (int i = 0; i < dt_DeviceSignalSim_Count; i++)
|
||||
{
|
||||
var startTime = Convert.ToInt32(dt_DeviceSignalSim.Rows[i]["StartTime"]);
|
||||
var tagStartTime = startTime / 100;
|
||||
var keepTime = Convert.ToInt32(dt_DeviceSignalSim.Rows[i]["KeepTime"]);
|
||||
var tagID = dt_DeviceSignalSim.Rows[i]["TagID"].ToString();
|
||||
var tagValue = dt_DeviceSignalSim.Rows[i]["TagValue"].ToString();
|
||||
var opName = dt_DeviceSignalSim.Rows[i]["OpName"].ToString();
|
||||
var tagIDCopyFrom = dt_DeviceSignalSim.Rows[i]["TagIDCopyFrom"].ToString();
|
||||
|
||||
int tagFrom = 1;
|
||||
if(dt_DeviceSignalSim.Rows[i]["TagFrom"]!=DBNull.Value)
|
||||
{
|
||||
tagFrom = Convert.ToInt32(dt_DeviceSignalSim.Rows[i]["TagFrom"]);
|
||||
|
||||
}
|
||||
list_TagStartTime_TagID_TagValue.Add(new OperationResultMesDtSim<Int32, String, String, Int32, String, String>()
|
||||
{ PlayIDList = tagStartTime, PlayName = tagID, ModelName = tagValue, TagFrom = tagFrom, OpName = opName, TagIDCopyFrom = tagIDCopyFrom });
|
||||
|
||||
timeList.Add(startTime + keepTime);
|
||||
}
|
||||
var maxTime = timeList.Max();
|
||||
var maxFrame = maxTime / 100;
|
||||
|
||||
var dc_TagStartTime_TagIDAndTagValue = list_TagStartTime_TagID_TagValue.GroupBy(m => m.PlayIDList)
|
||||
.ToDictionary(k => k.First().PlayIDList, v => v.ToList());
|
||||
|
||||
do{
|
||||
do{
|
||||
if (dc_TagStartTime_TagIDAndTagValue.ContainsKey(playIndex))
|
||||
foreach (var item in dc_TagStartTime_TagIDAndTagValue[playIndex])
|
||||
{
|
||||
var tagID = item.PlayName;
|
||||
var tagValue = item.ModelName;
|
||||
var opName = item.OpName;
|
||||
var tagIDCopyFrom = item.TagIDCopyFrom;
|
||||
switch (item.TagFrom)
|
||||
{
|
||||
case 1:
|
||||
DtWebApiDT.PLC.WritePLC(tagID, tagValue);
|
||||
break;
|
||||
case 2:
|
||||
DtWebApi.ReadWritePLC.WritePLC(tagID, tagValue);
|
||||
break;
|
||||
case 3://扫描条码
|
||||
string Message;
|
||||
|
||||
|
||||
Message = "BarCode|Bar|" + opName + "|" + tagValue;
|
||||
|
||||
SendMessage.SendMessageBARToMES(opName,Message);
|
||||
//asyncSendMessage(Message);
|
||||
//DtWebApi.ReadWritePLC.WritePLC(tagID, tagValue);
|
||||
break;
|
||||
case 4://拷贝变量值
|
||||
tagValue = DtWebApi.ReadWritePLC.ReadPLC(tagIDCopyFrom).ToString();
|
||||
DtWebApi.ReadWritePLC.WritePLC(tagID, tagValue);
|
||||
break;
|
||||
case 5://MQTT
|
||||
|
||||
Message = "MesToWeb|Web|" + opName + "|" + tagValue;
|
||||
SendMessage.SendMessageMESToWEB(opName, Message);
|
||||
//asyncSendMessage(Message);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
//if (GlobalVar.signalWriteTask != null)
|
||||
//{
|
||||
// GlobalVar.signalWriteTask.BeginInvoke(Cmd_Frame.SignalWrite, tagID, tagValue, "-1", new AsyncCallback(SignalWriteTask_0), GlobalVar.signalWriteTask);
|
||||
//}
|
||||
}
|
||||
|
||||
ModelControl_CurrRunInfoEventPs(playIndex);
|
||||
playIndex++;
|
||||
Thread.Sleep(100);
|
||||
} while (playIndex <= maxFrame) ;
|
||||
|
||||
playIndex = 0;
|
||||
|
||||
} while(LoopPlay);
|
||||
|
||||
t_PlayCurrDeviceSignalSimTask = null;
|
||||
PlayDeviceSignalSimTaskEnd(deviceSignalSimCode);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void End_DeviceSignalSim_ExecTask(string deviceSignalSimCode)
|
||||
{
|
||||
if (t_PlayCurrDeviceSignalSimTask != null)
|
||||
{
|
||||
var ts = Get_DeviceSignalSim_ExecTask_State();
|
||||
if (ts == (ThreadState.Background | ThreadState.Suspended))
|
||||
{
|
||||
t_PlayCurrDeviceSignalSimTask.Resume();
|
||||
}
|
||||
t_PlayCurrDeviceSignalSimTask.Abort();
|
||||
}
|
||||
|
||||
playIndex = 0;
|
||||
t_PlayCurrDeviceSignalSimTask = null ;
|
||||
PlayDeviceSignalSimTaskEnd(deviceSignalSimCode);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="craftCode"></param>
|
||||
public void Suspend_DeviceSignalSim_ExecTask()
|
||||
{
|
||||
t_PlayCurrDeviceSignalSimTask.Suspend();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="craftCode"></param>
|
||||
public void Resume_DeviceSignalSim_ExecTask()
|
||||
{
|
||||
t_PlayCurrDeviceSignalSimTask.Resume();
|
||||
}
|
||||
|
||||
public ThreadState Get_DeviceSignalSim_ExecTask_State()
|
||||
{
|
||||
ThreadState threadState = ThreadState.Stopped;
|
||||
if (t_PlayCurrDeviceSignalSimTask != null)
|
||||
{
|
||||
threadState = t_PlayCurrDeviceSignalSimTask.ThreadState;
|
||||
}
|
||||
return threadState;
|
||||
}
|
||||
|
||||
public MesWorkMqtt.Mqtt2 mqtt2;
|
||||
public void InitMqtt2(string url, string topic)
|
||||
{
|
||||
mqtt2 = new MesWorkMqtt.Mqtt2();
|
||||
mqtt2.MqttUrl = url;
|
||||
mqtt2.topic = topic;
|
||||
StartAsync();
|
||||
|
||||
}
|
||||
private async void StartAsync()
|
||||
{
|
||||
await mqtt2.StartAsync();
|
||||
}
|
||||
|
||||
|
||||
public async void asyncSendMessage(string Message)
|
||||
{
|
||||
|
||||
|
||||
await mqtt2.Publish(MqttTargetTopicPLC, Message);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
448
DataMirrorTools_Simulator/ModelBasic/Base/MM.TransferProject.cs
Normal file
448
DataMirrorTools_Simulator/ModelBasic/Base/MM.TransferProject.cs
Normal file
@@ -0,0 +1,448 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial class ModelManagement
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 导出项目数据
|
||||
/// 2020.10.29
|
||||
/// </summary>
|
||||
public void ExportProjectData_FixedTable_Dialog(bool isLightweight)
|
||||
{
|
||||
var exportOpenFileDialog = new SaveFileDialog();
|
||||
//设置文件类型
|
||||
exportOpenFileDialog.Filter = "JavaScript Object Notation(*.json)|*.json";
|
||||
//exportOpenFileDialog.Filter = "JavaScript Object Notation(*.json)|*.json|Microsoft Excel(*.xls)|*.xls|Data File(*.dat)|*.dat";
|
||||
//设置默认文件类型显示顺序
|
||||
exportOpenFileDialog.FilterIndex = 1;
|
||||
//保存对话框是否记忆上次打开的目录
|
||||
exportOpenFileDialog.RestoreDirectory = true;
|
||||
|
||||
var exportDialogResult = exportOpenFileDialog.ShowDialog();
|
||||
|
||||
//点了保存按钮进入
|
||||
if (exportDialogResult == DialogResult.OK)
|
||||
{
|
||||
var localFilePath = exportOpenFileDialog.FileName;//获得文件路径
|
||||
var fileNameExt = localFilePath.Substring(localFilePath.LastIndexOf("\\") + 1); //获取文件名,不带路径
|
||||
var fileExtension = localFilePath.Substring(localFilePath.LastIndexOf(".") + 1); //获取文件扩展名
|
||||
|
||||
//获取文件路径,不带文件名
|
||||
//FilePath = localFilePath.Substring(0, localFilePath.LastIndexOf("\\"));
|
||||
|
||||
//给文件名前加上时间
|
||||
//newFileName = DateTime.Now.ToString("yyyyMMdd") + fileNameExt;
|
||||
|
||||
//在文件名里加字符
|
||||
//saveFileDialog1.FileName.Insert(1,"dameng");
|
||||
|
||||
//System.IO.FileStream fs = (System.IO.FileStream)sfd.OpenFile();//输出文件
|
||||
var fileExtensionToLower = fileExtension.ToLower();
|
||||
|
||||
ExportProjectData_FixedTable(localFilePath, fileExtensionToLower, isLightweight);
|
||||
|
||||
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show("您已取消了导出数据操作!");
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
public void ExportProjectData_FixedTable_Dialog(string projectName)
|
||||
{
|
||||
var exportOpenFileDialog = new SaveFileDialog();
|
||||
//设置文件类型
|
||||
exportOpenFileDialog.Filter = "导出文件(*.bak)|*.bak";
|
||||
//exportOpenFileDialog.Filter = "JavaScript Object Notation(*.json)|*.json|Microsoft Excel(*.xls)|*.xls|Data File(*.dat)|*.dat";
|
||||
//设置默认文件类型显示顺序
|
||||
exportOpenFileDialog.FilterIndex = 1;
|
||||
//保存对话框是否记忆上次打开的目录
|
||||
exportOpenFileDialog.RestoreDirectory = true;
|
||||
|
||||
var exportDialogResult = exportOpenFileDialog.ShowDialog();
|
||||
|
||||
//点了保存按钮进入
|
||||
if (exportDialogResult == DialogResult.OK)
|
||||
{
|
||||
var localFilePath = exportOpenFileDialog.FileName;//获得文件路径
|
||||
//var fileNameExt = localFilePath.Substring(localFilePath.LastIndexOf("\\") + 1); //获取文件名,不带路径
|
||||
//var fileExtension = localFilePath.Substring(localFilePath.LastIndexOf(".") + 1); //获取文件扩展名
|
||||
|
||||
//获取文件路径,不带文件名
|
||||
//FilePath = localFilePath.Substring(0, localFilePath.LastIndexOf("\\"));
|
||||
|
||||
//给文件名前加上时间
|
||||
//newFileName = DateTime.Now.ToString("yyyyMMdd") + fileNameExt;
|
||||
|
||||
//在文件名里加字符
|
||||
//saveFileDialog1.FileName.Insert(1,"dameng");
|
||||
|
||||
//System.IO.FileStream fs = (System.IO.FileStream)sfd.OpenFile();//输出文件
|
||||
//var fileExtensionToLower = fileExtension.ToLower();
|
||||
System.Threading.ThreadPool.QueueUserWorkItem((object obj) => {
|
||||
ExportProjectData(localFilePath, projectName);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show("您已取消了导出数据操作!");
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
public void ExportProjectData(string localFilePath,string projectName)
|
||||
{
|
||||
string projectDbDir = PP.currExecPath + "\\models\\GLTFmodel\\" + projectName;
|
||||
string projectDbPath = projectDbDir + "\\db.json";
|
||||
//1导出项目数据
|
||||
ExportProjectData_FixedTable(projectDbPath, "json", false);
|
||||
|
||||
// Zip.ZipFile(projectDbDir, localFilePath, out string err);
|
||||
|
||||
}
|
||||
|
||||
public void ImportProjectData(string localFilePath, string projectName)
|
||||
{
|
||||
|
||||
string projectDbDir = PP.currExecPath + "\\models\\GLTFmodel\\" + projectName;
|
||||
string projectDbPath = projectDbDir + "\\db.json";
|
||||
// Zip.UnZipFile(localFilePath, projectDbDir, out string err);
|
||||
ImportProjectData_FixedTable(projectDbPath, projectName);
|
||||
//1导出项目数据
|
||||
//ExportProjectData_FixedTable(projectDbPath, "json", false);
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 导出项目数据
|
||||
/// 2020.10.29
|
||||
/// 2021.3.12
|
||||
/// </summary>
|
||||
public void ExportProjectData_FixedTable(string localFilePath, string fileExtensionToLower, bool isLightweight)
|
||||
{
|
||||
var outDataSet = new DataSet();
|
||||
var tableDataList = new List<String>();
|
||||
|
||||
var dt_TableList = SqlOperation.TransferProject.Select_DB_Tables();
|
||||
|
||||
// PP.iGlobalVar2.ShowMainProgressSet("导出项目数据进度", dt_TableList.Rows.Count - 1);
|
||||
|
||||
for (int i = 0; i < dt_TableList.Rows.Count; i++)
|
||||
{
|
||||
var tableName = dt_TableList.Rows[i]["name"].ToString();
|
||||
DataTable dt = null;
|
||||
try
|
||||
{
|
||||
dt = SqlOperation.TransferProject.Select_Table(tableName);
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ModelManagement), err);
|
||||
if(ModelBasic.ErrDef.iErrHandler!=null)
|
||||
// ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("导出项目数据查询表【错误】在表名【" + tableName + "】:\n" + err.ToString());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dt.Columns.Contains("ID"))
|
||||
{
|
||||
dt.Columns.Remove("ID");
|
||||
}
|
||||
if (dt.Columns.Contains("OperationTime"))
|
||||
{
|
||||
dt.Columns.Remove("OperationTime");
|
||||
}
|
||||
if (dt.Columns.Contains("ProjectCode"))
|
||||
{
|
||||
dt.Columns.Remove("ProjectCode");
|
||||
}
|
||||
if (dt.Columns.Contains("ActData"))
|
||||
{
|
||||
dt.Columns.Remove("ActData");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (isLightweight)//轻量级选项
|
||||
{
|
||||
if (dt.Columns.Contains("CraftPlayData"))
|
||||
{
|
||||
dt.Columns.Remove("CraftPlayData");
|
||||
}
|
||||
}
|
||||
|
||||
//if (dt.Columns.Contains("CraftPlayData_Joint"))
|
||||
//{
|
||||
// dt.Columns.Remove("CraftPlayData_Joint");
|
||||
//}
|
||||
//if (dt.Columns.Contains("CraftPlayData_Raw"))
|
||||
//{
|
||||
// dt.Columns.Remove("CraftPlayData_Raw");
|
||||
//}
|
||||
|
||||
outDataSet.Tables.Add(dt.Copy());
|
||||
if (dt.Rows.Count > 0)
|
||||
tableDataList.Add("{\"" + dt.TableName + "\":" + JsonConvert.SerializeObject(dt) + "}");
|
||||
// PP.iGlobalVar2.ShowMainProgress(i);
|
||||
}
|
||||
|
||||
if (fileExtensionToLower == "json" | fileExtensionToLower == "dat")
|
||||
{
|
||||
var db_Project_Json = "[" + string.Join(",", tableDataList.ToArray()) + "]";
|
||||
File.WriteAllText(localFilePath, db_Project_Json);
|
||||
|
||||
//string strobj = db_Project_Json;
|
||||
//FileStream stream = new FileStream(localFilePath, FileMode.Create, FileAccess.Write, FileShare.None);
|
||||
//BinaryFormatter formatter = new BinaryFormatter();
|
||||
//formatter.Serialize(stream, strobj);
|
||||
//stream.Close();
|
||||
|
||||
}
|
||||
if (fileExtensionToLower == "xls" | fileExtensionToLower == "xlsx")
|
||||
{
|
||||
var success = OExcel.ExeclHelper_Model.DataSetToExcel(outDataSet, localFilePath);
|
||||
if (success == false)
|
||||
{
|
||||
// ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("项目数据导出Excel【错误】,原因是数据中存在大字段!请导出.json或.dat文件");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// if(ModelBasic.ErrDef.iErrHandler!=null)
|
||||
// ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("导出项目数据完成!输出路径:" + localFilePath);
|
||||
}
|
||||
|
||||
public void ImportProjectData(string projectName)
|
||||
{
|
||||
//1:判断项目名称是否存在?
|
||||
|
||||
|
||||
//2:项目名称如果存在,如果导入,删除原来项目
|
||||
|
||||
if (MessageBox.Show("确认导入项目?【" + projectName + "】", "导入确认", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
var importOpenFileDialog = new OpenFileDialog();
|
||||
var importDialogResult = importOpenFileDialog.ShowDialog();
|
||||
if (importDialogResult == DialogResult.OK)
|
||||
{
|
||||
var localFilePath = importOpenFileDialog.FileName;
|
||||
ImportProjectData( localFilePath, projectName);
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show("您已取消了导入项目操作!");
|
||||
//}
|
||||
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show("您已取消了导入项目操作!");
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导入项目数据
|
||||
/// </summary>
|
||||
public void ImportProjectData()
|
||||
{
|
||||
//1:判断项目名称是否存在?
|
||||
|
||||
|
||||
//2:项目名称如果存在,如果导入,删除原来项目
|
||||
|
||||
if (MessageBox.Show("确认导入项目?【" + "projectName" + "】", "导入确认", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
var importOpenFileDialog = new OpenFileDialog();
|
||||
var importDialogResult = importOpenFileDialog.ShowDialog();
|
||||
if (importDialogResult == DialogResult.OK)
|
||||
{
|
||||
var localFilePath = importOpenFileDialog.FileName;
|
||||
ImportProjectData_FixedTable(localFilePath);
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show("您已取消了导入项目操作!");
|
||||
//}
|
||||
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show("您已取消了导入项目操作!");
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
public void ImportProjectData_FixedTable(string localFilePath, string restoredProjectName)
|
||||
{
|
||||
string PP_ProjectCode = Guid.NewGuid().ToString("D").ToUpper();
|
||||
var t1 = DateTime.Now.ToFileTimeUtc();
|
||||
var projectDataFile = File.ReadAllText(localFilePath);
|
||||
|
||||
var t2 = DateTime.Now.ToFileTimeUtc();
|
||||
var D1 = ((t2 - t1) / 10000).ToString();
|
||||
|
||||
var jProjectData = (JArray)JsonConvert.DeserializeObject(projectDataFile);
|
||||
|
||||
var curr_Index_All = 1;
|
||||
var t_ProgressBar_2 = new T_ProgressBar_2("导入项目数据进度", jProjectData.Count);
|
||||
//t_ProgressBar_2.Show();
|
||||
|
||||
foreach (JToken jProjectData_P in jProjectData)
|
||||
{
|
||||
var jObj = JObject.Parse(jProjectData_P.ToString());
|
||||
var tableName = jObj.First.Path;
|
||||
var j_TableData = jObj[tableName].ToString();
|
||||
|
||||
var dt_TableData = JsonConvert.DeserializeObject<DataTable>(j_TableData);
|
||||
|
||||
var columnName = GetColumnsByDataTable(dt_TableData);
|
||||
var columnNameRows = string.Join(",", columnName.ToList<String>().ToArray());
|
||||
|
||||
t_ProgressBar_2.ShowProgressSet(dt_TableData.Rows.Count);
|
||||
|
||||
//foreach(DataRow dr in dt_TableData.Rows)
|
||||
for (int k = 0; k < dt_TableData.Rows.Count; k++)
|
||||
{
|
||||
var rowDataList = new List<string>();
|
||||
for (int i = 0; i < columnName.Length; i++)
|
||||
{
|
||||
var currValue = dt_TableData.Rows[k][(columnName[i])].ToString();
|
||||
if (!ModelBasic.Judge.IsIntOrDouble(currValue))
|
||||
currValue = "'" + currValue + "'";
|
||||
|
||||
rowDataList.Add(currValue);
|
||||
|
||||
}
|
||||
|
||||
var rowData = string.Join(",", rowDataList.ToArray());
|
||||
SqlOperation.TransferProject.Insert_Table(tableName, columnNameRows, rowData, PP_ProjectCode, restoredProjectName);
|
||||
|
||||
//t_ProgressBar_2.ShowProgress(k);
|
||||
}
|
||||
|
||||
//t_ProgressBar_2.ShowProgress_All(curr_Index_All);
|
||||
curr_Index_All = curr_Index_All + 1;
|
||||
}
|
||||
|
||||
var t3 = DateTime.Now.ToFileTimeUtc();
|
||||
var D2 = ((t3 - t2) / 10000).ToString();
|
||||
MessageBox.Show("项目文件导入成功!\n"
|
||||
+ "读取耗时:" + D1 + " ms\n"
|
||||
+ "转换存储耗时:" + D2 + " ms\n");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入项目数据
|
||||
/// 2020.10.30
|
||||
/// 固定格式文件方式
|
||||
/// </summary>
|
||||
public void ImportProjectData_FixedTable(string localFilePath)
|
||||
{
|
||||
var t1 = DateTime.Now.ToFileTimeUtc();
|
||||
var projectDataFile = File.ReadAllText(localFilePath);
|
||||
|
||||
var t2 = DateTime.Now.ToFileTimeUtc();
|
||||
var D1 = ((t2 - t1) / 10000).ToString();
|
||||
|
||||
var jProjectData = (JArray)JsonConvert.DeserializeObject(projectDataFile);
|
||||
|
||||
var curr_Index_All = 1;
|
||||
var t_ProgressBar_2 = new T_ProgressBar_2("导入项目数据进度", jProjectData.Count);
|
||||
t_ProgressBar_2.Show();
|
||||
|
||||
foreach (JToken jProjectData_P in jProjectData)
|
||||
{
|
||||
var jObj = JObject.Parse(jProjectData_P.ToString());
|
||||
var tableName = jObj.First.Path;
|
||||
var j_TableData = jObj[tableName].ToString();
|
||||
|
||||
var dt_TableData = JsonConvert.DeserializeObject<DataTable>(j_TableData);
|
||||
|
||||
var columnName = GetColumnsByDataTable(dt_TableData);
|
||||
var columnNameRows = string.Join(",", columnName.ToList<String>().ToArray());
|
||||
|
||||
t_ProgressBar_2.ShowProgressSet(dt_TableData.Rows.Count);
|
||||
|
||||
//foreach(DataRow dr in dt_TableData.Rows)
|
||||
for (int k = 0; k < dt_TableData.Rows.Count; k++)
|
||||
{
|
||||
var rowDataList = new List<string>();
|
||||
for (int i = 0; i < columnName.Length; i++)
|
||||
{
|
||||
var currValue = dt_TableData.Rows[k][(columnName[i])].ToString();
|
||||
if (!ModelBasic.Judge.IsIntOrDouble(currValue))
|
||||
currValue = "'" + currValue + "'";
|
||||
|
||||
rowDataList.Add(currValue);
|
||||
|
||||
}
|
||||
|
||||
var rowData = string.Join(",", rowDataList.ToArray());
|
||||
SqlOperation.TransferProject.Insert_Table(tableName, columnNameRows, rowData);
|
||||
|
||||
t_ProgressBar_2.ShowProgress(k);
|
||||
}
|
||||
|
||||
t_ProgressBar_2.ShowProgress_All(curr_Index_All);
|
||||
curr_Index_All = curr_Index_All + 1;
|
||||
}
|
||||
|
||||
var t3 = DateTime.Now.ToFileTimeUtc();
|
||||
var D2 = ((t3 - t2) / 10000).ToString();
|
||||
MessageBox.Show("项目文件导入成功!\n"
|
||||
+ "读取耗时:" + D1 + " ms\n"
|
||||
+ "转换存储耗时:" + D2 + " ms\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据datatable获得列名
|
||||
/// </summary>
|
||||
/// <param name="dt">表对象</param>
|
||||
/// <returns>返回结果的数据列数组</returns>
|
||||
public static string[] GetColumnsByDataTable(DataTable dt)
|
||||
{
|
||||
string[] strColumns = null;
|
||||
|
||||
if (dt.Columns.Count > 0)
|
||||
{
|
||||
var columnNum = 0;
|
||||
columnNum = dt.Columns.Count;
|
||||
strColumns = new string[columnNum];
|
||||
for (int i = 0; i < dt.Columns.Count; i++)
|
||||
{
|
||||
strColumns[i] = dt.Columns[i].ColumnName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return strColumns;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
161
DataMirrorTools_Simulator/ModelBasic/Base/MM.Virtual.cs
Normal file
161
DataMirrorTools_Simulator/ModelBasic/Base/MM.Virtual.cs
Normal file
@@ -0,0 +1,161 @@
|
||||
using Global;
|
||||
using ModelBasic;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial class ModelManagement
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="m"></param>
|
||||
public virtual void ModelMotionControl_CurrModelInfo(object sender, Data_ClickModel m)
|
||||
{
|
||||
if (GlobalEventInterface.E_ModelMotionControl_CurrClickModel != null)
|
||||
{
|
||||
GlobalEventInterface.E_ModelMotionControl_CurrClickModel.Invoke(sender, m);
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="threejsBaseQ"></param>
|
||||
/// <param name="threejsToolQ"></param>
|
||||
/// <param name="threejsTcpQ"></param>
|
||||
/// <param name="threejsBaseP"></param>
|
||||
/// <param name="threejsToolP"></param>
|
||||
/// <param name="threejsTcpP"></param>
|
||||
public virtual void RobotData(double[] threejsBaseQ, double[] threejsToolQ, double[] threejsTcpQ, double[] threejsBaseP, double[] threejsToolP, double[] threejsTcpP)
|
||||
{
|
||||
if (GlobalEventInterface.E_RobotData != null)
|
||||
{
|
||||
GlobalEventInterface.E_RobotData.Invoke(threejsBaseQ, threejsToolQ, threejsTcpQ, threejsBaseP, threejsToolP, threejsTcpP);
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="arg1"></param>
|
||||
/// <param name="arg2"></param>
|
||||
public virtual void ModelControl_CurrRunInfoEvent(int index, int indexAll, C_Frames arg2)
|
||||
{
|
||||
if (GlobalEventInterface.E_ShowIndex != null)
|
||||
{
|
||||
GlobalEventInterface.E_ShowIndex.Invoke(index, indexAll);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public virtual void ModelControl_PlayTaskEnd()
|
||||
{
|
||||
if (GlobalEventInterface.E_ModelControl_PlayTaskEnd != null)
|
||||
{
|
||||
GlobalEventInterface.E_ModelControl_PlayTaskEnd.Invoke();
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="currTime_Play"></param>
|
||||
public virtual void CurrTime_Play(long currTime_Play)
|
||||
{
|
||||
if (GlobalEventInterface.E_CurrTime_Play != null)
|
||||
{
|
||||
GlobalEventInterface.E_CurrTime_Play.Invoke(currTime_Play);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="craftCode"></param>
|
||||
public virtual void PlayCurrCraftTaskEnd(string craftCode)
|
||||
{
|
||||
if (GlobalEventInterface.E_PlayCurrCraftTaskEnd != null)
|
||||
{
|
||||
GlobalEventInterface.E_PlayCurrCraftTaskEnd.Invoke(craftCode);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="index_ActFindCraftPlay"></param>
|
||||
/// <param name="maxRunFrame"></param>
|
||||
public virtual void ShowIndex(int index_ActFindCraftPlay, int maxRunFrame)
|
||||
{
|
||||
if (GlobalEventInterface.E_ShowIndex != null)
|
||||
{
|
||||
GlobalEventInterface.E_ShowIndex.Invoke(index_ActFindCraftPlay, maxRunFrame);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="actCode"></param>
|
||||
public virtual void PlayCurrActTaskEnd(string actCode)
|
||||
{
|
||||
if (GlobalEventInterface.E_PlayCurrActTaskEnd != null)
|
||||
{
|
||||
GlobalEventInterface.E_PlayCurrActTaskEnd.Invoke(actCode);
|
||||
}
|
||||
}//~~~
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="index_ActFindCraftPlay"></param>
|
||||
public virtual void PlayCurrActCraftTaskEnd(int index_ActFindCraftPlay)
|
||||
{
|
||||
if (GlobalEventInterface.E_PlayCurrActCraftTaskEnd != null)
|
||||
{
|
||||
GlobalEventInterface.E_PlayCurrActCraftTaskEnd.Invoke(index_ActFindCraftPlay);
|
||||
}
|
||||
}//~~~
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
public virtual void ModelControl_CurrRunInfoEventPs(int index)
|
||||
{
|
||||
if (GlobalEventInterface.E_ModelControl_CurrRunInfoEventPs != null)
|
||||
{
|
||||
GlobalEventInterface.E_ModelControl_CurrRunInfoEventPs.Invoke(index);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="deviceSignalSimCode"></param>
|
||||
public virtual void PlayDeviceSignalSimTaskEnd(string deviceSignalSimCode)
|
||||
{
|
||||
if (GlobalEventInterface.E_PlayDeviceSignalSimTaskEnd != null)
|
||||
{
|
||||
GlobalEventInterface.E_PlayDeviceSignalSimTaskEnd.Invoke(deviceSignalSimCode);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public virtual void OpenFileModel()
|
||||
{
|
||||
if (GlobalEventInterface.E_OpenFileModel != null)
|
||||
{
|
||||
GlobalEventInterface.E_OpenFileModel.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
176
DataMirrorTools_Simulator/ModelBasic/Base/MM.cs
Normal file
176
DataMirrorTools_Simulator/ModelBasic/Base/MM.cs
Normal file
@@ -0,0 +1,176 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
//using static SqlManage.ExecSql;
|
||||
using System.IO;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
truncate table [DeviceSignalSimTree]
|
||||
truncate table [DeviceTree]
|
||||
truncate table [ModelProcess]
|
||||
truncate table [OperationTree]
|
||||
truncate table [ProcesslLabelList]
|
||||
truncate table [ProjectList]
|
||||
truncate table [SignalViewer]
|
||||
truncate table [TagTriggerHandler]
|
||||
truncate table [Z_Save_Position]
|
||||
truncate table [Z_Save_Tag]
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial class ModelManagement
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public ModelManagement()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用数据库链接创建项目
|
||||
/// 所有
|
||||
/// </summary>
|
||||
/// <param name="connectionString"></param>
|
||||
public ModelManagement(string connectionString,string projectCode)
|
||||
{
|
||||
LoadModel(connectionString);
|
||||
ReLoadPara(projectCode);
|
||||
while (!PP.ReLoadPara_IsCompleted)
|
||||
{
|
||||
System.Threading.Thread.Sleep(300);
|
||||
}
|
||||
}
|
||||
|
||||
#region 加载模型
|
||||
|
||||
/// <summary>
|
||||
/// 装载模型
|
||||
/// </summary>
|
||||
/// <param name="ipPortOpName_1"></param>
|
||||
/// <param name="prefix"></param>
|
||||
/// <param name="objectHeader"></param>
|
||||
/// <param name="sendInterval"></param>
|
||||
public void LoadModel(string connectionStringCurr)
|
||||
{
|
||||
//if (!DataLinkMesWork.KeyWordTest.KeyWordNew(out string sn1))
|
||||
//{
|
||||
// new DataLinkMesWork.Reg().ShowDialog();
|
||||
// if (!DataLinkMesWork.KeyWordTest.KeyWordNew(out string sn2))
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (connectionStringCurr.ToLower() == "file")
|
||||
connectionStringCurr = "Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=" + PP.currExecPath + "\\ModelData.mdf;Integrated Security=True;Connect Timeout=30";
|
||||
|
||||
PP.ConnectionStr = connectionStringCurr;
|
||||
|
||||
if (!SqlOperation.Project.SelectConnect(PP.ConnectionStr))
|
||||
{
|
||||
string[] txt = PP.ConnectionStr.Split(';');
|
||||
string server = txt[0].Split('=')[1];
|
||||
string database = txt[1].Split('=')[1];
|
||||
string uid = txt[2].Split('=')[1];
|
||||
string pwd = txt[3].Split('=')[1];
|
||||
|
||||
MessageBox.Show("【未找到数据源,请检查链接】\r\n\r\n" +"当前链接是:"+ server + "\\"+ database + "\r\n\r\n" +"用户名:" + uid + "\r\n\r\n" +"密码:" + pwd + "\r\n\r\n位置:DataMirrorTools.exe.config");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void ReLoadPara(string projectCode)
|
||||
{
|
||||
SqlOperation.SqlProject.Refresh_Project_Para(projectCode);
|
||||
|
||||
try
|
||||
{
|
||||
var tipsBuilder = new System.Text.StringBuilder();
|
||||
if (!PP.PCP.ConnMode)
|
||||
tipsBuilder.AppendLine("【提示】没有使用通讯服务!").AppendLine();
|
||||
if (PP.PCP.IsRecordData)
|
||||
tipsBuilder.AppendLine("【警告】程序将记录数据到数据库!").AppendLine();
|
||||
if (!PP.PCP.IsAllowVisible)
|
||||
tipsBuilder.AppendLine("【警告】发布后的程序将不会控制模型显示和隐藏!").AppendLine();
|
||||
if (!PP.PCP.IsStartChrome)
|
||||
tipsBuilder.AppendLine("【警告】程序启动将不启动浏览界面!").AppendLine();
|
||||
if (tipsBuilder.Length > 0)
|
||||
MessageBox.Show(tipsBuilder.ToString());
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ModelManagement), err);
|
||||
|
||||
Console.WriteLine(err);
|
||||
MessageBox.Show("程序启动配置判断有误!");
|
||||
}
|
||||
|
||||
// UsedCefOrSocket(PP.PCP.ConnMode);
|
||||
// SelectTagID_Handler();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检测行为是否存在
|
||||
/// </summary>
|
||||
/// <param name="actCode"></param>
|
||||
/// <returns></returns>
|
||||
public ActControl ActObjectExist(string actCode)
|
||||
{
|
||||
ActControl actControl = null;
|
||||
try
|
||||
{
|
||||
if (dc_ActCode_Object.ContainsKey(actCode))
|
||||
{
|
||||
actControl = dc_ActCode_Object[actCode];
|
||||
}
|
||||
else
|
||||
{
|
||||
actControl = new ActControl();
|
||||
actControl.CurrRunInfoEvent += new Action<int, int, C_Frames>(ModelControl_CurrRunInfoEvent);
|
||||
actControl.CurrRunInfoEvent += new Action<int, int, C_Frames>(CurrRunInfoSend);
|
||||
actControl.PlayTaskEnd += new Action(ModelControl_PlayTaskEnd);
|
||||
dc_ActCode_Object.Add(actCode, actControl);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ModelManagement), err);
|
||||
|
||||
Console.WriteLine(err);
|
||||
}
|
||||
|
||||
return actControl;
|
||||
}
|
||||
|
||||
|
||||
protected internal void CurrRunInfoSend(int arg1, int arg2, C_Frames arg3)
|
||||
{
|
||||
// SendPlayFrameData(arg3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public partial class SS
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public partial class SS
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public partial class SS
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
17
DataMirrorTools_Simulator/ModelBasic/BasicClass/A_BAK_1.cs
Normal file
17
DataMirrorTools_Simulator/ModelBasic/BasicClass/A_BAK_1.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public partial class SS
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public class AutoClosingMessageBox
|
||||
{
|
||||
private System.Threading.Timer _timeoutTimer;
|
||||
private string _caption;
|
||||
private const int WM_CLOSE = 16;
|
||||
private AutoClosingMessageBox(string text, string caption, int timeout)
|
||||
{
|
||||
this._caption = caption;
|
||||
this._timeoutTimer = new System.Threading.Timer(new System.Threading.TimerCallback(this.OnTimerElapsed), null, timeout, -1);
|
||||
MessageBox.Show(text, caption);
|
||||
}
|
||||
public static void Show(string text, string caption, int timeout)
|
||||
{
|
||||
new AutoClosingMessageBox(text, caption, timeout);
|
||||
}
|
||||
private void OnTimerElapsed(object state)
|
||||
{
|
||||
IntPtr intPtr = AutoClosingMessageBox.FindWindow(null, this._caption);
|
||||
if (intPtr != IntPtr.Zero)
|
||||
{
|
||||
AutoClosingMessageBox.SendMessage(intPtr, 16u, IntPtr.Zero, IntPtr.Zero);
|
||||
}
|
||||
this._timeoutTimer.Dispose();
|
||||
}
|
||||
[System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)]
|
||||
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
|
||||
[System.Runtime.InteropServices.DllImport("user32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)]
|
||||
private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
||||
}
|
||||
391
DataMirrorTools_Simulator/ModelBasic/BasicClass/CONVERT.cs
Normal file
391
DataMirrorTools_Simulator/ModelBasic/BasicClass/CONVERT.cs
Normal file
@@ -0,0 +1,391 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CVT
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="M"></param>
|
||||
/// <returns></returns>
|
||||
public static double MToMM(object M)
|
||||
{
|
||||
return Math.Round(Convert.ToDouble(M.ToString()) * 1000, 2);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="MM"></param>
|
||||
/// <returns></returns>
|
||||
public static double MMToM(object MM)
|
||||
{
|
||||
return Math.Round(Convert.ToDouble(MM.ToString()) / 1000, 5);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="angle"></param>
|
||||
/// <returns></returns>
|
||||
public static double AngleToRad(object angle)
|
||||
{
|
||||
return Math.Round(Convert.ToDouble(angle.ToString()) * Math.PI / 180, 5);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="rad"></param>
|
||||
/// <returns></returns>
|
||||
public static double RadToAngle(object rad)
|
||||
{
|
||||
return Math.Round(Convert.ToDouble(rad.ToString()) * 180 / Math.PI, 5);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="M"></param>
|
||||
/// <returns></returns>
|
||||
public static double MToMM(string M)
|
||||
{
|
||||
return Math.Round(Convert.ToDouble(M) * 1000, 2);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="MM"></param>
|
||||
/// <returns></returns>
|
||||
public static double MMToM(string MM)
|
||||
{
|
||||
return Math.Round(Convert.ToDouble(MM) / 1000, 5);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="angle"></param>
|
||||
/// <returns></returns>
|
||||
public static double AngleToRad(string angle)
|
||||
{
|
||||
return Math.Round(Convert.ToDouble(angle) * Math.PI / 180, 5);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="rad"></param>
|
||||
/// <returns></returns>
|
||||
public static double RadToAngle(string rad)
|
||||
{
|
||||
return Math.Round(Convert.ToDouble(rad) * 180 / Math.PI, 5);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="M"></param>
|
||||
/// <returns></returns>
|
||||
public static double MToMM(double M)
|
||||
{
|
||||
return Math.Round(M * 1000, 2);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="MM"></param>
|
||||
/// <returns></returns>
|
||||
public static double MMToM(double MM)
|
||||
{
|
||||
return Math.Round(MM / 1000, 5);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="angle"></param>
|
||||
/// <returns></returns>
|
||||
public static double AngleToRad(double angle)
|
||||
{
|
||||
return Math.Round(angle * Math.PI / 180, 5);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="rad"></param>
|
||||
/// <returns></returns>
|
||||
public static double RadToAngle(double rad)
|
||||
{
|
||||
return Math.Round(rad * 180 / Math.PI, 5);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 坐标系的转换
|
||||
/// ThreeJsToMatlab
|
||||
/// 原则:Y、Z互换,且Y取负方向
|
||||
/// 2020.10.19
|
||||
/// </summary>
|
||||
/// <param name="threePosition"></param>
|
||||
/// <returns></returns>
|
||||
public static double[] ThreeJsToMatlab__Y_Z(double[] threePosition)
|
||||
{
|
||||
double[] matlabPosition = new double[6];
|
||||
matlabPosition[0] = threePosition[0];
|
||||
matlabPosition[1] = threePosition[2] * (-1);
|
||||
matlabPosition[2] = threePosition[1];
|
||||
matlabPosition[3] = threePosition[3];
|
||||
matlabPosition[4] = threePosition[4];
|
||||
matlabPosition[5] = threePosition[5];
|
||||
return matlabPosition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 坐标系的转换
|
||||
/// ThreeJsToMatlab
|
||||
/// </summary>
|
||||
/// <param name="threePosition"></param>
|
||||
/// <returns></returns>
|
||||
public static double[] ThreeJsToKdl(double[] threePosition)
|
||||
{
|
||||
double[] matlabPosition = new double[6];
|
||||
|
||||
//// 2020.10.19 原则:当时好用的变换
|
||||
//matlabPosition[0] = threePosition[2] * (-1);
|
||||
//matlabPosition[1] = threePosition[0] * (-1);
|
||||
//matlabPosition[2] = threePosition[1];
|
||||
//matlabPosition[3] = threePosition[5] * (-1);
|
||||
//matlabPosition[4] = threePosition[3] * (-1);
|
||||
//matlabPosition[5] = threePosition[4];
|
||||
|
||||
//// 2020.11.24 原则:不做变换
|
||||
//matlabPosition[0] = threePosition[0];
|
||||
//matlabPosition[1] = threePosition[1];
|
||||
//matlabPosition[2] = threePosition[2];
|
||||
//matlabPosition[3] = threePosition[3];
|
||||
//matlabPosition[4] = threePosition[4];
|
||||
//matlabPosition[5] = threePosition[5];
|
||||
|
||||
//// 2020.11.25 原则:
|
||||
//matlabPosition[0] = threePosition[2] ;
|
||||
//matlabPosition[1] = threePosition[0] * (-1);
|
||||
//matlabPosition[2] = threePosition[1];
|
||||
//matlabPosition[3] = threePosition[5] ;
|
||||
//matlabPosition[4] = threePosition[3] * (-1);
|
||||
//matlabPosition[5] = threePosition[4];
|
||||
|
||||
// 2020.11.25 原则:现在好用的
|
||||
matlabPosition[0] = threePosition[2];
|
||||
matlabPosition[1] = threePosition[0];
|
||||
matlabPosition[2] = threePosition[1];
|
||||
matlabPosition[3] = threePosition[5];
|
||||
matlabPosition[4] = threePosition[3];
|
||||
matlabPosition[5] = threePosition[4];
|
||||
|
||||
return matlabPosition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 字符串 转换 双浮点
|
||||
/// </summary>
|
||||
/// <param name="arrayStr"></param>
|
||||
/// <returns></returns>
|
||||
public static double[] StringArrayToDoubleArray(string[] arrayStr)
|
||||
{
|
||||
double[] arrayDouble = new double[arrayStr.Length];
|
||||
for (int i = 0; i < arrayStr.Length; i++)
|
||||
arrayDouble[i] = Convert.ToDouble(arrayStr[i]);
|
||||
return arrayDouble;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// obj 转换 双浮点
|
||||
/// </summary>
|
||||
/// <param name="arrayStr"></param>
|
||||
/// <returns></returns>
|
||||
public static double[] ObjectArrayToDoubleArray(object[] arrayObj)
|
||||
{
|
||||
double[] arrayDouble = new double[arrayObj.Length];
|
||||
for (int i = 0; i < arrayObj.Length; i++)
|
||||
arrayDouble[i] = Convert.ToDouble(arrayObj[i].ToString());
|
||||
return arrayDouble;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 毫米转米
|
||||
/// 角度转弧度
|
||||
/// 10个值
|
||||
/// 2021.2.26
|
||||
/// </summary>
|
||||
/// <param name="p_Ten"></param>
|
||||
public static double[] MMToM_AngleToRad_Ten(double[] p_Ten)
|
||||
{
|
||||
return new double[] {
|
||||
CVT.MMToM(p_Ten[0]),
|
||||
CVT.MMToM(p_Ten[1]),
|
||||
CVT.MMToM(p_Ten[2]),
|
||||
p_Ten[3],
|
||||
p_Ten[4],
|
||||
p_Ten[5],
|
||||
p_Ten[6],
|
||||
CVT.AngleToRad(p_Ten[7]),
|
||||
CVT.AngleToRad(p_Ten[8]),
|
||||
CVT.AngleToRad(p_Ten[9]) };
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 毫米转米
|
||||
/// 角度转弧度
|
||||
/// 7个值
|
||||
/// 2021.2.26
|
||||
/// </summary>
|
||||
/// <param name="p_Seven"></param>
|
||||
public static double[] MMToM_AngleToRad_Seven(double[] p_Seven)
|
||||
{
|
||||
return new double[] {
|
||||
CVT.MMToM(p_Seven[0]),
|
||||
CVT.MMToM(p_Seven[1]),
|
||||
CVT.MMToM(p_Seven[2]),
|
||||
p_Seven[3],
|
||||
p_Seven[4],
|
||||
p_Seven[5],
|
||||
p_Seven[6] };
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 毫米转米
|
||||
/// 角度转弧度
|
||||
/// 6个值
|
||||
/// 2021.2.26
|
||||
/// </summary>
|
||||
/// <param name="p_Six"></param>
|
||||
public static double[] MMToM_AngleToRad_Six(double[] p_Six)
|
||||
{
|
||||
return new double[]{
|
||||
CVT.MMToM(p_Six[0]),
|
||||
CVT.MMToM(p_Six[1]),
|
||||
CVT.MMToM(p_Six[2]),
|
||||
CVT.AngleToRad(p_Six[3]),
|
||||
CVT.AngleToRad(p_Six[4]),
|
||||
CVT.AngleToRad(p_Six[5])};
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 米转毫米
|
||||
/// 弧度转角度
|
||||
/// 10个值
|
||||
/// 2021.2.26
|
||||
/// </summary>
|
||||
/// <param name="p_Ten"></param>
|
||||
public static double[] MToMM_RadToAngle_Ten(double[] p_Ten)
|
||||
{
|
||||
return new double[] {
|
||||
CVT.MToMM(p_Ten[0]),
|
||||
CVT.MToMM(p_Ten[1]),
|
||||
CVT.MToMM(p_Ten[2]),
|
||||
p_Ten[3],
|
||||
p_Ten[4],
|
||||
p_Ten[5],
|
||||
p_Ten[6],
|
||||
CVT.RadToAngle(p_Ten[7]),
|
||||
CVT.RadToAngle(p_Ten[8]),
|
||||
CVT.RadToAngle(p_Ten[9])
|
||||
};
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 米转毫米
|
||||
/// 弧度转角度
|
||||
/// 7个值
|
||||
/// 2021.2.26
|
||||
/// </summary>
|
||||
/// <param name="p_Seven"></param>
|
||||
public static double[] MToMM_RadToAngle_Seven(double[] p_Seven)
|
||||
{
|
||||
return new double[] {
|
||||
CVT.MToMM(p_Seven[0]),
|
||||
CVT.MToMM(p_Seven[1]),
|
||||
CVT.MToMM(p_Seven[2]),
|
||||
p_Seven[3],
|
||||
p_Seven[4],
|
||||
p_Seven[5],
|
||||
p_Seven[6] };
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 米转毫米
|
||||
/// 弧度转角度
|
||||
/// 6个值
|
||||
/// 2021.2.26
|
||||
/// </summary>
|
||||
/// <param name="p_Six"></param>
|
||||
public static double[] MToMM_RadToAngle_Six(double[] p_Six)
|
||||
{
|
||||
return new double[]{
|
||||
CVT.MToMM(p_Six[0]),
|
||||
CVT.MToMM(p_Six[1]),
|
||||
CVT.MToMM(p_Six[2]),
|
||||
CVT.RadToAngle(p_Six[3]),
|
||||
CVT.RadToAngle(p_Six[4]),
|
||||
CVT.RadToAngle(p_Six[5])
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="radList"></param>
|
||||
/// <returns></returns>
|
||||
public static List<double> RadToAngle(List<double> radList)
|
||||
{
|
||||
var angleList = new List<double>();
|
||||
|
||||
foreach (double rad in radList)
|
||||
{
|
||||
angleList.Add(Math.Round(rad * 180 / Math.PI, 5));
|
||||
}
|
||||
|
||||
return angleList;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="angleList"></param>
|
||||
/// <returns></returns>
|
||||
public static List<double> AngleToRad(List<double> angleList)
|
||||
{
|
||||
var radList = new List<double>();
|
||||
|
||||
foreach (double angle in angleList)
|
||||
{
|
||||
radList.Add(Math.Round(angle * Math.PI / 180, 5));
|
||||
}
|
||||
|
||||
return radList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CVT_Import
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="content"></param>
|
||||
/// <param name="extension"></param>
|
||||
/// <returns></returns>
|
||||
public static string ConvertingFileFormats(string localFilePath, string extension, out string sourceData_Raw)
|
||||
{
|
||||
var sourceData_Joint = "-1";
|
||||
sourceData_Raw = "-1";
|
||||
|
||||
var sourceData = File.ReadLines(localFilePath);
|
||||
sourceData_Raw = File.ReadAllText(localFilePath);
|
||||
List<String> playData_Group = null;
|
||||
|
||||
switch (extension.ToLower())
|
||||
{
|
||||
case "dat":
|
||||
playData_Group = GeneratePdpsPlayData_NoHead(sourceData);
|
||||
break;
|
||||
default:
|
||||
playData_Group = GenerateConnServerPlayData_NoHead(sourceData);
|
||||
break;
|
||||
}
|
||||
sourceData_Joint = string.Join("", playData_Group);
|
||||
sourceData_Joint = "[" + sourceData_Joint + "]";
|
||||
sourceData_Joint = sourceData_Joint.Replace(",]", "]");
|
||||
|
||||
return sourceData_Joint;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据Pdps文本文件,得到播放序列
|
||||
/// 生成的数据不包含头
|
||||
/// </summary>
|
||||
/// <param name="sourceData"></param>
|
||||
/// <returns></returns>
|
||||
private static List<String> GeneratePdpsPlayData_NoHead(IEnumerable<String> sourceData)
|
||||
{
|
||||
List<String> sendList = new List<String>();
|
||||
|
||||
List<List<double>> rowData = new List<List<double>>();
|
||||
foreach (string str in sourceData)
|
||||
{
|
||||
List<double> data = new List<double>();
|
||||
foreach (string str2 in str.Split('\t'))
|
||||
{
|
||||
data.Add(Convert.ToDouble(str2.Split(',')[1].Trim()));
|
||||
}
|
||||
rowData.Add(data);
|
||||
}
|
||||
|
||||
int count = rowData[0].Count;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
sendList.Add(GetRobotJoint(new double[] { rowData[0][i], rowData[1][i], rowData[2][i], rowData[3][i], rowData[4][i], rowData[5][i] }));
|
||||
|
||||
return sendList;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据通讯服务文本文件,得到播放序列
|
||||
/// 生成的数据不包含头
|
||||
/// 2020.12.12
|
||||
/// </summary>
|
||||
/// <param name="sourceData"></param>
|
||||
/// <returns></returns>
|
||||
private static List<String> GenerateConnServerPlayData_NoHead(IEnumerable<String> sourceData)
|
||||
{
|
||||
var sendList = new List<String>();
|
||||
foreach (string str in sourceData)
|
||||
{
|
||||
double[] j = new double[6];
|
||||
string j_ValueStr = str.Split('|')[3];
|
||||
int count = j_ValueStr.Count(i => "&".Contains(i));
|
||||
if (count == 5 | count == 6)
|
||||
{
|
||||
string[] j_Value = j_ValueStr.Split('&');
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
string value = j_Value[i].Trim();
|
||||
if (value.Length > 0)
|
||||
{
|
||||
j[i] = Convert.ToDouble(j_Value[i].Trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
sendList.Add(GetRobotJoint(j));
|
||||
}
|
||||
|
||||
return sendList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 合成机器人的 Joint 数据
|
||||
/// </summary>
|
||||
/// <param name="j"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetRobotJoint(double[] j)
|
||||
{
|
||||
return "{\"j1\":" + CVT.AngleToRad(j[0]) + ",\"j2\":" + CVT.AngleToRad(j[1]) + ",\"j3\":" + CVT.AngleToRad(j[2]) + ",\"j4\":" + CVT.AngleToRad(j[3]) + ",\"j5\":" + CVT.AngleToRad(j[4]) + ",\"j6\":" + CVT.AngleToRad(j[5]) + "},";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CVT_JSON
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 把JointData 转化成 JointList
|
||||
/// 2021.3.29
|
||||
/// </summary>
|
||||
/// <param name="craftPlayData_Joint"></param>
|
||||
/// <returns></returns>
|
||||
public static List<double[]> JointDataToJointList(string craftPlayData_Joint)
|
||||
{
|
||||
List<double[]> jSqlList = new List<double[]>();
|
||||
foreach (JToken jJointFramesRows in (JArray)JsonConvert.DeserializeObject(craftPlayData_Joint))
|
||||
jSqlList.Add(new double[] {
|
||||
Convert.ToDouble(jJointFramesRows["j1"]),
|
||||
Convert.ToDouble(jJointFramesRows["j2"]),
|
||||
Convert.ToDouble(jJointFramesRows["j3"]),
|
||||
Convert.ToDouble(jJointFramesRows["j4"]),
|
||||
Convert.ToDouble(jJointFramesRows["j5"]),
|
||||
Convert.ToDouble(jJointFramesRows["j6"])});
|
||||
return jSqlList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
110
DataMirrorTools_Simulator/ModelBasic/BasicClass/CONVERT_TABLE.cs
Normal file
110
DataMirrorTools_Simulator/ModelBasic/BasicClass/CONVERT_TABLE.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CVT_TABLE
|
||||
{
|
||||
/// <summary>
|
||||
/// 将Datatable数据转化需要的格式
|
||||
/// 2021.3.25
|
||||
/// </summary>
|
||||
/// <param name="dt"></param>
|
||||
/// <param name="baseQ_List"></param>
|
||||
/// <param name="toolQ_List"></param>
|
||||
/// <param name="ptQ_List"></param>
|
||||
/// <param name="useTime_List"></param>
|
||||
public static void DatatableTo_BaseToolTcp_List(DataTable dt,
|
||||
out List<String> processCode_List,
|
||||
out List<double[]> baseQ_List, out List<double[]> toolQ_List, out List<double[]> ptQ_List, out List<double[]> ptP_List,
|
||||
out List<Int32> useTime_List, out string modelCode_Base, out string modelName_Base, out int reverse)
|
||||
{
|
||||
processCode_List = new List<String>();
|
||||
baseQ_List = new List<double[]>();
|
||||
toolQ_List = new List<double[]>();
|
||||
ptQ_List = new List<double[]>();
|
||||
ptP_List = new List<double[]>();
|
||||
useTime_List = new List<Int32>();
|
||||
modelCode_Base = dt.Rows[0]["ModelCode"].ToString ();
|
||||
modelName_Base = dt.Rows[0]["ModelName"].ToString();
|
||||
reverse = Convert.ToInt32(dt.Rows[0]["Reverse"]);
|
||||
|
||||
for (int i = 0; i < dt.Rows.Count; i++)
|
||||
{
|
||||
var processCode = dt.Rows[i]["ProcessCode"].ToString();
|
||||
|
||||
var baseQ = new double[7];
|
||||
baseQ[0] = Convert.ToDouble(dt.Rows[i]["X_Base"]);
|
||||
baseQ[1] = Convert.ToDouble(dt.Rows[i]["Y_Base"]);
|
||||
baseQ[2] = Convert.ToDouble(dt.Rows[i]["Z_Base"]);
|
||||
baseQ[3] = Convert.ToDouble(dt.Rows[i]["QX_Base"]);
|
||||
baseQ[4] = Convert.ToDouble(dt.Rows[i]["QY_Base"]);
|
||||
baseQ[5] = Convert.ToDouble(dt.Rows[i]["QZ_Base"]);
|
||||
baseQ[6] = Convert.ToDouble(dt.Rows[i]["QW_Base"]);
|
||||
|
||||
var toolQ = new double[7];
|
||||
toolQ[0] = Convert.ToDouble(dt.Rows[i]["X_Tool"]);
|
||||
toolQ[1] = Convert.ToDouble(dt.Rows[i]["Y_Tool"]);
|
||||
toolQ[2] = Convert.ToDouble(dt.Rows[i]["Z_Tool"]);
|
||||
toolQ[3] = Convert.ToDouble(dt.Rows[i]["QX_Tool"]);
|
||||
toolQ[4] = Convert.ToDouble(dt.Rows[i]["QY_Tool"]);
|
||||
toolQ[5] = Convert.ToDouble(dt.Rows[i]["QZ_Tool"]);
|
||||
toolQ[6] = Convert.ToDouble(dt.Rows[i]["QW_Tool"]);
|
||||
|
||||
var ptQ = new double[7];
|
||||
ptQ[0] = Convert.ToDouble(dt.Rows[i]["X"]);
|
||||
ptQ[1] = Convert.ToDouble(dt.Rows[i]["Y"]);
|
||||
ptQ[2] = Convert.ToDouble(dt.Rows[i]["Z"]);
|
||||
ptQ[3] = Convert.ToDouble(dt.Rows[i]["QX"]);
|
||||
ptQ[4] = Convert.ToDouble(dt.Rows[i]["QY"]);
|
||||
ptQ[5] = Convert.ToDouble(dt.Rows[i]["QZ"]);
|
||||
ptQ[6] = Convert.ToDouble(dt.Rows[i]["QW"]);
|
||||
|
||||
var ptP = new double[6];
|
||||
ptP[0] = Convert.ToDouble(dt.Rows[i]["X"]);
|
||||
ptP[1] = Convert.ToDouble(dt.Rows[i]["Y"]);
|
||||
ptP[2] = Convert.ToDouble(dt.Rows[i]["Z"]);
|
||||
ptP[3] = Convert.ToDouble(dt.Rows[i]["RX"]);
|
||||
ptP[4] = Convert.ToDouble(dt.Rows[i]["RY"]);
|
||||
ptP[5] = Convert.ToDouble(dt.Rows[i]["RZ"]);
|
||||
|
||||
var useTime = Convert.ToInt32(dt.Rows[i]["UseTime"]);
|
||||
|
||||
processCode_List.Add(processCode);
|
||||
baseQ_List.Add(baseQ);
|
||||
toolQ_List.Add(toolQ);
|
||||
ptQ_List.Add(ptQ);
|
||||
ptP_List.Add(ptP);
|
||||
useTime_List.Add(useTime);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToDataTable
|
||||
/// </summary>
|
||||
/// <param name="rows"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable ToDataTable(DataRow[] rows)
|
||||
{
|
||||
if (rows == null || rows.Length == 0) return null;
|
||||
DataTable tmp = rows[0].Table.Clone(); // 复制DataRow的表结构
|
||||
foreach (DataRow row in rows)
|
||||
{
|
||||
tmp.ImportRow(row); // 将DataRow添加到DataTable中
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace ModelBasic
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CopyFilesHandler
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="strSouPath"></param>
|
||||
/// <param name="strDesPath"></param>
|
||||
public static void CopyFiles(string strSouPath, string strDesPath)
|
||||
{
|
||||
Directory.CreateDirectory(strDesPath);
|
||||
|
||||
if (!Directory.Exists(strSouPath)) return;
|
||||
|
||||
string[] directories = Directory.GetDirectories(strSouPath);
|
||||
|
||||
if (directories.Length > 0)
|
||||
{
|
||||
foreach (string d in directories)
|
||||
{
|
||||
CopyFiles(d, strDesPath + d.Substring(d.LastIndexOf("\\")));
|
||||
}
|
||||
}
|
||||
|
||||
string[] files = Directory.GetFiles(strSouPath);
|
||||
|
||||
if (files.Length > 0)
|
||||
{
|
||||
foreach (string s in files)
|
||||
{
|
||||
string targetPath = strDesPath + s.Substring(s.LastIndexOf("\\"));
|
||||
if (File.Exists(targetPath))
|
||||
{
|
||||
File.Delete(targetPath);
|
||||
}
|
||||
File.Copy(s, targetPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static List<String> fileNameLiat = new List<String>();
|
||||
|
||||
|
||||
public static int GetFileCount(string strSouPath)
|
||||
{
|
||||
|
||||
if (!Directory.Exists(strSouPath)) return 0;
|
||||
|
||||
string[] directories = Directory.GetDirectories(strSouPath);
|
||||
|
||||
if (directories.Length > 0)
|
||||
{
|
||||
foreach (string d in directories)
|
||||
{
|
||||
GetFileCount(d);
|
||||
}
|
||||
}
|
||||
|
||||
string[] files = Directory.GetFiles(strSouPath);
|
||||
|
||||
if (files.Length > 0)
|
||||
{
|
||||
foreach (string s in files)
|
||||
{
|
||||
fileNameLiat.Add(s);
|
||||
}
|
||||
}
|
||||
return fileNameLiat.Count();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public class CreateTable
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 创建 固定格式 数据表
|
||||
/// 显示机器人的数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DataTable CreateDataTableForShowDeviceImportData()
|
||||
{
|
||||
var dt = new DataTable();
|
||||
dt.Columns.Add("Index");
|
||||
dt.Columns.Add("模型名称");
|
||||
dt.Columns.Add("J1");
|
||||
dt.Columns.Add("J2");
|
||||
dt.Columns.Add("J3");
|
||||
dt.Columns.Add("J4");
|
||||
dt.Columns.Add("J5");
|
||||
dt.Columns.Add("J6");
|
||||
return dt;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
106
DataMirrorTools_Simulator/ModelBasic/BasicClass/DelayAction.cs
Normal file
106
DataMirrorTools_Simulator/ModelBasic/BasicClass/DelayAction.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Timers;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace HZ.Common
|
||||
{
|
||||
public class DelayAction
|
||||
{
|
||||
Timer _timerDbc;
|
||||
Timer _timerTrt;
|
||||
|
||||
/// <summary>
|
||||
/// 延迟timesMs后执行。 在此期间如果再次调用,则重新计时
|
||||
/// </summary>
|
||||
/// <param name="invoker">同步对象,一般为Control控件。 如不需同步可传null</param>
|
||||
public void Debounce(int timeMs, ISynchronizeInvoke invoker, Action action)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (_timerDbc == null)
|
||||
{
|
||||
_timerDbc = new Timer(timeMs);
|
||||
_timerDbc.AutoReset = false;
|
||||
_timerDbc.Elapsed += (o, e) =>
|
||||
{
|
||||
_timerDbc.Stop();
|
||||
_timerDbc.Close();
|
||||
_timerDbc = null;
|
||||
InvokeAction(action, invoker);
|
||||
};
|
||||
}
|
||||
_timerDbc.Stop();
|
||||
_timerDbc.Start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 即刻执行,执行之后,在timeMs内再次调用无效
|
||||
/// </summary>
|
||||
/// <param name="timeMs">不应期,这段时间内调用无效</param>
|
||||
/// <param name="invoker">同步对象,一般为控件。 如不需同步可传null</param>
|
||||
public void Throttle(int timeMs, ISynchronizeInvoke invoker, Action action)
|
||||
{
|
||||
System.Threading.Monitor.Enter(this);
|
||||
bool needExit = true;
|
||||
try
|
||||
{
|
||||
if (_timerTrt == null)
|
||||
{
|
||||
_timerTrt = new Timer(timeMs);
|
||||
_timerTrt.AutoReset = false;
|
||||
_timerTrt.Elapsed += (o, e) =>
|
||||
{
|
||||
_timerTrt.Stop();
|
||||
_timerTrt.Close();
|
||||
_timerTrt = null;
|
||||
};
|
||||
_timerTrt.Start();
|
||||
System.Threading.Monitor.Exit(this);
|
||||
needExit = false;
|
||||
InvokeAction(action, invoker);//这个过程不能锁
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (needExit)
|
||||
System.Threading.Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 延迟timesMs后执行。
|
||||
/// </summary>
|
||||
public void Delay(int timeMs, ISynchronizeInvoke invoker, Action action)
|
||||
{
|
||||
Debounce(timeMs, invoker, action);
|
||||
}
|
||||
|
||||
|
||||
private static void InvokeAction(Action action, ISynchronizeInvoke invoker)
|
||||
{
|
||||
if (invoker == null)
|
||||
{
|
||||
action();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (invoker.InvokeRequired)
|
||||
{
|
||||
invoker.Invoke(action, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
action();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
157
DataMirrorTools_Simulator/ModelBasic/BasicClass/ExtendMethod.cs
Normal file
157
DataMirrorTools_Simulator/ModelBasic/BasicClass/ExtendMethod.cs
Normal file
@@ -0,0 +1,157 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public static class ExtendMethod
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public static List<T> ToDataList<T>(this DataTable dt)
|
||||
{
|
||||
var list = new List<T>();
|
||||
var plist = new List<PropertyInfo>(typeof(T).GetProperties());
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
T s = Activator.CreateInstance<T>();
|
||||
for (int i = 0; i < dt.Columns.Count; i++)
|
||||
{
|
||||
PropertyInfo info = plist.Find(p => p.Name == dt.Columns[i].ColumnName);
|
||||
if (info != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Convert.IsDBNull(item[i]))
|
||||
{
|
||||
object v = null;
|
||||
if (info.PropertyType.ToString().Contains("System.Nullable"))
|
||||
{
|
||||
v = Convert.ChangeType(item[i], Nullable.GetUnderlyingType(info.PropertyType));
|
||||
}
|
||||
else
|
||||
{
|
||||
v = Convert.ChangeType(item[i], info.PropertyType);
|
||||
}
|
||||
info.SetValue(s, v, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ExtendMethod), ex);
|
||||
|
||||
throw new Exception("字段[" + info.Name + "]转换出错," + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
list.Add(s);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DataTable转成Dto
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public static T ToDataDto<T>(this DataTable dt)
|
||||
{
|
||||
T s = Activator.CreateInstance<T>();
|
||||
if (dt == null || dt.Rows.Count == 0)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
var plist = new List<PropertyInfo>(typeof(T).GetProperties());
|
||||
for (int i = 0; i < dt.Columns.Count; i++)
|
||||
{
|
||||
PropertyInfo info = plist.Find(p => p.Name == dt.Columns[i].ColumnName);
|
||||
if (info != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Convert.IsDBNull(dt.Rows[0][i]))
|
||||
{
|
||||
object v = null;
|
||||
if (info.PropertyType.ToString().Contains("System.Nullable"))
|
||||
{
|
||||
v = Convert.ChangeType(dt.Rows[0][i], Nullable.GetUnderlyingType(info.PropertyType));
|
||||
}
|
||||
else
|
||||
{
|
||||
v = Convert.ChangeType(dt.Rows[0][i], info.PropertyType);
|
||||
}
|
||||
info.SetValue(s, v, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ExtendMethod), ex);
|
||||
|
||||
throw new Exception("字段[" + info.Name + "]转换出错," + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将实体集合转换为DataTable
|
||||
/// </summary>
|
||||
/// <typeparam name="T">实体类型</typeparam>
|
||||
/// <param name="entities">实体集合</param>
|
||||
public static DataTable ToDataTable<T>(List<T> entities)
|
||||
{
|
||||
var result = CreateTable<T>();
|
||||
FillData(result, entities);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建表
|
||||
/// </summary>
|
||||
private static DataTable CreateTable<T>()
|
||||
{
|
||||
var result = new DataTable();
|
||||
var type = typeof(T);
|
||||
foreach (var property in type.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance))
|
||||
{
|
||||
var propertyType = property.PropertyType;
|
||||
if ((propertyType.IsGenericType) && (propertyType.GetGenericTypeDefinition() == typeof(Nullable<>)))
|
||||
propertyType = propertyType.GetGenericArguments()[0];
|
||||
result.Columns.Add(property.Name, propertyType);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 填充数据
|
||||
/// </summary>
|
||||
private static void FillData<T>(DataTable dt, IEnumerable<T> entities)
|
||||
{
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
dt.Rows.Add(CreateRow(dt, entity));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建行
|
||||
/// </summary>
|
||||
private static DataRow CreateRow<T>(DataTable dt, T entity)
|
||||
{
|
||||
DataRow row = dt.NewRow();
|
||||
var type = typeof(T);
|
||||
foreach (var property in type.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance))
|
||||
{
|
||||
row[property.Name] = property.GetValue(entity) ?? DBNull.Value;
|
||||
}
|
||||
return row;
|
||||
}
|
||||
}
|
||||
}
|
||||
32
DataMirrorTools_Simulator/ModelBasic/BasicClass/Judge.cs
Normal file
32
DataMirrorTools_Simulator/ModelBasic/BasicClass/Judge.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public class Judge
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 判断字符串是否是int/double
|
||||
/// </summary>
|
||||
public static bool IsIntOrDouble(string strNumber)
|
||||
{
|
||||
var objNotNumberPattern = new Regex("[^0-9.-]");
|
||||
var objTwoDotPattern = new Regex("[0-9]*[.][0-9]*[.][0-9]*");
|
||||
var objTwoMinusPattern = new Regex("[0-9]*[-][0-9]*[-][0-9]*");
|
||||
const string strValidRealPattern = "^([-]|[.]|[-.]|[0-9])[0-9]*[.]*[0-9]+$";
|
||||
const string strValidIntegerPattern = "^([-]|[0-9])[0-9]*$";
|
||||
var objNumberPattern = new Regex("(" + strValidRealPattern + ")|(" + strValidIntegerPattern + ")");
|
||||
return !objNotNumberPattern.IsMatch(strNumber) &&
|
||||
!objTwoDotPattern.IsMatch(strNumber) &&
|
||||
!objTwoMinusPattern.IsMatch(strNumber) &&
|
||||
objNumberPattern.IsMatch(strNumber);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
104
DataMirrorTools_Simulator/ModelBasic/BasicClass/ParsingData.cs
Normal file
104
DataMirrorTools_Simulator/ModelBasic/BasicClass/ParsingData.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using DTTest;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace ModelBasic
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ParsingData
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 在Json中得到Base、Tool、Tcp位置
|
||||
/// 2021.1.15
|
||||
/// </summary>
|
||||
/// <param name="jsonStr">Json</param>
|
||||
/// <param name="threejsBase">xyz rpy</param>
|
||||
/// <param name="threejsTool">xyz qxqyqzqw</param>
|
||||
/// <param name="threejsTcp">xyz qxqyqzqw</param>
|
||||
/// <param name="threejsInitJoint">返回初始机器人姿态坐标值,传出的threejsInitJoint 是rad 和m</param>
|
||||
public static void GetRobotParameter_MM(Data_RobotCurr robotCurr, out double[] threejsBaseQ, out double[] threejsToolQ, out double[] threejsTcpQ,out double[] threejsInitJoint)
|
||||
{
|
||||
threejsBaseQ = new double[] {
|
||||
CVT.MToMM(robotCurr.Base.tx),
|
||||
CVT.MToMM(robotCurr.Base.ty),
|
||||
CVT.MToMM(robotCurr.Base.tz),
|
||||
robotCurr.Base.qx,
|
||||
robotCurr.Base.qy,
|
||||
robotCurr.Base.qz,
|
||||
robotCurr.Base.qw};
|
||||
threejsToolQ = new double[] {
|
||||
CVT.MToMM(robotCurr.Tool.tx),
|
||||
CVT.MToMM(robotCurr.Tool.ty),
|
||||
CVT.MToMM(robotCurr.Tool.tz),
|
||||
robotCurr.Tool.qx,
|
||||
robotCurr.Tool.qy,
|
||||
robotCurr.Tool.qz,
|
||||
robotCurr.Tool.qw};
|
||||
threejsTcpQ = new double[] {
|
||||
CVT.MToMM(robotCurr.Tcp.tx),
|
||||
CVT.MToMM(robotCurr.Tcp.ty),
|
||||
CVT.MToMM(robotCurr.Tcp.tz),
|
||||
robotCurr.Tcp.qx,
|
||||
robotCurr.Tcp.qy,
|
||||
robotCurr.Tcp.qz,
|
||||
robotCurr.Tcp.qw};
|
||||
|
||||
#region 处理初始joint
|
||||
|
||||
var currentJoint = robotCurr.CurrentJoint;
|
||||
var jointNum = currentJoint.Count;
|
||||
|
||||
threejsInitJoint = new double[jointNum];
|
||||
|
||||
for (int i = 0; i < jointNum; i++)
|
||||
{
|
||||
var item = currentJoint[i];
|
||||
double value = Convert.ToDouble(item.JValue);
|
||||
// 转动副 从弧度转换为角度
|
||||
if (item.JType == "0")
|
||||
{
|
||||
value = value * 180 / Math.PI;
|
||||
}
|
||||
else // 滑动副 从m转换为mm
|
||||
{
|
||||
//value = value * 1000;
|
||||
}
|
||||
threejsInitJoint[i] = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="dataSplit"></param>
|
||||
/// <param name="items"></param>
|
||||
/// <returns></returns>
|
||||
public static JObject GetPositionDataInfo(string jStr)
|
||||
{
|
||||
var itemsArray = (JArray)JsonConvert.DeserializeObject(jStr);
|
||||
var jObjectParam = itemsArray[0].ToString();
|
||||
return (JObject)JsonConvert.DeserializeObject(jObjectParam);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace ModelBasic
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class SortBindingHelper<T> : BindingList<T>
|
||||
{
|
||||
private bool isSortedCore = true;
|
||||
private ListSortDirection sortDirectionCore = ListSortDirection.Ascending;
|
||||
private PropertyDescriptor sortPropertyCore = null;
|
||||
private string defaultSortItem;
|
||||
|
||||
public SortBindingHelper() : base() { }
|
||||
|
||||
public SortBindingHelper(IList<T> list) : base(list) { }
|
||||
|
||||
protected override bool SupportsSortingCore
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
protected override bool SupportsSearchingCore
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
protected override bool IsSortedCore
|
||||
{
|
||||
get { return isSortedCore; }
|
||||
}
|
||||
|
||||
protected override ListSortDirection SortDirectionCore
|
||||
{
|
||||
get { return sortDirectionCore; }
|
||||
}
|
||||
|
||||
protected override PropertyDescriptor SortPropertyCore
|
||||
{
|
||||
get { return sortPropertyCore; }
|
||||
}
|
||||
|
||||
protected override int FindCore(PropertyDescriptor prop, object key)
|
||||
{
|
||||
for (int i = 0; i < this.Count; i++)
|
||||
{
|
||||
if (Equals(prop.GetValue(this[i]), key)) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected override void ApplySortCore(PropertyDescriptor prop, ListSortDirection direction)
|
||||
{
|
||||
isSortedCore = true;
|
||||
sortPropertyCore = prop;
|
||||
sortDirectionCore = direction;
|
||||
Sort();
|
||||
}
|
||||
|
||||
protected override void RemoveSortCore()
|
||||
{
|
||||
if (isSortedCore)
|
||||
{
|
||||
isSortedCore = false;
|
||||
sortPropertyCore = null;
|
||||
sortDirectionCore = ListSortDirection.Ascending;
|
||||
Sort();
|
||||
}
|
||||
}
|
||||
|
||||
public string DefaultSortItem
|
||||
{
|
||||
get { return defaultSortItem; }
|
||||
set
|
||||
{
|
||||
if (defaultSortItem != value)
|
||||
{
|
||||
defaultSortItem = value;
|
||||
Sort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Sort()
|
||||
{
|
||||
List<T> list = (this.Items as List<T>);
|
||||
list.Sort(CompareCore);
|
||||
ResetBindings();
|
||||
}
|
||||
|
||||
private int CompareCore(T o1, T o2)
|
||||
{
|
||||
int ret = 0;
|
||||
if (SortPropertyCore != null)
|
||||
{
|
||||
ret = CompareValue(SortPropertyCore.GetValue(o1), SortPropertyCore.GetValue(o2), SortPropertyCore.PropertyType);
|
||||
}
|
||||
if (ret == 0 && DefaultSortItem != null)
|
||||
{
|
||||
PropertyInfo property = typeof(T).GetProperty(DefaultSortItem, BindingFlags.Public | BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.IgnoreCase, null, null, new Type[0], null);
|
||||
if (property != null)
|
||||
{
|
||||
ret = CompareValue(property.GetValue(o1, null), property.GetValue(o2, null), property.PropertyType);
|
||||
}
|
||||
}
|
||||
if (SortDirectionCore == ListSortDirection.Descending) ret = -ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static int CompareValue(object o1, object o2, Type type)
|
||||
{
|
||||
if (o1 == null) return o2 == null ? 0 : -1;
|
||||
else if (o2 == null) return 1;
|
||||
else if (type.IsPrimitive || type.IsEnum) return Convert.ToDouble(o1).CompareTo(Convert.ToDouble(o2));
|
||||
else if (type == typeof(DateTime)) return Convert.ToDateTime(o1).CompareTo(o2);
|
||||
else return String.Compare(o1.ToString().Trim(), o2.ToString().Trim());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class SortableBindingList<T> : BindingList<T>
|
||||
{
|
||||
private System.Collections.ArrayList sortedList;
|
||||
private bool isSortedValue;
|
||||
|
||||
public SortableBindingList()
|
||||
{
|
||||
}
|
||||
|
||||
public SortableBindingList(IList<T> list)
|
||||
{
|
||||
foreach (object o in list)
|
||||
{
|
||||
this.Add((T)o);
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool SupportsSortingCore
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
|
||||
protected override bool IsSortedCore
|
||||
{
|
||||
get { return isSortedValue; }
|
||||
}
|
||||
|
||||
ListSortDirection sortDirectionValue;
|
||||
PropertyDescriptor sortPropertyValue;
|
||||
|
||||
protected override void ApplySortCore(PropertyDescriptor prop,
|
||||
ListSortDirection direction)
|
||||
{
|
||||
sortedList = new ArrayList();
|
||||
|
||||
Type interfaceType = prop.PropertyType.GetInterface("IComparable");
|
||||
|
||||
if (interfaceType == null && prop.PropertyType.IsValueType)
|
||||
{
|
||||
Type underlyingType = Nullable.GetUnderlyingType(prop.PropertyType);
|
||||
|
||||
if (underlyingType != null)
|
||||
{
|
||||
interfaceType = underlyingType.GetInterface("IComparable");
|
||||
}
|
||||
}
|
||||
|
||||
if (interfaceType != null)
|
||||
{
|
||||
sortPropertyValue = prop;
|
||||
sortDirectionValue = direction;
|
||||
|
||||
IEnumerable<T> query = base.Items;
|
||||
if (direction == ListSortDirection.Ascending)
|
||||
{
|
||||
query = query.OrderBy(i => prop.GetValue(i));
|
||||
}
|
||||
else
|
||||
{
|
||||
query = query.OrderByDescending(i => prop.GetValue(i));
|
||||
}
|
||||
int newIndex = 0;
|
||||
foreach (object item in query)
|
||||
{
|
||||
this.Items[newIndex] = (T)item;
|
||||
newIndex++;
|
||||
}
|
||||
isSortedValue = true;
|
||||
this.OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotSupportedException("Cannot sort by " + prop.Name +
|
||||
". This" + prop.PropertyType.ToString() +
|
||||
" does not implement IComparable");
|
||||
}
|
||||
}
|
||||
|
||||
protected override PropertyDescriptor SortPropertyCore
|
||||
{
|
||||
get { return sortPropertyValue; }
|
||||
}
|
||||
|
||||
protected override ListSortDirection SortDirectionCore
|
||||
{
|
||||
get { return sortDirectionValue; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public class TransitionalClass
|
||||
{
|
||||
|
||||
public TransitionalClass()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 为了数字孪生初始化加载数据(单个链接)
|
||||
/// </summary>
|
||||
/// <param name="ipPortOpName_1"></param>
|
||||
/// <param name="prefix0"></param>
|
||||
/// <param name="objectHeader0"></param>
|
||||
/// <param name="sendInterval0"></param>
|
||||
/// <param name="connectionString"></param>
|
||||
/// <param name="projectName"></param>
|
||||
public void Load_PlcVarName_Trig_3DModel_Movement_Interface(
|
||||
string ipPortOpName_1, string prefix0, string objectHeader0, int sendInterval0,
|
||||
string connectionString, string projectName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 为了数字孪生初始化加载数据(两个链接)
|
||||
/// </summary>
|
||||
/// <param name="ipPortOpName_1"></param>
|
||||
/// <param name="ipPortOpName_2"></param>
|
||||
/// <param name="prefix0"></param>
|
||||
/// <param name="objectHeader0"></param>
|
||||
/// <param name="sendInterval0"></param>
|
||||
/// <param name="connectionString"></param>
|
||||
/// <param name="projectName"></param>
|
||||
public void Load_PlcVarName_Trig_3DModel_Movement_Interface(
|
||||
string ipPortOpName_1, string ipPortOpName_2, string prefix0, string objectHeader0, int sendInterval0,
|
||||
string connectionString, string projectName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PLC 信号 触发3D模型运动
|
||||
/// </summary>
|
||||
/// <param name="tagNamePlc"></param>
|
||||
/// <param name="inputValue"></param>
|
||||
public void PlcVarName_Trig_3DModel_Movement(string tagNamePlc, bool inputValue)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 模型可见控制
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="visible"></param>
|
||||
public void ModelVisible(string modelName, bool visible)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.JScript;
|
||||
using Microsoft.JScript.Vsa;
|
||||
|
||||
|
||||
namespace ExecJavaScript
|
||||
{
|
||||
public class ExecScript
|
||||
{
|
||||
///// <summary>
|
||||
/////
|
||||
///// </summary>
|
||||
///// <param name="dc_TagID_PlcValue"></param>
|
||||
///// <param name="script"></param>
|
||||
///// <returns></returns>
|
||||
//public string RunScript(Dictionary<String, String> dc_TagID_PlcValue, string script)
|
||||
//{
|
||||
|
||||
// using (JavascriptContext context = new JavascriptContext())
|
||||
// {
|
||||
// foreach (KeyValuePair<String, String> item in dc_TagID_PlcValue)
|
||||
// {
|
||||
// var tagID = item.Key;
|
||||
// var tagValue = item.Value;
|
||||
// context.SetParameter("tag_" + tagID, tagValue);
|
||||
// //context.SetParameter("console", new SystemConsole());
|
||||
// }
|
||||
// context.Run("result = " + script);
|
||||
// return context.GetParameter("result").ToString();
|
||||
// }
|
||||
//}
|
||||
|
||||
private static VsaEngine vsaEngine = VsaEngine.CreateEngine();
|
||||
|
||||
//public string RunScript(Dictionary<String, String> dc_TagID_PlcValue, string script)
|
||||
//{
|
||||
// List<String> listVarDef = new List<String>();
|
||||
|
||||
// foreach (KeyValuePair<String, String> item in dc_TagID_PlcValue)
|
||||
// {
|
||||
// var tagID = item.Key;
|
||||
// var tagValue = item.Value;
|
||||
// listVarDef.Add($"var tag_{tagID} = {tagValue}; ");
|
||||
// }
|
||||
// listVarDef.Add(script);
|
||||
|
||||
// var execScriptStr = string.Join(" ", listVarDef.ToArray());
|
||||
|
||||
// return EvalJScript(execScriptStr).ToString();
|
||||
|
||||
//}
|
||||
|
||||
public string RunScript_SymbolTable(Dictionary<String, String> dc_SymbolName_SymbolValue, string script)
|
||||
{
|
||||
var listVarDef = new List<String>();
|
||||
foreach (KeyValuePair<String, String> item in dc_SymbolName_SymbolValue)
|
||||
listVarDef.Add($"var {item.Key} = {item.Value}; ");
|
||||
listVarDef.Add(script);
|
||||
|
||||
return EvalJScript(string.Join(" ", listVarDef.ToArray())).ToString();
|
||||
}
|
||||
|
||||
private object EvalJScript(string JScript)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
object Result = null;
|
||||
try
|
||||
{
|
||||
Result = Microsoft.JScript.Eval.JScriptEvaluate(JScript, vsaEngine);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ExecScript), ex);
|
||||
|
||||
return ex.Message;
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
185
DataMirrorTools_Simulator/ModelBasic/ExportModelHandler/Cmd.cs
Normal file
185
DataMirrorTools_Simulator/ModelBasic/ExportModelHandler/Cmd.cs
Normal file
@@ -0,0 +1,185 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Management;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FileExplorer
|
||||
{
|
||||
public class Cmd
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 是否终止调用CMD命令执行
|
||||
/// </summary>
|
||||
private static bool invokeCmdKilled = true;
|
||||
/// <summary>
|
||||
/// 获取或设置是否终止调用CMD命令执行
|
||||
/// </summary>
|
||||
public static bool InvokeCmdKilled
|
||||
{
|
||||
get { return invokeCmdKilled; }
|
||||
set
|
||||
{
|
||||
invokeCmdKilled = value;
|
||||
if (invokeCmdKilled)
|
||||
{
|
||||
if (p != null && !p.HasExited)
|
||||
{
|
||||
killProcess(p.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private static Process p;
|
||||
private static Action<string> RefreshResult;
|
||||
|
||||
/// <summary>
|
||||
/// 调用CMD命令,执行指定的命令,并返回命令执行返回结果字符串
|
||||
/// </summary>
|
||||
/// <param name="cmdArgs">命令行</param>
|
||||
/// <param name="RefreshResult">刷新返回结果字符串的事件</param>
|
||||
/// <returns></returns>
|
||||
public static void InvokeCmd(string cmdArgs, Action<string> pRefreshResult = null)
|
||||
{
|
||||
InvokeCmdKilled = false;
|
||||
RefreshResult = pRefreshResult;
|
||||
if (p != null)
|
||||
{
|
||||
p.Close();
|
||||
p = null;
|
||||
}
|
||||
p = new Process();
|
||||
p.StartInfo.FileName = "cmd.exe";
|
||||
p.ErrorDataReceived += new DataReceivedEventHandler(p_ErrorDataReceived);
|
||||
p.OutputDataReceived += new DataReceivedEventHandler(p_OutputDataReceived);
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.RedirectStandardInput = true;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.RedirectStandardError = true;
|
||||
p.StartInfo.CreateNoWindow = true;
|
||||
|
||||
p.Start();
|
||||
p.BeginErrorReadLine();
|
||||
p.BeginOutputReadLine();
|
||||
|
||||
p.StandardInput.WriteLine(cmdArgs);
|
||||
}
|
||||
/// <summary>
|
||||
/// 异步读取标准输出信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
static void p_OutputDataReceived(object sender, DataReceivedEventArgs e)
|
||||
{
|
||||
if (e.Data != null)
|
||||
{
|
||||
if (e.Data.Length > 5)
|
||||
{
|
||||
if (e.Data.LastIndexOf("Total") > -1)// .f.Substring(5)== "Total")
|
||||
{
|
||||
|
||||
// // ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("【导出完成】 " + e.Data);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步读取错误消息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
static void p_ErrorDataReceived(object sender, DataReceivedEventArgs e)
|
||||
{
|
||||
if ( e.Data != null)
|
||||
{
|
||||
// // ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("【导出错误】"+ e.Data);
|
||||
}
|
||||
else
|
||||
{
|
||||
// // ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit("【导出错误】但是错误原因是空值!");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭指定进程ID的进程以及子进程(关闭进程树)
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
public static void FindAndKillProcess(int id)
|
||||
{
|
||||
killProcess(id);
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭指定进程名称的进程以及子进程(关闭进程树)
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public static void FindAndKillProcess(string name)
|
||||
{
|
||||
foreach (Process clsProcess in Process.GetProcesses())
|
||||
{
|
||||
if ((clsProcess.ProcessName.StartsWith(name, StringComparison.CurrentCulture)) || (clsProcess.MainWindowTitle.StartsWith(name, StringComparison.CurrentCulture)))
|
||||
killProcess(clsProcess.Id);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭进程树
|
||||
/// </summary>
|
||||
/// <param name="pid"></param>
|
||||
/// <returns></returns>
|
||||
private static bool killProcess(int pid)
|
||||
{
|
||||
Process[] procs = Process.GetProcesses();
|
||||
for (int i = 0; i < procs.Length; i++)
|
||||
{
|
||||
if (getParentProcess(procs[i].Id) == pid)
|
||||
killProcess(procs[i].Id);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Process myProc = Process.GetProcessById(pid);
|
||||
myProc.Kill();
|
||||
}
|
||||
//进程已经退出
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(Cmd), err);
|
||||
|
||||
;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取父进程ID
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
private static int getParentProcess(int Id)
|
||||
{
|
||||
int parentPid = 0;
|
||||
using (ManagementObject mo = new ManagementObject("win32_process.handle='" + Id.ToString(CultureInfo.InvariantCulture) + "'"))
|
||||
{
|
||||
try
|
||||
{
|
||||
mo.Get();
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(Cmd), err);
|
||||
|
||||
return -1;
|
||||
}
|
||||
parentPid = Convert.ToInt32(mo["ParentProcessId"], CultureInfo.InvariantCulture);
|
||||
}
|
||||
return parentPid;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.Win32;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FileExplorer
|
||||
{
|
||||
public class GetSystemIcon
|
||||
{
|
||||
/// <summary>
|
||||
/// 依据文件名读取图标,若指定文件不存在,则返回空值。
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
public static Icon GetIconByFileName(string fileName)
|
||||
{
|
||||
if (fileName == null || fileName.Equals(string.Empty)) return null;
|
||||
if (!File.Exists(fileName)) return null;
|
||||
|
||||
SHFILEINFO shinfo = new SHFILEINFO();
|
||||
//Use this to get the small Icon
|
||||
Win32.SHGetFileInfo(fileName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), Win32.SHGFI_ICON | Win32.SHGFI_LARGEICON);
|
||||
//The icon is returned in the hIcon member of the shinfo struct
|
||||
System.Drawing.Icon myIcon = System.Drawing.Icon.FromHandle(shinfo.hIcon);
|
||||
return myIcon;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 给出文件扩展名(.*),返回相应图标
|
||||
/// 若不以"."开头则返回文件夹的图标。
|
||||
/// </summary>
|
||||
/// <param name="fileType"></param>
|
||||
/// <param name="isLarge"></param>
|
||||
/// <returns></returns>
|
||||
public static Icon GetIconByFileType(string fileType, bool isLarge)
|
||||
{
|
||||
if (fileType == null || fileType.Equals(string.Empty)) return null;
|
||||
|
||||
RegistryKey regVersion = null;
|
||||
string regFileType = null;
|
||||
string regIconString = null;
|
||||
string systemDirectory = Environment.SystemDirectory + "\\";
|
||||
|
||||
if (fileType[0] == '.')
|
||||
{
|
||||
//读系统注册表中文件类型信息
|
||||
regVersion = Registry.ClassesRoot.OpenSubKey(fileType, true);
|
||||
if (regVersion != null)
|
||||
{
|
||||
regFileType = regVersion.GetValue("") as string;
|
||||
regVersion.Close();
|
||||
regVersion = Registry.ClassesRoot.OpenSubKey(regFileType + @"\DefaultIcon", true);
|
||||
if (regVersion != null)
|
||||
{
|
||||
regIconString = regVersion.GetValue("") as string;
|
||||
regVersion.Close();
|
||||
}
|
||||
}
|
||||
if (regIconString == null)
|
||||
{
|
||||
//没有读取到文件类型注册信息,指定为未知文件类型的图标
|
||||
regIconString = systemDirectory + "shell32.dll,0";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//直接指定为文件夹图标
|
||||
regIconString = systemDirectory + "shell32.dll,3";
|
||||
}
|
||||
string[] fileIcon = regIconString.Split(new char[] { ',' });
|
||||
if (fileIcon.Length != 2)
|
||||
{
|
||||
//系统注册表中注册的标图不能直接提取,则返回可执行文件的通用图标
|
||||
fileIcon = new string[] { systemDirectory + "shell32.dll", "2" };
|
||||
}
|
||||
Icon resultIcon = null;
|
||||
try
|
||||
{
|
||||
//调用API方法读取图标
|
||||
int[] phiconLarge = new int[1];
|
||||
int[] phiconSmall = new int[1];
|
||||
uint count = Win32.ExtractIconEx(fileIcon[0], Int32.Parse(fileIcon[1]), phiconLarge, phiconSmall, 1);
|
||||
IntPtr IconHnd = new IntPtr(isLarge ? phiconLarge[0] : phiconSmall[0]);
|
||||
resultIcon = Icon.FromHandle(IconHnd);
|
||||
}
|
||||
catch(Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(GetSystemIcon), err);
|
||||
|
||||
}
|
||||
return resultIcon;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct SHFILEINFO
|
||||
{
|
||||
public IntPtr hIcon;
|
||||
public IntPtr iIcon;
|
||||
public uint dwAttributes;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
|
||||
public string szDisplayName;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
|
||||
public string szTypeName;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// 定义调用的API方法
|
||||
/// </summary>
|
||||
class Win32
|
||||
{
|
||||
public const uint SHGFI_ICON = 0x100;
|
||||
public const uint SHGFI_LARGEICON = 0x0; // 'Large icon
|
||||
public const uint SHGFI_SMALLICON = 0x1; // 'Small icon
|
||||
|
||||
[DllImport("shell32.dll")]
|
||||
public static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags);
|
||||
[DllImport("shell32.dll")]
|
||||
public static extern uint ExtractIconEx(string lpszFile, int nIconIndex, int[] phiconLarge, int[] phiconSmall, uint nIcons);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
//using Microsoft.CSharp;
|
||||
//using System;
|
||||
//using System.CodeDom.Compiler;
|
||||
//using System.Collections;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Reflection;
|
||||
//using System.Text;
|
||||
//using System.Text.RegularExpressions;
|
||||
//using System.Threading.Tasks;
|
||||
|
||||
//namespace LogicComputer
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 变量管理
|
||||
// /// </summary>
|
||||
// public class TagName
|
||||
// {
|
||||
// /// <summary>
|
||||
// /// 内部触发变量与值对应关系表
|
||||
// /// </summary>
|
||||
// public static Hashtable hsTagName=new Hashtable();
|
||||
// /// <summary>
|
||||
// /// 内部触发变量与PLC变量的逻辑表达式值对应关系表
|
||||
// /// 任何一个内部变量,都对应一个PLC变量的逻辑表达式
|
||||
// /// tagName1 = tagNamePlc1 AND tagNamePlc2
|
||||
// /// </summary>
|
||||
// public static Hashtable hsTagNameLogicExpression = new Hashtable();
|
||||
// /// <summary>
|
||||
// /// 内部触发变量的操作方法
|
||||
// /// </summary>
|
||||
// public static Hashtable hsTagNameMethodInfo = new Hashtable();
|
||||
|
||||
// /// <summary>
|
||||
// /// PLC当前的变量值
|
||||
// /// PLC变量名称与对应值的关系表
|
||||
// /// tagNamePlc1,tagNamePlc2,tagNamePlc3,tagNamePlc4,
|
||||
// /// </summary>
|
||||
// public static Hashtable hsTagNamePlc = new Hashtable();
|
||||
// /// <summary>
|
||||
// /// PLC的历史变量值
|
||||
// /// </summary>
|
||||
// public static Hashtable hsTagNamePlcHistory = new Hashtable();
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 根据逻辑表达式,创建计算方法
|
||||
// /// </summary>
|
||||
// public static void InitTagNameLogicComputeMethodInfo()
|
||||
// {
|
||||
// foreach (string tagName in TagName.hsTagName.Keys)
|
||||
// {
|
||||
// TagName.CreateLogicComputeMethodInfo(tagName);
|
||||
// }
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 根据内部变量名称,通过表达式计算PLC逻辑变量,返回计算结果
|
||||
// /// </summary>
|
||||
// /// <param name="tagName"></param>
|
||||
// /// <returns></returns>
|
||||
// public static bool ExpressionCompute(string tagName)
|
||||
// {
|
||||
// bool result = false;
|
||||
// Expression compute;
|
||||
// if (hsTagNameMethodInfo.ContainsKey(tagName))
|
||||
// {
|
||||
|
||||
// compute = (Expression)hsTagNameMethodInfo[tagName];
|
||||
// result = compute.Compute(tagName);
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 保存表达式和 TagName.hsTagNameLogicExpression
|
||||
// /// 表达式计算线程 TagName.hsTagNameMethodInfo
|
||||
// /// </summary>
|
||||
// /// <param name="tagName"></param>
|
||||
// /// <param name="strExp"></param>
|
||||
// public static void SaveLogicExpression(string tagName, string strExp)
|
||||
// {
|
||||
|
||||
// if (hsTagNameLogicExpression.ContainsKey(tagName))
|
||||
// {
|
||||
// hsTagNameLogicExpression[tagName] = strExp;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// hsTagNameLogicExpression.Add(tagName, strExp);
|
||||
// }
|
||||
// CreateLogicComputeMethodInfo(tagName);
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 根据逻辑表达式,创建计算方法。
|
||||
// /// </summary>
|
||||
// /// <param name="tagName"></param>
|
||||
// public static void CreateLogicComputeMethodInfo(string tagName)
|
||||
// {
|
||||
// string expression = "";
|
||||
// expression = GetExpressionTagName(tagName);
|
||||
// Expression e1 = new Expression(expression, tagName);
|
||||
// if (TagName.hsTagNameMethodInfo.ContainsKey(tagName))
|
||||
// {
|
||||
// TagName.hsTagNameMethodInfo[tagName] = e1;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// TagName.hsTagNameMethodInfo.Add(tagName, e1);
|
||||
// }
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 创建能运行算脚本 C#能识别的表达式
|
||||
// /// 1、逻辑变量tagNamePlc,转化为 FF("tagNamePlc")
|
||||
// /// 2、RE(tagNamePlc) SE(tagNamePlc) 转化为 RE("tagNamePlc") SE("tagNamePlc")
|
||||
// /// 3、AND NOT OR 运算符里面的处理特殊C#的与 或 非 & ! |
|
||||
// /// </summary>
|
||||
// /// <param name="tagName"></param>
|
||||
// /// <returns></returns>
|
||||
// public static string GetExpressionTagName(string tagName)
|
||||
// {
|
||||
// string expression = "";
|
||||
|
||||
// string expression1;
|
||||
// string[] tagNameList;
|
||||
|
||||
// string strTemp;
|
||||
// string strTempStart;
|
||||
// string strTempEnd;
|
||||
// expression = TagName.hsTagNameLogicExpression[tagName].ToString();
|
||||
// //去掉关键字所,有空格被","代替,提取变量列表
|
||||
// tagNameList = new Regex("[\\s]+").Replace(expression.Replace(" AND ", " ").Replace(" OR ", " ").Replace("NOT ", "").Replace("RE(", " ").Replace("SE(", " ").Replace("(", " ").Replace(")", " "), ",").Split(',');
|
||||
|
||||
|
||||
// //去掉()击面的所有空格。
|
||||
// expression1 = new Regex("[\\s]+").Replace(expression, ",").Replace("(,","(").Replace(",)",")").Replace(","," ");
|
||||
// //收索下一个逻辑变量的开始位置
|
||||
// int index=0;
|
||||
// //逻辑变量的开始位置
|
||||
// int indexCurent = 0;
|
||||
// // tagNameList = tagNameList.Distinct<string>().ToArray();
|
||||
// for (int i = 0; i < tagNameList.Length; i++)
|
||||
// {
|
||||
// if (tagNameList[i].Length < 1) break;
|
||||
// //变量前面由操作符 ( 的,不替换成hsTagNamePlc,保持不变。
|
||||
|
||||
// indexCurent = expression1.IndexOf(tagNameList[i], index);
|
||||
// strTempStart = expression1.Substring(0, indexCurent);
|
||||
// strTempEnd = expression1.Substring(indexCurent+ tagNameList[i].Length, expression1.Length- indexCurent - tagNameList[i].Length);
|
||||
|
||||
|
||||
// //判断前一个字符是否是小括弧 "(",
|
||||
// //如果有小括弧,说明当前变量是 RE SE 等计算变量 "tagNamePLC"
|
||||
// //如果没有小括弧,说明当前变量是 PLC基本变量 FF("tagNamePLC")
|
||||
// if (indexCurent>0)
|
||||
// {
|
||||
// //当前 不是 RE 或 SE 函数,字符串 换成 FF("tagNamePLC")
|
||||
// if (expression1[indexCurent-1]!='(')
|
||||
// {
|
||||
// strTemp = "LogicComputer.TagName.FF(\"" + tagNameList[i] + "\")";
|
||||
// expression1 = strTempStart+ strTemp+ strTempEnd;
|
||||
// index = indexCurent+ strTemp.Length;
|
||||
// //index = index + indexCurent+ strTemp.Length;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //RE SE 等计算变量 "tagNamePLC"
|
||||
// strTemp = "\"" + tagNameList[i] + "\"";
|
||||
// expression1 = strTempStart+ strTemp+ strTempEnd;
|
||||
// index = indexCurent + strTemp.Length;
|
||||
// //index = index + indexCurent + strTemp.Length;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //第一个变量前面没有字符,所以这个是PLC变量,不是RE SE 计算表达式
|
||||
// strTemp = "LogicComputer.TagName.FF(\"" + tagNameList[i] + "\")";
|
||||
// expression1 = strTempStart + strTemp + strTempEnd;
|
||||
// index = indexCurent + strTemp.Length;
|
||||
// }
|
||||
// }
|
||||
// //替换与或非为C#操作符
|
||||
// expression1 = expression1.Replace(" AND ", " & ").Replace(" OR ", " | ").Replace("NOT ", " ! ").Replace("NOT(", " !( ").Replace("RE(", "LogicComputer.TagName.RE(").Replace("SE(", "LogicComputer.TagName.SE(");
|
||||
// return expression1;
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 获取当前PLC的值
|
||||
// /// </summary>
|
||||
// /// <param name="tagNamePlc"></param>
|
||||
// /// <returns></returns>
|
||||
// static public bool FF(string tagNamePlc)
|
||||
// {
|
||||
// return (bool)hsTagNamePlc[tagNamePlc];
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// 上升沿
|
||||
// /// Plc变量由 false 变为 true
|
||||
// /// </summary>
|
||||
// /// <param name="tagNamePlc"></param>
|
||||
// /// <returns></returns>
|
||||
// static public bool RE(string tagNamePlc)
|
||||
// {
|
||||
// bool result = false;
|
||||
// if ((!(bool)hsTagNamePlcHistory[tagNamePlc]) & (bool)hsTagNamePlc[tagNamePlc])
|
||||
// {
|
||||
// result = true;
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 下降沿
|
||||
// /// Plc变量由 true 变为 flse
|
||||
// /// </summary>
|
||||
// /// <param name="tagNamePlc"></param>
|
||||
// /// <returns></returns>
|
||||
// static public bool SE(string tagNamePlc)
|
||||
// {
|
||||
// bool result = false;
|
||||
// if (((bool)hsTagNamePlcHistory[tagNamePlc]) & !(bool)hsTagNamePlc[tagNamePlc])
|
||||
// {
|
||||
// result = true;
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 购件C#脚本可执行函数
|
||||
// /// </summary>
|
||||
// public class Expression
|
||||
// {
|
||||
// object instance;
|
||||
// MethodInfo method;
|
||||
// /// <summary>
|
||||
// /// 表达试运算
|
||||
// /// </summary>
|
||||
// /// <param name="expression">表达试</param>
|
||||
// public Expression(string expression, string tagName)
|
||||
// {
|
||||
// if (expression.IndexOf("return") < 0) expression = "return " + expression + ";";
|
||||
// string className = "Expression_" + tagName;
|
||||
// string methodName = "Compute";
|
||||
// CompilerParameters p = new CompilerParameters();
|
||||
// p.ReferencedAssemblies.Add(Assembly.GetExecutingAssembly().Location);
|
||||
// p.GenerateInMemory = true;
|
||||
// string strProgram;
|
||||
|
||||
// // p.ReferencedAssemblies.Add("Expression.TagName.dll");
|
||||
// p.ReferencedAssemblies.Add("ModelBasic.dll");//20200712,刘利勋修改
|
||||
// p.ReferencedAssemblies.Add(Assembly.GetExecutingAssembly().Location);
|
||||
|
||||
// strProgram = string.Format("using System;using LogicComputer;sealed class {0}{{public bool {1}(string x){{{2}}}}}",
|
||||
// className, methodName, expression);
|
||||
// CompilerResults cr = new CSharpCodeProvider().CompileAssemblyFromSource(p, strProgram);
|
||||
// if (cr.Errors.Count > 0)
|
||||
// {
|
||||
// string msg = "Expression(\"" + expression + "\"): \n";
|
||||
// foreach (CompilerError err in cr.Errors)
|
||||
// { msg += err.ToString() + "\n"; }
|
||||
// throw new Exception(msg);
|
||||
// }
|
||||
|
||||
// instance = cr.CompiledAssembly.CreateInstance(className);
|
||||
// method = instance.GetType().GetMethod(methodName);
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 计算逻辑表达式
|
||||
// /// </summary>
|
||||
// /// <param name="tagName"></param>
|
||||
// /// <returns></returns>
|
||||
// public bool Compute(string tagName)
|
||||
// {
|
||||
// bool result;
|
||||
// result = (bool)method.Invoke(instance, new object[] { tagName });
|
||||
// TagName.hsTagName[tagName] = result;
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
21
DataMirrorTools_Simulator/ModelBasic/IBase.Form/IMM.MainF.cs
Normal file
21
DataMirrorTools_Simulator/ModelBasic/IBase.Form/IMM.MainF.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
/// <summary>
|
||||
/// 导入模型
|
||||
/// </summary>
|
||||
/// <param name="dt_ModelName"></param>
|
||||
void ImportModelToSql(DataTable dt_ModelName)
|
||||
;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
/// <summary>
|
||||
/// 导入模型
|
||||
/// </summary>
|
||||
/// <param name="dt_ModelName"></param>
|
||||
void ImportSignalToSql(DataTable dt)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
/// <summary>
|
||||
/// 在此接入机器人的实际数据
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="j1"></param>
|
||||
/// <param name="j2"></param>
|
||||
/// <param name="j3"></param>
|
||||
/// <param name="j4"></param>
|
||||
/// <param name="j5"></param>
|
||||
/// <param name="j6"></param>
|
||||
/// <param name="h"></param>
|
||||
void ActualRobotMotion(string modelName, double j1, double j2, double j3, double j4, double j5, double j6, double h)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 在此接入三轴(带机械手)设备的真实数据
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <param name="z"></param>
|
||||
/// <param name="h"></param>
|
||||
void ActualThreeAxisMotion(string modelName, double x, double y, double z, double h)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 在此接入自由度运动
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <param name="z"></param>
|
||||
/// <param name="rx"></param>
|
||||
/// <param name="ry"></param>
|
||||
/// <param name="rz"></param>
|
||||
void ActualFreedomMotion(string modelName, double x, double y, double z, double rx, double ry, double rz)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
|
||||
void DirectPlay(string modelName, double x0, double y0, double z0, double rx0, double ry0, double rz0, double x, double y, double z, double rx, double ry, double rz, int usageTime)
|
||||
;
|
||||
|
||||
void DirectPlay(string modelName, double x, double y, double z, double rx, double ry, double rz, int usageTime)
|
||||
;
|
||||
|
||||
void DirectPlay_X(string modelName, double changeValue, int usageTime)
|
||||
;
|
||||
void DirectPlay_X(string modelName, double changeValue, int usageTime, int isPlay)
|
||||
;
|
||||
|
||||
void DirectPlay_Y(string modelName, double changeValue, int usageTime)
|
||||
;
|
||||
|
||||
void DirectPlay_Z(string modelName, double changeValue, int usageTime)
|
||||
;
|
||||
|
||||
void DirectPlay_RX(string modelName, double changeValue, int usageTime)
|
||||
;
|
||||
|
||||
void DirectPlay_RY(string modelName, double changeValue, int usageTime)
|
||||
;
|
||||
|
||||
void DirectPlay_RZ(string modelName, double changeValue, int usageTime)
|
||||
;
|
||||
/**************************************/
|
||||
|
||||
void DirectPlay_XY(string modelName, double x, double y, int usageTime)
|
||||
;
|
||||
|
||||
void DirectPlay_XZ(string modelName, double x, double z, int usageTime)
|
||||
;
|
||||
|
||||
void DirectPlay_YZ(string modelName, double y, double z, int usageTime)
|
||||
;
|
||||
|
||||
void DirectPlay_XYZ(string modelName, double x, double y, double z, int usageTime)
|
||||
;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
31
DataMirrorTools_Simulator/ModelBasic/IBase/IMM.Move.Load.cs
Normal file
31
DataMirrorTools_Simulator/ModelBasic/IBase/IMM.Move.Load.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
void Move_X(string modelName, double distance, int useTime)
|
||||
;
|
||||
|
||||
void Move_Y(string modelName, double distance, int useTime)
|
||||
;
|
||||
void Move_Z(string modelName, double distance, int useTime)
|
||||
;
|
||||
void Move_RX(string modelName, double angular, int useTime)
|
||||
;
|
||||
void Move_RY(string modelName, double angular, int useTime)
|
||||
;
|
||||
void Move_RZ(string modelName, double angular, int useTime)
|
||||
;
|
||||
|
||||
|
||||
void Move_XYZ(string modelName, double x, double y, double z, int useTime)
|
||||
;
|
||||
|
||||
void Move_RxRyRz(string modelName, double rx, double ry, double rz, int useTime)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
|
||||
{ "OPERATION": {frames: [
|
||||
|
||||
{time:10, objStates:[{i:装配工位完成产品加托盘,tx:1.484,ty:-0.001,tz:3.183,rx:0.000000,ry:0.000000,rz:0.000000}, ] },
|
||||
{time:10, objStates:[{i:装配工位完成产品加托盘,tx:1.484,ty:-0.001,tz:3.183,rx:0.000000,ry:0.000000,rz:0.000000}, ] },
|
||||
|
||||
]}}
|
||||
|
||||
*/
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 生成工艺播放数据(所有)
|
||||
/// </summary>
|
||||
/// <param name="frameValue">帧值</param>
|
||||
void OutputCraftDataF(int frameValue)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 生成工艺播放数据(工艺)
|
||||
/// </summary>
|
||||
/// <param name="currCraftCode">工艺代码</param>
|
||||
/// <param name="frameValue">帧值</param>
|
||||
void OutputCraftDataF(string currCraftCode, int frameValue)
|
||||
;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生成工艺播放数据 的方法
|
||||
/// </summary>
|
||||
/// <param name="currCraftCode"></param>
|
||||
void OutputCraftData(string currCraftCode, int frameValue)
|
||||
;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生成工艺播放数据 的方法
|
||||
/// </summary>
|
||||
/// <param name="currCraftCode"></param>
|
||||
/// <param name="_dt"></param>
|
||||
void OutputCraftData(string currCraftCode, DataTable _dt, int frameValue)
|
||||
;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
void PlayCurrCraft(DataTable dt)
|
||||
;
|
||||
|
||||
void PlayCurrCraftTaskEnd(string modelName)
|
||||
;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
//using LogicComputer;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
|
||||
void SetTagName(DataSet ds_Init)
|
||||
;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PLC 信号 触发3D模型运动,内部使用
|
||||
/// </summary>
|
||||
/// <param name="tagNamePlc"></param>
|
||||
/// <param name="inputValue"></param>
|
||||
void PlcVarName_Trig_3DModel_Movement_Internal(string tagNamePlc, bool inputValue)
|
||||
;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
29
DataMirrorTools_Simulator/ModelBasic/IBase/IMM.Socket.cs
Normal file
29
DataMirrorTools_Simulator/ModelBasic/IBase/IMM.Socket.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using ConLink.Enthernet;
|
||||
using ConLink;
|
||||
using System;
|
||||
using System.Net;
|
||||
using ConLink.Core.Net;
|
||||
using System.Data;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 连接客户端
|
||||
/// </summary>
|
||||
/// <param name="ipPortName"></param>
|
||||
NetComplexClient ClientConnection(string ipPortName)
|
||||
;
|
||||
|
||||
|
||||
void SendMsg(string msg)
|
||||
;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
179
DataMirrorTools_Simulator/ModelBasic/IBase/IMM.cs
Normal file
179
DataMirrorTools_Simulator/ModelBasic/IBase/IMM.cs
Normal file
@@ -0,0 +1,179 @@
|
||||
using Global;
|
||||
using ModelBasic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class E { }
|
||||
public partial interface IModelManagement
|
||||
{
|
||||
|
||||
|
||||
|
||||
#region 加载模型(4个重载)
|
||||
|
||||
/// <summary>
|
||||
/// 装载模型
|
||||
/// </summary>
|
||||
/// <param name="ipPortOpName_1"></param>
|
||||
/// <param name="prefix"></param>
|
||||
/// <param name="objectHeader"></param>
|
||||
/// <param name="sendInterval"></param>
|
||||
void LoadModel(string ipPortOpName_1, string prefix0, string objectHeader0, int sendInterval0, string connectionStringCurr, string projectNameCurr)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 装载模型
|
||||
/// </summary>
|
||||
/// <param name="ipPortOpName_1"></param>
|
||||
/// <param name="ipPortOpName_2"></param>
|
||||
/// <param name="prefix"></param>
|
||||
/// <param name="objectHeader"></param>
|
||||
/// <param name="sendInterval"></param>
|
||||
void LoadModel(string ipPortOpName_1, string ipPortOpName_2, string prefix0, string objectHeader0, int sendInterval0, string connectionStringCurr, string projectNameCurr)
|
||||
;
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 装载模型
|
||||
///// </summary>
|
||||
///// <param name="clientLocal"></param>
|
||||
///// <param name="prefix"></param>
|
||||
///// <param name="objectHeader"></param>
|
||||
///// <param name="sendInterval"></param>
|
||||
//public void LoadModel(NetComplexClient clientLocal0, string prefix0, string objectHeader0, int sendInterval0)
|
||||
//;
|
||||
|
||||
///// <summary>
|
||||
/////
|
||||
///// </summary>
|
||||
///// <param name="clientLocal"></param>
|
||||
///// <param name="clientCloud"></param>
|
||||
///// <param name="prefix"></param>
|
||||
///// <param name="objectHeader"></param>
|
||||
///// <param name="sendInterval"></param>
|
||||
//public void LoadModel(NetComplexClient clientLocal0, NetComplexClient clientCloud0, string prefix0, string objectHeader0, int sendInterval0)
|
||||
//;
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 得到播放数据(3种方法)
|
||||
|
||||
/// <summary>
|
||||
/// 从文件得到播放数据
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="modelName"></param>
|
||||
/// <returns></returns>
|
||||
OperationResult<List<String>, string, string> GetOrderFromFile(string fileName, string modelName)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 从PDPS文件得到播放数据
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="modelName"></param>
|
||||
/// <returns></returns>
|
||||
OperationResult<List<String>, string, string> GetOrderFromPdps(string fileName, string modelName)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 通过自定义算法得到播放数据
|
||||
/// </summary>
|
||||
/// <param name="setX">X方向变化值</param>
|
||||
/// <param name="setY">Y方向变化值</param>
|
||||
/// <param name="setZ">Z方向变化值</param>
|
||||
/// <param name="setRX">RX方向变化值</param>
|
||||
/// <param name="setRY">RY方向变化值</param>
|
||||
/// <param name="setRZ">RZ方向变化值</param>
|
||||
/// <param name="modelName">模型名称</param>
|
||||
/// <param name="time">使用时间</param>
|
||||
/// <returns> OperationResult<T,T,T> </returns>
|
||||
OperationResult<List<String>, string, string> GetOrder(double setX, double setY, double setZ, double setRX, double setRY, double setRZ, string modelName, int time)
|
||||
;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 播放
|
||||
/// </summary>
|
||||
/// <param name="playID"></param>
|
||||
void Play动作(int playID)
|
||||
;
|
||||
/// <summary>
|
||||
/// 播放
|
||||
/// </summary>
|
||||
/// <param name="playID"></param>
|
||||
void Play(string modelName)
|
||||
;
|
||||
/// <summary>
|
||||
/// 暂停
|
||||
/// </summary>
|
||||
void Suspend(string modelName)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 终了
|
||||
/// </summary>
|
||||
void End(string modelName)
|
||||
;
|
||||
/// <summary>
|
||||
/// 复位
|
||||
/// </summary>
|
||||
void ReSet(string modelName)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 删除动作号
|
||||
/// </summary>
|
||||
/// <param name="playID"></param>
|
||||
/// <returns></returns>
|
||||
List<String> DeleteOrder(int playID)
|
||||
;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 翻阅模型对象
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
void SelectModel(string modelName)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 翻阅动作号对象
|
||||
/// </summary>
|
||||
/// <param name="playID"></param>
|
||||
/// <returns></returns>
|
||||
string SelectPlayID(int playID)
|
||||
;
|
||||
|
||||
/// <summary>
|
||||
/// 得到模型队列
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<String> GetModeList()
|
||||
;
|
||||
|
||||
|
||||
void FileDataMotion(string modelName)
|
||||
;
|
||||
|
||||
|
||||
DataTable LoadModelTreeView()
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace InnerApplicationException
|
||||
{
|
||||
public class LowHighLimitException : ApplicationException
|
||||
{
|
||||
public LowHighLimitException(string message): base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class JointAxisInfoException : ApplicationException
|
||||
{
|
||||
public JointAxisInfoException(string message): base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
using ConLink.Enthernet;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class ActControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 是处于活跃状态
|
||||
/// 2021.3.31
|
||||
/// </summary>
|
||||
public bool isActive
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = false;
|
||||
/// <summary>
|
||||
/// 播放的指针
|
||||
/// </summary>
|
||||
private int indexPlay
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = 0;
|
||||
/// <summary>
|
||||
/// 播放的状态
|
||||
/// </summary>
|
||||
private bool isPlay
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = false;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private List<C_Frames> sendList
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// 2020-8-6
|
||||
/// </summary>
|
||||
public event Action<Int32, Int32, C_Frames> CurrRunInfoEvent;
|
||||
/// <summary>
|
||||
/// 2021.1.4
|
||||
/// 上午11.15
|
||||
/// </summary>
|
||||
public event Action PlayTaskEnd;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Thread t_Play = null;
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
/// <param name="clientLocal"></param>
|
||||
/// <param name="sendInterval"></param>
|
||||
public ActControl()
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 播放序列
|
||||
/// </summary>
|
||||
/// <param name="sendList"></param>
|
||||
public ActControl PlayData(List<C_Frames> sendList)
|
||||
{
|
||||
this.sendList = sendList;
|
||||
|
||||
t_Play = new Thread(new ParameterizedThreadStart(PlayData));
|
||||
t_Play.IsBackground = true;
|
||||
t_Play.Name = "123";
|
||||
t_Play.Start(sendList);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
private void PlayData(object obj)
|
||||
{
|
||||
var frams = (List<C_Frames>)obj;
|
||||
|
||||
while (indexPlay <= sendList.Count - 1)
|
||||
{
|
||||
if (isPlay)
|
||||
{
|
||||
var frame = frams[indexPlay];
|
||||
indexPlay++;
|
||||
CurrRunInfoEvent?.Invoke(indexPlay, sendList.Count, frame);
|
||||
}
|
||||
Thread.Sleep(PP.PCP.SendInterval);
|
||||
}
|
||||
|
||||
isPlay = false;
|
||||
isActive = false;
|
||||
indexPlay = 0;
|
||||
PlayTaskEnd?.Invoke();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 返回播放状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool PlayState()
|
||||
{
|
||||
return isPlay;
|
||||
}
|
||||
/// <summary>
|
||||
/// 返回活跃状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool ActiveState()
|
||||
{
|
||||
return isActive;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 播放
|
||||
/// </summary>
|
||||
public ActControl Play()
|
||||
{
|
||||
isActive = true;
|
||||
isPlay = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 暂停
|
||||
/// </summary>
|
||||
public ActControl Suspend()
|
||||
{
|
||||
isPlay = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 终了
|
||||
/// </summary>
|
||||
public ActControl End()
|
||||
{
|
||||
if (t_Play != null)
|
||||
{
|
||||
t_Play.Abort();
|
||||
}
|
||||
isPlay = false;
|
||||
isActive = false;
|
||||
indexPlay = 0;
|
||||
PlayTaskEnd?.Invoke();
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
public ActControl SetIndex(int index)
|
||||
{
|
||||
indexPlay = index;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
417
DataMirrorTools_Simulator/ModelBasic/OExcel/OExcel.cs
Normal file
417
DataMirrorTools_Simulator/ModelBasic/OExcel/OExcel.cs
Normal file
@@ -0,0 +1,417 @@
|
||||
using NPOI.HPSF;
|
||||
using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OExcel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Execl工具辅助类
|
||||
/// </summary>
|
||||
public class ExeclHelper_Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 读取Execl数据到DataTable中
|
||||
/// </summary>
|
||||
/// <param name="filePath">指定Execl文件路径</param>
|
||||
/// <param name="isColumnName">设置第一行是否是列名</param>
|
||||
/// <returns>返回一个DataTable数据集</returns>
|
||||
public static DataTable ExcelToDataTable(string filePath, string sheetName, bool isColumnName)
|
||||
{
|
||||
DataTable dataTable = null;
|
||||
FileStream fs = null;
|
||||
DataColumn column = null;
|
||||
DataRow dataRow = null;
|
||||
IWorkbook workbook = null;
|
||||
ISheet sheet = null;
|
||||
IRow row = null;
|
||||
ICell cell = null;
|
||||
int startRow = 0;
|
||||
try
|
||||
{
|
||||
using (fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
{
|
||||
// 2007版本
|
||||
if (filePath.IndexOf(".xlsx") > 0)
|
||||
workbook = new XSSFWorkbook(fs);
|
||||
// 2003版本
|
||||
else if (filePath.IndexOf(".xls") > 0)
|
||||
workbook = new HSSFWorkbook(fs);
|
||||
if (workbook != null)
|
||||
{
|
||||
sheet = workbook.GetSheet(sheetName);//读取第一个sheet,当然也可以循环读取每个sheet
|
||||
dataTable = new DataTable();
|
||||
if (sheet != null)
|
||||
{
|
||||
int rowCount = sheet.LastRowNum;//总行数
|
||||
if (rowCount > 0)
|
||||
{
|
||||
IRow firstRow = sheet.GetRow(0);//第一行
|
||||
int cellCount = firstRow.LastCellNum;//列数
|
||||
//构建datatable的列
|
||||
if (isColumnName)
|
||||
{
|
||||
startRow = 1;//如果第一行是列名,则从第二行开始读取
|
||||
for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
|
||||
{
|
||||
cell = firstRow.GetCell(i);
|
||||
if (cell != null)
|
||||
{
|
||||
if (cell.StringCellValue != null)
|
||||
{
|
||||
column = new DataColumn(cell.StringCellValue);
|
||||
dataTable.Columns.Add(column);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
|
||||
{
|
||||
column = new DataColumn("column" + (i + 1));
|
||||
dataTable.Columns.Add(column);
|
||||
}
|
||||
}
|
||||
|
||||
//填充行
|
||||
for (int i = startRow; i <= rowCount; ++i)
|
||||
{
|
||||
row = sheet.GetRow(i);
|
||||
if (row == null) continue;
|
||||
|
||||
dataRow = dataTable.NewRow();
|
||||
for (int j = row.FirstCellNum; j < cellCount; ++j)
|
||||
{
|
||||
cell = row.GetCell(j);
|
||||
if (cell == null)
|
||||
{
|
||||
dataRow[j] = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
//CellType(Unknown = -1,Numeric = 0,String = 1,Formula = 2,Blank = 3,Boolean = 4,Error = 5,)
|
||||
switch (cell.CellType)
|
||||
{
|
||||
case CellType.Blank:
|
||||
dataRow[j] = "";
|
||||
break;
|
||||
case CellType.Numeric:
|
||||
short format = cell.CellStyle.DataFormat;
|
||||
//对时间格式(2015.12.5、2015/12/5、2015-12-5等)的处理
|
||||
if (format == 14 || format == 31 || format == 57 || format == 58)
|
||||
dataRow[j] = cell.DateCellValue;
|
||||
else
|
||||
dataRow[j] = cell.NumericCellValue;
|
||||
break;
|
||||
case CellType.String:
|
||||
dataRow[j] = cell.StringCellValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dataTable.Rows.Add(dataRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return dataTable;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ExeclHelper_Model), err);
|
||||
|
||||
Console.WriteLine(err);
|
||||
if (fs != null)
|
||||
{
|
||||
fs.Close();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将DataTable导出到Execl文档
|
||||
/// </summary>
|
||||
/// <param name="dt">传入一个DataTable数据集</param>
|
||||
/// <returns>返回一个Bool类型的值,表示是否导出成功</returns>
|
||||
/// True表示导出成功,Flase表示导出失败
|
||||
public static bool DataTableToExcel(DataTable dt, string sheetName, string Outpath)
|
||||
{
|
||||
bool result = false;
|
||||
IWorkbook workbook = null;
|
||||
FileStream fs = null;
|
||||
IRow row = null;
|
||||
ISheet sheet = null;
|
||||
ICell cell = null;
|
||||
try
|
||||
{
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
workbook = new HSSFWorkbook();
|
||||
sheet = workbook.CreateSheet(sheetName);//创建一个名称为Sheet0的表
|
||||
int rowCount = dt.Rows.Count;//行数
|
||||
int columnCount = dt.Columns.Count;//列数
|
||||
|
||||
//设置列头
|
||||
row = sheet.CreateRow(0);//excel第一行设为列头
|
||||
for (int c = 0; c < columnCount; c++)
|
||||
{
|
||||
cell = row.CreateCell(c);
|
||||
cell.SetCellValue(dt.Columns[c].ColumnName);
|
||||
}
|
||||
|
||||
//设置每行每列的单元格,
|
||||
for (int i = 0; i < rowCount; i++)
|
||||
{
|
||||
row = sheet.CreateRow(i + 1);
|
||||
for (int j = 0; j < columnCount; j++)
|
||||
{
|
||||
cell = row.CreateCell(j);//excel第二行开始写入数据
|
||||
cell.SetCellValue(dt.Rows[i][j].ToString());
|
||||
}
|
||||
}
|
||||
//向outPath输出数据
|
||||
using (fs = File.OpenWrite(Outpath))
|
||||
{
|
||||
workbook.Write(fs);//向打开的这个xls文件中写入数据
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ExeclHelper_Model), err);
|
||||
|
||||
Console.WriteLine(err);
|
||||
if (fs != null)
|
||||
{
|
||||
fs.Close();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 读取Execl数据到DataTable(DataSet)中
|
||||
/// </summary>
|
||||
/// <param name="filePath">指定Execl文件路径</param>
|
||||
/// <param name="isFirstLineColumnName">设置第一行是否是列名</param>
|
||||
/// <returns>返回一个DataTable数据集</returns>
|
||||
public static DataSet ExcelToDataSet(string filePath, bool isFirstLineColumnName)
|
||||
{
|
||||
DataSet dataSet = new DataSet();
|
||||
int startRow = 0;
|
||||
try
|
||||
{
|
||||
using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
{
|
||||
IWorkbook workbook = null;
|
||||
// 如果是2007+的Excel版本
|
||||
if (filePath.IndexOf(".xlsx") > 0)
|
||||
{
|
||||
workbook = new XSSFWorkbook(fs);
|
||||
}
|
||||
// 如果是2003-的Excel版本
|
||||
else if (filePath.IndexOf(".xls") > 0)
|
||||
{
|
||||
workbook = new HSSFWorkbook(fs);
|
||||
}
|
||||
if (workbook != null)
|
||||
{
|
||||
//循环读取Excel的每个sheet,每个sheet页都转换为一个DataTable,并放在DataSet中
|
||||
for (int p = 0; p < workbook.NumberOfSheets; p++)
|
||||
{
|
||||
ISheet sheet = workbook.GetSheetAt(p);
|
||||
DataTable dataTable = new DataTable();
|
||||
dataTable.TableName = sheet.SheetName;
|
||||
if (sheet != null)
|
||||
{
|
||||
int rowCount = sheet.LastRowNum;//获取总行数
|
||||
if (rowCount > 0)
|
||||
{
|
||||
IRow firstRow = sheet.GetRow(0);//获取第一行
|
||||
int cellCount = firstRow.LastCellNum;//获取总列数
|
||||
|
||||
//构建datatable的列
|
||||
if (isFirstLineColumnName)
|
||||
{
|
||||
startRow = 1;//如果第一行是列名,则从第二行开始读取
|
||||
for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
|
||||
{
|
||||
ICell cell = firstRow.GetCell(i);
|
||||
if (cell != null)
|
||||
{
|
||||
if (cell.StringCellValue != null)
|
||||
{
|
||||
DataColumn column = new DataColumn(cell.StringCellValue);
|
||||
dataTable.Columns.Add(column);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
|
||||
{
|
||||
DataColumn column = new DataColumn("column" + (i + 1));
|
||||
dataTable.Columns.Add(column);
|
||||
}
|
||||
}
|
||||
|
||||
//填充行
|
||||
for (int i = startRow; i <= rowCount; ++i)
|
||||
{
|
||||
IRow row = sheet.GetRow(i);
|
||||
if (row == null) continue;
|
||||
|
||||
DataRow dataRow = dataTable.NewRow();
|
||||
for (int j = row.FirstCellNum; j < cellCount; ++j)
|
||||
{
|
||||
ICell cell = row.GetCell(j);
|
||||
if (cell == null)
|
||||
{
|
||||
dataRow[j] = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
//CellType(Unknown = -1,Numeric = 0,String = 1,Formula = 2,Blank = 3,Boolean = 4,Error = 5,)
|
||||
switch (cell.CellType)
|
||||
{
|
||||
case CellType.Blank:
|
||||
dataRow[j] = "";
|
||||
break;
|
||||
case CellType.Numeric:
|
||||
short format = cell.CellStyle.DataFormat;
|
||||
//对时间格式(2015.12.5、2015/12/5、2015-12-5等)的处理
|
||||
if (format == 14 || format == 31 || format == 57 || format == 58)
|
||||
dataRow[j] = cell.DateCellValue;
|
||||
else
|
||||
dataRow[j] = cell.NumericCellValue;
|
||||
break;
|
||||
case CellType.String:
|
||||
dataRow[j] = cell.StringCellValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dataTable.Rows.Add(dataRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
dataSet.Tables.Add(dataTable);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return dataSet;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ExeclHelper_Model), err);
|
||||
|
||||
Console.WriteLine(err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 将DataTable(DataSet)导出到Execl文档
|
||||
/// </summary>
|
||||
/// <param name="dataSet">传入一个DataSet</param>
|
||||
/// <param name="Outpath">导出路径(可以不加扩展名,不加默认为.xls)</param>
|
||||
/// <returns>返回一个Bool类型的值,表示是否导出成功</returns>
|
||||
/// True表示导出成功,Flase表示导出失败
|
||||
public static bool DataSetToExcel(DataSet dataSet, string Outpath)
|
||||
{
|
||||
bool result = false;
|
||||
try
|
||||
{
|
||||
if (dataSet == null || dataSet.Tables == null || dataSet.Tables.Count == 0 || string.IsNullOrEmpty(Outpath))
|
||||
throw new Exception("输入的DataSet或路径异常");
|
||||
int sheetIndex = 0;
|
||||
//根据输出路径的扩展名判断workbook的实例类型
|
||||
IWorkbook workbook = null;
|
||||
string pathExtensionName = Outpath.Trim().Substring(Outpath.Length - 5);
|
||||
if (pathExtensionName.Contains(".xlsx"))
|
||||
{
|
||||
workbook = new XSSFWorkbook();
|
||||
}
|
||||
else if (pathExtensionName.Contains(".xls"))
|
||||
{
|
||||
workbook = new HSSFWorkbook();
|
||||
}
|
||||
else
|
||||
{
|
||||
Outpath = Outpath.Trim() + ".xls";
|
||||
workbook = new HSSFWorkbook();
|
||||
}
|
||||
//将DataSet导出为Excel
|
||||
foreach (DataTable dt in dataSet.Tables)
|
||||
{
|
||||
sheetIndex++;
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
ISheet sheet = workbook.CreateSheet(string.IsNullOrEmpty(dt.TableName) ? ("sheet" + sheetIndex) : dt.TableName);//创建一个名称为Sheet0的表
|
||||
int rowCount = dt.Rows.Count;//行数
|
||||
int columnCount = dt.Columns.Count;//列数
|
||||
|
||||
//设置列头
|
||||
IRow row = sheet.CreateRow(0);//excel第一行设为列头
|
||||
for (int c = 0; c < columnCount; c++)
|
||||
{
|
||||
ICell cell = row.CreateCell(c);
|
||||
cell.SetCellValue(dt.Columns[c].ColumnName);
|
||||
}
|
||||
|
||||
//设置每行每列的单元格,
|
||||
for (int i = 0; i < rowCount; i++)
|
||||
{
|
||||
row = sheet.CreateRow(i + 1);
|
||||
for (int j = 0; j < columnCount; j++)
|
||||
{
|
||||
ICell cell = row.CreateCell(j);//excel第二行开始写入数据
|
||||
cell.SetCellValue(dt.Rows[i][j].ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//向outPath输出数据
|
||||
using (FileStream fs = File.OpenWrite(Outpath))
|
||||
{
|
||||
workbook.Write(fs);//向打开的这个xls文件中写入数据
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(ExeclHelper_Model), err);
|
||||
|
||||
Console.WriteLine(err);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
60
DataMirrorTools_Simulator/ModelBasic/OJson/IJsonWrapper.cs
Normal file
60
DataMirrorTools_Simulator/ModelBasic/OJson/IJsonWrapper.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
#region Header
|
||||
/**
|
||||
* IJsonWrapper.cs
|
||||
* Interface that represents a type capable of handling all kinds of JSON
|
||||
* data. This is mainly used when mapping objects through JsonMapper, and
|
||||
* it's implemented by JsonData.
|
||||
*
|
||||
* The authors disclaim copyright to this source code. For more details, see
|
||||
* the COPYING file included with this distribution.
|
||||
**/
|
||||
#endregion
|
||||
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
|
||||
namespace LitJson
|
||||
{
|
||||
public enum JsonType
|
||||
{
|
||||
None,
|
||||
|
||||
Object,
|
||||
Array,
|
||||
String,
|
||||
Int,
|
||||
Long,
|
||||
Double,
|
||||
Boolean
|
||||
}
|
||||
|
||||
public interface IJsonWrapper : IList, IOrderedDictionary
|
||||
{
|
||||
bool IsArray { get; }
|
||||
bool IsBoolean { get; }
|
||||
bool IsDouble { get; }
|
||||
bool IsInt { get; }
|
||||
bool IsLong { get; }
|
||||
bool IsObject { get; }
|
||||
bool IsString { get; }
|
||||
|
||||
bool GetBoolean ();
|
||||
double GetDouble ();
|
||||
int GetInt ();
|
||||
JsonType GetJsonType ();
|
||||
long GetLong ();
|
||||
string GetString ();
|
||||
|
||||
void SetBoolean (bool val);
|
||||
void SetDouble (double val);
|
||||
void SetInt (int val);
|
||||
void SetJsonType (JsonType type);
|
||||
void SetLong (long val);
|
||||
void SetString (string val);
|
||||
|
||||
string ToJson ();
|
||||
void ToJson (JsonWriter writer);
|
||||
}
|
||||
}
|
||||
1059
DataMirrorTools_Simulator/ModelBasic/OJson/JsonData.cs
Normal file
1059
DataMirrorTools_Simulator/ModelBasic/OJson/JsonData.cs
Normal file
File diff suppressed because it is too large
Load Diff
65
DataMirrorTools_Simulator/ModelBasic/OJson/JsonException.cs
Normal file
65
DataMirrorTools_Simulator/ModelBasic/OJson/JsonException.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
#region Header
|
||||
/**
|
||||
* JsonException.cs
|
||||
* Base class throwed by LitJSON when a parsing error occurs.
|
||||
*
|
||||
* The authors disclaim copyright to this source code. For more details, see
|
||||
* the COPYING file included with this distribution.
|
||||
**/
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
|
||||
|
||||
namespace LitJson
|
||||
{
|
||||
public class JsonException :
|
||||
#if NETSTANDARD1_5
|
||||
Exception
|
||||
#else
|
||||
ApplicationException
|
||||
#endif
|
||||
{
|
||||
public JsonException () : base ()
|
||||
{
|
||||
}
|
||||
|
||||
internal JsonException (ParserToken token) :
|
||||
base (String.Format (
|
||||
"Invalid token '{0}' in input string", token))
|
||||
{
|
||||
}
|
||||
|
||||
internal JsonException (ParserToken token,
|
||||
Exception inner_exception) :
|
||||
base (String.Format (
|
||||
"Invalid token '{0}' in input string", token),
|
||||
inner_exception)
|
||||
{
|
||||
}
|
||||
|
||||
internal JsonException (int c) :
|
||||
base (String.Format (
|
||||
"Invalid character '{0}' in input string", (char) c))
|
||||
{
|
||||
}
|
||||
|
||||
internal JsonException (int c, Exception inner_exception) :
|
||||
base (String.Format (
|
||||
"Invalid character '{0}' in input string", (char) c),
|
||||
inner_exception)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public JsonException (string message) : base (message)
|
||||
{
|
||||
}
|
||||
|
||||
public JsonException (string message, Exception inner_exception) :
|
||||
base (message, inner_exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
964
DataMirrorTools_Simulator/ModelBasic/OJson/JsonMapper.cs
Normal file
964
DataMirrorTools_Simulator/ModelBasic/OJson/JsonMapper.cs
Normal file
@@ -0,0 +1,964 @@
|
||||
#region Header
|
||||
/**
|
||||
* JsonMapper.cs
|
||||
* JSON to .Net object and object to JSON conversions.
|
||||
*
|
||||
* The authors disclaim copyright to this source code. For more details, see
|
||||
* the COPYING file included with this distribution.
|
||||
**/
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
|
||||
namespace LitJson
|
||||
{
|
||||
internal struct PropertyMetadata
|
||||
{
|
||||
public MemberInfo Info;
|
||||
public bool IsField;
|
||||
public Type Type;
|
||||
}
|
||||
|
||||
|
||||
internal struct ArrayMetadata
|
||||
{
|
||||
private Type element_type;
|
||||
private bool is_array;
|
||||
private bool is_list;
|
||||
|
||||
|
||||
public Type ElementType {
|
||||
get {
|
||||
if (element_type == null)
|
||||
return typeof (JsonData);
|
||||
|
||||
return element_type;
|
||||
}
|
||||
|
||||
set { element_type = value; }
|
||||
}
|
||||
|
||||
public bool IsArray {
|
||||
get { return is_array; }
|
||||
set { is_array = value; }
|
||||
}
|
||||
|
||||
public bool IsList {
|
||||
get { return is_list; }
|
||||
set { is_list = value; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal struct ObjectMetadata
|
||||
{
|
||||
private Type element_type;
|
||||
private bool is_dictionary;
|
||||
|
||||
private IDictionary<string, PropertyMetadata> properties;
|
||||
|
||||
|
||||
public Type ElementType {
|
||||
get {
|
||||
if (element_type == null)
|
||||
return typeof (JsonData);
|
||||
|
||||
return element_type;
|
||||
}
|
||||
|
||||
set { element_type = value; }
|
||||
}
|
||||
|
||||
public bool IsDictionary {
|
||||
get { return is_dictionary; }
|
||||
set { is_dictionary = value; }
|
||||
}
|
||||
|
||||
public IDictionary<string, PropertyMetadata> Properties {
|
||||
get { return properties; }
|
||||
set { properties = value; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal delegate void ExporterFunc (object obj, JsonWriter writer);
|
||||
public delegate void ExporterFunc<T> (T obj, JsonWriter writer);
|
||||
|
||||
internal delegate object ImporterFunc (object input);
|
||||
public delegate TValue ImporterFunc<TJson, TValue> (TJson input);
|
||||
|
||||
public delegate IJsonWrapper WrapperFactory ();
|
||||
|
||||
|
||||
public class JsonMapper
|
||||
{
|
||||
#region Fields
|
||||
private static readonly int max_nesting_depth;
|
||||
|
||||
private static readonly IFormatProvider datetime_format;
|
||||
|
||||
private static readonly IDictionary<Type, ExporterFunc> base_exporters_table;
|
||||
private static readonly IDictionary<Type, ExporterFunc> custom_exporters_table;
|
||||
|
||||
private static readonly IDictionary<Type,
|
||||
IDictionary<Type, ImporterFunc>> base_importers_table;
|
||||
private static readonly IDictionary<Type,
|
||||
IDictionary<Type, ImporterFunc>> custom_importers_table;
|
||||
|
||||
private static readonly IDictionary<Type, ArrayMetadata> array_metadata;
|
||||
private static readonly object array_metadata_lock = new Object ();
|
||||
|
||||
private static readonly IDictionary<Type,
|
||||
IDictionary<Type, MethodInfo>> conv_ops;
|
||||
private static readonly object conv_ops_lock = new Object ();
|
||||
|
||||
private static readonly IDictionary<Type, ObjectMetadata> object_metadata;
|
||||
private static readonly object object_metadata_lock = new Object ();
|
||||
|
||||
private static readonly IDictionary<Type,
|
||||
IList<PropertyMetadata>> type_properties;
|
||||
private static readonly object type_properties_lock = new Object ();
|
||||
|
||||
private static readonly JsonWriter static_writer;
|
||||
private static readonly object static_writer_lock = new Object ();
|
||||
#endregion
|
||||
|
||||
|
||||
#region Constructors
|
||||
static JsonMapper ()
|
||||
{
|
||||
max_nesting_depth = 100;
|
||||
|
||||
array_metadata = new Dictionary<Type, ArrayMetadata> ();
|
||||
conv_ops = new Dictionary<Type, IDictionary<Type, MethodInfo>> ();
|
||||
object_metadata = new Dictionary<Type, ObjectMetadata> ();
|
||||
type_properties = new Dictionary<Type,
|
||||
IList<PropertyMetadata>> ();
|
||||
|
||||
static_writer = new JsonWriter ();
|
||||
|
||||
datetime_format = DateTimeFormatInfo.InvariantInfo;
|
||||
|
||||
base_exporters_table = new Dictionary<Type, ExporterFunc> ();
|
||||
custom_exporters_table = new Dictionary<Type, ExporterFunc> ();
|
||||
|
||||
base_importers_table = new Dictionary<Type,
|
||||
IDictionary<Type, ImporterFunc>> ();
|
||||
custom_importers_table = new Dictionary<Type,
|
||||
IDictionary<Type, ImporterFunc>> ();
|
||||
|
||||
RegisterBaseExporters ();
|
||||
RegisterBaseImporters ();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Private Methods
|
||||
private static void AddArrayMetadata (Type type)
|
||||
{
|
||||
if (array_metadata.ContainsKey (type))
|
||||
return;
|
||||
|
||||
ArrayMetadata data = new ArrayMetadata ();
|
||||
|
||||
data.IsArray = type.IsArray;
|
||||
|
||||
if (type.GetInterface ("System.Collections.IList") != null)
|
||||
data.IsList = true;
|
||||
|
||||
foreach (PropertyInfo p_info in type.GetProperties ()) {
|
||||
if (p_info.Name != "Item")
|
||||
continue;
|
||||
|
||||
ParameterInfo[] parameters = p_info.GetIndexParameters ();
|
||||
|
||||
if (parameters.Length != 1)
|
||||
continue;
|
||||
|
||||
if (parameters[0].ParameterType == typeof (int))
|
||||
data.ElementType = p_info.PropertyType;
|
||||
}
|
||||
|
||||
lock (array_metadata_lock) {
|
||||
try {
|
||||
array_metadata.Add (type, data);
|
||||
} catch (ArgumentException err) {
|
||||
LogNet.LogisTrac.WriteLog(typeof(JsonMapper), err);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddObjectMetadata (Type type)
|
||||
{
|
||||
if (object_metadata.ContainsKey (type))
|
||||
return;
|
||||
|
||||
ObjectMetadata data = new ObjectMetadata ();
|
||||
|
||||
if (type.GetInterface ("System.Collections.IDictionary") != null)
|
||||
data.IsDictionary = true;
|
||||
|
||||
data.Properties = new Dictionary<string, PropertyMetadata> ();
|
||||
|
||||
foreach (PropertyInfo p_info in type.GetProperties ()) {
|
||||
if (p_info.Name == "Item") {
|
||||
ParameterInfo[] parameters = p_info.GetIndexParameters ();
|
||||
|
||||
if (parameters.Length != 1)
|
||||
continue;
|
||||
|
||||
if (parameters[0].ParameterType == typeof (string))
|
||||
data.ElementType = p_info.PropertyType;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
PropertyMetadata p_data = new PropertyMetadata ();
|
||||
p_data.Info = p_info;
|
||||
p_data.Type = p_info.PropertyType;
|
||||
|
||||
data.Properties.Add (p_info.Name, p_data);
|
||||
}
|
||||
|
||||
foreach (FieldInfo f_info in type.GetFields ()) {
|
||||
PropertyMetadata p_data = new PropertyMetadata ();
|
||||
p_data.Info = f_info;
|
||||
p_data.IsField = true;
|
||||
p_data.Type = f_info.FieldType;
|
||||
|
||||
data.Properties.Add (f_info.Name, p_data);
|
||||
}
|
||||
|
||||
lock (object_metadata_lock) {
|
||||
try {
|
||||
object_metadata.Add (type, data);
|
||||
} catch (ArgumentException err) {
|
||||
LogNet.LogisTrac.WriteLog(typeof(JsonMapper), err);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddTypeProperties (Type type)
|
||||
{
|
||||
if (type_properties.ContainsKey (type))
|
||||
return;
|
||||
|
||||
IList<PropertyMetadata> props = new List<PropertyMetadata> ();
|
||||
|
||||
foreach (PropertyInfo p_info in type.GetProperties ()) {
|
||||
if (p_info.Name == "Item")
|
||||
continue;
|
||||
|
||||
PropertyMetadata p_data = new PropertyMetadata ();
|
||||
p_data.Info = p_info;
|
||||
p_data.IsField = false;
|
||||
props.Add (p_data);
|
||||
}
|
||||
|
||||
foreach (FieldInfo f_info in type.GetFields ()) {
|
||||
PropertyMetadata p_data = new PropertyMetadata ();
|
||||
p_data.Info = f_info;
|
||||
p_data.IsField = true;
|
||||
|
||||
props.Add (p_data);
|
||||
}
|
||||
|
||||
lock (type_properties_lock) {
|
||||
try {
|
||||
type_properties.Add (type, props);
|
||||
} catch (ArgumentException err) {
|
||||
LogNet.LogisTrac.WriteLog(typeof(JsonMapper), err);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static MethodInfo GetConvOp (Type t1, Type t2)
|
||||
{
|
||||
lock (conv_ops_lock) {
|
||||
if (! conv_ops.ContainsKey (t1))
|
||||
conv_ops.Add (t1, new Dictionary<Type, MethodInfo> ());
|
||||
}
|
||||
|
||||
if (conv_ops[t1].ContainsKey (t2))
|
||||
return conv_ops[t1][t2];
|
||||
|
||||
MethodInfo op = t1.GetMethod (
|
||||
"op_Implicit", new Type[] { t2 });
|
||||
|
||||
lock (conv_ops_lock) {
|
||||
try {
|
||||
conv_ops[t1].Add (t2, op);
|
||||
} catch (ArgumentException err) {
|
||||
LogNet.LogisTrac.WriteLog(typeof(JsonMapper), err);
|
||||
|
||||
return conv_ops[t1][t2];
|
||||
}
|
||||
}
|
||||
|
||||
return op;
|
||||
}
|
||||
|
||||
private static object ReadValue (Type inst_type, JsonReader reader)
|
||||
{
|
||||
reader.Read ();
|
||||
|
||||
if (reader.Token == JsonToken.ArrayEnd)
|
||||
return null;
|
||||
|
||||
Type underlying_type = Nullable.GetUnderlyingType(inst_type);
|
||||
Type value_type = underlying_type ?? inst_type;
|
||||
|
||||
if (reader.Token == JsonToken.Null) {
|
||||
#if NETSTANDARD1_5
|
||||
if (inst_type.IsClass() || underlying_type != null) {
|
||||
return null;
|
||||
}
|
||||
#else
|
||||
if (inst_type.IsClass || underlying_type != null) {
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
|
||||
throw new JsonException (String.Format (
|
||||
"Can't assign null to an instance of type {0}",
|
||||
inst_type));
|
||||
}
|
||||
|
||||
if (reader.Token == JsonToken.Double ||
|
||||
reader.Token == JsonToken.Int ||
|
||||
reader.Token == JsonToken.Long ||
|
||||
reader.Token == JsonToken.String ||
|
||||
reader.Token == JsonToken.Boolean) {
|
||||
|
||||
Type json_type = reader.Value.GetType ();
|
||||
|
||||
if (value_type.IsAssignableFrom (json_type))
|
||||
return reader.Value;
|
||||
|
||||
// If there's a custom importer that fits, use it
|
||||
if (custom_importers_table.ContainsKey (json_type) &&
|
||||
custom_importers_table[json_type].ContainsKey (
|
||||
value_type)) {
|
||||
|
||||
ImporterFunc importer =
|
||||
custom_importers_table[json_type][value_type];
|
||||
|
||||
return importer (reader.Value);
|
||||
}
|
||||
|
||||
// Maybe there's a base importer that works
|
||||
if (base_importers_table.ContainsKey (json_type) &&
|
||||
base_importers_table[json_type].ContainsKey (
|
||||
value_type)) {
|
||||
|
||||
ImporterFunc importer =
|
||||
base_importers_table[json_type][value_type];
|
||||
|
||||
return importer (reader.Value);
|
||||
}
|
||||
|
||||
// Maybe it's an enum
|
||||
#if NETSTANDARD1_5
|
||||
if (value_type.IsEnum())
|
||||
return Enum.ToObject (value_type, reader.Value);
|
||||
#else
|
||||
if (value_type.IsEnum)
|
||||
return Enum.ToObject (value_type, reader.Value);
|
||||
#endif
|
||||
// Try using an implicit conversion operator
|
||||
MethodInfo conv_op = GetConvOp (value_type, json_type);
|
||||
|
||||
if (conv_op != null)
|
||||
return conv_op.Invoke (null,
|
||||
new object[] { reader.Value });
|
||||
|
||||
// No luck
|
||||
throw new JsonException (String.Format (
|
||||
"Can't assign value '{0}' (type {1}) to type {2}",
|
||||
reader.Value, json_type, inst_type));
|
||||
}
|
||||
|
||||
object instance = null;
|
||||
|
||||
if (reader.Token == JsonToken.ArrayStart) {
|
||||
|
||||
AddArrayMetadata (inst_type);
|
||||
ArrayMetadata t_data = array_metadata[inst_type];
|
||||
|
||||
if (! t_data.IsArray && ! t_data.IsList)
|
||||
throw new JsonException (String.Format (
|
||||
"Type {0} can't act as an array",
|
||||
inst_type));
|
||||
|
||||
IList list;
|
||||
Type elem_type;
|
||||
|
||||
if (! t_data.IsArray) {
|
||||
list = (IList) Activator.CreateInstance (inst_type);
|
||||
elem_type = t_data.ElementType;
|
||||
} else {
|
||||
list = new ArrayList ();
|
||||
elem_type = inst_type.GetElementType ();
|
||||
}
|
||||
|
||||
while (true) {
|
||||
object item = ReadValue (elem_type, reader);
|
||||
if (item == null && reader.Token == JsonToken.ArrayEnd)
|
||||
break;
|
||||
|
||||
list.Add (item);
|
||||
}
|
||||
|
||||
if (t_data.IsArray) {
|
||||
int n = list.Count;
|
||||
instance = Array.CreateInstance (elem_type, n);
|
||||
|
||||
for (int i = 0; i < n; i++)
|
||||
((Array) instance).SetValue (list[i], i);
|
||||
} else
|
||||
instance = list;
|
||||
|
||||
} else if (reader.Token == JsonToken.ObjectStart) {
|
||||
AddObjectMetadata (value_type);
|
||||
ObjectMetadata t_data = object_metadata[value_type];
|
||||
|
||||
instance = Activator.CreateInstance (value_type);
|
||||
|
||||
while (true) {
|
||||
reader.Read ();
|
||||
|
||||
if (reader.Token == JsonToken.ObjectEnd)
|
||||
break;
|
||||
|
||||
string property = (string) reader.Value;
|
||||
|
||||
if (t_data.Properties.ContainsKey (property)) {
|
||||
PropertyMetadata prop_data =
|
||||
t_data.Properties[property];
|
||||
|
||||
if (prop_data.IsField) {
|
||||
((FieldInfo) prop_data.Info).SetValue (
|
||||
instance, ReadValue (prop_data.Type, reader));
|
||||
} else {
|
||||
PropertyInfo p_info =
|
||||
(PropertyInfo) prop_data.Info;
|
||||
|
||||
if (p_info.CanWrite)
|
||||
p_info.SetValue (
|
||||
instance,
|
||||
ReadValue (prop_data.Type, reader),
|
||||
null);
|
||||
else
|
||||
ReadValue (prop_data.Type, reader);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (! t_data.IsDictionary) {
|
||||
|
||||
if (! reader.SkipNonMembers) {
|
||||
throw new JsonException (String.Format (
|
||||
"The type {0} doesn't have the " +
|
||||
"property '{1}'",
|
||||
inst_type, property));
|
||||
} else {
|
||||
ReadSkip (reader);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
((IDictionary) instance).Add (
|
||||
property, ReadValue (
|
||||
t_data.ElementType, reader));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
private static IJsonWrapper ReadValue (WrapperFactory factory,
|
||||
JsonReader reader)
|
||||
{
|
||||
reader.Read ();
|
||||
|
||||
if (reader.Token == JsonToken.ArrayEnd ||
|
||||
reader.Token == JsonToken.Null)
|
||||
return null;
|
||||
|
||||
IJsonWrapper instance = factory ();
|
||||
|
||||
if (reader.Token == JsonToken.String) {
|
||||
instance.SetString ((string) reader.Value);
|
||||
return instance;
|
||||
}
|
||||
|
||||
if (reader.Token == JsonToken.Double) {
|
||||
instance.SetDouble ((double) reader.Value);
|
||||
return instance;
|
||||
}
|
||||
|
||||
if (reader.Token == JsonToken.Int) {
|
||||
instance.SetInt ((int) reader.Value);
|
||||
return instance;
|
||||
}
|
||||
|
||||
if (reader.Token == JsonToken.Long) {
|
||||
instance.SetLong ((long) reader.Value);
|
||||
return instance;
|
||||
}
|
||||
|
||||
if (reader.Token == JsonToken.Boolean) {
|
||||
instance.SetBoolean ((bool) reader.Value);
|
||||
return instance;
|
||||
}
|
||||
|
||||
if (reader.Token == JsonToken.ArrayStart) {
|
||||
instance.SetJsonType (JsonType.Array);
|
||||
|
||||
while (true) {
|
||||
IJsonWrapper item = ReadValue (factory, reader);
|
||||
if (item == null && reader.Token == JsonToken.ArrayEnd)
|
||||
break;
|
||||
|
||||
((IList) instance).Add (item);
|
||||
}
|
||||
}
|
||||
else if (reader.Token == JsonToken.ObjectStart) {
|
||||
instance.SetJsonType (JsonType.Object);
|
||||
|
||||
while (true) {
|
||||
reader.Read ();
|
||||
|
||||
if (reader.Token == JsonToken.ObjectEnd)
|
||||
break;
|
||||
|
||||
string property = (string) reader.Value;
|
||||
|
||||
((IDictionary) instance)[property] = ReadValue (
|
||||
factory, reader);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
private static void ReadSkip (JsonReader reader)
|
||||
{
|
||||
ToWrapper (
|
||||
delegate { return new JsonMockWrapper (); }, reader);
|
||||
}
|
||||
|
||||
private static void RegisterBaseExporters ()
|
||||
{
|
||||
base_exporters_table[typeof (byte)] =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
writer.Write (Convert.ToInt32 ((byte) obj));
|
||||
};
|
||||
|
||||
base_exporters_table[typeof (char)] =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
writer.Write (Convert.ToString ((char) obj));
|
||||
};
|
||||
|
||||
base_exporters_table[typeof (DateTime)] =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
writer.Write (Convert.ToString ((DateTime) obj,
|
||||
datetime_format));
|
||||
};
|
||||
|
||||
base_exporters_table[typeof (decimal)] =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
writer.Write ((decimal) obj);
|
||||
};
|
||||
|
||||
base_exporters_table[typeof (sbyte)] =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
writer.Write (Convert.ToInt32 ((sbyte) obj));
|
||||
};
|
||||
|
||||
base_exporters_table[typeof (short)] =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
writer.Write (Convert.ToInt32 ((short) obj));
|
||||
};
|
||||
|
||||
base_exporters_table[typeof (ushort)] =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
writer.Write (Convert.ToInt32 ((ushort) obj));
|
||||
};
|
||||
|
||||
base_exporters_table[typeof (uint)] =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
writer.Write (Convert.ToUInt64 ((uint) obj));
|
||||
};
|
||||
|
||||
base_exporters_table[typeof (ulong)] =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
writer.Write ((ulong) obj);
|
||||
};
|
||||
}
|
||||
|
||||
private static void RegisterBaseImporters ()
|
||||
{
|
||||
ImporterFunc importer;
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToByte ((int) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (int),
|
||||
typeof (byte), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToUInt64 ((int) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (int),
|
||||
typeof (ulong), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToInt64((int)input);
|
||||
};
|
||||
RegisterImporter(base_importers_table, typeof(int),
|
||||
typeof(long), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToSByte ((int) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (int),
|
||||
typeof (sbyte), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToInt16 ((int) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (int),
|
||||
typeof (short), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToUInt16 ((int) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (int),
|
||||
typeof (ushort), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToUInt32 ((int) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (int),
|
||||
typeof (uint), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToSingle ((int) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (int),
|
||||
typeof (float), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToDouble ((int) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (int),
|
||||
typeof (double), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToDecimal ((double) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (double),
|
||||
typeof (decimal), importer);
|
||||
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToUInt32 ((long) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (long),
|
||||
typeof (uint), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToChar ((string) input);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (string),
|
||||
typeof (char), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return Convert.ToDateTime ((string) input, datetime_format);
|
||||
};
|
||||
RegisterImporter (base_importers_table, typeof (string),
|
||||
typeof (DateTime), importer);
|
||||
|
||||
importer = delegate (object input) {
|
||||
return DateTimeOffset.Parse((string)input, datetime_format);
|
||||
};
|
||||
RegisterImporter(base_importers_table, typeof(string),
|
||||
typeof(DateTimeOffset), importer);
|
||||
}
|
||||
|
||||
private static void RegisterImporter (
|
||||
IDictionary<Type, IDictionary<Type, ImporterFunc>> table,
|
||||
Type json_type, Type value_type, ImporterFunc importer)
|
||||
{
|
||||
if (! table.ContainsKey (json_type))
|
||||
table.Add (json_type, new Dictionary<Type, ImporterFunc> ());
|
||||
|
||||
table[json_type][value_type] = importer;
|
||||
}
|
||||
|
||||
private static void WriteValue (object obj, JsonWriter writer,
|
||||
bool writer_is_private,
|
||||
int depth)
|
||||
{
|
||||
if (depth > max_nesting_depth)
|
||||
throw new JsonException (
|
||||
String.Format ("Max allowed object depth reached while " +
|
||||
"trying to export from type {0}",
|
||||
obj.GetType ()));
|
||||
|
||||
if (obj == null) {
|
||||
writer.Write (null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is IJsonWrapper) {
|
||||
if (writer_is_private)
|
||||
writer.TextWriter.Write (((IJsonWrapper) obj).ToJson ());
|
||||
else
|
||||
((IJsonWrapper) obj).ToJson (writer);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is String) {
|
||||
writer.Write ((string) obj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is Double) {
|
||||
writer.Write ((double) obj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is Int32) {
|
||||
writer.Write ((int) obj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is Boolean) {
|
||||
writer.Write ((bool) obj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is Int64) {
|
||||
writer.Write ((long) obj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is Array) {
|
||||
writer.WriteArrayStart ();
|
||||
|
||||
foreach (object elem in (Array) obj)
|
||||
WriteValue (elem, writer, writer_is_private, depth + 1);
|
||||
|
||||
writer.WriteArrayEnd ();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is IList) {
|
||||
writer.WriteArrayStart ();
|
||||
foreach (object elem in (IList) obj)
|
||||
WriteValue (elem, writer, writer_is_private, depth + 1);
|
||||
writer.WriteArrayEnd ();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is IDictionary) {
|
||||
writer.WriteObjectStart ();
|
||||
foreach (DictionaryEntry entry in (IDictionary) obj) {
|
||||
writer.WritePropertyName ((string) entry.Key);
|
||||
WriteValue (entry.Value, writer, writer_is_private,
|
||||
depth + 1);
|
||||
}
|
||||
writer.WriteObjectEnd ();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Type obj_type = obj.GetType ();
|
||||
|
||||
// See if there's a custom exporter for the object
|
||||
if (custom_exporters_table.ContainsKey (obj_type)) {
|
||||
ExporterFunc exporter = custom_exporters_table[obj_type];
|
||||
exporter (obj, writer);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// If not, maybe there's a base exporter
|
||||
if (base_exporters_table.ContainsKey (obj_type)) {
|
||||
ExporterFunc exporter = base_exporters_table[obj_type];
|
||||
exporter (obj, writer);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Last option, let's see if it's an enum
|
||||
if (obj is Enum) {
|
||||
Type e_type = Enum.GetUnderlyingType (obj_type);
|
||||
|
||||
if (e_type == typeof (long)
|
||||
|| e_type == typeof (uint)
|
||||
|| e_type == typeof (ulong))
|
||||
writer.Write ((ulong) obj);
|
||||
else
|
||||
writer.Write ((int) obj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Okay, so it looks like the input should be exported as an
|
||||
// object
|
||||
AddTypeProperties (obj_type);
|
||||
IList<PropertyMetadata> props = type_properties[obj_type];
|
||||
|
||||
writer.WriteObjectStart ();
|
||||
foreach (PropertyMetadata p_data in props) {
|
||||
if (p_data.IsField) {
|
||||
writer.WritePropertyName (p_data.Info.Name);
|
||||
WriteValue (((FieldInfo) p_data.Info).GetValue (obj),
|
||||
writer, writer_is_private, depth + 1);
|
||||
}
|
||||
else {
|
||||
PropertyInfo p_info = (PropertyInfo) p_data.Info;
|
||||
|
||||
if (p_info.CanRead) {
|
||||
writer.WritePropertyName (p_data.Info.Name);
|
||||
WriteValue (p_info.GetValue (obj, null),
|
||||
writer, writer_is_private, depth + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
writer.WriteObjectEnd ();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
public static string ToJson (object obj)
|
||||
{
|
||||
lock (static_writer_lock) {
|
||||
static_writer.Reset ();
|
||||
|
||||
WriteValue (obj, static_writer, true, 0);
|
||||
|
||||
return static_writer.ToString ();
|
||||
}
|
||||
}
|
||||
|
||||
public static void ToJson (object obj, JsonWriter writer)
|
||||
{
|
||||
WriteValue (obj, writer, false, 0);
|
||||
}
|
||||
|
||||
public static JsonData ToObject (JsonReader reader)
|
||||
{
|
||||
return (JsonData) ToWrapper (
|
||||
delegate { return new JsonData (); }, reader);
|
||||
}
|
||||
|
||||
public static JsonData ToObject (TextReader reader)
|
||||
{
|
||||
JsonReader json_reader = new JsonReader (reader);
|
||||
|
||||
return (JsonData) ToWrapper (
|
||||
delegate { return new JsonData (); }, json_reader);
|
||||
}
|
||||
|
||||
public static JsonData ToObject (string json)
|
||||
{
|
||||
return (JsonData) ToWrapper (
|
||||
delegate { return new JsonData (); }, json);
|
||||
}
|
||||
|
||||
public static T ToObject<T> (JsonReader reader)
|
||||
{
|
||||
return (T) ReadValue (typeof (T), reader);
|
||||
}
|
||||
|
||||
public static T ToObject<T> (TextReader reader)
|
||||
{
|
||||
JsonReader json_reader = new JsonReader (reader);
|
||||
|
||||
return (T) ReadValue (typeof (T), json_reader);
|
||||
}
|
||||
|
||||
public static T ToObject<T> (string json)
|
||||
{
|
||||
JsonReader reader = new JsonReader (json);
|
||||
|
||||
return (T) ReadValue (typeof (T), reader);
|
||||
}
|
||||
|
||||
public static object ToObject(string json, Type ConvertType )
|
||||
{
|
||||
JsonReader reader = new JsonReader(json);
|
||||
|
||||
return ReadValue(ConvertType, reader);
|
||||
}
|
||||
|
||||
public static IJsonWrapper ToWrapper (WrapperFactory factory,
|
||||
JsonReader reader)
|
||||
{
|
||||
return ReadValue (factory, reader);
|
||||
}
|
||||
|
||||
public static IJsonWrapper ToWrapper (WrapperFactory factory,
|
||||
string json)
|
||||
{
|
||||
JsonReader reader = new JsonReader (json);
|
||||
|
||||
return ReadValue (factory, reader);
|
||||
}
|
||||
|
||||
public static void RegisterExporter<T> (ExporterFunc<T> exporter)
|
||||
{
|
||||
ExporterFunc exporter_wrapper =
|
||||
delegate (object obj, JsonWriter writer) {
|
||||
exporter ((T) obj, writer);
|
||||
};
|
||||
|
||||
custom_exporters_table[typeof (T)] = exporter_wrapper;
|
||||
}
|
||||
|
||||
public static void RegisterImporter<TJson, TValue> (
|
||||
ImporterFunc<TJson, TValue> importer)
|
||||
{
|
||||
ImporterFunc importer_wrapper =
|
||||
delegate (object input) {
|
||||
return importer ((TJson) input);
|
||||
};
|
||||
|
||||
RegisterImporter (custom_importers_table, typeof (TJson),
|
||||
typeof (TValue), importer_wrapper);
|
||||
}
|
||||
|
||||
public static void UnregisterExporters ()
|
||||
{
|
||||
custom_exporters_table.Clear ();
|
||||
}
|
||||
|
||||
public static void UnregisterImporters ()
|
||||
{
|
||||
custom_importers_table.Clear ();
|
||||
}
|
||||
}
|
||||
}
|
||||
105
DataMirrorTools_Simulator/ModelBasic/OJson/JsonMockWrapper.cs
Normal file
105
DataMirrorTools_Simulator/ModelBasic/OJson/JsonMockWrapper.cs
Normal file
@@ -0,0 +1,105 @@
|
||||
#region Header
|
||||
/**
|
||||
* JsonMockWrapper.cs
|
||||
* Mock object implementing IJsonWrapper, to facilitate actions like
|
||||
* skipping data more efficiently.
|
||||
*
|
||||
* The authors disclaim copyright to this source code. For more details, see
|
||||
* the COPYING file included with this distribution.
|
||||
**/
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
|
||||
namespace LitJson
|
||||
{
|
||||
public class JsonMockWrapper : IJsonWrapper
|
||||
{
|
||||
public bool IsArray { get { return false; } }
|
||||
public bool IsBoolean { get { return false; } }
|
||||
public bool IsDouble { get { return false; } }
|
||||
public bool IsInt { get { return false; } }
|
||||
public bool IsLong { get { return false; } }
|
||||
public bool IsObject { get { return false; } }
|
||||
public bool IsString { get { return false; } }
|
||||
|
||||
public bool GetBoolean () { return false; }
|
||||
public double GetDouble () { return 0.0; }
|
||||
public int GetInt () { return 0; }
|
||||
public JsonType GetJsonType () { return JsonType.None; }
|
||||
public long GetLong () { return 0L; }
|
||||
public string GetString () { return ""; }
|
||||
|
||||
public void SetBoolean (bool val) {}
|
||||
public void SetDouble (double val) {}
|
||||
public void SetInt (int val) {}
|
||||
public void SetJsonType (JsonType type) {}
|
||||
public void SetLong (long val) {}
|
||||
public void SetString (string val) {}
|
||||
|
||||
public string ToJson () { return ""; }
|
||||
public void ToJson (JsonWriter writer) {}
|
||||
|
||||
|
||||
bool IList.IsFixedSize { get { return true; } }
|
||||
bool IList.IsReadOnly { get { return true; } }
|
||||
|
||||
object IList.this[int index] {
|
||||
get { return null; }
|
||||
set {}
|
||||
}
|
||||
|
||||
int IList.Add (object value) { return 0; }
|
||||
void IList.Clear () {}
|
||||
bool IList.Contains (object value) { return false; }
|
||||
int IList.IndexOf (object value) { return -1; }
|
||||
void IList.Insert (int i, object v) {}
|
||||
void IList.Remove (object value) {}
|
||||
void IList.RemoveAt (int index) {}
|
||||
|
||||
|
||||
int ICollection.Count { get { return 0; } }
|
||||
bool ICollection.IsSynchronized { get { return false; } }
|
||||
object ICollection.SyncRoot { get { return null; } }
|
||||
|
||||
void ICollection.CopyTo (Array array, int index) {}
|
||||
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator () { return null; }
|
||||
|
||||
|
||||
bool IDictionary.IsFixedSize { get { return true; } }
|
||||
bool IDictionary.IsReadOnly { get { return true; } }
|
||||
|
||||
ICollection IDictionary.Keys { get { return null; } }
|
||||
ICollection IDictionary.Values { get { return null; } }
|
||||
|
||||
object IDictionary.this[object key] {
|
||||
get { return null; }
|
||||
set {}
|
||||
}
|
||||
|
||||
void IDictionary.Add (object k, object v) {}
|
||||
void IDictionary.Clear () {}
|
||||
bool IDictionary.Contains (object key) { return false; }
|
||||
void IDictionary.Remove (object key) {}
|
||||
|
||||
IDictionaryEnumerator IDictionary.GetEnumerator () { return null; }
|
||||
|
||||
|
||||
object IOrderedDictionary.this[int idx] {
|
||||
get { return null; }
|
||||
set {}
|
||||
}
|
||||
|
||||
IDictionaryEnumerator IOrderedDictionary.GetEnumerator () {
|
||||
return null;
|
||||
}
|
||||
void IOrderedDictionary.Insert (int i, object k, object v) {}
|
||||
void IOrderedDictionary.RemoveAt (int i) {}
|
||||
}
|
||||
}
|
||||
480
DataMirrorTools_Simulator/ModelBasic/OJson/JsonReader.cs
Normal file
480
DataMirrorTools_Simulator/ModelBasic/OJson/JsonReader.cs
Normal file
@@ -0,0 +1,480 @@
|
||||
#region Header
|
||||
/**
|
||||
* JsonReader.cs
|
||||
* Stream-like access to JSON text.
|
||||
*
|
||||
* The authors disclaim copyright to this source code. For more details, see
|
||||
* the COPYING file included with this distribution.
|
||||
**/
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace LitJson
|
||||
{
|
||||
public enum JsonToken
|
||||
{
|
||||
None,
|
||||
|
||||
ObjectStart,
|
||||
PropertyName,
|
||||
ObjectEnd,
|
||||
|
||||
ArrayStart,
|
||||
ArrayEnd,
|
||||
|
||||
Int,
|
||||
Long,
|
||||
Double,
|
||||
|
||||
String,
|
||||
|
||||
Boolean,
|
||||
Null
|
||||
}
|
||||
|
||||
|
||||
public class JsonReader
|
||||
{
|
||||
#region Fields
|
||||
private static readonly IDictionary<int, IDictionary<int, int[]>> parse_table;
|
||||
|
||||
private Stack<int> automaton_stack;
|
||||
private int current_input;
|
||||
private int current_symbol;
|
||||
private bool end_of_json;
|
||||
private bool end_of_input;
|
||||
private Lexer lexer;
|
||||
private bool parser_in_string;
|
||||
private bool parser_return;
|
||||
private bool read_started;
|
||||
private TextReader reader;
|
||||
private bool reader_is_owned;
|
||||
private bool skip_non_members;
|
||||
private object token_value;
|
||||
private JsonToken token;
|
||||
#endregion
|
||||
|
||||
|
||||
#region Public Properties
|
||||
public bool AllowComments {
|
||||
get { return lexer.AllowComments; }
|
||||
set { lexer.AllowComments = value; }
|
||||
}
|
||||
|
||||
public bool AllowSingleQuotedStrings {
|
||||
get { return lexer.AllowSingleQuotedStrings; }
|
||||
set { lexer.AllowSingleQuotedStrings = value; }
|
||||
}
|
||||
|
||||
public bool SkipNonMembers {
|
||||
get { return skip_non_members; }
|
||||
set { skip_non_members = value; }
|
||||
}
|
||||
|
||||
public bool EndOfInput {
|
||||
get { return end_of_input; }
|
||||
}
|
||||
|
||||
public bool EndOfJson {
|
||||
get { return end_of_json; }
|
||||
}
|
||||
|
||||
public JsonToken Token {
|
||||
get { return token; }
|
||||
}
|
||||
|
||||
public object Value {
|
||||
get { return token_value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Constructors
|
||||
static JsonReader ()
|
||||
{
|
||||
parse_table = PopulateParseTable ();
|
||||
}
|
||||
|
||||
public JsonReader (string json_text) :
|
||||
this (new StringReader (json_text), true)
|
||||
{
|
||||
}
|
||||
|
||||
public JsonReader (TextReader reader) :
|
||||
this (reader, false)
|
||||
{
|
||||
}
|
||||
|
||||
private JsonReader (TextReader reader, bool owned)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new ArgumentNullException ("reader");
|
||||
|
||||
parser_in_string = false;
|
||||
parser_return = false;
|
||||
|
||||
read_started = false;
|
||||
automaton_stack = new Stack<int> ();
|
||||
automaton_stack.Push ((int) ParserToken.End);
|
||||
automaton_stack.Push ((int) ParserToken.Text);
|
||||
|
||||
lexer = new Lexer (reader);
|
||||
|
||||
end_of_input = false;
|
||||
end_of_json = false;
|
||||
|
||||
skip_non_members = true;
|
||||
|
||||
this.reader = reader;
|
||||
reader_is_owned = owned;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Static Methods
|
||||
private static IDictionary<int, IDictionary<int, int[]>> PopulateParseTable ()
|
||||
{
|
||||
// See section A.2. of the manual for details
|
||||
IDictionary<int, IDictionary<int, int[]>> parse_table = new Dictionary<int, IDictionary<int, int[]>> ();
|
||||
|
||||
TableAddRow (parse_table, ParserToken.Array);
|
||||
TableAddCol (parse_table, ParserToken.Array, '[',
|
||||
'[',
|
||||
(int) ParserToken.ArrayPrime);
|
||||
|
||||
TableAddRow (parse_table, ParserToken.ArrayPrime);
|
||||
TableAddCol (parse_table, ParserToken.ArrayPrime, '"',
|
||||
(int) ParserToken.Value,
|
||||
|
||||
(int) ParserToken.ValueRest,
|
||||
']');
|
||||
TableAddCol (parse_table, ParserToken.ArrayPrime, '[',
|
||||
(int) ParserToken.Value,
|
||||
(int) ParserToken.ValueRest,
|
||||
']');
|
||||
TableAddCol (parse_table, ParserToken.ArrayPrime, ']',
|
||||
']');
|
||||
TableAddCol (parse_table, ParserToken.ArrayPrime, '{',
|
||||
(int) ParserToken.Value,
|
||||
(int) ParserToken.ValueRest,
|
||||
']');
|
||||
TableAddCol (parse_table, ParserToken.ArrayPrime, (int) ParserToken.Number,
|
||||
(int) ParserToken.Value,
|
||||
(int) ParserToken.ValueRest,
|
||||
']');
|
||||
TableAddCol (parse_table, ParserToken.ArrayPrime, (int) ParserToken.True,
|
||||
(int) ParserToken.Value,
|
||||
(int) ParserToken.ValueRest,
|
||||
']');
|
||||
TableAddCol (parse_table, ParserToken.ArrayPrime, (int) ParserToken.False,
|
||||
(int) ParserToken.Value,
|
||||
(int) ParserToken.ValueRest,
|
||||
']');
|
||||
TableAddCol (parse_table, ParserToken.ArrayPrime, (int) ParserToken.Null,
|
||||
(int) ParserToken.Value,
|
||||
(int) ParserToken.ValueRest,
|
||||
']');
|
||||
|
||||
TableAddRow (parse_table, ParserToken.Object);
|
||||
TableAddCol (parse_table, ParserToken.Object, '{',
|
||||
'{',
|
||||
(int) ParserToken.ObjectPrime);
|
||||
|
||||
TableAddRow (parse_table, ParserToken.ObjectPrime);
|
||||
TableAddCol (parse_table, ParserToken.ObjectPrime, '"',
|
||||
(int) ParserToken.Pair,
|
||||
(int) ParserToken.PairRest,
|
||||
'}');
|
||||
TableAddCol (parse_table, ParserToken.ObjectPrime, '}',
|
||||
'}');
|
||||
|
||||
TableAddRow (parse_table, ParserToken.Pair);
|
||||
TableAddCol (parse_table, ParserToken.Pair, '"',
|
||||
(int) ParserToken.String,
|
||||
':',
|
||||
(int) ParserToken.Value);
|
||||
|
||||
TableAddRow (parse_table, ParserToken.PairRest);
|
||||
TableAddCol (parse_table, ParserToken.PairRest, ',',
|
||||
',',
|
||||
(int) ParserToken.Pair,
|
||||
(int) ParserToken.PairRest);
|
||||
TableAddCol (parse_table, ParserToken.PairRest, '}',
|
||||
(int) ParserToken.Epsilon);
|
||||
|
||||
TableAddRow (parse_table, ParserToken.String);
|
||||
TableAddCol (parse_table, ParserToken.String, '"',
|
||||
'"',
|
||||
(int) ParserToken.CharSeq,
|
||||
'"');
|
||||
|
||||
TableAddRow (parse_table, ParserToken.Text);
|
||||
TableAddCol (parse_table, ParserToken.Text, '[',
|
||||
(int) ParserToken.Array);
|
||||
TableAddCol (parse_table, ParserToken.Text, '{',
|
||||
(int) ParserToken.Object);
|
||||
|
||||
TableAddRow (parse_table, ParserToken.Value);
|
||||
TableAddCol (parse_table, ParserToken.Value, '"',
|
||||
(int) ParserToken.String);
|
||||
TableAddCol (parse_table, ParserToken.Value, '[',
|
||||
(int) ParserToken.Array);
|
||||
TableAddCol (parse_table, ParserToken.Value, '{',
|
||||
(int) ParserToken.Object);
|
||||
TableAddCol (parse_table, ParserToken.Value, (int) ParserToken.Number,
|
||||
(int) ParserToken.Number);
|
||||
TableAddCol (parse_table, ParserToken.Value, (int) ParserToken.True,
|
||||
(int) ParserToken.True);
|
||||
TableAddCol (parse_table, ParserToken.Value, (int) ParserToken.False,
|
||||
(int) ParserToken.False);
|
||||
TableAddCol (parse_table, ParserToken.Value, (int) ParserToken.Null,
|
||||
(int) ParserToken.Null);
|
||||
|
||||
TableAddRow (parse_table, ParserToken.ValueRest);
|
||||
TableAddCol (parse_table, ParserToken.ValueRest, ',',
|
||||
',',
|
||||
(int) ParserToken.Value,
|
||||
(int) ParserToken.ValueRest);
|
||||
TableAddCol (parse_table, ParserToken.ValueRest, ']',
|
||||
(int) ParserToken.Epsilon);
|
||||
|
||||
return parse_table;
|
||||
}
|
||||
|
||||
private static void TableAddCol (IDictionary<int, IDictionary<int, int[]>> parse_table, ParserToken row, int col,
|
||||
params int[] symbols)
|
||||
{
|
||||
parse_table[(int) row].Add (col, symbols);
|
||||
}
|
||||
|
||||
private static void TableAddRow (IDictionary<int, IDictionary<int, int[]>> parse_table, ParserToken rule)
|
||||
{
|
||||
parse_table.Add ((int) rule, new Dictionary<int, int[]> ());
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Private Methods
|
||||
private void ProcessNumber (string number)
|
||||
{
|
||||
if (number.IndexOf ('.') != -1 ||
|
||||
number.IndexOf ('e') != -1 ||
|
||||
number.IndexOf ('E') != -1) {
|
||||
|
||||
double n_double;
|
||||
if (double.TryParse (number, NumberStyles.Any, CultureInfo.InvariantCulture, out n_double)) {
|
||||
token = JsonToken.Double;
|
||||
token_value = n_double;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int n_int32;
|
||||
if (int.TryParse (number, NumberStyles.Integer, CultureInfo.InvariantCulture, out n_int32)) {
|
||||
token = JsonToken.Int;
|
||||
token_value = n_int32;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
long n_int64;
|
||||
if (long.TryParse (number, NumberStyles.Integer, CultureInfo.InvariantCulture, out n_int64)) {
|
||||
token = JsonToken.Long;
|
||||
token_value = n_int64;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ulong n_uint64;
|
||||
if (ulong.TryParse(number, NumberStyles.Integer, CultureInfo.InvariantCulture, out n_uint64))
|
||||
{
|
||||
token = JsonToken.Long;
|
||||
token_value = n_uint64;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Shouldn't happen, but just in case, return something
|
||||
token = JsonToken.Int;
|
||||
token_value = 0;
|
||||
}
|
||||
|
||||
private void ProcessSymbol ()
|
||||
{
|
||||
if (current_symbol == '[') {
|
||||
token = JsonToken.ArrayStart;
|
||||
parser_return = true;
|
||||
|
||||
} else if (current_symbol == ']') {
|
||||
token = JsonToken.ArrayEnd;
|
||||
parser_return = true;
|
||||
|
||||
} else if (current_symbol == '{') {
|
||||
token = JsonToken.ObjectStart;
|
||||
parser_return = true;
|
||||
|
||||
} else if (current_symbol == '}') {
|
||||
token = JsonToken.ObjectEnd;
|
||||
parser_return = true;
|
||||
|
||||
} else if (current_symbol == '"') {
|
||||
if (parser_in_string) {
|
||||
parser_in_string = false;
|
||||
|
||||
parser_return = true;
|
||||
|
||||
} else {
|
||||
if (token == JsonToken.None)
|
||||
token = JsonToken.String;
|
||||
|
||||
parser_in_string = true;
|
||||
}
|
||||
|
||||
} else if (current_symbol == (int) ParserToken.CharSeq) {
|
||||
token_value = lexer.StringValue;
|
||||
|
||||
} else if (current_symbol == (int) ParserToken.False) {
|
||||
token = JsonToken.Boolean;
|
||||
token_value = false;
|
||||
parser_return = true;
|
||||
|
||||
} else if (current_symbol == (int) ParserToken.Null) {
|
||||
token = JsonToken.Null;
|
||||
parser_return = true;
|
||||
|
||||
} else if (current_symbol == (int) ParserToken.Number) {
|
||||
ProcessNumber (lexer.StringValue);
|
||||
|
||||
parser_return = true;
|
||||
|
||||
} else if (current_symbol == (int) ParserToken.Pair) {
|
||||
token = JsonToken.PropertyName;
|
||||
|
||||
} else if (current_symbol == (int) ParserToken.True) {
|
||||
token = JsonToken.Boolean;
|
||||
token_value = true;
|
||||
parser_return = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private bool ReadToken ()
|
||||
{
|
||||
if (end_of_input)
|
||||
return false;
|
||||
|
||||
lexer.NextToken ();
|
||||
|
||||
if (lexer.EndOfInput) {
|
||||
Close ();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
current_input = lexer.Token;
|
||||
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
public void Close ()
|
||||
{
|
||||
if (end_of_input)
|
||||
return;
|
||||
|
||||
end_of_input = true;
|
||||
end_of_json = true;
|
||||
|
||||
if (reader_is_owned)
|
||||
{
|
||||
using(reader){}
|
||||
}
|
||||
|
||||
reader = null;
|
||||
}
|
||||
|
||||
public bool Read ()
|
||||
{
|
||||
if (end_of_input)
|
||||
return false;
|
||||
|
||||
if (end_of_json) {
|
||||
end_of_json = false;
|
||||
automaton_stack.Clear ();
|
||||
automaton_stack.Push ((int) ParserToken.End);
|
||||
automaton_stack.Push ((int) ParserToken.Text);
|
||||
}
|
||||
|
||||
parser_in_string = false;
|
||||
parser_return = false;
|
||||
|
||||
token = JsonToken.None;
|
||||
token_value = null;
|
||||
|
||||
if (! read_started) {
|
||||
read_started = true;
|
||||
|
||||
if (! ReadToken ())
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
int[] entry_symbols;
|
||||
|
||||
while (true) {
|
||||
if (parser_return) {
|
||||
if (automaton_stack.Peek () == (int) ParserToken.End)
|
||||
end_of_json = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
current_symbol = automaton_stack.Pop ();
|
||||
|
||||
ProcessSymbol ();
|
||||
|
||||
if (current_symbol == current_input) {
|
||||
if (! ReadToken ()) {
|
||||
if (automaton_stack.Peek () != (int) ParserToken.End)
|
||||
throw new JsonException (
|
||||
"Input doesn't evaluate to proper JSON text");
|
||||
|
||||
if (parser_return)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
entry_symbols =
|
||||
parse_table[current_symbol][current_input];
|
||||
|
||||
} catch (KeyNotFoundException e) {
|
||||
LogNet.LogisTrac.WriteLog(typeof(JsonMapper), e);
|
||||
|
||||
throw new JsonException ((ParserToken) current_input, e);
|
||||
}
|
||||
|
||||
if (entry_symbols[0] == (int) ParserToken.Epsilon)
|
||||
continue;
|
||||
|
||||
for (int i = entry_symbols.Length - 1; i >= 0; i--)
|
||||
automaton_stack.Push (entry_symbols[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
473
DataMirrorTools_Simulator/ModelBasic/OJson/JsonWriter.cs
Normal file
473
DataMirrorTools_Simulator/ModelBasic/OJson/JsonWriter.cs
Normal file
@@ -0,0 +1,473 @@
|
||||
#region Header
|
||||
/**
|
||||
* JsonWriter.cs
|
||||
* Stream-like facility to output JSON text.
|
||||
*
|
||||
* The authors disclaim copyright to this source code. For more details, see
|
||||
* the COPYING file included with this distribution.
|
||||
**/
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace LitJson
|
||||
{
|
||||
internal enum Condition
|
||||
{
|
||||
InArray,
|
||||
InObject,
|
||||
NotAProperty,
|
||||
Property,
|
||||
Value
|
||||
}
|
||||
|
||||
internal class WriterContext
|
||||
{
|
||||
public int Count;
|
||||
public bool InArray;
|
||||
public bool InObject;
|
||||
public bool ExpectingValue;
|
||||
public int Padding;
|
||||
}
|
||||
|
||||
public class JsonWriter
|
||||
{
|
||||
#region Fields
|
||||
private static readonly NumberFormatInfo number_format;
|
||||
|
||||
private WriterContext context;
|
||||
private Stack<WriterContext> ctx_stack;
|
||||
private bool has_reached_end;
|
||||
private char[] hex_seq;
|
||||
private int indentation;
|
||||
private int indent_value;
|
||||
private StringBuilder inst_string_builder;
|
||||
private bool pretty_print;
|
||||
private bool validate;
|
||||
private bool lower_case_properties;
|
||||
private TextWriter writer;
|
||||
#endregion
|
||||
|
||||
|
||||
#region Properties
|
||||
public int IndentValue {
|
||||
get { return indent_value; }
|
||||
set {
|
||||
indentation = (indentation / indent_value) * value;
|
||||
indent_value = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool PrettyPrint {
|
||||
get { return pretty_print; }
|
||||
set { pretty_print = value; }
|
||||
}
|
||||
|
||||
public TextWriter TextWriter {
|
||||
get { return writer; }
|
||||
}
|
||||
|
||||
public bool Validate {
|
||||
get { return validate; }
|
||||
set { validate = value; }
|
||||
}
|
||||
|
||||
public bool LowerCaseProperties {
|
||||
get { return lower_case_properties; }
|
||||
set { lower_case_properties = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Constructors
|
||||
static JsonWriter ()
|
||||
{
|
||||
number_format = NumberFormatInfo.InvariantInfo;
|
||||
}
|
||||
|
||||
public JsonWriter ()
|
||||
{
|
||||
inst_string_builder = new StringBuilder ();
|
||||
writer = new StringWriter (inst_string_builder);
|
||||
|
||||
Init ();
|
||||
}
|
||||
|
||||
public JsonWriter (StringBuilder sb) :
|
||||
this (new StringWriter (sb))
|
||||
{
|
||||
}
|
||||
|
||||
public JsonWriter (TextWriter writer)
|
||||
{
|
||||
if (writer == null)
|
||||
throw new ArgumentNullException ("writer");
|
||||
|
||||
this.writer = writer;
|
||||
|
||||
Init ();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Private Methods
|
||||
private void DoValidation (Condition cond)
|
||||
{
|
||||
if (! context.ExpectingValue)
|
||||
context.Count++;
|
||||
|
||||
if (! validate)
|
||||
return;
|
||||
|
||||
if (has_reached_end)
|
||||
throw new JsonException (
|
||||
"A complete JSON symbol has already been written");
|
||||
|
||||
switch (cond) {
|
||||
case Condition.InArray:
|
||||
if (! context.InArray)
|
||||
throw new JsonException (
|
||||
"Can't close an array here");
|
||||
break;
|
||||
|
||||
case Condition.InObject:
|
||||
if (! context.InObject || context.ExpectingValue)
|
||||
throw new JsonException (
|
||||
"Can't close an object here");
|
||||
break;
|
||||
|
||||
case Condition.NotAProperty:
|
||||
if (context.InObject && ! context.ExpectingValue)
|
||||
throw new JsonException (
|
||||
"Expected a property");
|
||||
break;
|
||||
|
||||
case Condition.Property:
|
||||
if (! context.InObject || context.ExpectingValue)
|
||||
throw new JsonException (
|
||||
"Can't add a property here");
|
||||
break;
|
||||
|
||||
case Condition.Value:
|
||||
if (! context.InArray &&
|
||||
(! context.InObject || ! context.ExpectingValue))
|
||||
throw new JsonException (
|
||||
"Can't add a value here");
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void Init ()
|
||||
{
|
||||
has_reached_end = false;
|
||||
hex_seq = new char[4];
|
||||
indentation = 0;
|
||||
indent_value = 4;
|
||||
pretty_print = false;
|
||||
validate = true;
|
||||
lower_case_properties = false;
|
||||
|
||||
ctx_stack = new Stack<WriterContext> ();
|
||||
context = new WriterContext ();
|
||||
ctx_stack.Push (context);
|
||||
}
|
||||
|
||||
private static void IntToHex (int n, char[] hex)
|
||||
{
|
||||
int num;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
num = n % 16;
|
||||
|
||||
if (num < 10)
|
||||
hex[3 - i] = (char) ('0' + num);
|
||||
else
|
||||
hex[3 - i] = (char) ('A' + (num - 10));
|
||||
|
||||
n >>= 4;
|
||||
}
|
||||
}
|
||||
|
||||
private void Indent ()
|
||||
{
|
||||
if (pretty_print)
|
||||
indentation += indent_value;
|
||||
}
|
||||
|
||||
|
||||
private void Put (string str)
|
||||
{
|
||||
if (pretty_print && ! context.ExpectingValue)
|
||||
for (int i = 0; i < indentation; i++)
|
||||
writer.Write (' ');
|
||||
|
||||
writer.Write (str);
|
||||
}
|
||||
|
||||
private void PutNewline ()
|
||||
{
|
||||
PutNewline (true);
|
||||
}
|
||||
|
||||
private void PutNewline (bool add_comma)
|
||||
{
|
||||
if (add_comma && ! context.ExpectingValue &&
|
||||
context.Count > 1)
|
||||
writer.Write (',');
|
||||
|
||||
if (pretty_print && ! context.ExpectingValue)
|
||||
writer.Write (Environment.NewLine);
|
||||
}
|
||||
|
||||
private void PutString (string str)
|
||||
{
|
||||
Put (String.Empty);
|
||||
|
||||
writer.Write ('"');
|
||||
|
||||
int n = str.Length;
|
||||
for (int i = 0; i < n; i++) {
|
||||
switch (str[i]) {
|
||||
case '\n':
|
||||
writer.Write ("\\n");
|
||||
continue;
|
||||
|
||||
case '\r':
|
||||
writer.Write ("\\r");
|
||||
continue;
|
||||
|
||||
case '\t':
|
||||
writer.Write ("\\t");
|
||||
continue;
|
||||
|
||||
case '"':
|
||||
case '\\':
|
||||
writer.Write ('\\');
|
||||
writer.Write (str[i]);
|
||||
continue;
|
||||
|
||||
case '\f':
|
||||
writer.Write ("\\f");
|
||||
continue;
|
||||
|
||||
case '\b':
|
||||
writer.Write ("\\b");
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((int) str[i] >= 32 && (int) str[i] <= 126) {
|
||||
writer.Write (str[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Default, turn into a \uXXXX sequence
|
||||
IntToHex ((int) str[i], hex_seq);
|
||||
writer.Write ("\\u");
|
||||
writer.Write (hex_seq);
|
||||
}
|
||||
|
||||
writer.Write ('"');
|
||||
}
|
||||
|
||||
private void Unindent ()
|
||||
{
|
||||
if (pretty_print)
|
||||
indentation -= indent_value;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
if (inst_string_builder == null)
|
||||
return String.Empty;
|
||||
|
||||
return inst_string_builder.ToString ();
|
||||
}
|
||||
|
||||
public void Reset ()
|
||||
{
|
||||
has_reached_end = false;
|
||||
|
||||
ctx_stack.Clear ();
|
||||
context = new WriterContext ();
|
||||
ctx_stack.Push (context);
|
||||
|
||||
if (inst_string_builder != null)
|
||||
inst_string_builder.Remove (0, inst_string_builder.Length);
|
||||
}
|
||||
|
||||
public void Write (bool boolean)
|
||||
{
|
||||
DoValidation (Condition.Value);
|
||||
PutNewline ();
|
||||
|
||||
Put (boolean ? "true" : "false");
|
||||
|
||||
context.ExpectingValue = false;
|
||||
}
|
||||
|
||||
public void Write (decimal number)
|
||||
{
|
||||
DoValidation (Condition.Value);
|
||||
PutNewline ();
|
||||
|
||||
Put (Convert.ToString (number, number_format));
|
||||
|
||||
context.ExpectingValue = false;
|
||||
}
|
||||
|
||||
public void Write (double number)
|
||||
{
|
||||
DoValidation (Condition.Value);
|
||||
PutNewline ();
|
||||
|
||||
string str = Convert.ToString (number, number_format);
|
||||
Put (str);
|
||||
|
||||
if (str.IndexOf ('.') == -1 &&
|
||||
str.IndexOf ('E') == -1)
|
||||
writer.Write (".0");
|
||||
|
||||
context.ExpectingValue = false;
|
||||
}
|
||||
|
||||
public void Write (int number)
|
||||
{
|
||||
DoValidation (Condition.Value);
|
||||
PutNewline ();
|
||||
|
||||
Put (Convert.ToString (number, number_format));
|
||||
|
||||
context.ExpectingValue = false;
|
||||
}
|
||||
|
||||
public void Write (long number)
|
||||
{
|
||||
DoValidation (Condition.Value);
|
||||
PutNewline ();
|
||||
|
||||
Put (Convert.ToString (number, number_format));
|
||||
|
||||
context.ExpectingValue = false;
|
||||
}
|
||||
|
||||
public void Write (string str)
|
||||
{
|
||||
DoValidation (Condition.Value);
|
||||
PutNewline ();
|
||||
|
||||
if (str == null)
|
||||
Put ("null");
|
||||
else
|
||||
PutString (str);
|
||||
|
||||
context.ExpectingValue = false;
|
||||
}
|
||||
|
||||
[CLSCompliant(false)]
|
||||
public void Write (ulong number)
|
||||
{
|
||||
DoValidation (Condition.Value);
|
||||
PutNewline ();
|
||||
|
||||
Put (Convert.ToString (number, number_format));
|
||||
|
||||
context.ExpectingValue = false;
|
||||
}
|
||||
|
||||
public void WriteArrayEnd ()
|
||||
{
|
||||
DoValidation (Condition.InArray);
|
||||
PutNewline (false);
|
||||
|
||||
ctx_stack.Pop ();
|
||||
if (ctx_stack.Count == 1)
|
||||
has_reached_end = true;
|
||||
else {
|
||||
context = ctx_stack.Peek ();
|
||||
context.ExpectingValue = false;
|
||||
}
|
||||
|
||||
Unindent ();
|
||||
Put ("]");
|
||||
}
|
||||
|
||||
public void WriteArrayStart ()
|
||||
{
|
||||
DoValidation (Condition.NotAProperty);
|
||||
PutNewline ();
|
||||
|
||||
Put ("[");
|
||||
|
||||
context = new WriterContext ();
|
||||
context.InArray = true;
|
||||
ctx_stack.Push (context);
|
||||
|
||||
Indent ();
|
||||
}
|
||||
|
||||
public void WriteObjectEnd ()
|
||||
{
|
||||
DoValidation (Condition.InObject);
|
||||
PutNewline (false);
|
||||
|
||||
ctx_stack.Pop ();
|
||||
if (ctx_stack.Count == 1)
|
||||
has_reached_end = true;
|
||||
else {
|
||||
context = ctx_stack.Peek ();
|
||||
context.ExpectingValue = false;
|
||||
}
|
||||
|
||||
Unindent ();
|
||||
Put ("}");
|
||||
}
|
||||
|
||||
public void WriteObjectStart ()
|
||||
{
|
||||
DoValidation (Condition.NotAProperty);
|
||||
PutNewline ();
|
||||
|
||||
Put ("{");
|
||||
|
||||
context = new WriterContext ();
|
||||
context.InObject = true;
|
||||
ctx_stack.Push (context);
|
||||
|
||||
Indent ();
|
||||
}
|
||||
|
||||
public void WritePropertyName (string property_name)
|
||||
{
|
||||
DoValidation (Condition.Property);
|
||||
PutNewline ();
|
||||
string propertyName = (property_name == null || !lower_case_properties)
|
||||
? property_name
|
||||
: property_name.ToLowerInvariant();
|
||||
|
||||
PutString (propertyName);
|
||||
|
||||
if (pretty_print) {
|
||||
if (propertyName.Length > context.Padding)
|
||||
context.Padding = propertyName.Length;
|
||||
|
||||
for (int i = context.Padding - propertyName.Length;
|
||||
i >= 0; i--)
|
||||
writer.Write (' ');
|
||||
|
||||
writer.Write (": ");
|
||||
} else
|
||||
writer.Write (':');
|
||||
|
||||
context.ExpectingValue = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
912
DataMirrorTools_Simulator/ModelBasic/OJson/Lexer.cs
Normal file
912
DataMirrorTools_Simulator/ModelBasic/OJson/Lexer.cs
Normal file
@@ -0,0 +1,912 @@
|
||||
#region Header
|
||||
/**
|
||||
* Lexer.cs
|
||||
* JSON lexer implementation based on a finite state machine.
|
||||
*
|
||||
* The authors disclaim copyright to this source code. For more details, see
|
||||
* the COPYING file included with this distribution.
|
||||
**/
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace LitJson
|
||||
{
|
||||
internal class FsmContext
|
||||
{
|
||||
public bool Return;
|
||||
public int NextState;
|
||||
public Lexer L;
|
||||
public int StateStack;
|
||||
}
|
||||
|
||||
|
||||
internal class Lexer
|
||||
{
|
||||
#region Fields
|
||||
private delegate bool StateHandler (FsmContext ctx);
|
||||
|
||||
private static readonly int[] fsm_return_table;
|
||||
private static readonly StateHandler[] fsm_handler_table;
|
||||
|
||||
private bool allow_comments;
|
||||
private bool allow_single_quoted_strings;
|
||||
private bool end_of_input;
|
||||
private FsmContext fsm_context;
|
||||
private int input_buffer;
|
||||
private int input_char;
|
||||
private TextReader reader;
|
||||
private int state;
|
||||
private StringBuilder string_buffer;
|
||||
private string string_value;
|
||||
private int token;
|
||||
private int unichar;
|
||||
#endregion
|
||||
|
||||
|
||||
#region Properties
|
||||
public bool AllowComments {
|
||||
get { return allow_comments; }
|
||||
set { allow_comments = value; }
|
||||
}
|
||||
|
||||
public bool AllowSingleQuotedStrings {
|
||||
get { return allow_single_quoted_strings; }
|
||||
set { allow_single_quoted_strings = value; }
|
||||
}
|
||||
|
||||
public bool EndOfInput {
|
||||
get { return end_of_input; }
|
||||
}
|
||||
|
||||
public int Token {
|
||||
get { return token; }
|
||||
}
|
||||
|
||||
public string StringValue {
|
||||
get { return string_value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Constructors
|
||||
static Lexer ()
|
||||
{
|
||||
PopulateFsmTables (out fsm_handler_table, out fsm_return_table);
|
||||
}
|
||||
|
||||
public Lexer (TextReader reader)
|
||||
{
|
||||
allow_comments = true;
|
||||
allow_single_quoted_strings = true;
|
||||
|
||||
input_buffer = 0;
|
||||
string_buffer = new StringBuilder (128);
|
||||
state = 1;
|
||||
end_of_input = false;
|
||||
this.reader = reader;
|
||||
|
||||
fsm_context = new FsmContext ();
|
||||
fsm_context.L = this;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Static Methods
|
||||
private static int HexValue (int digit)
|
||||
{
|
||||
switch (digit) {
|
||||
case 'a':
|
||||
case 'A':
|
||||
return 10;
|
||||
|
||||
case 'b':
|
||||
case 'B':
|
||||
return 11;
|
||||
|
||||
case 'c':
|
||||
case 'C':
|
||||
return 12;
|
||||
|
||||
case 'd':
|
||||
case 'D':
|
||||
return 13;
|
||||
|
||||
case 'e':
|
||||
case 'E':
|
||||
return 14;
|
||||
|
||||
case 'f':
|
||||
case 'F':
|
||||
return 15;
|
||||
|
||||
default:
|
||||
return digit - '0';
|
||||
}
|
||||
}
|
||||
|
||||
private static void PopulateFsmTables (out StateHandler[] fsm_handler_table, out int[] fsm_return_table)
|
||||
{
|
||||
// See section A.1. of the manual for details of the finite
|
||||
// state machine.
|
||||
fsm_handler_table = new StateHandler[28] {
|
||||
State1,
|
||||
State2,
|
||||
State3,
|
||||
State4,
|
||||
State5,
|
||||
State6,
|
||||
State7,
|
||||
State8,
|
||||
State9,
|
||||
State10,
|
||||
State11,
|
||||
State12,
|
||||
State13,
|
||||
State14,
|
||||
State15,
|
||||
State16,
|
||||
State17,
|
||||
State18,
|
||||
State19,
|
||||
State20,
|
||||
State21,
|
||||
State22,
|
||||
State23,
|
||||
State24,
|
||||
State25,
|
||||
State26,
|
||||
State27,
|
||||
State28
|
||||
};
|
||||
|
||||
fsm_return_table = new int[28] {
|
||||
(int) ParserToken.Char,
|
||||
0,
|
||||
(int) ParserToken.Number,
|
||||
(int) ParserToken.Number,
|
||||
0,
|
||||
(int) ParserToken.Number,
|
||||
0,
|
||||
(int) ParserToken.Number,
|
||||
0,
|
||||
0,
|
||||
(int) ParserToken.True,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(int) ParserToken.False,
|
||||
0,
|
||||
0,
|
||||
(int) ParserToken.Null,
|
||||
(int) ParserToken.CharSeq,
|
||||
(int) ParserToken.Char,
|
||||
0,
|
||||
0,
|
||||
(int) ParserToken.CharSeq,
|
||||
(int) ParserToken.Char,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
}
|
||||
|
||||
private static char ProcessEscChar (int esc_char)
|
||||
{
|
||||
switch (esc_char) {
|
||||
case '"':
|
||||
case '\'':
|
||||
case '\\':
|
||||
case '/':
|
||||
return Convert.ToChar (esc_char);
|
||||
|
||||
case 'n':
|
||||
return '\n';
|
||||
|
||||
case 't':
|
||||
return '\t';
|
||||
|
||||
case 'r':
|
||||
return '\r';
|
||||
|
||||
case 'b':
|
||||
return '\b';
|
||||
|
||||
case 'f':
|
||||
return '\f';
|
||||
|
||||
default:
|
||||
// Unreachable
|
||||
return '?';
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State1 (FsmContext ctx)
|
||||
{
|
||||
while (ctx.L.GetChar ()) {
|
||||
if (ctx.L.input_char == ' ' ||
|
||||
ctx.L.input_char >= '\t' && ctx.L.input_char <= '\r')
|
||||
continue;
|
||||
|
||||
if (ctx.L.input_char >= '1' && ctx.L.input_char <= '9') {
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 3;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case '"':
|
||||
ctx.NextState = 19;
|
||||
ctx.Return = true;
|
||||
return true;
|
||||
|
||||
case ',':
|
||||
case ':':
|
||||
case '[':
|
||||
case ']':
|
||||
case '{':
|
||||
case '}':
|
||||
ctx.NextState = 1;
|
||||
ctx.Return = true;
|
||||
return true;
|
||||
|
||||
case '-':
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 2;
|
||||
return true;
|
||||
|
||||
case '0':
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 4;
|
||||
return true;
|
||||
|
||||
case 'f':
|
||||
ctx.NextState = 12;
|
||||
return true;
|
||||
|
||||
case 'n':
|
||||
ctx.NextState = 16;
|
||||
return true;
|
||||
|
||||
case 't':
|
||||
ctx.NextState = 9;
|
||||
return true;
|
||||
|
||||
case '\'':
|
||||
if (! ctx.L.allow_single_quoted_strings)
|
||||
return false;
|
||||
|
||||
ctx.L.input_char = '"';
|
||||
ctx.NextState = 23;
|
||||
ctx.Return = true;
|
||||
return true;
|
||||
|
||||
case '/':
|
||||
if (! ctx.L.allow_comments)
|
||||
return false;
|
||||
|
||||
ctx.NextState = 25;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool State2 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
if (ctx.L.input_char >= '1' && ctx.L.input_char<= '9') {
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 3;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case '0':
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 4;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State3 (FsmContext ctx)
|
||||
{
|
||||
while (ctx.L.GetChar ()) {
|
||||
if (ctx.L.input_char >= '0' && ctx.L.input_char <= '9') {
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ctx.L.input_char == ' ' ||
|
||||
ctx.L.input_char >= '\t' && ctx.L.input_char <= '\r') {
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case ',':
|
||||
case ']':
|
||||
case '}':
|
||||
ctx.L.UngetChar ();
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
|
||||
case '.':
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 5;
|
||||
return true;
|
||||
|
||||
case 'e':
|
||||
case 'E':
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 7;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool State4 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
if (ctx.L.input_char == ' ' ||
|
||||
ctx.L.input_char >= '\t' && ctx.L.input_char <= '\r') {
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case ',':
|
||||
case ']':
|
||||
case '}':
|
||||
ctx.L.UngetChar ();
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
|
||||
case '.':
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 5;
|
||||
return true;
|
||||
|
||||
case 'e':
|
||||
case 'E':
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 7;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State5 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
if (ctx.L.input_char >= '0' && ctx.L.input_char <= '9') {
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 6;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool State6 (FsmContext ctx)
|
||||
{
|
||||
while (ctx.L.GetChar ()) {
|
||||
if (ctx.L.input_char >= '0' && ctx.L.input_char <= '9') {
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ctx.L.input_char == ' ' ||
|
||||
ctx.L.input_char >= '\t' && ctx.L.input_char <= '\r') {
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case ',':
|
||||
case ']':
|
||||
case '}':
|
||||
ctx.L.UngetChar ();
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
|
||||
case 'e':
|
||||
case 'E':
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 7;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool State7 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
if (ctx.L.input_char >= '0' && ctx.L.input_char<= '9') {
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 8;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case '+':
|
||||
case '-':
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
ctx.NextState = 8;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State8 (FsmContext ctx)
|
||||
{
|
||||
while (ctx.L.GetChar ()) {
|
||||
if (ctx.L.input_char >= '0' && ctx.L.input_char<= '9') {
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ctx.L.input_char == ' ' ||
|
||||
ctx.L.input_char >= '\t' && ctx.L.input_char<= '\r') {
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case ',':
|
||||
case ']':
|
||||
case '}':
|
||||
ctx.L.UngetChar ();
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool State9 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'r':
|
||||
ctx.NextState = 10;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State10 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'u':
|
||||
ctx.NextState = 11;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State11 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'e':
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State12 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'a':
|
||||
ctx.NextState = 13;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State13 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'l':
|
||||
ctx.NextState = 14;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State14 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 's':
|
||||
ctx.NextState = 15;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State15 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'e':
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State16 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'u':
|
||||
ctx.NextState = 17;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State17 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'l':
|
||||
ctx.NextState = 18;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State18 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'l':
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State19 (FsmContext ctx)
|
||||
{
|
||||
while (ctx.L.GetChar ()) {
|
||||
switch (ctx.L.input_char) {
|
||||
case '"':
|
||||
ctx.L.UngetChar ();
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 20;
|
||||
return true;
|
||||
|
||||
case '\\':
|
||||
ctx.StateStack = 19;
|
||||
ctx.NextState = 21;
|
||||
return true;
|
||||
|
||||
default:
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool State20 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case '"':
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State21 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case 'u':
|
||||
ctx.NextState = 22;
|
||||
return true;
|
||||
|
||||
case '"':
|
||||
case '\'':
|
||||
case '/':
|
||||
case '\\':
|
||||
case 'b':
|
||||
case 'f':
|
||||
case 'n':
|
||||
case 'r':
|
||||
case 't':
|
||||
ctx.L.string_buffer.Append (
|
||||
ProcessEscChar (ctx.L.input_char));
|
||||
ctx.NextState = ctx.StateStack;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State22 (FsmContext ctx)
|
||||
{
|
||||
int counter = 0;
|
||||
int mult = 4096;
|
||||
|
||||
ctx.L.unichar = 0;
|
||||
|
||||
while (ctx.L.GetChar ()) {
|
||||
|
||||
if (ctx.L.input_char >= '0' && ctx.L.input_char <= '9' ||
|
||||
ctx.L.input_char >= 'A' && ctx.L.input_char <= 'F' ||
|
||||
ctx.L.input_char >= 'a' && ctx.L.input_char <= 'f') {
|
||||
|
||||
ctx.L.unichar += HexValue (ctx.L.input_char) * mult;
|
||||
|
||||
counter++;
|
||||
mult /= 16;
|
||||
|
||||
if (counter == 4) {
|
||||
ctx.L.string_buffer.Append (
|
||||
Convert.ToChar (ctx.L.unichar));
|
||||
ctx.NextState = ctx.StateStack;
|
||||
return true;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool State23 (FsmContext ctx)
|
||||
{
|
||||
while (ctx.L.GetChar ()) {
|
||||
switch (ctx.L.input_char) {
|
||||
case '\'':
|
||||
ctx.L.UngetChar ();
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 24;
|
||||
return true;
|
||||
|
||||
case '\\':
|
||||
ctx.StateStack = 23;
|
||||
ctx.NextState = 21;
|
||||
return true;
|
||||
|
||||
default:
|
||||
ctx.L.string_buffer.Append ((char) ctx.L.input_char);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool State24 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case '\'':
|
||||
ctx.L.input_char = '"';
|
||||
ctx.Return = true;
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State25 (FsmContext ctx)
|
||||
{
|
||||
ctx.L.GetChar ();
|
||||
|
||||
switch (ctx.L.input_char) {
|
||||
case '*':
|
||||
ctx.NextState = 27;
|
||||
return true;
|
||||
|
||||
case '/':
|
||||
ctx.NextState = 26;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool State26 (FsmContext ctx)
|
||||
{
|
||||
while (ctx.L.GetChar ()) {
|
||||
if (ctx.L.input_char == '\n') {
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool State27 (FsmContext ctx)
|
||||
{
|
||||
while (ctx.L.GetChar ()) {
|
||||
if (ctx.L.input_char == '*') {
|
||||
ctx.NextState = 28;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool State28 (FsmContext ctx)
|
||||
{
|
||||
while (ctx.L.GetChar ()) {
|
||||
if (ctx.L.input_char == '*')
|
||||
continue;
|
||||
|
||||
if (ctx.L.input_char == '/') {
|
||||
ctx.NextState = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
ctx.NextState = 27;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
private bool GetChar ()
|
||||
{
|
||||
if ((input_char = NextChar ()) != -1)
|
||||
return true;
|
||||
|
||||
end_of_input = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private int NextChar ()
|
||||
{
|
||||
if (input_buffer != 0) {
|
||||
int tmp = input_buffer;
|
||||
input_buffer = 0;
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
return reader.Read ();
|
||||
}
|
||||
|
||||
public bool NextToken ()
|
||||
{
|
||||
StateHandler handler;
|
||||
fsm_context.Return = false;
|
||||
|
||||
while (true) {
|
||||
handler = fsm_handler_table[state - 1];
|
||||
|
||||
if (! handler (fsm_context))
|
||||
throw new JsonException (input_char);
|
||||
|
||||
if (end_of_input)
|
||||
return false;
|
||||
|
||||
if (fsm_context.Return) {
|
||||
string_value = string_buffer.ToString ();
|
||||
string_buffer.Remove (0, string_buffer.Length);
|
||||
token = fsm_return_table[state - 1];
|
||||
|
||||
if (token == (int) ParserToken.Char)
|
||||
token = input_char;
|
||||
|
||||
state = fsm_context.NextState;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
state = fsm_context.NextState;
|
||||
}
|
||||
}
|
||||
|
||||
private void UngetChar ()
|
||||
{
|
||||
input_buffer = input_char;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#if NETSTANDARD1_5
|
||||
using System;
|
||||
using System.Reflection;
|
||||
namespace LitJson
|
||||
{
|
||||
internal static class Netstandard15Polyfill
|
||||
{
|
||||
internal static Type GetInterface(this Type type, string name)
|
||||
{
|
||||
return type.GetTypeInfo().GetInterface(name);
|
||||
}
|
||||
|
||||
internal static bool IsClass(this Type type)
|
||||
{
|
||||
return type.GetTypeInfo().IsClass;
|
||||
}
|
||||
|
||||
internal static bool IsEnum(this Type type)
|
||||
{
|
||||
return type.GetTypeInfo().IsEnum;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
44
DataMirrorTools_Simulator/ModelBasic/OJson/ParserToken.cs
Normal file
44
DataMirrorTools_Simulator/ModelBasic/OJson/ParserToken.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
#region Header
|
||||
/**
|
||||
* ParserToken.cs
|
||||
* Internal representation of the tokens used by the lexer and the parser.
|
||||
*
|
||||
* The authors disclaim copyright to this source code. For more details, see
|
||||
* the COPYING file included with this distribution.
|
||||
**/
|
||||
#endregion
|
||||
|
||||
|
||||
namespace LitJson
|
||||
{
|
||||
internal enum ParserToken
|
||||
{
|
||||
// Lexer tokens (see section A.1.1. of the manual)
|
||||
None = System.Char.MaxValue + 1,
|
||||
Number,
|
||||
True,
|
||||
False,
|
||||
Null,
|
||||
CharSeq,
|
||||
// Single char
|
||||
Char,
|
||||
|
||||
// Parser Rules (see section A.2.1 of the manual)
|
||||
Text,
|
||||
Object,
|
||||
ObjectPrime,
|
||||
Pair,
|
||||
PairRest,
|
||||
Array,
|
||||
ArrayPrime,
|
||||
Value,
|
||||
ValueRest,
|
||||
String,
|
||||
|
||||
// End of input
|
||||
End,
|
||||
|
||||
// The empty rule
|
||||
Epsilon
|
||||
}
|
||||
}
|
||||
13
DataMirrorTools_Simulator/ModelBasic/Process/ProcessData.cs
Normal file
13
DataMirrorTools_Simulator/ModelBasic/Process/ProcessData.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ModelBasic.Process
|
||||
{
|
||||
public static class ProcessData
|
||||
{
|
||||
// 记录了当前选中的时序基点下的所有工艺
|
||||
public static List<string> currentSequenceList = new List<string>();
|
||||
|
||||
// 记录时序仿真下当前选中节点
|
||||
public static string currentSequenceNode = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("ModelBasic")]
|
||||
[assembly: AssemblyDescription("ModelBasic")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("MesWork")]
|
||||
[assembly: AssemblyProduct("ModelBasic")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("MesWork LOGO")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("b258f56f-59e9-4c6f-bcc0-04a151d51251")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("20.20.9.21")]
|
||||
@@ -0,0 +1,196 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BasicOperation.TreeNodeUtils
|
||||
{
|
||||
public class TreeNodeHelper
|
||||
{
|
||||
public static List<TreeNode> ToList(TreeNodeCollection nodes)
|
||||
{
|
||||
List<TreeNode> list = new List<TreeNode>();
|
||||
foreach (TreeNode node in ToIEnumerable(nodes))
|
||||
list.Add(node);
|
||||
return list;
|
||||
}
|
||||
public static IEnumerable<TreeNode> ToIEnumerable(TreeNodeCollection nodes)
|
||||
{
|
||||
foreach (TreeNode c1 in nodes)
|
||||
{
|
||||
yield return c1;
|
||||
foreach (TreeNode c2 in ToIEnumerable(c1.Nodes))
|
||||
{
|
||||
yield return c2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 找到更改的TreeNode 包括增加,删除,修改
|
||||
/// </summary>
|
||||
/// <param name="originNodes"></param>
|
||||
/// <param name="currentNodes"></param>
|
||||
/// <returns></returns>
|
||||
public static List<KeyValuePair<TreeNode, string>> FindModify(List<TreeNode> originNodes,List<TreeNode> currentNodes)
|
||||
{
|
||||
var res = new List<KeyValuePair<TreeNode, string>>();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 层次遍历树节点
|
||||
/// </summary>
|
||||
/// <param name="nodes"></param>
|
||||
public static void LevelTraversal(TreeNodeCollection nodes)
|
||||
{
|
||||
if (nodes == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var queue = new Queue<TreeNode>();
|
||||
foreach (TreeNode node in nodes)
|
||||
{
|
||||
queue.Enqueue(node);
|
||||
}
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
// 出队
|
||||
var one = queue.Dequeue();
|
||||
// 访问
|
||||
Debug.WriteLine(one.Level + " " + one.Text.ToString());
|
||||
// 子节点入队
|
||||
foreach (TreeNode subNode in one.Nodes)
|
||||
{
|
||||
queue.Enqueue(subNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void LevelTraversal(TreeNode node)
|
||||
{
|
||||
if (node == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var queue = new Queue<TreeNode>();
|
||||
|
||||
queue.Enqueue(node);
|
||||
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
// 出队
|
||||
var one = queue.Dequeue();
|
||||
// 访问
|
||||
Debug.WriteLine(one.Level + " " + one.Text.ToString());
|
||||
// 子节点入队
|
||||
foreach (TreeNode subNode in one.Nodes)
|
||||
{
|
||||
queue.Enqueue(subNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void LevelTraversalFunc(TreeNode node,Func<TreeNode,int> visitFunc)
|
||||
{
|
||||
if (node == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var queue = new Queue<TreeNode>();
|
||||
|
||||
queue.Enqueue(node);
|
||||
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
// 出队
|
||||
var one = queue.Dequeue();
|
||||
// 访问
|
||||
//Debug.WriteLine(one.Level + " " + one.Text.ToString());
|
||||
visitFunc(one);
|
||||
// 子节点入队
|
||||
foreach (TreeNode subNode in one.Nodes)
|
||||
{
|
||||
queue.Enqueue(subNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 深度非递归遍历树节点
|
||||
/// </summary>
|
||||
/// <param name="nodes"></param>
|
||||
public static List<TreeNode> DeepTraversal(TreeNodeCollection nodes)
|
||||
{
|
||||
var res = new List<TreeNode>();
|
||||
|
||||
if (nodes == null)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
||||
var stack = new Stack<TreeNode>();
|
||||
|
||||
// 倒序入栈
|
||||
for (int i = 0; i < nodes.Count; i++)
|
||||
{
|
||||
stack.Push(nodes[nodes.Count - i - 1]);
|
||||
}
|
||||
|
||||
while (stack.Count > 0)
|
||||
{
|
||||
// 出栈
|
||||
var oneNode = stack.Pop();
|
||||
|
||||
// 访问
|
||||
//Debug.WriteLine(oneNode.Level + " " + oneNode.Text.ToString());
|
||||
res.Add(oneNode);
|
||||
|
||||
// 倒序入栈
|
||||
for (int j = 0; j < oneNode.Nodes.Count; j++)
|
||||
{
|
||||
stack.Push(oneNode.Nodes[oneNode.Nodes.Count - j - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public static void DeepTraversal(TreeNode node)
|
||||
{
|
||||
if (node == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var stack = new Stack<TreeNode>();
|
||||
|
||||
|
||||
stack.Push(node);
|
||||
|
||||
|
||||
while (stack.Count > 0)
|
||||
{
|
||||
var oneNode = stack.Pop();
|
||||
|
||||
Debug.WriteLine(oneNode.Level + " " + oneNode.Text.ToString());
|
||||
|
||||
for (int j = 0; j < oneNode.Nodes.Count; j++)
|
||||
{
|
||||
stack.Push(oneNode.Nodes[oneNode.Nodes.Count - j - 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
60
DataMirrorTools_Simulator/ModelBasic/Version/VersionDescription.Designer.cs
generated
Normal file
60
DataMirrorTools_Simulator/ModelBasic/Version/VersionDescription.Designer.cs
generated
Normal file
@@ -0,0 +1,60 @@
|
||||
namespace DTTest
|
||||
{
|
||||
partial class VersionDescription
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.listBox_VersionDescription = new System.Windows.Forms.ListBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listBox_VersionDescription
|
||||
//
|
||||
this.listBox_VersionDescription.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listBox_VersionDescription.FormattingEnabled = true;
|
||||
this.listBox_VersionDescription.ItemHeight = 12;
|
||||
this.listBox_VersionDescription.Location = new System.Drawing.Point(0, 0);
|
||||
this.listBox_VersionDescription.Name = "listBox_VersionDescription";
|
||||
this.listBox_VersionDescription.Size = new System.Drawing.Size(1086, 569);
|
||||
this.listBox_VersionDescription.TabIndex = 0;
|
||||
//
|
||||
// VersionDescription
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1086, 569);
|
||||
this.Controls.Add(this.listBox_VersionDescription);
|
||||
this.Name = "VersionDescription";
|
||||
this.Text = "版本修改说明";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListBox listBox_VersionDescription;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
/// <summary>
|
||||
/// 版本修改说明
|
||||
/// </summary>
|
||||
public partial class VersionDescription : Form
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 初始化函数
|
||||
/// </summary>
|
||||
public VersionDescription()
|
||||
{
|
||||
InitializeComponent();
|
||||
listBox_VersionDescription.DataSource = ModelBasic.WriteVersion.GetVersion();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
166
DataMirrorTools_Simulator/ModelBasic/Version/VersionsInformation.Designer.cs
generated
Normal file
166
DataMirrorTools_Simulator/ModelBasic/Version/VersionsInformation.Designer.cs
generated
Normal file
@@ -0,0 +1,166 @@
|
||||
namespace DataMirrorTools
|
||||
{
|
||||
partial class DataMirrorToolsVersionsInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DataMirrorToolsVersionsInformation));
|
||||
this.label_CompanyInfo = new System.Windows.Forms.Label();
|
||||
this.label_AboutMES = new System.Windows.Forms.Label();
|
||||
this.pictureBox_MESLOGO = new System.Windows.Forms.PictureBox();
|
||||
this.label_Copyright = new System.Windows.Forms.Label();
|
||||
this.label_Version = new System.Windows.Forms.Label();
|
||||
this.label_SoftWareName = new System.Windows.Forms.Label();
|
||||
this.button_OK = new System.Windows.Forms.Button();
|
||||
this.groupBox_Depart = new System.Windows.Forms.GroupBox();
|
||||
this.label_Email = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox_MESLOGO)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label_CompanyInfo
|
||||
//
|
||||
this.label_CompanyInfo.AutoSize = true;
|
||||
this.label_CompanyInfo.Location = new System.Drawing.Point(79, 179);
|
||||
this.label_CompanyInfo.Name = "label_CompanyInfo";
|
||||
this.label_CompanyInfo.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_CompanyInfo.TabIndex = 1686;
|
||||
this.label_CompanyInfo.Text = "公司信息";
|
||||
//
|
||||
// label_AboutMES
|
||||
//
|
||||
this.label_AboutMES.AutoSize = true;
|
||||
this.label_AboutMES.Location = new System.Drawing.Point(12, 240);
|
||||
this.label_AboutMES.Name = "label_AboutMES";
|
||||
this.label_AboutMES.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_AboutMES.TabIndex = 1685;
|
||||
this.label_AboutMES.Text = "关于迈思";
|
||||
this.label_AboutMES.Click += new System.EventHandler(this.Label_AboutMES_Click);
|
||||
//
|
||||
// pictureBox_MESLOGO
|
||||
//
|
||||
this.pictureBox_MESLOGO.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox_MESLOGO.Image")));
|
||||
this.pictureBox_MESLOGO.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox_MESLOGO.InitialImage")));
|
||||
this.pictureBox_MESLOGO.Location = new System.Drawing.Point(28, 11);
|
||||
this.pictureBox_MESLOGO.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pictureBox_MESLOGO.Name = "pictureBox_MESLOGO";
|
||||
this.pictureBox_MESLOGO.Size = new System.Drawing.Size(154, 50);
|
||||
this.pictureBox_MESLOGO.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox_MESLOGO.TabIndex = 1684;
|
||||
this.pictureBox_MESLOGO.TabStop = false;
|
||||
//
|
||||
// label_Copyright
|
||||
//
|
||||
this.label_Copyright.AutoSize = true;
|
||||
this.label_Copyright.Location = new System.Drawing.Point(78, 153);
|
||||
this.label_Copyright.Name = "label_Copyright";
|
||||
this.label_Copyright.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_Copyright.TabIndex = 1681;
|
||||
this.label_Copyright.Text = "版权信息";
|
||||
//
|
||||
// label_Version
|
||||
//
|
||||
this.label_Version.AutoSize = true;
|
||||
this.label_Version.Location = new System.Drawing.Point(78, 127);
|
||||
this.label_Version.Name = "label_Version";
|
||||
this.label_Version.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_Version.TabIndex = 1682;
|
||||
this.label_Version.Text = "版本信息";
|
||||
//
|
||||
// label_SoftWareName
|
||||
//
|
||||
this.label_SoftWareName.AutoSize = true;
|
||||
this.label_SoftWareName.Location = new System.Drawing.Point(79, 102);
|
||||
this.label_SoftWareName.Name = "label_SoftWareName";
|
||||
this.label_SoftWareName.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_SoftWareName.TabIndex = 1683;
|
||||
this.label_SoftWareName.Text = "软件名称";
|
||||
//
|
||||
// button_OK
|
||||
//
|
||||
this.button_OK.Location = new System.Drawing.Point(378, 227);
|
||||
this.button_OK.Name = "button_OK";
|
||||
this.button_OK.Size = new System.Drawing.Size(75, 23);
|
||||
this.button_OK.TabIndex = 1678;
|
||||
this.button_OK.Text = "确定";
|
||||
this.button_OK.UseVisualStyleBackColor = true;
|
||||
this.button_OK.Click += new System.EventHandler(this.Button_OK_Click);
|
||||
//
|
||||
// groupBox_Depart
|
||||
//
|
||||
this.groupBox_Depart.Location = new System.Drawing.Point(13, 85);
|
||||
this.groupBox_Depart.Name = "groupBox_Depart";
|
||||
this.groupBox_Depart.Size = new System.Drawing.Size(440, 1);
|
||||
this.groupBox_Depart.TabIndex = 1677;
|
||||
this.groupBox_Depart.TabStop = false;
|
||||
//
|
||||
// label_Email
|
||||
//
|
||||
this.label_Email.AutoSize = true;
|
||||
this.label_Email.Location = new System.Drawing.Point(80, 201);
|
||||
this.label_Email.Name = "label_Email";
|
||||
this.label_Email.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_Email.TabIndex = 1687;
|
||||
this.label_Email.Text = "电子邮件";
|
||||
//
|
||||
// VersionsInformation
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(468, 264);
|
||||
this.Controls.Add(this.label_Email);
|
||||
this.Controls.Add(this.label_CompanyInfo);
|
||||
this.Controls.Add(this.label_AboutMES);
|
||||
this.Controls.Add(this.pictureBox_MESLOGO);
|
||||
this.Controls.Add(this.label_Copyright);
|
||||
this.Controls.Add(this.label_Version);
|
||||
this.Controls.Add(this.label_SoftWareName);
|
||||
this.Controls.Add(this.button_OK);
|
||||
this.Controls.Add(this.groupBox_Depart);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximumSize = new System.Drawing.Size(484, 303);
|
||||
this.MinimumSize = new System.Drawing.Size(484, 303);
|
||||
this.Name = "VersionsInformation";
|
||||
this.Text = "版本信息";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox_MESLOGO)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label_CompanyInfo;
|
||||
private System.Windows.Forms.Label label_AboutMES;
|
||||
private System.Windows.Forms.PictureBox pictureBox_MESLOGO;
|
||||
private System.Windows.Forms.Label label_Copyright;
|
||||
private System.Windows.Forms.Label label_Version;
|
||||
private System.Windows.Forms.Label label_SoftWareName;
|
||||
private System.Windows.Forms.Button button_OK;
|
||||
private System.Windows.Forms.GroupBox groupBox_Depart;
|
||||
private System.Windows.Forms.Label label_Email;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DataMirrorTools
|
||||
{
|
||||
public partial class DataMirrorToolsVersionsInformation : Form
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DataMirrorToolsVersionsInformation()
|
||||
{
|
||||
InitializeComponent();
|
||||
// label_SoftWareName.Text = "Data Mirror Tools";
|
||||
label_SoftWareName.Text = "MesWork Data Factory";
|
||||
label_Version.Text = ModelBasic.WriteVersion.ProgramVersion;
|
||||
label_Copyright.Text = "版权所有 © 2022 Meswork Corporation。 保留所有权利。";
|
||||
label_CompanyInfo.Text = "大连迈思信息技术有限公司 电话:0411-81761316";
|
||||
label_Email.Text = "电子邮箱: inf@meswork.com";
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Label_AboutMES_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://www.meswork.com/");
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Button_OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,583 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBox_MESLOGO.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAoYAAADMCAYAAADu1mJaAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAArnklE
|
||||
QVR4Xu3bW5LkWowdWI1JM+6Rdhuj2rN4GYvhAA/4xscKU3kdbDw8Zdc/pP/z//yf/9vO9/+u0NvWWmut
|
||||
tV3ww3YI/RD8izJaa6211srww7Yb/eDLUm5rrbXW2jB+2Erpx10V9WuttdZa24QftmH6Ebc3zdFaa621
|
||||
FsYP2yb6sXYWzddaa6219id+2FL0w+wqNG9rrbXWGvHD9pV+hF2d9mittdZa+4cfNtKPrUpH9lv2aq21
|
||||
1lrrH4Zf6EdVJfUU1VZRv9Zaa629ED9s/AFVRf2ilFdJPVtrrbX2EvzwpfRDqYr6jVKfSurZWmuttQfj
|
||||
hy+iH0RV1G8v6l9F/VprrbX2QPzw4fTjp4r6HU1zVVG/1lprrT0EP3wg/cippJ5XoFmrqF9rrbXWbowf
|
||||
PoR+zFRSz6vR3HtQ79Zaa63dDD+8Of1wqaJ+V6O5j6J5WmuttXYT/PCG9COlivpdjeY+m+ZsrbXW2oXx
|
||||
w5vQj5FK6nklmvmqNH9rrbXWLoYfXph+dFRSzyvRzKOO6vOhfq211lq7AH54QfqBUUX9rkZzj1APUW0l
|
||||
9WyttdbaSfjhReiHRBX1uxrNPUI9MpRZRf1aa621djB+eCL9aKiiflejuUeoRwX1qqJ+rbXWWjsAPzyY
|
||||
fhxUUb+r0dyj1Gcv6l9F/VprrbW2E354AP0IqKSeV6O5R6jH0TRXFfVrrb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9KPorfSfVprrbX2cPzw5fRD6S10j9Za
|
||||
a629BD9s/+jH09No79Zaa629ED9sv+gH1d1pz9Zaa629GD9sf9KPrDvRTq211lpr/cNwgH50XZXmb621
|
||||
1lr7D37YUvRD7Co0b2uttdYa8cO2mX6cHU1ztdZaa619xQ/bMP1g25vmaK211loL44etjH7AVVPf1lpr
|
||||
rbU0fth2oR91Wym/tdZaa20IP2y70g+9KOW11lprrZXgh+0w+vEnqm2ttdZaK8UP2+H6x2BrrbXWTvZ/
|
||||
/8//B/11Gg+rfed2AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="pictureBox_MESLOGO.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAoYAAADMCAYAAADu1mJaAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAArnklE
|
||||
QVR4Xu3bW5LkWowdWI1JM+6Rdhuj2rN4GYvhAA/4xscKU3kdbDw8Zdc/pP/z//yf/9vO9/+u0NvWWmut
|
||||
tV3ww3YI/RD8izJaa6211srww7Yb/eDLUm5rrbXW2jB+2Erpx10V9WuttdZa24QftmH6Ebc3zdFaa621
|
||||
FsYP2yb6sXYWzddaa6219id+2FL0w+wqNG9rrbXWGvHD9pV+hF2d9mittdZa+4cfNtKPrUpH9lv2aq21
|
||||
1lrrH4Zf6EdVJfUU1VZRv9Zaa629ED9s/AFVRf2ilFdJPVtrrbX2EvzwpfRDqYr6jVKfSurZWmuttQfj
|
||||
hy+iH0RV1G8v6l9F/VprrbX2QPzw4fTjp4r6HU1zVVG/1lprrT0EP3wg/cippJ5XoFmrqF9rrbXWbowf
|
||||
PoR+zFRSz6vR3HtQ79Zaa63dDD+8Of1wqaJ+V6O5j6J5WmuttXYT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yingnr9RRln0GyttdZaOxk/vAH92DiDZhPVVlCvJdWd
|
||||
RfO11lpr7SL44Y3ox8cZNNucaiqo14fen0GztdZaa+2C+OEN6QfJWY6c78heWZqttdZaaxfGD29OP1LO
|
||||
cMRMV9t5Mt+7tdZaazfCDx9CP1rOcKVZ9rK8fWuttdZuiB8+kH7MtHG6dWuttdZuih8+mH7ctBzdtbXW
|
||||
WmsPwA9fQD942t90x9Zaa609CD98Gf0Iav9LN2uttdbaA/HDl9KPorfSfVprrbX2cPzw5fRD6S10j9Za
|
||||
a629BD9s/+jH09No79Zaa629ED9sv+gH1d1pz9Zaa629GD9sf9KPrDvRTq211lpr/cNwgH50XZXmb621
|
||||
1lr7D37YUvRD7Co0b2uttdYa8cO2mX6cHU1ztdZaa619xQ/bMP1g25vmaK211loL44etjH7AVVPf1lpr
|
||||
rbU0fth2oR91Wym/tdZaa20IP2y70g+9KOW11lprrZXgh+0w+vEnqm2ttdZaK8UP2+H6x2BrrbXWTvZ/
|
||||
/8//B/11Gg+rfed2AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABMLAAATCwAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQIyAKEgMgChczIA
|
||||
occyAKHqMgChmTIAoTwyAKEJMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQQyAKEvMgChdzIA
|
||||
odYyAKH7MgCh/zIAof8yAKH/MgCh6jIAoacyAKFJMgChEjIAoQAyAKEAAAAAAA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AAAAAAAAAAAAAAAAADIAoQAyAKECMgChITIAoW8yAKG/MgCh/zIA
|
||||
oZYyAKEAMgCh/zIAoZoyAKEBMgChADIAoZkyAKHSMgChEjIAoQAyAKEGMgChujIAoZoyAKEAMgChADIA
|
||||
oWkyAKH/MgCh/zIAof0yAKH+MgCh4TIAoZIyAKFEMgChDjIAoQAyAKEAAAAAAAAAAAAAAAAAMgChADIA
|
||||
oUIyAKH7MgChlzIAoQAyAKH/MgChlzIAoQAyAKEAMgChmjIAobMyAKEEMgChADIAoQAyAKGcMgChmzIA
|
||||
oQAyAKEAMgChaTIAof8yAKH/MgCh4zIAoZYyAKHRMgCh+zIAofQyAKHDMgChZDIAoSIyAKEBMgChAAAA
|
||||
AAAyAKEAMgChPzIAofsyAKGXMgChADIAof8yAKGXMgChADIAoQAyAKGaMgChiDIAoQAAAAAAMgChADIA
|
||||
oYgyAKGaMgChADIAoQAyAKFpMgCh/zIAof8yAKHhMgChIDIAoRIyAKFeMgChqzIAoe0yAKH+MgCh3jIA
|
||||
oYYyAKEqMgChADIAoQAyAKE/MgCh+zIAoZcyAKEAMgCh/zIAoZcyAKEAMgChADIAoZgyAKFtMgChAAAA
|
||||
AAAyAKEAMgChXDIAoZQyAKEAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChADIAoQAyAKEGMgChMDIA
|
||||
oX8yAKHTMgCh+jIAoWkyAKEAMgChADIAoT8yAKH7MgChlzIAoQAyAKH/MgChlzIAoQAyAKEAMgChlTIA
|
||||
oWMyAKEAAAAAADIAoQAyAKE2MgChhTIAoQAyAKEAMgChaTIAof8yAKH/MgCh4TIAoR4yAKEAAAAAAAAA
|
||||
AAAyAKEAMgChATIAoRUyAKFYMgChQDIAoQAyAKEAMgChPzIAofsyAKGXMgChADIAof8yAKGXMgChADIA
|
||||
oQAyAKGLMgChQTIAoQAyAKEFMgChADIAoSMyAKF4MgChADIAoQAyAKFpMgCh/zIAof8yAKHhMgChHjIA
|
||||
oQAAAAAAAAAAA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
|
||||
oQAAAAAAAAAAAAAAAAAyAKEAMgChATIAoSAyAKF2MgCh/zIAoZYyAKEAMgCh/zIAoZcyAKEAAAAAADIA
|
||||
oQAyAKEAMgChljIAof8yAKGeMgChOTIAoZEyAKHcMgCh+TIAof8yAKH/MgCh/zIAof8yAKH+MgCh6jIA
|
||||
obgyAKFXMgChITIAoQEyAKEAAAAAAAAAAAAAAAAAMgChADIAoT8yAKH7MgChlzIAoQAyAKH/MgChlzIA
|
||||
oQAAAAAAMgChADIAoQwyAKG9MgCh/zIAofMyAKHyMgCh/jIAof8yAKH/MgCh/zIAofoyAKH3MgCh/jIA
|
||||
of8yAKH/MgCh/zIAofsyAKHbMgChmzIAoUwyAKENMgChATIAoQAyAKEAMgChPzIAofsyAKGXMgChADIA
|
||||
of8yAKGXMgChATIAoRkyAKFbMgChsTIAofAyAKH/MgCh/zIAof8yAKH/MgCh/DIAoeYyAKGxMgChVTIA
|
||||
oUIyAKGFMgCh1TIAofUyAKH/MgCh/zIAof8yAKH/MgCh9DIAocUyAKGDMgChMDIAoQYyAKE/MgCh+zIA
|
||||
oZcyAKEAMgCh/zIAocEyAKGOMgCh2TIAofcyAKH/MgCh/zIAof8yAKH/MgCh7jIAobMyAKFwMgChJjIA
|
||||
oQoyAKEAMgChADIAoQEyAKEXMgChTTIAoZsyAKHYMgCh/TIAof8yAKH/MgCh/zIAof4yAKHqMgChszIA
|
||||
oZgyAKH+MgChljIAoQAyAKH/MgCh/zIAof8yAKH/MgCh/zIAof8yAKH0MgChyTIAoYEyAKE/MgChBzIA
|
||||
oQAAAAAAMgChADIAoSIyAKF2MgChQjIAoRIyAKEAMgChATIAoR4yAKFjMgChrjIAoecyAKH9MgCh/zIA
|
||||
of8yAKH/MgCh/zIAof8yAKGWMgChADIAof8yAKH/MgCh/zIAofkyAKHWMgChmjIAoUIyAKERMgChATIA
|
||||
oQAyAKEGMgChFTIAoQMyAKEAMgChKDIAoZUyAKHHMgChxjIAoXcyAKE3MgChBzIAoQA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cyAKEBMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA/+Af//+AB//8AAD/8AAAP8AIAA8AGDABARg+AQEYD4ERGAPxMZgAcTOY
|
||||
ADEzmDAxM5g8MTKIPzEgCDDxIAgwMSB4MAEgeDgBJHg+ATxAD8E8AAHxOAAAMQAAAAEAAwABABwgAQBE
|
||||
BAEBwAABAEAAA+AAAA/4AAB//wAD///gD/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
72
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.Designer.cs
generated
Normal file
72
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.Designer.cs
generated
Normal file
@@ -0,0 +1,72 @@
|
||||
namespace DTTest
|
||||
{
|
||||
partial class T_ProgressBar
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label_ProgressShow = new System.Windows.Forms.Label();
|
||||
this.progressBar_Output = new System.Windows.Forms.ProgressBar();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label_ProgressShow
|
||||
//
|
||||
this.label_ProgressShow.AutoSize = true;
|
||||
this.label_ProgressShow.Location = new System.Drawing.Point(271, 19);
|
||||
this.label_ProgressShow.Name = "label_ProgressShow";
|
||||
this.label_ProgressShow.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_ProgressShow.TabIndex = 2;
|
||||
this.label_ProgressShow.Text = "进度显示";
|
||||
//
|
||||
// progressBar_Output
|
||||
//
|
||||
this.progressBar_Output.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressBar_Output.Location = new System.Drawing.Point(0, 0);
|
||||
this.progressBar_Output.Name = "progressBar_Output";
|
||||
this.progressBar_Output.Size = new System.Drawing.Size(619, 49);
|
||||
this.progressBar_Output.TabIndex = 4;
|
||||
this.progressBar_Output.Value = 20;
|
||||
//
|
||||
// T_ProgressBar
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(619, 49);
|
||||
this.Controls.Add(this.label_ProgressShow);
|
||||
this.Controls.Add(this.progressBar_Output);
|
||||
this.Name = "T_ProgressBar";
|
||||
this.Text = "通用调用进度条";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label_ProgressShow;
|
||||
private System.Windows.Forms.ProgressBar progressBar_Output;
|
||||
}
|
||||
}
|
||||
110
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.cs
Normal file
110
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class T_ProgressBar : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前操作名称
|
||||
/// </summary>
|
||||
public string taskName = "-1";
|
||||
/// <summary>
|
||||
/// 设置的进度条的最大值
|
||||
/// </summary>
|
||||
public int progressBarMax = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化函数
|
||||
/// </summary>
|
||||
public T_ProgressBar()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.TopMost = true;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化函数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max"></param>
|
||||
public T_ProgressBar(string taskName, int max)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.TopMost = true;
|
||||
ShowProgressSet(taskName, max);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置参数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max"></param>
|
||||
public void ShowProgressSet(string taskName, int max)
|
||||
{
|
||||
Text = this.taskName = taskName;
|
||||
progressBar_Output.Maximum = progressBarMax = max;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示进度数据
|
||||
/// </summary>
|
||||
/// <param name="curr"></param>
|
||||
public void ShowProgress(int curr)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (progressBarMax == curr)
|
||||
{
|
||||
// new Task(delegate () { System.Threading.Thread.Sleep(1000); this.Close(); }).Start();
|
||||
System.Threading.Thread.Sleep(1000); this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.progressBar_Output.InvokeRequired)
|
||||
{
|
||||
|
||||
this.progressBar_Output.Invoke(new Action(delegate ()
|
||||
{
|
||||
this.progressBar_Output.Value = curr;
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.progressBar_Output.Value = curr;
|
||||
}
|
||||
|
||||
if (this.label_ProgressShow.InvokeRequired)
|
||||
{
|
||||
this.label_ProgressShow.Invoke(new Action(delegate ()
|
||||
{
|
||||
this.label_ProgressShow.Text = "进度:" + curr + " / " + progressBarMax;
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.label_ProgressShow.Text = "进度:" + curr + " / " + progressBarMax;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(T_ProgressBar), err);
|
||||
|
||||
// ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit(err.ToString());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
120
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.resx
Normal file
120
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
141
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar_2.Designer.cs
generated
Normal file
141
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar_2.Designer.cs
generated
Normal file
@@ -0,0 +1,141 @@
|
||||
namespace DTTest
|
||||
{
|
||||
partial class T_ProgressBar_2
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label_ProgressShow = new System.Windows.Forms.Label();
|
||||
this.progressBar_Output = new System.Windows.Forms.ProgressBar();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.label_ProgressShow_All = new System.Windows.Forms.Label();
|
||||
this.progressBar_Output_All = new System.Windows.Forms.ProgressBar();
|
||||
this.panel1.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label_ProgressShow
|
||||
//
|
||||
this.label_ProgressShow.AutoSize = true;
|
||||
this.label_ProgressShow.Location = new System.Drawing.Point(294, 20);
|
||||
this.label_ProgressShow.Name = "label_ProgressShow";
|
||||
this.label_ProgressShow.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_ProgressShow.TabIndex = 2;
|
||||
this.label_ProgressShow.Text = "进度显示";
|
||||
//
|
||||
// progressBar_Output
|
||||
//
|
||||
this.progressBar_Output.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressBar_Output.Location = new System.Drawing.Point(0, 0);
|
||||
this.progressBar_Output.Name = "progressBar_Output";
|
||||
this.progressBar_Output.Size = new System.Drawing.Size(669, 49);
|
||||
this.progressBar_Output.TabIndex = 4;
|
||||
this.progressBar_Output.Value = 20;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.label_ProgressShow);
|
||||
this.panel1.Controls.Add(this.progressBar_Output);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(669, 49);
|
||||
this.panel1.TabIndex = 5;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(675, 110);
|
||||
this.tableLayoutPanel1.TabIndex = 6;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.label_ProgressShow_All);
|
||||
this.panel2.Controls.Add(this.progressBar_Output_All);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(3, 58);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(669, 49);
|
||||
this.panel2.TabIndex = 6;
|
||||
//
|
||||
// label_ProgressShow_All
|
||||
//
|
||||
this.label_ProgressShow_All.AutoSize = true;
|
||||
this.label_ProgressShow_All.Location = new System.Drawing.Point(294, 20);
|
||||
this.label_ProgressShow_All.Name = "label_ProgressShow_All";
|
||||
this.label_ProgressShow_All.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_ProgressShow_All.TabIndex = 2;
|
||||
this.label_ProgressShow_All.Text = "进度显示";
|
||||
//
|
||||
// progressBar_Output_All
|
||||
//
|
||||
this.progressBar_Output_All.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressBar_Output_All.Location = new System.Drawing.Point(0, 0);
|
||||
this.progressBar_Output_All.Name = "progressBar_Output_All";
|
||||
this.progressBar_Output_All.Size = new System.Drawing.Size(669, 49);
|
||||
this.progressBar_Output_All.TabIndex = 4;
|
||||
this.progressBar_Output_All.Value = 20;
|
||||
//
|
||||
// T_ProgressBar_2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(675, 110);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Name = "T_ProgressBar_2";
|
||||
this.Text = "通用调用进度条(双条)";
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label_ProgressShow;
|
||||
private System.Windows.Forms.ProgressBar progressBar_Output;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label label_ProgressShow_All;
|
||||
private System.Windows.Forms.ProgressBar progressBar_Output_All;
|
||||
}
|
||||
}
|
||||
134
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar_2.cs
Normal file
134
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar_2.cs
Normal file
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class T_ProgressBar_2 : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前操作名称
|
||||
/// </summary>
|
||||
public string taskName = "-1";
|
||||
/// <summary>
|
||||
/// 设置的进度条的最大值
|
||||
/// </summary>
|
||||
public int progressBarMax = 100;
|
||||
/// <summary>
|
||||
/// 设置的进度条的最大值(总)
|
||||
/// </summary>
|
||||
public int progressBarMax_All = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化函数
|
||||
/// </summary>
|
||||
public T_ProgressBar_2()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.TopMost = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化函数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max"></param>
|
||||
/// <param name="max_All"></param>
|
||||
public T_ProgressBar_2(string taskName,int max_All)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.TopMost = true;
|
||||
ShowProgressSet_All(taskName, max_All);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置参数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max"></param>
|
||||
public void ShowProgressSet( int max)
|
||||
{
|
||||
progressBar_Output.Maximum = progressBarMax = max;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置参数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max_All"></param>
|
||||
public void ShowProgressSet_All(string taskName,int max_All)
|
||||
{
|
||||
Text = this.taskName = taskName;
|
||||
progressBar_Output_All.Maximum = progressBarMax_All = max_All;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示进度数据
|
||||
/// </summary>
|
||||
/// <param name="curr"></param>
|
||||
public void ShowProgress(int curr)
|
||||
{
|
||||
if (progressBarMax == curr)
|
||||
{
|
||||
new Task(delegate () { System.Threading.Thread.Sleep(1000); this.Close(); }).Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (progressBar_Output.InvokeRequired)
|
||||
//{
|
||||
progressBar_Output.Invoke(new Action(delegate () {
|
||||
progressBar_Output.Value = curr;
|
||||
label_ProgressShow.Text = "进度:" + curr + " / " + progressBarMax;
|
||||
}));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// progressBar_Output.Value = curr;
|
||||
// label_ProgressShow.Text = "进度:" + curr + " / " + progressBarMax;
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示进度数据
|
||||
/// </summary>
|
||||
/// <param name="curr"></param>
|
||||
public void ShowProgress_All(int curr)
|
||||
{
|
||||
if (progressBarMax_All == curr)
|
||||
{
|
||||
new Task(delegate () { System.Threading.Thread.Sleep(1000); this.Close(); }).Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (progressBar_Output_All.InvokeRequired)
|
||||
{
|
||||
progressBar_Output_All.Invoke(new Action(delegate () {
|
||||
progressBar_Output_All.Value = curr;
|
||||
label_ProgressShow_All.Text = "进度:" + curr + " / " + progressBarMax_All;
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
progressBar_Output_All.Value = curr;
|
||||
label_ProgressShow_All.Text = "进度:" + curr + " / " + progressBarMax_All;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
453
DataMirrorTools_Simulator/ModelBasic/WriteVersion.cs
Normal file
453
DataMirrorTools_Simulator/ModelBasic/WriteVersion.cs
Normal file
@@ -0,0 +1,453 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace ModelBasic
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WriteVersion
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<String> GetVersion()
|
||||
{
|
||||
var list = new List<String>();
|
||||
list.Add("【2020.09.30 1800】修改了自增ID自己生成");
|
||||
list.Add("【2020.09.30 1800】修改了TagID处理合并表");
|
||||
list.Add("【2020.10.12 1826】数据库表格增加了项目代码!");
|
||||
list.Add("【2020.10.14 1756】导出数据!模型回原点!等不记得了!");
|
||||
list.Add("【2020.10.17 1810】添加了机器人算法!");
|
||||
list.Add("【2020.10.19 1810】PUMA560机器人调试完成!");
|
||||
list.Add("【2020.10.29 1837】增加IRB20!增加项目导出!导入(未完成)!");
|
||||
list.Add("【2020.10.30 1555】增加项目导入!");
|
||||
list.Add("【2020.10.30 1832】修改程序启动界面!");
|
||||
list.Add("【2020.10.31 1800】修改程序启动界面!");
|
||||
list.Add("【2020.11.02 1738】修改了导入及项目打开逻辑等!");
|
||||
list.Add("【2020.11.06 1607】修复了信号仿真功能!");
|
||||
list.Add("【2020.11.09 1833】修复路径编辑器里的机器人到达指定位置!修改机器人接收位置信息改点问题!程序的初始数据!");
|
||||
list.Add("【2020.11.10 1113】导入导出数据进度条!");
|
||||
list.Add("【2020.11.12 1749】合并项目数据!整理项目网页!导出Excel!");
|
||||
list.Add("【2020.11.13 1923】浮框提示!文本框回车!多机器人!");
|
||||
list.Add("【2020.11.14 1817】多机器人修改完成!改了底座坐标为极坐标!配置IRB6640机器人D-H表!");
|
||||
list.Add("【2020.11.16 1053】修改BUG编辑工序自动刷新!暂时屏掉模型查工艺!");
|
||||
list.Add("【2020.11.28 1736】错误列表!");
|
||||
list.Add("【2020.12.01 1720】增加PDPS数据导入!改机器人的驱动命令冲突!改添加(仿真PS)行为的模型显示隐藏的限制!");
|
||||
list.Add("【2020.12.07 0913】修改加载模型的错误提示!");
|
||||
list.Add("【2020.12.09 1108】修改设备信号仿真模块!机器人还没做!");
|
||||
list.Add("【2020.12.09 1355】修改!可改TagValue!可改Tag持续时间!修改重复时间报错!");
|
||||
list.Add("【2020.12.09 1744】修改用ID操作数据!修改默认长度是方块!");
|
||||
list.Add("【2020.12.10 1718】增加设备信号仿真的循环播放!修改错误列表自动滚动!修改版本修改的方便性!\r\n修改导入导出数据!修改设备信号仿真业务至网页播放!");
|
||||
list.Add("【2020.12.11 1658】修改Socket切换项目不能连接!修改TagID处理的数据加载时机!修改Web直接通讯!修改设备信号仿真!");
|
||||
list.Add("【2020.12.12 1839】修改导入数据到软件中!数据库连接错误提示!");
|
||||
list.Add("【2020.12.17 1703】修改使用J数据播放!使用生成的自由度数据播放!修改配置后将自动刷新配置!");
|
||||
list.Add("【2020.12.17 1703】修改数据库的工艺的驱动类型!修改工艺添加界面的工艺驱动选项!添加了不加载浏览器的功能!");
|
||||
list.Add("【2020.12.17 1703】选不同工艺是数据在工序中分类别显示!播放数据的工艺显示Index当前跳滚!");
|
||||
list.Add("【2020.12.17 1708】修改设备信号仿真添加甘特图元素时候的时间计算错误问题!");
|
||||
list.Add("【2020.12.17 1723】对克隆后的工艺对应的工序的显示进行清空!");
|
||||
list.Add("【2020.12.17 1927】行为播放时,先播放所有工艺的第一帧!");
|
||||
list.Add("【2020.12.18 1059】屏蔽了程序中的机器人的程序!");
|
||||
list.Add("【2020.12.18 1134】屏蔽了调用表达式运算的初始化程序!");
|
||||
list.Add("【2020.12.18 1659】修改刷新树的渲染!");
|
||||
list.Add("【2020.12.23 1436】修改记录数据的时间24进制!");
|
||||
list.Add("【2020.12.23 1304】增加运行程序的网页模型初始化状态功能!");
|
||||
list.Add("\n");
|
||||
list.Add("-----------------------------稳定的版本(广州明珞第二个项目)---------------------------------");
|
||||
list.Add("\n");
|
||||
list.Add("【2020.12.28 0905】取消了视图的使用!");
|
||||
list.Add("【2020.12.28 1531】修改切换项目和关闭程序时,回放及信号模型自动循环停止任务!");
|
||||
list.Add("【2020.12.28 1531】修改切换项目通讯断开不能连接问题!");
|
||||
list.Add("【2020.12.28 1531】暂时取消使用逻辑控制行为的功能!");
|
||||
list.Add("【2020.12.28 1531】信号视图中增加了信号全选和全不选功能!");
|
||||
list.Add("【2020.12.28 1531】更改软件通讯目标,不重启程序便生效!");
|
||||
list.Add("【2020.12.28 1531】仅保留一份通讯实例接口!");
|
||||
list.Add("【2020.12.28 1531】修改菜单的勾选状态!");
|
||||
list.Add("【2020.12.29 1043】修改界面在视图窗口里不能打开!");
|
||||
list.Add("【2020.12.29 1043】修改工艺的参数同时刷新行为合成器!");
|
||||
list.Add("【2020.12.29 1043】修改工序数据不允许被删空!并且工艺无工序的数据在发行的时候会提示!");
|
||||
list.Add("【2020.12.29 1341】修改行为数据播放前 先生成数据!");
|
||||
list.Add("【2020.12.29 1616】修改行为播放的调用工艺的规则!");
|
||||
list.Add("【2020.12.30 1359】增加删除按钮的二次确认!");
|
||||
list.Add("【2020.12.30 1359】增加仿真的模型显示隐藏ing....!");
|
||||
list.Add("\n");
|
||||
list.Add("-----------------------------临时版本(仿真模型操作没做完,还有其他bug,这是不好用的)2020.12.31---------------------------------");
|
||||
list.Add("\n");
|
||||
list.Add("【2021.01.19 0932】增加选择行为里的工具跳选到工艺树!");
|
||||
list.Add("【2021.01.19 0932】增加行为播放的调试功能,同时显示时刻线,拖拽到指定位置可以从这里开始播放!");
|
||||
list.Add("【2021.01.19 0932】限制了行为的重复播放!");
|
||||
list.Add("【2021.01.19 0932】删掉数据库的定值表!");
|
||||
list.Add("【2021.01.19 0932】程序启动自然最大化!");
|
||||
list.Add("【2021.01.19 0932】增加判断工艺、行为不允许添加重名!");
|
||||
list.Add("【2021.01.19 0932】修改复杂行为与非复杂行为串位的问题!");
|
||||
list.Add("\n");
|
||||
list.Add("-----------------------------暂时版本(正在做机器人...)2021.1.19---------------------------------");
|
||||
list.Add("\n");
|
||||
list.Add("【2021.01.19 0932】修改播放行为的同时刻不同时播放问题!");
|
||||
list.Add("【2021.01.19 0932】修复关闭放置控制器发2次消息BUG!");
|
||||
list.Add("【2021.01.23 1131】增加命令行!clear、exit、release、version");
|
||||
list.Add("【2021.01.25 1549】增加模型驱动类型编辑!增加软件更新功能!");
|
||||
list.Add("【2021.01.25 1643】增加命令行!findcraft、findmodel");
|
||||
list.Add("【2021.01.28 1344】修改行为数据播放,同一个模型所用工艺,最早出现的数据首帧附加到行为第一帧");
|
||||
list.Add("【2021.01.29 1959】修改行为数据播放,仿真数据模型隐藏问题做完,包括第1帧");
|
||||
list.Add("【2021.02.01 1009】增加工艺换绑模型!");
|
||||
list.Add("【2021.02.18 1453】取消了第一帧对模型显示隐藏的操作!");
|
||||
list.Add("【2021.02.18 1516】修改对状态型的工艺二次调用!");
|
||||
list.Add("【2021.02.18 1726】修改删除工艺组,同时删除在工序里的工艺组错误数据!");
|
||||
list.Add("【2021.02.19 1518】修改导出Act数据的键值表弃用!");
|
||||
list.Add("【2021.02.19 1746】增加[AlignCraftForAct]字段[StartTime],取消[OperationTree]字段[StartTime]!");
|
||||
list.Add("【2021.02.19 1746】修改视图[AlignCraftForAct]<->[OperationTree]!结果:允许状态工艺在同个行为里任意调用!");
|
||||
list.Add("【2021.02.19 1826】修改删除行为里的工艺使用ID!");
|
||||
list.Add("【2021.02.20 0909】修改行为播放丢最后一帧!");
|
||||
list.Add("【2021.02.20 1059】修改生成数据的中途报错!进行了错误提示!");
|
||||
list.Add("【2021.02.20 1150】修改行为(甘特图,数据播放部分的)帧间隔设置和显示!");
|
||||
list.Add("【2021.02.20 1703】修改清空甘特图!");
|
||||
list.Add("【2021.02.24 1718】增加仿真的数据生成时候,是否添加状态数据!");
|
||||
list.Add("【2021.02.25 0920】修改生成数据串名!");
|
||||
list.Add("【2021.02.26 1557】机器人规划功能修改完成!");
|
||||
list.Add("【2021.03.01 1909】修改工序新增加点取值为复制!");
|
||||
list.Add("【2021.03.02 1757】修改数据库表名称和字段!");
|
||||
list.Add("【2021.03.04 1828】增加缺少C++运行库报错!");
|
||||
list.Add("【2021.03.05 1637】修改设备信号仿真结构!");
|
||||
list.Add("【2021.03.05 1935】增加规划机器人的数据生成存储及PalyAct播放!");
|
||||
|
||||
list.Add("【2021.03.06 1727】修改生成Act时候的工艺数据源来自数据库了!");
|
||||
list.Add("【2021.03.08 1025】修改机器人生成数据的显隐Json判断!");
|
||||
list.Add("【2021.03.09 1612】修改Act的存放结构、增加字段[CraftCode]、删除字段[CraftDeviceTypeCode]!");
|
||||
|
||||
list.Add("【2021.03.11 1811】这个是【2020.03.09 1612】版本程序!之前两天做的机器人不好用,并再项目终身保留文件夹里备份!!");
|
||||
list.Add("【2021.03.12 1113】修改设备信号仿真的时间动态更新!");
|
||||
list.Add("【2021.03.12 1710】由于表结构的改变,导入导出数据改成活的了!");
|
||||
|
||||
list.Add("【2021.03.19 1000】修改设备信号仿真的信号值修改!");
|
||||
list.Add("【2021.03.19 1950】增加机器人逆解微分趋势显示!");
|
||||
list.Add("【2021.03.22 1050】关闭了Act的悬停!");
|
||||
list.Add("【2021.03.23 1950】机器人算f法修好了!");
|
||||
|
||||
list.Add("【2021.03.27 1003】机器人工艺间连接的第4轴翻转问题承接完成!");
|
||||
list.Add("【2021.03.27 2154】机器人离散点,单独逆解,正解,整理完成!");
|
||||
|
||||
list.Add("【2021.03.29 1044】修改了机器人生成数据时候播放及相关代码分类!");
|
||||
list.Add("【2021.03.30 1455】修改路径编辑器页面的播放、暂停、停止、其他bug!");
|
||||
list.Add("【2021.03.31 1557】修改所有页面的播放、暂停、停止、其他bug!");
|
||||
list.Add("【2021.04.01 0932】修改线性规划的点为RXRYRX的错误!");
|
||||
|
||||
list.Add("【2021.04.01 1616】合并前的备份!");
|
||||
|
||||
list.Add("【2021.04.02 1829】不知道哪好用哪不好用!");
|
||||
|
||||
list.Add("【2021.04.08 1151】改回了新增模型和导入模型!");
|
||||
list.Add("【2021.04.08 1151】修改了显示修改当前工序!");
|
||||
list.Add("【2021.04.08 1751】修改行为播放时候切换的跳帧问题及程序卡死问题!");
|
||||
|
||||
list.Add("【2021.04.10 2031】增加了模型导入导出的功能!");
|
||||
|
||||
list.Add("【2021.04.11 0745】增加动态附加浏览器!");
|
||||
|
||||
list.Add("【2021.04.12 1459】修改动态导航加载浏览器界面!");
|
||||
|
||||
list.Add("【2021.04.16 1459】修改代码为GUID!");
|
||||
|
||||
list.Add("【2021.04.23 1747】模型导入导入带工艺数据做完了,没测试好不好用!");
|
||||
|
||||
list.Add("【2021.05.06 0846】修改xyz成为txtytz!修改加载树时候的字符串参数");
|
||||
|
||||
list.Add("【2021.05.08 1828】去掉了模型树的数据库表!");
|
||||
list.Add("【2021.05.10 0936】数据库由22张表,删成了17张表!");
|
||||
|
||||
list.Add("【2021.05.11 1435】增加元素(模型、工艺、工序、行为、信号)所属关系查找!");
|
||||
|
||||
list.Add("【2021.05.20 1133】修复本地导入导出模型的功能!");
|
||||
|
||||
list.Add("【2021.05.21 1441】修改工艺树刷新慢、新增加工艺定位!");
|
||||
list.Add("【2021.05.21 1820】改了Gantt显示和颜色!");
|
||||
|
||||
list.Add("【2021.05.22 1055】修改了浏览器清缓存加载!");
|
||||
list.Add("【2021.05.24 1734】修改了线性流规划工艺不能暂停!");
|
||||
|
||||
list.Add("【2021.05.25 1856】修改了参数自动刷新!");
|
||||
list.Add("【2021.05.29 1830】增加了导入布局图!");
|
||||
|
||||
list.Add("【2021.06.01 1515】模型预览导入,增加模型名称!");
|
||||
list.Add("【2021.06.01 1925】增加连接信号!");
|
||||
|
||||
list.Add("【2021.06.09 1925】增加帧信号回写!");
|
||||
|
||||
list.Add(@"【2021.06.08 - 11】修改这些bug:
|
||||
1.行为合成后的播放,有的播放不了;Json格式错误的原因。
|
||||
2.路径编辑器和行为合成器,增加回到初始状态、终了状态的按钮。
|
||||
3.路径点添加时候,序号错乱,中间有空的信号。
|
||||
4.工序上移不好用。
|
||||
5.工序调位置,可以连续调整,光标跟着操作行走。
|
||||
6.工序第一个点的时间,不累计到工艺时长。
|
||||
7.工序第一个点以后的时间不允许设置 < 0 的数。
|
||||
8.行为停止,自转也停止做完了。
|
||||
9.自转工艺的停止按钮,控制自转停止。
|
||||
10.行为暂停播放后,拖动工艺的位置,继续播放时候,指针会首末帧来回跳动。
|
||||
11.修改浏览器清缓存加载,修改成功。不说关了重开的那种。
|
||||
|
||||
");
|
||||
|
||||
list.Add("【2021.06.11 1703】去掉字段和程序相关,字段名称:工序表的 TcpPositionStr !");
|
||||
list.Add("【2021.06.16 1727】将表信号表整理成采集信号表格式!");
|
||||
list.Add("【2021.06.21 1512】配置信号的界面改进完成,DeviceTree!");
|
||||
list.Add("【2021.06.21 1600】修改TagID绑定里的设备树!");
|
||||
list.Add("【2021.06.22 1755】把行为树去掉,改成了操作树!");
|
||||
list.Add("【2021.06.23 1825】把设备信号仿真做成树!等其他优化!");
|
||||
list.Add("【2021.06.27 1550】完成虚拟调试的版本!");
|
||||
|
||||
list.Add("【2021.07.08 1003】修改运动学算法,调用C++内存损坏Bug!");
|
||||
list.Add("【2021.07.12 0759】写说明书的版本,此版本使用不定数量轴的机器人!");
|
||||
|
||||
list.Add("【2021.09.08 1149】改全部换成四元数之前!");
|
||||
list.Add("【2021.09.08 1446】全部换成四元数!");
|
||||
list.Add("【2021.09.08 1801】修改线性插值!");
|
||||
|
||||
list.Add("【2021.09.09 1050】导出机器人路径点!");
|
||||
list.Add("【2021.09.13 1643】修改信号筛选启用功能,仅显示启用!");
|
||||
list.Add("【2021.09.17 1608】修改克隆时候 Reverse 字段报错!");
|
||||
|
||||
list.Add("【2021.10.06 2110】修改自动生成信号的可选择性!");
|
||||
|
||||
list.Add("【2021.10.08 1346】修改设备树!");
|
||||
|
||||
list.Add(@"【2021.10.11 0033】
|
||||
1.增加筛选工艺类型生成信号。
|
||||
2.增加信号的模糊查询。\n
|
||||
3.取消所有绑定。《==》添加所有绑定。
|
||||
4.删除信号时候,删除关联。
|
||||
5.信号的仿真面板,显示值和写入值逻辑不对,并且目前只能写bool。
|
||||
6.启动PLC链接的部分有改动。真实和模拟。
|
||||
|
||||
7.从PLC刷新信号值。
|
||||
8.仿真面板和信号视图,赛选时候的字段不对。
|
||||
9.修改设备树,把冗余的界面修改掉。
|
||||
|
||||
10.测试一根网线访问另一台电脑的两张网卡。
|
||||
11.把TagID处理那部分挪到网页上。
|
||||
|
||||
15.修改操作树节点的属性。
|
||||
16.强制功能,信号的强制。
|
||||
17.选择工位号的界面存储值的修改和记录。
|
||||
!");
|
||||
|
||||
list.Add(@"【2021.10.12 0029】
|
||||
update [TagTriggerHandler] set [HandlerType] = 'visible' where [HandlerType] = '1'
|
||||
update [TagTriggerHandler] set [HandlerType] = 'rotation' where [HandlerType] = '2'
|
||||
update [TagTriggerHandler] set [HandlerType] = 'craft' where [HandlerType] = '3'
|
||||
update [TagTriggerHandler] set [HandlerType] = 'targetlocation' where [HandlerType] = '4'
|
||||
!");
|
||||
|
||||
list.Add(@"【2021.10.14 1447】
|
||||
数据库改动:2021.10.12.0119
|
||||
1.把仿真面板删掉,同时信号视图添加了4列。
|
||||
2.改了TagID处理的 数据类型 HandlerType :int -> String
|
||||
同时修改HandlerType 的值,脚本在程序里。
|
||||
update [TagTriggerHandler] set [HandlerType] = 'visible' where [HandlerType] = '1'
|
||||
update [TagTriggerHandler] set [HandlerType] = 'rotation' where [HandlerType] = '2'
|
||||
update [TagTriggerHandler] set [HandlerType] = 'craft' where [HandlerType] = '3'
|
||||
update [TagTriggerHandler] set [HandlerType] = 'targetlocation' where [HandlerType] = '4'
|
||||
3.信号标签表的ExecValue字段的字符串长度加长。
|
||||
4.删掉InternalVar_Logical表
|
||||
5.OperationTree新增俩字段[ScriptText],[ExistScript]
|
||||
6.信号表新增[IsMonitor]字段, update [SignalViewer] set [IsMonitor] = 'True'
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
1.增加筛选工艺类型生成信号。
|
||||
2.增加信号的模糊查询。
|
||||
3.取消所有绑定。《==》添加所有绑定。
|
||||
4.删除信号时候,删除关联。
|
||||
5.信号的仿真面板,显示值和写入值逻辑不对,并且目前只能写bool。
|
||||
6.启动PLC链接的部分有改动。真实和模拟。
|
||||
|
||||
7.从PLC刷新信号值。
|
||||
8.仿真面板和信号视图,赛选时候的字段不对。
|
||||
9.修改设备树,把冗余的界面修改掉。
|
||||
|
||||
10.测试一根网线访问另一台电脑的两张网卡。
|
||||
11.把TagID处理那部分挪到网页上。
|
||||
12.在工艺的工序中能够增加等待信号。
|
||||
|
||||
13.【采集程序】关闭整个程序。
|
||||
14.【采集程序】关闭时候的弹窗。
|
||||
15.修改操作树节点的属性。
|
||||
16.强制功能,信号的强制。
|
||||
17.选择工位号的界面存储值的修改和记录。
|
||||
18.信号的并集执行(执行脚本)。
|
||||
19.码垛机的位置信息写入。
|
||||
20.脚本的初始值错误少 :
|
||||
21.信号表行高变小。
|
||||
22.运行时候,添加信号,检测不到。也就是OPC重启问题
|
||||
|
||||
23.执行脚本的时候,不想干信号,会执行脚本值为1的脚本逻辑。
|
||||
24.加信号是否监控的属性。
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
!");
|
||||
|
||||
list.Add("【2021.10.16 1053】增加工艺合并功能!");
|
||||
|
||||
list.Add(@"【2021.10.22 2147】
|
||||
|
||||
数据库改动:2021.10.12.0119
|
||||
1.把仿真面板删掉,同时信号视图添加了4列。
|
||||
2.改了TagID处理的 数据类型 HandlerType :int -> String
|
||||
同时修改HandlerType 的值,脚本在程序里。
|
||||
update [TagTriggerHandler] set [HandlerType] = 'visible' where [HandlerType] = '1'
|
||||
update [TagTriggerHandler] set [HandlerType] = 'rotation' where [HandlerType] = '2'
|
||||
update [TagTriggerHandler] set [HandlerType] = 'craft' where [HandlerType] = '3'
|
||||
update [TagTriggerHandler] set [HandlerType] = 'targetlocation' where [HandlerType] = '4'
|
||||
3.信号标签表的ExecValue字段的字符串长度加长。
|
||||
4.删掉InternalVar_Logical表
|
||||
5.OperationTree新增俩字段[ScriptText],[ExistScript]
|
||||
6.信号表新增[IsMonitor]字段, update [SignalViewer] set [IsMonitor] = 'True'
|
||||
7.删掉了表:Program_Config,在表[ProjectList]增加字段[ParamConfig]。
|
||||
8.修改操作树工艺名称的长度改成500。
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
1.增加筛选工艺类型生成信号。
|
||||
2.增加信号的模糊查询。
|
||||
3.取消所有绑定。《==》添加所有绑定。
|
||||
4.删除信号时候,删除关联。
|
||||
5.信号的仿真面板,显示值和写入值逻辑不对,并且目前只能写bool。
|
||||
6.启动PLC链接的部分有改动。真实和模拟。
|
||||
|
||||
7.从PLC刷新信号值。
|
||||
8.仿真面板和信号视图,赛选时候的字段不对。
|
||||
9.修改设备树,把冗余的界面修改掉。
|
||||
|
||||
10.测试一根网线访问另一台电脑的两张网卡。
|
||||
11.把TagID处理那部分挪到网页上。
|
||||
12.在工艺的工序中能够增加等待信号。
|
||||
|
||||
13.【采集程序】关闭整个程序。
|
||||
14.【采集程序】关闭时候的弹窗。
|
||||
15.修改操作树节点的属性。
|
||||
16.强制功能,信号的强制。
|
||||
17.选择工位号的界面存储值的修改和记录。
|
||||
18.信号的并集执行(执行脚本)。
|
||||
19.码垛机的位置信息写入。
|
||||
20.脚本的初始值错误少 :
|
||||
21.信号表行高变小。
|
||||
22.运行时候,添加信号,检测不到。也就是OPC重启问题
|
||||
|
||||
23.执行脚本的时候,不想干信号,会执行脚本值为1的脚本逻辑。
|
||||
24.加信号是否监控的属性。
|
||||
25.修改程序参数配置,把数据存放到项目表里。
|
||||
26.修改强制勾选框,改变后的下次修改值的字段的状态判断。
|
||||
27.网页播放帧数据,第一帧里的附加工艺不能播放。
|
||||
|
||||
31.变量表排序功能不好用。
|
||||
|
||||
33.强制勾选框有时候状态更新不出来!,改到右键按钮执行了。
|
||||
34.在工序中,可以看见绑定的数量和绑定内容。
|
||||
|
||||
36.信号表排序,排序中间会不连续。
|
||||
37.新增加的信号默认不被强制。
|
||||
38.把立库位置调整准确。
|
||||
|
||||
40.伺服值单位配置。
|
||||
41.Datatable的多选。
|
||||
42.立库的位置和模型的删减。
|
||||
|
||||
44.克隆工艺不带标签。删除工艺不删除标签。
|
||||
|
||||
45.使用Advanced强制回写。
|
||||
-----------------------------------------------------------
|
||||
|
||||
28.做信号分类。传感器信号、I信号、O信号。
|
||||
29.传感器打开软件的时候,不能初始化!要能初始化。网页加按钮。
|
||||
30.采集程序把TagID换成GUID。
|
||||
32.缺少逻辑块这个模块。缺少设备这个模块。缺少7轴机器人这个模块。
|
||||
35.找TreeTable控件。
|
||||
|
||||
39.更新一次当前值到模型。
|
||||
|
||||
43.信号表里写名称,再写脚本时候只能写TagID,极难使用。
|
||||
|
||||
|
||||
|
||||
|
||||
");
|
||||
|
||||
list.Add("【2021.10.25 2109】修改了克隆工艺时候的克隆标签!");
|
||||
list.Add("【2021.10.25 2120】修改了删除工艺时候的删除标签!");
|
||||
|
||||
list.Add("【2021.10.25 2337】增加的Adv回写!");
|
||||
|
||||
list.Add("【2021.11.04 1834】增加机器人控制器!增加克隆工艺组!增加删除工序同时删除标签!");
|
||||
|
||||
list.Add("【2021.12.03 0919】增加下载功能!并能够打开目录");
|
||||
|
||||
list.Add("【2021.12.23 1637】拆出界面!");
|
||||
|
||||
list.Add("【2022.01.26 1818】上传到Git版本!");
|
||||
|
||||
list.Add("【2022.01.28 1551】春节前的备份!");
|
||||
|
||||
list.Add("【2022.02.09 1648】改URDF/1000!");
|
||||
|
||||
list.Add("【2022.02.09 1648】改URDF/1!");
|
||||
|
||||
list.Add("【2022.02.12 1037】取消虚拟调试时,单独获取K的协议!可能没取消完整!");
|
||||
|
||||
list.Add("【2022.02.17 1013】修改启动生产线仿真模式时候,创建2个以上连接报错!");
|
||||
|
||||
list.Add("【2022.02.17 1613】增加了姿态编辑界面微调!");
|
||||
|
||||
list.Add("【2022.02.17 2139】修改逻辑块手动创建的BUG!");
|
||||
|
||||
list.Add("【2022.02.18 1526】修改虚拟调试逻辑块播放机器人工艺!");
|
||||
|
||||
list.Add("【2022.02.25 1306】修好了增加信号没有序号的问题!");
|
||||
|
||||
list.Add("【2022.02.25 1559】增加批量修改信号数据类型!");
|
||||
|
||||
list.Add("【2022.02.28 2045】修改信号编辑长度限制50的bug!");
|
||||
|
||||
list.Add("【2022.03.01 0013】生成json数据时[TagTriggerHandler]加了Order by!");
|
||||
|
||||
list.Add("【2022.03.01 0052】修改伺服值,以前是关节ID,改成模型ID!");
|
||||
|
||||
list.Add("【2022.03.01 1746】修改机器人或者最后一个关节的代码!(凑合能用!)");
|
||||
|
||||
list.Add("【2022.03.06 2125】增加机器人工序记录机器人当前关节值。工序可以修改当前关节值。数据库工序表增加字段[CurrJoint]");
|
||||
|
||||
list.Add("【2022.03.07 1137】修复机器人路径之间影响");
|
||||
|
||||
list.Add("【2022.03.10 0931】修复播放间隔和生成数据间隔为20时生成仿真数据报错的问题");
|
||||
|
||||
list.Add("【2022.03.14 0900】添加工艺树随意拖动");
|
||||
|
||||
list.Add("【2022.03.16 1335】允许修改时记录 Joint");
|
||||
|
||||
list.Add("【2022.03.21 1711】修复播放机器人路径joint");
|
||||
|
||||
list.Add("【2022.03.26 0930】Gantt图增加功能");
|
||||
|
||||
list.Add("【2022.04.13 1355】虚拟调试检验设备是否在线");
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static string ProgramVersion = "(内部版本 V : 2022.04.13 1355)";
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
11
DataMirrorTools_Simulator/ModelBasic/app.config
Normal file
11
DataMirrorTools_Simulator/ModelBasic/app.config
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
4
DataMirrorTools_Simulator/ModelBasic/packages.config
Normal file
4
DataMirrorTools_Simulator/ModelBasic/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user