commit 4a6b23db69ff2887f101212c62777bdafe30b4e6 Author: zhusenlin Date: Sat Jan 24 08:45:54 2026 +0800 首次提交:本地项目同步到Gitea diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed6d1d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,402 @@ +# ---> VisualStudio +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +# but not Directory.Build.rsp, as it configures directory-level build defaults +!Directory.Build.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + diff --git a/BarcodeEdit/BarcodeEdit.csproj b/BarcodeEdit/BarcodeEdit.csproj new file mode 100644 index 0000000..08c250c --- /dev/null +++ b/BarcodeEdit/BarcodeEdit.csproj @@ -0,0 +1,169 @@ + + + + + Debug + AnyCPU + {0DA6FB53-139C-415E-9508-10A0A8E3D311} + WinExe + Properties + BarcodeEdit + BarcodeEdit + v4.8 + 512 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + none + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + false + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + false + + + bin\x86\ + false + + + bin\x86\x86\ + x86 + false + + + LocalIntranet + + + true + + + Properties\app.manifest + + + Icon2.ico + + + + + + + + + + + + + + + + Form + + + FrmBarcodeEdit.cs + + + + + FrmBarcodeEdit.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + {998da8fb-1cc7-467a-85a5-404fadac5ed8} + Help + + + {ee859868-a204-44e8-85b3-b080ae587c38} + LibShapes + + + + + False + .NET Framework 3.5 SP1 + false + + + + + \ No newline at end of file diff --git a/BarcodeEdit/FrmBarcodeEdit.cs b/BarcodeEdit/FrmBarcodeEdit.cs new file mode 100644 index 0000000..946f93a --- /dev/null +++ b/BarcodeEdit/FrmBarcodeEdit.cs @@ -0,0 +1,566 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.IO; +using System.Collections; + +using Io.Github.Kerwinxu.LibShapes.Core; +using Io.Github.Kerwinxu.LibShapes.Utils; +using Io.Github.Kerwinxu.LibShapes.Core.Print; +using System.Drawing.Printing; + +namespace BarcodeTerminator +{ + public partial class FrmBarcodeEdit : Form + { + #region 如下几个是私有变量 + + /// + /// 表格信息 + /// + private DataTable CurrentDataTable; + + /// + /// 表格信息的下标 + /// + private int index=-1; + + /// + /// 文件名称 + /// + private string modelfileName; + + /// + /// 取得文件名称 + /// + /// + public string getModelFileName() { return this.modelfileName; } + + #endregion + /// + /// 导入模板文档 + /// + /// + public FrmBarcodeEdit(string modelFileName):this() + { + loadModelFile(modelFileName); + } + + /// + /// 可以导入模板文档以及excel数据 + /// + /// + /// + public FrmBarcodeEdit(string modelFileName, DataTable dt) : this(modelFileName) + { + this.CurrentDataTable = dt; + } + + public FrmBarcodeEdit(DataTable dt) : this() + { + this.CurrentDataTable = dt; + loadDatatable(); + } + + + public FrmBarcodeEdit() + { + InitializeComponent(); + // 界面上的初始化放在这里。 + canvasResize(); + toolboxResize(); + // 画布和工具箱之间是有关联的 + this.toolBox.canvas = this.canvas; + this.canvas.objectSelected += this.toolBox.objectSelected; // 选择更改事件 + this.canvas.stateChanged += this.toolBox.stateChanged; // 状态更改事件 + this.toolBox.PropertyValueChanged += this.canvas.propertyValueChanged; // 属性更改事件 + // + init_printers(); // 加载打印机 + + } + + /// + /// 画布的自动更改尺寸 + /// + private void canvasResize() + { + int _spacing = 5; + this.canvas.Location = new Point(_spacing, _spacing); + this.canvas.Width = this.splitContainer2.Panel1.Width - 2 * _spacing; + this.canvas.Height = this.splitContainer2.Panel1.Height - 2 * _spacing; + + } + + private void init_printers() + { + // 加载打印机的 + foreach (var item in PrinterSettings.InstalledPrinters) + { + combo_printers.Items.Add(item); + } + // 这里有一个默认的打印机 + var doc = new PrintDocument(); + combo_printers.Text = doc.DefaultPageSettings.PrinterSettings.PrinterName; + } + + /// + /// 工具箱的自动更改尺寸。 + /// + private void toolboxResize() + { + int _spacing = 5; + this.toolBox.Location = new Point(_spacing, _spacing); + this.toolBox.Width = this.splitContainer2.Panel2.Width - 2 * _spacing; + this.toolBox.Height = this.splitContainer2.Panel2.Height - 2 * _spacing; + } + + private void splitContainer2_Panel1_Resize(object sender, EventArgs e) + { + canvasResize(); + } + + private void splitContainer2_Panel2_SizeChanged(object sender, EventArgs e) + { + toolboxResize(); + } + + private void 新建NToolStripMenuItem_Click(object sender, EventArgs e) + { + newFile(); + } + + private void 打开OToolStripMenuItem_Click(object sender, EventArgs e) + { + loadModelFile(); + } + + private void 保存SToolStripMenuItem_Click(object sender, EventArgs e) + { + saveModelFile(); + } + + private void 另存为AToolStripMenuItem_Click(object sender, EventArgs e) + { + saveAsModelFile(); + } + + private void 导入EXCEL表格ToolStripMenuItem_Click(object sender, EventArgs e) + { + loadexcel(); + } + + private void 退出XToolStripMenuItem_Click(object sender, EventArgs e) + { + myExit(); + } + + private void 撤消UToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.undo(); + } + + private void 重复RToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.redo(); + } + + private void 剪切TToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.cut(); + } + + private void 复制CToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.copy(); + } + + private void 粘贴PToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.paste(); + } + + private void 全选AToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.selectAll(); + } + + private void 删除DToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.deleteShapes(); + } + + private void 讲ToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.zoomToScreen(); + } + + private void 向前一层ToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.forward(); + } + + private void 向后一层ToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.backward(); + } + + private void 移到最前ToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.forwardToFront(); + } + + private void 移到最后ToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.backwardToEnd(); + } + + private void 分组ToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.mergeGroup(); + } + + private void 解除分组ToolStripMenuItem_Click(object sender, EventArgs e) + { + this.canvas.cancelGroup(); + } + + private void 关于AToolStripMenuItem_Click(object sender, EventArgs e) + { + FrmHelp frmHelp = new FrmHelp(); + frmHelp.ShowDialog(); + } + + private void 新建NToolStripButton_Click(object sender, EventArgs e) + { + newFile(); + } + + private void 打开OToolStripButton_Click(object sender, EventArgs e) + { + loadModelFile(); + } + + private void 保存SToolStripButton_Click(object sender, EventArgs e) + { + saveModelFile(); + } + + private void 剪切UToolStripButton_Click(object sender, EventArgs e) + { + this.canvas.cut(); + } + + private void 复制CToolStripButton_Click(object sender, EventArgs e) + { + this.canvas.copy(); + } + + private void 粘贴PToolStripButton_Click(object sender, EventArgs e) + { + this.canvas.paste(); + } + + private void 导入EXCEL_Click(object sender, EventArgs e) + { + loadexcel(); + } + + + private void bindingNavigatorMovePreviousItem_Click(object sender, EventArgs e) + { + if (CurrentDataTable != null && CurrentDataTable.Rows.Count > 0) index -=1; + updateBinding(); + } + + private void bindingNavigatorMoveFirstItem_Click(object sender, EventArgs e) + { + if (CurrentDataTable != null && CurrentDataTable.Rows.Count > 0) index = 0; + updateBinding(); + } + + private void bindingNavigatorMoveNextItem_Click(object sender, EventArgs e) + { + if (CurrentDataTable != null && index < CurrentDataTable.Rows.Count-1) index += 1; + updateBinding(); + } + + private void bindingNavigatorMoveLastItem_Click(object sender, EventArgs e) + { + if (CurrentDataTable != null && index < CurrentDataTable.Rows.Count - 1) index = CurrentDataTable.Rows.Count - 1; + updateBinding(); + } + + private void btnTestPrint_Click(object sender, EventArgs e) + { + printShapes(1); + } + + private void btnPrint2_Click(object sender, EventArgs e) + { + int num1 = 0; + if (!int.TryParse(txtQtyOfWantToPrinted.Text, out num1)) { MessageBox.Show("打印数量转换失败"); return; } + if (num1 == 0) MessageBox.Show("打印数量为0"); + float num2 = 0; + if (!float.TryParse(txtSunHao.Text, out num2)){ MessageBox.Show("损耗比例转换失败");return; } + if (num2 > 0) num1 = (int)(num1 * (1 + num2)); + printShapes(num1); + } + + private void btnPrint_Click(object sender, EventArgs e) + { + int num = 0; + if (!int.TryParse(txtCurrentPrintPage.Text, out num)) { MessageBox.Show("打印数量转换失败"); return; } + if (num == 0) MessageBox.Show("打印数量为0"); + printShapes(num); + } + + /// + /// 加载模型文件 + /// + private void loadModelFile() + { + openFileDialog1.Filter = "模板文件|*.json"; + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + loadModelFile(openFileDialog1.FileName); + } + } + + private void loadModelFile(string modelFileName) + { + this.modelfileName = modelFileName; + // 然后读取这个文件 + var shapes = Shapes.load(modelFileName); + // 然后更改画布的 + this.canvas.shapes = shapes; + this.canvas.Refresh(); + } + + private void saveModelFile(string modelFileName) + { + if (this.canvas.shapes != null) + { + canvas.shapes.save(modelFileName); + } + } + + private void saveModelFile() + { + // 这里判断一下是否有名字 + if (string.IsNullOrEmpty(this.modelfileName)) + { + saveFileDialog1.AddExtension = true; + saveFileDialog1.DefaultExt = ".json"; + saveFileDialog1.Filter = "模板文件|*.json"; + + if (saveFileDialog1.ShowDialog() == DialogResult.OK) + { + this.modelfileName = saveFileDialog1.FileName; + } + + } + saveModelFile(this.modelfileName); + } + + /// + /// 新建一个文档 + /// + private void newFile() + { + //清空数据 + this.modelfileName = null; + this.CurrentDataTable = null; + this.index = -1; + this.canvas.shapes = new Shapes(); + } + + private string [] getColumnNames (DataTable dt) + { + List columnNameList = new List(); + foreach (DataColumn col in dt.Columns) + { + columnNameList.Add(col.ColumnName);//获取到DataColumn列对象的列名 + } + return columnNameList.ToArray(); + } + + private void loadDatatable() + { + // 然后这里默认是第一行。 + index = 0; + bindingNavigatorCountItem.Text = $"/ {CurrentDataTable.Rows.Count}"; + updateBinding(); + // 这里设置有什么打印的变量。 + var var_names = getColumnNames(CurrentDataTable); + comboBoxQtyOfWantToPrinted.Items.Clear(); + comboBoxQtyOfWantToPrinted.Items.AddRange(var_names); + } + + private void loadexcel() + { + // 读取excel表格 + openFileDialog1.Filter = "excel文件|*.xls;*.xlsx"; + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + CurrentDataTable = ExcelData.LoadExcel(openFileDialog1.FileName); + loadDatatable(); + } + } + + /// + /// 取得 + /// + /// + /// + private Dictionary getDict(int i) + { + var _data = CurrentDataTable.Rows[i]; + // 然后将这个组成字典形式 + Dictionary dict = new Dictionary(); + foreach (DataColumn item in CurrentDataTable.Columns) + { + dict[item.ColumnName] = _data[item.ColumnName].ToString(); + } + return dict; + } + + private void updateBinding() + { + if (index >= 0) + { + // 取得变量 + var dict = getDict(index); + // 设置变量 + this.canvas.setVars(dict); + // 更新打印的数量 + if (dict.ContainsKey(comboBoxQtyOfWantToPrinted.Text)) + { + txtQtyOfWantToPrinted.Text = dict[comboBoxQtyOfWantToPrinted.Text]; + } + } + // 更新几个状态 + if (index < 0 ) + { + bindingNavigatorPositionItem.Text = "0"; + bindingNavigatorCountItem.Text = "0"; + + } + else + { + bindingNavigatorPositionItem.Text = (index + 1).ToString() ; + } + + bindingNavigatorMoveFirstItem.Enabled = index > 0; + bindingNavigatorMovePreviousItem.Enabled = index > 0; + if (CurrentDataTable != null) + { + bindingNavigatorMoveNextItem.Enabled = index < CurrentDataTable.Rows.Count - 1; + bindingNavigatorMoveLastItem.Enabled = index < CurrentDataTable.Rows.Count - 1; + } + else + { + bindingNavigatorMoveNextItem.Enabled = false; + bindingNavigatorMoveLastItem.Enabled = false; + } + + + + } + + + + private void 帮助LToolStripButton_Click(object sender, EventArgs e) + { + FrmHelp frmHelp = new FrmHelp(); + frmHelp.ShowDialog(); + } + + /// + /// 打印。 + /// + /// + private void printShapes(int num) + { + PrintItem printItem = new PrintItem(); + + if (index < 0 ) + { + printItem.Valss.Add(new Dictionary()); // 空白的变量 + } + else + { + // 首先构造变量 + var dict = getDict(index); + printItem.Valss.Add(dict); + } + + // 然后构造数量 + printItem.PrintCounts.Add(1); + // 充满打印 + printItem.isFullPrint = chkIsFull.Checked; + printItem.Shapes = this.canvas.shapes; + printItem.PrinterName = combo_printers.Text; + // 添加到 + PrintManagerImpl printManagerImpl = new PrintManagerImpl(); + printManagerImpl.addPrintItem(printItem); + + } + + private void myExit() + { + // 不管怎么样,只要有图形,就有保存或者另存为 + if (this.canvas.shapes.lstShapes.Count > 0 && MessageBox.Show("需要保存文件吗?") == DialogResult.OK) + { + saveModelFile(); + } + } + + /// + /// 另存为。 + /// + private void saveAsModelFile() + { + + saveFileDialog1.AddExtension = true; + saveFileDialog1.DefaultExt = ".json"; + saveFileDialog1.Filter = "模板文件|*.json"; + + if (saveFileDialog1.ShowDialog() == DialogResult.OK) + { + this.modelfileName = saveFileDialog1.FileName; + } + + saveModelFile(this.modelfileName); + } + + + + private void comboBoxQtyOfWantToPrinted_SelectedIndexChanged(object sender, EventArgs e) + { + // 这里需要判断是否有这个变量 + if (index >= 0) + { + var dict = getDict(index); + // 如果有这个 + if (dict.ContainsKey(comboBoxQtyOfWantToPrinted.Text)) + { + txtQtyOfWantToPrinted.Text = dict[comboBoxQtyOfWantToPrinted.Text]; + } + else + { + txtQtyOfWantToPrinted.Text = string.Empty; + } + } + else + { + txtQtyOfWantToPrinted.Text = string.Empty; + } + + + } + } +} diff --git a/BarcodeEdit/FrmBarcodeEdit.designer.cs b/BarcodeEdit/FrmBarcodeEdit.designer.cs new file mode 100644 index 0000000..3bc7d3d --- /dev/null +++ b/BarcodeEdit/FrmBarcodeEdit.designer.cs @@ -0,0 +1,1002 @@ +namespace BarcodeTerminator +{ + partial class FrmBarcodeEdit + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBarcodeEdit)); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.bindingNavigator1 = new System.Windows.Forms.BindingNavigator(this.components); + this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel(); + this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox(); + this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.btnTestPrint = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.comboBoxQtyOfWantToPrinted = new System.Windows.Forms.ComboBox(); + this.txtQtyOfWantToPrinted = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.txtSunHao = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.btnPrint2 = new System.Windows.Forms.Button(); + this.label4 = new System.Windows.Forms.Label(); + this.txtCurrentPrintPage = new System.Windows.Forms.TextBox(); + this.btnPrint = new System.Windows.Forms.Button(); + this.chkIsFull = new System.Windows.Forms.CheckBox(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.canvas = new Io.Github.Kerwinxu.LibShapes.Core.UserControlCanvas(); + this.toolBox = new Io.Github.Kerwinxu.LibShapes.Core.UserControlToolbox(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.文件FToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.新建NToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.打开OToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.保存SToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.另存为AToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); + this.导入EXCEL表格ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.退出XToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.编辑EToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.撤消UToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.重复RToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator(); + this.剪切TToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.复制CToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.粘贴PToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); + this.全选AToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.删除DToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.查看ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.讲ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.排列ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.顺序ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.向前一层ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.向后一层ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.移到最前ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.移到最后ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); + this.分组ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.解除分组ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); + this.帮助HToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator(); + this.关于AToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.新建NToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.打开OToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.保存SToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); + this.剪切UToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.复制CToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.粘贴PToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.导入EXCEL = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); + this.combo_printers = new System.Windows.Forms.ToolStripComboBox(); + this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); + this.帮助LToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.flowLayoutPanel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingNavigator1)).BeginInit(); + this.bindingNavigator1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Size = new System.Drawing.Size(984, 661); + this.splitContainer1.SplitterDistance = 81; + this.splitContainer1.TabIndex = 0; + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.Controls.Add(this.bindingNavigator1); + this.flowLayoutPanel2.Controls.Add(this.btnTestPrint); + this.flowLayoutPanel2.Controls.Add(this.label2); + this.flowLayoutPanel2.Controls.Add(this.comboBoxQtyOfWantToPrinted); + this.flowLayoutPanel2.Controls.Add(this.txtQtyOfWantToPrinted); + this.flowLayoutPanel2.Controls.Add(this.label7); + this.flowLayoutPanel2.Controls.Add(this.txtSunHao); + this.flowLayoutPanel2.Controls.Add(this.label1); + this.flowLayoutPanel2.Controls.Add(this.btnPrint2); + this.flowLayoutPanel2.Controls.Add(this.label4); + this.flowLayoutPanel2.Controls.Add(this.txtCurrentPrintPage); + this.flowLayoutPanel2.Controls.Add(this.btnPrint); + this.flowLayoutPanel2.Controls.Add(this.chkIsFull); + this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 53); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(982, 26); + this.flowLayoutPanel2.TabIndex = 0; + // + // bindingNavigator1 + // + this.bindingNavigator1.AddNewItem = null; + this.bindingNavigator1.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.bindingNavigator1.CountItem = this.bindingNavigatorCountItem; + this.bindingNavigator1.DeleteItem = null; + this.bindingNavigator1.Dock = System.Windows.Forms.DockStyle.None; + this.bindingNavigator1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.bindingNavigatorMoveFirstItem, + this.bindingNavigatorMovePreviousItem, + this.bindingNavigatorSeparator, + this.bindingNavigatorPositionItem, + this.bindingNavigatorCountItem, + this.bindingNavigatorSeparator1, + this.bindingNavigatorMoveNextItem, + this.bindingNavigatorMoveLastItem, + this.bindingNavigatorSeparator2}); + this.bindingNavigator1.Location = new System.Drawing.Point(0, 2); + this.bindingNavigator1.MoveFirstItem = this.bindingNavigatorMoveFirstItem; + this.bindingNavigator1.MoveLastItem = this.bindingNavigatorMoveLastItem; + this.bindingNavigator1.MoveNextItem = this.bindingNavigatorMoveNextItem; + this.bindingNavigator1.MovePreviousItem = this.bindingNavigatorMovePreviousItem; + this.bindingNavigator1.Name = "bindingNavigator1"; + this.bindingNavigator1.PositionItem = this.bindingNavigatorPositionItem; + this.bindingNavigator1.Size = new System.Drawing.Size(213, 25); + this.bindingNavigator1.TabIndex = 18; + this.bindingNavigator1.Text = "bindingNavigator1"; + // + // bindingNavigatorCountItem + // + this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; + this.bindingNavigatorCountItem.Size = new System.Drawing.Size(39, 22); + this.bindingNavigatorCountItem.Text = "of {0}"; + this.bindingNavigatorCountItem.ToolTipText = "总项数"; + // + // bindingNavigatorMoveFirstItem + // + this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image"))); + this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem"; + this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorMoveFirstItem.Text = "移到第一条记录"; + this.bindingNavigatorMoveFirstItem.Click += new System.EventHandler(this.bindingNavigatorMoveFirstItem_Click); + // + // bindingNavigatorMovePreviousItem + // + this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image"))); + this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem"; + this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorMovePreviousItem.Text = "移到上一条记录"; + this.bindingNavigatorMovePreviousItem.Click += new System.EventHandler(this.bindingNavigatorMovePreviousItem_Click); + // + // bindingNavigatorSeparator + // + this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator"; + this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25); + // + // bindingNavigatorPositionItem + // + this.bindingNavigatorPositionItem.AccessibleName = "位置"; + this.bindingNavigatorPositionItem.AutoSize = false; + this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem"; + this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23); + this.bindingNavigatorPositionItem.Text = "0"; + this.bindingNavigatorPositionItem.ToolTipText = "当前位置"; + // + // bindingNavigatorSeparator1 + // + this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1"; + this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25); + // + // bindingNavigatorMoveNextItem + // + this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image"))); + this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem"; + this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorMoveNextItem.Text = "移到下一条记录"; + this.bindingNavigatorMoveNextItem.Click += new System.EventHandler(this.bindingNavigatorMoveNextItem_Click); + // + // bindingNavigatorMoveLastItem + // + this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image"))); + this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem"; + this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorMoveLastItem.Text = "移到最后一条记录"; + this.bindingNavigatorMoveLastItem.Click += new System.EventHandler(this.bindingNavigatorMoveLastItem_Click); + // + // bindingNavigatorSeparator2 + // + this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2"; + this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25); + // + // btnTestPrint + // + this.btnTestPrint.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.btnTestPrint.Location = new System.Drawing.Point(216, 3); + this.btnTestPrint.Name = "btnTestPrint"; + this.btnTestPrint.Size = new System.Drawing.Size(75, 23); + this.btnTestPrint.TabIndex = 9; + this.btnTestPrint.Text = "测试打印"; + this.btnTestPrint.UseVisualStyleBackColor = true; + this.btnTestPrint.Click += new System.EventHandler(this.btnTestPrint_Click); + // + // label2 + // + this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("SimSun", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(297, 8); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(72, 13); + this.label2.TabIndex = 39; + this.label2.Text = "要打印数量"; + // + // comboBoxQtyOfWantToPrinted + // + this.comboBoxQtyOfWantToPrinted.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.comboBoxQtyOfWantToPrinted.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxQtyOfWantToPrinted.FormattingEnabled = true; + this.comboBoxQtyOfWantToPrinted.Location = new System.Drawing.Point(375, 4); + this.comboBoxQtyOfWantToPrinted.Name = "comboBoxQtyOfWantToPrinted"; + this.comboBoxQtyOfWantToPrinted.Size = new System.Drawing.Size(72, 20); + this.comboBoxQtyOfWantToPrinted.TabIndex = 40; + this.comboBoxQtyOfWantToPrinted.SelectedIndexChanged += new System.EventHandler(this.comboBoxQtyOfWantToPrinted_SelectedIndexChanged); + // + // txtQtyOfWantToPrinted + // + this.txtQtyOfWantToPrinted.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.txtQtyOfWantToPrinted.Location = new System.Drawing.Point(453, 4); + this.txtQtyOfWantToPrinted.Name = "txtQtyOfWantToPrinted"; + this.txtQtyOfWantToPrinted.ReadOnly = true; + this.txtQtyOfWantToPrinted.Size = new System.Drawing.Size(31, 21); + this.txtQtyOfWantToPrinted.TabIndex = 41; + // + // label7 + // + this.label7.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("SimSun", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(490, 5); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(28, 19); + this.label7.TabIndex = 44; + this.label7.Text = "加"; + // + // txtSunHao + // + this.txtSunHao.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.txtSunHao.Location = new System.Drawing.Point(524, 4); + this.txtSunHao.Name = "txtSunHao"; + this.txtSunHao.Size = new System.Drawing.Size(24, 21); + this.txtSunHao.TabIndex = 42; + this.txtSunHao.Text = "1"; + // + // label1 + // + this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("SimSun", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(554, 5); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(19, 19); + this.label1.TabIndex = 49; + this.label1.Text = "%"; + // + // btnPrint2 + // + this.btnPrint2.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.btnPrint2.Location = new System.Drawing.Point(579, 3); + this.btnPrint2.Name = "btnPrint2"; + this.btnPrint2.Size = new System.Drawing.Size(75, 23); + this.btnPrint2.TabIndex = 43; + this.btnPrint2.Text = "按损耗打印"; + this.btnPrint2.UseVisualStyleBackColor = true; + this.btnPrint2.Click += new System.EventHandler(this.btnPrint2_Click); + // + // label4 + // + this.label4.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("SimSun", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(660, 8); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(111, 13); + this.label4.TabIndex = 45; + this.label4.Text = "手动输入打印数量"; + // + // txtCurrentPrintPage + // + this.txtCurrentPrintPage.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.txtCurrentPrintPage.Location = new System.Drawing.Point(777, 4); + this.txtCurrentPrintPage.Name = "txtCurrentPrintPage"; + this.txtCurrentPrintPage.Size = new System.Drawing.Size(46, 21); + this.txtCurrentPrintPage.TabIndex = 47; + // + // btnPrint + // + this.btnPrint.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.btnPrint.Location = new System.Drawing.Point(829, 3); + this.btnPrint.Name = "btnPrint"; + this.btnPrint.Size = new System.Drawing.Size(54, 23); + this.btnPrint.TabIndex = 46; + this.btnPrint.Text = "打印"; + this.btnPrint.UseVisualStyleBackColor = true; + this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click); + // + // chkIsFull + // + this.chkIsFull.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.chkIsFull.AutoSize = true; + this.chkIsFull.Location = new System.Drawing.Point(889, 6); + this.chkIsFull.Name = "chkIsFull"; + this.chkIsFull.Size = new System.Drawing.Size(72, 16); + this.chkIsFull.TabIndex = 48; + this.chkIsFull.Text = "充满打印"; + this.chkIsFull.UseVisualStyleBackColor = true; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.canvas); + this.splitContainer2.Panel1.Resize += new System.EventHandler(this.splitContainer2_Panel1_Resize); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.toolBox); + this.splitContainer2.Panel2.SizeChanged += new System.EventHandler(this.splitContainer2_Panel2_SizeChanged); + this.splitContainer2.Size = new System.Drawing.Size(984, 576); + this.splitContainer2.SplitterDistance = 729; + this.splitContainer2.TabIndex = 0; + // + // canvas + // + this.canvas.GriddingInterval = 2; + this.canvas.isAlignDridding = false; + this.canvas.isDrawDridding = false; + this.canvas.IsEdit = true; + this.canvas.isShift = false; + this.canvas.Location = new System.Drawing.Point(3, 3); + this.canvas.Name = "canvas"; + this.canvas.SelectShape = null; + this.canvas.Size = new System.Drawing.Size(447, 279); + this.canvas.TabIndex = 1; + // + // toolBox + // + this.toolBox.canvas = null; + this.toolBox.Location = new System.Drawing.Point(3, 3); + this.toolBox.Name = "toolBox"; + this.toolBox.Size = new System.Drawing.Size(228, 573); + this.toolBox.TabIndex = 0; + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.文件FToolStripMenuItem, + this.编辑EToolStripMenuItem, + this.查看ToolStripMenuItem, + this.排列ToolStripMenuItem, + this.帮助HToolStripMenuItem1}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(984, 25); + this.menuStrip1.TabIndex = 1; + this.menuStrip1.Text = "menuStrip1"; + // + // 文件FToolStripMenuItem + // + this.文件FToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.新建NToolStripMenuItem, + this.打开OToolStripMenuItem, + this.toolStripSeparator, + this.保存SToolStripMenuItem, + this.另存为AToolStripMenuItem, + this.toolStripSeparator10, + this.导入EXCEL表格ToolStripMenuItem, + this.toolStripSeparator1, + this.退出XToolStripMenuItem}); + this.文件FToolStripMenuItem.Name = "文件FToolStripMenuItem"; + this.文件FToolStripMenuItem.Size = new System.Drawing.Size(58, 21); + this.文件FToolStripMenuItem.Text = "文件(&F)"; + // + // 新建NToolStripMenuItem + // + this.新建NToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("新建NToolStripMenuItem.Image"))); + this.新建NToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.新建NToolStripMenuItem.Name = "新建NToolStripMenuItem"; + this.新建NToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); + this.新建NToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.新建NToolStripMenuItem.Text = "新建(&N)"; + this.新建NToolStripMenuItem.Click += new System.EventHandler(this.新建NToolStripMenuItem_Click); + // + // 打开OToolStripMenuItem + // + this.打开OToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("打开OToolStripMenuItem.Image"))); + this.打开OToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.打开OToolStripMenuItem.Name = "打开OToolStripMenuItem"; + this.打开OToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); + this.打开OToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.打开OToolStripMenuItem.Text = "打开(&O)"; + this.打开OToolStripMenuItem.Click += new System.EventHandler(this.打开OToolStripMenuItem_Click); + // + // toolStripSeparator + // + this.toolStripSeparator.Name = "toolStripSeparator"; + this.toolStripSeparator.Size = new System.Drawing.Size(162, 6); + // + // 保存SToolStripMenuItem + // + this.保存SToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("保存SToolStripMenuItem.Image"))); + this.保存SToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.保存SToolStripMenuItem.Name = "保存SToolStripMenuItem"; + this.保存SToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); + this.保存SToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.保存SToolStripMenuItem.Text = "保存(&S)"; + this.保存SToolStripMenuItem.Click += new System.EventHandler(this.保存SToolStripMenuItem_Click); + // + // 另存为AToolStripMenuItem + // + this.另存为AToolStripMenuItem.Name = "另存为AToolStripMenuItem"; + this.另存为AToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.另存为AToolStripMenuItem.Text = "另存为(&A)"; + this.另存为AToolStripMenuItem.Click += new System.EventHandler(this.另存为AToolStripMenuItem_Click); + // + // toolStripSeparator10 + // + this.toolStripSeparator10.Name = "toolStripSeparator10"; + this.toolStripSeparator10.Size = new System.Drawing.Size(162, 6); + // + // 导入EXCEL表格ToolStripMenuItem + // + this.导入EXCEL表格ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("导入EXCEL表格ToolStripMenuItem.Image"))); + this.导入EXCEL表格ToolStripMenuItem.Name = "导入EXCEL表格ToolStripMenuItem"; + this.导入EXCEL表格ToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.导入EXCEL表格ToolStripMenuItem.Text = "导入EXCEL表格"; + this.导入EXCEL表格ToolStripMenuItem.Click += new System.EventHandler(this.导入EXCEL表格ToolStripMenuItem_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(162, 6); + // + // 退出XToolStripMenuItem + // + this.退出XToolStripMenuItem.Name = "退出XToolStripMenuItem"; + this.退出XToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.退出XToolStripMenuItem.Text = "退出(&X)"; + this.退出XToolStripMenuItem.Click += new System.EventHandler(this.退出XToolStripMenuItem_Click); + // + // 编辑EToolStripMenuItem + // + this.编辑EToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.撤消UToolStripMenuItem, + this.重复RToolStripMenuItem, + this.toolStripSeparator12, + this.剪切TToolStripMenuItem, + this.复制CToolStripMenuItem, + this.粘贴PToolStripMenuItem, + this.toolStripSeparator13, + this.全选AToolStripMenuItem, + this.删除DToolStripMenuItem}); + this.编辑EToolStripMenuItem.Name = "编辑EToolStripMenuItem"; + this.编辑EToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete; + this.编辑EToolStripMenuItem.Size = new System.Drawing.Size(59, 21); + this.编辑EToolStripMenuItem.Text = "编辑(&E)"; + // + // 撤消UToolStripMenuItem + // + this.撤消UToolStripMenuItem.Name = "撤消UToolStripMenuItem"; + this.撤消UToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); + this.撤消UToolStripMenuItem.Size = new System.Drawing.Size(173, 22); + this.撤消UToolStripMenuItem.Text = "撤消(&U)"; + this.撤消UToolStripMenuItem.Click += new System.EventHandler(this.撤消UToolStripMenuItem_Click); + // + // 重复RToolStripMenuItem + // + this.重复RToolStripMenuItem.Name = "重复RToolStripMenuItem"; + this.重复RToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); + this.重复RToolStripMenuItem.Size = new System.Drawing.Size(173, 22); + this.重复RToolStripMenuItem.Text = "重复(&R)"; + this.重复RToolStripMenuItem.Click += new System.EventHandler(this.重复RToolStripMenuItem_Click); + // + // toolStripSeparator12 + // + this.toolStripSeparator12.Name = "toolStripSeparator12"; + this.toolStripSeparator12.Size = new System.Drawing.Size(170, 6); + // + // 剪切TToolStripMenuItem + // + this.剪切TToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("剪切TToolStripMenuItem.Image"))); + this.剪切TToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.剪切TToolStripMenuItem.Name = "剪切TToolStripMenuItem"; + this.剪切TToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); + this.剪切TToolStripMenuItem.Size = new System.Drawing.Size(173, 22); + this.剪切TToolStripMenuItem.Text = "剪切(&T)"; + this.剪切TToolStripMenuItem.Click += new System.EventHandler(this.剪切TToolStripMenuItem_Click); + // + // 复制CToolStripMenuItem + // + this.复制CToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("复制CToolStripMenuItem.Image"))); + this.复制CToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.复制CToolStripMenuItem.Name = "复制CToolStripMenuItem"; + this.复制CToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.复制CToolStripMenuItem.Size = new System.Drawing.Size(173, 22); + this.复制CToolStripMenuItem.Text = "复制(&C)"; + this.复制CToolStripMenuItem.Click += new System.EventHandler(this.复制CToolStripMenuItem_Click); + // + // 粘贴PToolStripMenuItem + // + this.粘贴PToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("粘贴PToolStripMenuItem.Image"))); + this.粘贴PToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.粘贴PToolStripMenuItem.Name = "粘贴PToolStripMenuItem"; + this.粘贴PToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); + this.粘贴PToolStripMenuItem.Size = new System.Drawing.Size(173, 22); + this.粘贴PToolStripMenuItem.Text = "粘贴(&P)"; + this.粘贴PToolStripMenuItem.Click += new System.EventHandler(this.粘贴PToolStripMenuItem_Click); + // + // toolStripSeparator13 + // + this.toolStripSeparator13.Name = "toolStripSeparator13"; + this.toolStripSeparator13.Size = new System.Drawing.Size(170, 6); + // + // 全选AToolStripMenuItem + // + this.全选AToolStripMenuItem.Name = "全选AToolStripMenuItem"; + this.全选AToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); + this.全选AToolStripMenuItem.Size = new System.Drawing.Size(173, 22); + this.全选AToolStripMenuItem.Text = "全选(&A)"; + this.全选AToolStripMenuItem.Click += new System.EventHandler(this.全选AToolStripMenuItem_Click); + // + // 删除DToolStripMenuItem + // + this.删除DToolStripMenuItem.Name = "删除DToolStripMenuItem"; + this.删除DToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete))); + this.删除DToolStripMenuItem.Size = new System.Drawing.Size(173, 22); + this.删除DToolStripMenuItem.Text = "删除(&D)"; + this.删除DToolStripMenuItem.Click += new System.EventHandler(this.删除DToolStripMenuItem_Click); + // + // 查看ToolStripMenuItem + // + this.查看ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.讲ToolStripMenuItem, + this.toolStripSeparator4}); + this.查看ToolStripMenuItem.Name = "查看ToolStripMenuItem"; + this.查看ToolStripMenuItem.Size = new System.Drawing.Size(60, 21); + this.查看ToolStripMenuItem.Text = "查看(&V)"; + // + // 讲ToolStripMenuItem + // + this.讲ToolStripMenuItem.Name = "讲ToolStripMenuItem"; + this.讲ToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3; + this.讲ToolStripMenuItem.Size = new System.Drawing.Size(255, 22); + this.讲ToolStripMenuItem.Text = "将设计区域调整到窗口大小(&F)"; + this.讲ToolStripMenuItem.Click += new System.EventHandler(this.讲ToolStripMenuItem_Click); + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(252, 6); + // + // 排列ToolStripMenuItem + // + this.排列ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.顺序ToolStripMenuItem, + this.toolStripSeparator7, + this.分组ToolStripMenuItem, + this.解除分组ToolStripMenuItem, + this.toolStripSeparator8}); + this.排列ToolStripMenuItem.Name = "排列ToolStripMenuItem"; + this.排列ToolStripMenuItem.Size = new System.Drawing.Size(60, 21); + this.排列ToolStripMenuItem.Text = "排列(&A)"; + // + // 顺序ToolStripMenuItem + // + this.顺序ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.向前一层ToolStripMenuItem, + this.向后一层ToolStripMenuItem, + this.移到最前ToolStripMenuItem, + this.移到最后ToolStripMenuItem}); + this.顺序ToolStripMenuItem.Name = "顺序ToolStripMenuItem"; + this.顺序ToolStripMenuItem.Size = new System.Drawing.Size(221, 22); + this.顺序ToolStripMenuItem.Text = "顺序"; + // + // 向前一层ToolStripMenuItem + // + this.向前一层ToolStripMenuItem.Name = "向前一层ToolStripMenuItem"; + this.向前一层ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); + this.向前一层ToolStripMenuItem.Text = "向前一层"; + this.向前一层ToolStripMenuItem.Click += new System.EventHandler(this.向前一层ToolStripMenuItem_Click); + // + // 向后一层ToolStripMenuItem + // + this.向后一层ToolStripMenuItem.Name = "向后一层ToolStripMenuItem"; + this.向后一层ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); + this.向后一层ToolStripMenuItem.Text = "向后一层"; + this.向后一层ToolStripMenuItem.Click += new System.EventHandler(this.向后一层ToolStripMenuItem_Click); + // + // 移到最前ToolStripMenuItem + // + this.移到最前ToolStripMenuItem.Name = "移到最前ToolStripMenuItem"; + this.移到最前ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); + this.移到最前ToolStripMenuItem.Text = "移到最前"; + this.移到最前ToolStripMenuItem.Click += new System.EventHandler(this.移到最前ToolStripMenuItem_Click); + // + // 移到最后ToolStripMenuItem + // + this.移到最后ToolStripMenuItem.Name = "移到最后ToolStripMenuItem"; + this.移到最后ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); + this.移到最后ToolStripMenuItem.Text = "移到最后"; + this.移到最后ToolStripMenuItem.Click += new System.EventHandler(this.移到最后ToolStripMenuItem_Click); + // + // toolStripSeparator7 + // + this.toolStripSeparator7.Name = "toolStripSeparator7"; + this.toolStripSeparator7.Size = new System.Drawing.Size(218, 6); + // + // 分组ToolStripMenuItem + // + this.分组ToolStripMenuItem.Name = "分组ToolStripMenuItem"; + this.分组ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) + | System.Windows.Forms.Keys.G))); + this.分组ToolStripMenuItem.Size = new System.Drawing.Size(221, 22); + this.分组ToolStripMenuItem.Text = "分组(&G)"; + this.分组ToolStripMenuItem.Click += new System.EventHandler(this.分组ToolStripMenuItem_Click); + // + // 解除分组ToolStripMenuItem + // + this.解除分组ToolStripMenuItem.Name = "解除分组ToolStripMenuItem"; + this.解除分组ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) + | System.Windows.Forms.Keys.U))); + this.解除分组ToolStripMenuItem.Size = new System.Drawing.Size(221, 22); + this.解除分组ToolStripMenuItem.Text = "解除分组(&U)"; + this.解除分组ToolStripMenuItem.Click += new System.EventHandler(this.解除分组ToolStripMenuItem_Click); + // + // toolStripSeparator8 + // + this.toolStripSeparator8.Name = "toolStripSeparator8"; + this.toolStripSeparator8.Size = new System.Drawing.Size(218, 6); + // + // 帮助HToolStripMenuItem1 + // + this.帮助HToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripSeparator14, + this.关于AToolStripMenuItem}); + this.帮助HToolStripMenuItem1.Name = "帮助HToolStripMenuItem1"; + this.帮助HToolStripMenuItem1.Size = new System.Drawing.Size(61, 21); + this.帮助HToolStripMenuItem1.Text = "帮助(&H)"; + // + // toolStripSeparator14 + // + this.toolStripSeparator14.Name = "toolStripSeparator14"; + this.toolStripSeparator14.Size = new System.Drawing.Size(122, 6); + // + // 关于AToolStripMenuItem + // + this.关于AToolStripMenuItem.Name = "关于AToolStripMenuItem"; + this.关于AToolStripMenuItem.Size = new System.Drawing.Size(125, 22); + this.关于AToolStripMenuItem.Text = "关于(&A)..."; + this.关于AToolStripMenuItem.Click += new System.EventHandler(this.关于AToolStripMenuItem_Click); + // + // toolStrip1 + // + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.新建NToolStripButton, + this.打开OToolStripButton, + this.保存SToolStripButton, + this.toolStripSeparator6, + this.剪切UToolStripButton, + this.复制CToolStripButton, + this.粘贴PToolStripButton, + this.toolStripSeparator5, + this.导入EXCEL, + this.toolStripSeparator9, + this.toolStripLabel2, + this.combo_printers, + this.toolStripLabel1, + this.帮助LToolStripButton}); + this.toolStrip1.Location = new System.Drawing.Point(0, 25); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(984, 25); + this.toolStrip1.TabIndex = 2; + this.toolStrip1.Text = "toolStrip1"; + // + // 新建NToolStripButton + // + this.新建NToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.新建NToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("新建NToolStripButton.Image"))); + this.新建NToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.新建NToolStripButton.Name = "新建NToolStripButton"; + this.新建NToolStripButton.Size = new System.Drawing.Size(23, 22); + this.新建NToolStripButton.Text = "新建(&N)"; + this.新建NToolStripButton.Click += new System.EventHandler(this.新建NToolStripButton_Click); + // + // 打开OToolStripButton + // + this.打开OToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.打开OToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("打开OToolStripButton.Image"))); + this.打开OToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.打开OToolStripButton.Name = "打开OToolStripButton"; + this.打开OToolStripButton.Size = new System.Drawing.Size(23, 22); + this.打开OToolStripButton.Text = "打开(&O)"; + this.打开OToolStripButton.Click += new System.EventHandler(this.打开OToolStripButton_Click); + // + // 保存SToolStripButton + // + this.保存SToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.保存SToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("保存SToolStripButton.Image"))); + this.保存SToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.保存SToolStripButton.Name = "保存SToolStripButton"; + this.保存SToolStripButton.Size = new System.Drawing.Size(23, 22); + this.保存SToolStripButton.Text = "保存(&S)"; + this.保存SToolStripButton.Click += new System.EventHandler(this.保存SToolStripButton_Click); + // + // toolStripSeparator6 + // + this.toolStripSeparator6.Name = "toolStripSeparator6"; + this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25); + // + // 剪切UToolStripButton + // + this.剪切UToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.剪切UToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("剪切UToolStripButton.Image"))); + this.剪切UToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.剪切UToolStripButton.Name = "剪切UToolStripButton"; + this.剪切UToolStripButton.Size = new System.Drawing.Size(23, 22); + this.剪切UToolStripButton.Text = "剪切(&U)"; + this.剪切UToolStripButton.Click += new System.EventHandler(this.剪切UToolStripButton_Click); + // + // 复制CToolStripButton + // + this.复制CToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.复制CToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("复制CToolStripButton.Image"))); + this.复制CToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.复制CToolStripButton.Name = "复制CToolStripButton"; + this.复制CToolStripButton.Size = new System.Drawing.Size(23, 22); + this.复制CToolStripButton.Text = "复制(&C)"; + this.复制CToolStripButton.Click += new System.EventHandler(this.复制CToolStripButton_Click); + // + // 粘贴PToolStripButton + // + this.粘贴PToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.粘贴PToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("粘贴PToolStripButton.Image"))); + this.粘贴PToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.粘贴PToolStripButton.Name = "粘贴PToolStripButton"; + this.粘贴PToolStripButton.Size = new System.Drawing.Size(23, 22); + this.粘贴PToolStripButton.Text = "粘贴(&P)"; + this.粘贴PToolStripButton.Click += new System.EventHandler(this.粘贴PToolStripButton_Click); + // + // toolStripSeparator5 + // + this.toolStripSeparator5.Name = "toolStripSeparator5"; + this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); + // + // 导入EXCEL + // + this.导入EXCEL.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.导入EXCEL.Image = ((System.Drawing.Image)(resources.GetObject("导入EXCEL.Image"))); + this.导入EXCEL.ImageTransparentColor = System.Drawing.Color.Magenta; + this.导入EXCEL.Name = "导入EXCEL"; + this.导入EXCEL.Size = new System.Drawing.Size(23, 22); + this.导入EXCEL.Text = "导入EXCEL"; + this.导入EXCEL.Click += new System.EventHandler(this.导入EXCEL_Click); + // + // toolStripSeparator9 + // + this.toolStripSeparator9.Name = "toolStripSeparator9"; + this.toolStripSeparator9.Size = new System.Drawing.Size(6, 25); + // + // toolStripLabel2 + // + this.toolStripLabel2.Name = "toolStripLabel2"; + this.toolStripLabel2.Size = new System.Drawing.Size(44, 22); + this.toolStripLabel2.Text = "打印机"; + // + // combo_printers + // + this.combo_printers.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.combo_printers.Name = "combo_printers"; + this.combo_printers.Size = new System.Drawing.Size(150, 25); + // + // toolStripLabel1 + // + this.toolStripLabel1.Name = "toolStripLabel1"; + this.toolStripLabel1.Size = new System.Drawing.Size(0, 22); + // + // 帮助LToolStripButton + // + this.帮助LToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.帮助LToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("帮助LToolStripButton.Image"))); + this.帮助LToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.帮助LToolStripButton.Name = "帮助LToolStripButton"; + this.帮助LToolStripButton.Size = new System.Drawing.Size(23, 22); + this.帮助LToolStripButton.Text = "帮助(&L)"; + this.帮助LToolStripButton.Click += new System.EventHandler(this.帮助LToolStripButton_Click); + // + // FrmBarcodeEdit + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(984, 661); + this.Controls.Add(this.toolStrip1); + this.Controls.Add(this.menuStrip1); + this.Controls.Add(this.splitContainer1); + this.KeyPreview = true; + this.Name = "FrmBarcodeEdit"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "条形码编辑设计 https://xinyiya.taobao.com/"; + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.flowLayoutPanel2.ResumeLayout(false); + this.flowLayoutPanel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingNavigator1)).EndInit(); + this.bindingNavigator1.ResumeLayout(false); + this.bindingNavigator1.PerformLayout(); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.BindingSource bindingSource1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private System.Windows.Forms.Button btnTestPrint; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox comboBoxQtyOfWantToPrinted; + private System.Windows.Forms.TextBox txtQtyOfWantToPrinted; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox txtSunHao; + private System.Windows.Forms.Button btnPrint2; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtCurrentPrintPage; + private System.Windows.Forms.Button btnPrint; + private System.Windows.Forms.BindingNavigator bindingNavigator1; + private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem; + private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator; + private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem; + private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1; + private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem; + private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem 文件FToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 新建NToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 打开OToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator; + private System.Windows.Forms.ToolStripMenuItem 保存SToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 另存为AToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator10; + private System.Windows.Forms.ToolStripMenuItem 导入EXCEL表格ToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem 退出XToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 编辑EToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 撤消UToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 重复RToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator12; + private System.Windows.Forms.ToolStripMenuItem 剪切TToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 复制CToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 粘贴PToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator13; + private System.Windows.Forms.ToolStripMenuItem 全选AToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 删除DToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 查看ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 讲ToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripMenuItem 排列ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 顺序ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 向前一层ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 向后一层ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 移到最前ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 移到最后ToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; + private System.Windows.Forms.ToolStripMenuItem 分组ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 解除分组ToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; + private System.Windows.Forms.ToolStripMenuItem 帮助HToolStripMenuItem1; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator14; + private System.Windows.Forms.ToolStripMenuItem 关于AToolStripMenuItem; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton 新建NToolStripButton; + private System.Windows.Forms.ToolStripButton 打开OToolStripButton; + private System.Windows.Forms.ToolStripButton 保存SToolStripButton; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; + private System.Windows.Forms.ToolStripButton 剪切UToolStripButton; + private System.Windows.Forms.ToolStripButton 复制CToolStripButton; + private System.Windows.Forms.ToolStripButton 粘贴PToolStripButton; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; + private System.Windows.Forms.ToolStripButton 导入EXCEL; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator9; + private System.Windows.Forms.ToolStripButton 帮助LToolStripButton; + private System.Windows.Forms.CheckBox chkIsFull; + private Io.Github.Kerwinxu.LibShapes.Core.UserControlCanvas canvas; + private Io.Github.Kerwinxu.LibShapes.Core.UserControlToolbox toolBox; + private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.ToolStripLabel toolStripLabel2; + private System.Windows.Forms.ToolStripComboBox combo_printers; + private System.Windows.Forms.ToolStripLabel toolStripLabel1; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/BarcodeEdit/FrmBarcodeEdit.resx b/BarcodeEdit/FrmBarcodeEdit.resx new file mode 100644 index 0000000..ca07139 --- /dev/null +++ b/BarcodeEdit/FrmBarcodeEdit.resx @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 165, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA6vAAAOrwFxEUPuAAABKklE + QVQ4T2MYPKBw1vP/TQue/8+c+Pg/VAgDhLc/wCnHkDvz2f9VR97/x6UovvvB/+CGa7gNyJjy9P/CfR+w + Korvefh/6f7///2rL+A2IKHnyf9pW95jKIpovw/WnDnr/3+v0hO4DYjsevS/d/UHFEWhrffAmlvXAW3v + /PvfJf8AbgMCmx/+r5v/Dq4ouOXu/0V7///vAGrOmPPzv13dz//2GdtxG+BRdf9//rQ3KIrsim//T5/z + +79/17f/OoXv/lskrMdtgH3p3f/Zk19jKNJPOf/fpOjFf5WsT/+NI5fhNsAi787/1P7XWBUZJJ34L5v2 + 9b9u8DzcBhhm3f4f1vISpyL91Mv/NXyn4TZAJ+3Gf7/qh3gVqXhMwG2AU+6V/yAFeBUNQsDAAADwdsCr + peWacAAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA6vAAAOrwFxEUPuAAAAtklE + QVQ4T2MYOiC8/cF/KJN0EN/94H9wwzXyDIjvefh/6f7///2rL5BuQET7fbDmzFn//3uVniDNgNDWe2DN + reuAtnf+/e+Sf4B4A4Jb7v5ftPf//w6g5ow5P//b1f38b5+xnTQX2BXf/p8+5/d//65v/3UK3/23SFhP + ehjop5z/b1L04r9K1qf/xpHLSDcABAySTvyXTfv6Xzd4HnkGgIB+6uX/Gr7TyDcABFQ8JlBmwGAFDAwA + 0BRgmAS6UFUAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA6vAAAOrwFxEUPuAAAAo0lE + QVQ4T2MYfKBw1vP/UCZ5IHfms/8J3ffINyRjytP/8/b//p/QdYc8QxJ6nvyfve/X/86tf/+7lV4m3ZDI + rkf/p2z79b9k6d//CdP//rfJPUuaIYHND/+3rn0P1mxc8uW/dPS1/8aRy4g3xKPq/v+Sue/gmhVdekhz + gX3p3f+BLc/I0wwCFnl3/tsUXCFPMwgYZt0mXzMI6KTdIF/zUAQMDACgfl+gBzRCOAAAAABJRU5ErkJg + gg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA6vAAAOrwFxEUPuAAABLElE + QVQ4T2MYXKBw1vP/UCYGAMk1LXj+P3PiY5xqGHJnPvuf0H0PqwKQ3Koj7/+Htz/AbUDGlKf/5+3//T+h + 6w6GIpDcwn0f/gc3XMNtQELPk/+z9/3637n173+30ssoCkFy07a8/+9ffQG3AZFdj/5P2fbrf8nSv/8T + pv/9b5N7Fq4YJNe7+sN/r9ITuA0IbH74v3Xte7Bm45Iv/6Wjr/03jlwG1gCSq5v/7r9L/gHcBnhU3f9f + MvcdXLOiSw9cMUguf9qb//YZ23EbYF96939gyzMMzSAAksue/Pq/RcJ63AZY5N35b1NwBUMzCIDkUvtf + w72EFRhm3caqGQRAcmEtL//rBs/DbYBO2g2ckiA5v+qH/zV8p+E2AB9wyr3yX8VjAhhDhQYFYGAAAL7R + v7O5DE6cAAAAAElFTkSuQmCC + + + + 17, 17 + + + 473, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAERSURBVDhPrZDbSgJRGIXnpewd6jXsjSQvIrwoI0RQMChU + 0iiDPCGiE3ZCRkvR8VzTeBhnyR5/ccaZNnPhB4t9sdf6Ln5hb8QeathNJFVFKF5C8DqL4ksDVHWGDf7j + LHyPg6NjviSaFqlu5yQYR+KpupaIkrMknCxT3Y7v/NYYb0ITK1c3BarbWWhLQ7IR0cTKReyZ6lZ0XYei + ztHpK4bAc+h1FgQijzSxMptrGIxVSO0xX3AaStFki7bUMVFmaMm/eJMGfIH/MkGzLep0AXn4h/r3CJV3 + mS9gn2bY4UY/UzQ7E9TqfeTFtnuB+XAfzSHKr11kSl/uBebDiZ89ZCst3OUkdwL28sIVsE83ock+EIQV + 2Mz2wxeg6/UAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJHSURBVDhPxZBdSNNhFMb/F110ZZEVhVBgeeHNICiiuggp + olAUyyxI0oSaH1QYC3N+tKnp5ubm1JUua5uuqdNKMwr7kApFItTUkWZqVhSVYmao5Nevvy7UoYR3HXh4 + 4XCe33nOKyy3lAY7l9RWMo0O/raWXxEyo5spVYTNvOGyfIRPfW+ptOkXqaPl6T83hcRmExSdgzAz3NVm + YWyoYla/B+1M9JtxWLPpaH22JORIjI6gKAMB0jyEimIdo4OlbuaprwVMOOMovammpDADc34qppwUrmnl + 5Kni3aFlFg2j3y1z5mnRTJccnNIltQhwq0jFry+mOXNtpWZWDx1Z1NhV3C3JwGFOw25SYjVe5oYhiUKd + HKMmwQUrMWUw/CF3NnZvvYKqUh1TvUroS3fXe7HXkwidMngTS2t5KLbregSzMY2f3Wr4qKW6LJvGR1rX + 0MLor8OhKYTJBn/GHvvxrliCTBrsOqXIoOBHh5K+hmSq7FqmexTQHuUytkaKxuNMNgYyVneA4Qd7GKjc + hjLaRzxH7gIU6JIZaEvgtk1D8wsxSWecCDgNzWFMvwxm/PkhRmr3Mli1nW9lvjRdWc0Jf+/5jzRmyWmv + S+GOLQu6U6BFjPvqKOP1AYw88WOoZif9DgmfLVtxaj1RSLdwNvrkPCA3M54KqxrnvRia9MKcGrUrqFOt + 5H7qKsqT1mGO9+Lqhc2ELdw+U/r0i+gVZ8hMiCDx3DHORwZyKnQ/hw/uYt9uCTskPvh6e7Fp41rWr/Fg + g6eHO+A/lyD8ARfG3mk9fv1YAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIySURBVDhPrZLfS5NRGMfff6H7boIuuq2pMZyL1eAt11CW + DcOKsB9vpFmaLtNExco0av6CbIVLJ61Wk3BSkT/AFCkRZSpZmrmiJQ41xSaCwdfznL15XEUX0Reem5f3 + 8znnec4j/Zc8fxYGla91CS3eRTx0z6OpMYS7jmnU1X6B/VYA18snUVoyjsKCt8jLHcH5c36ouCQR2NUJ + 1Nas4G9ZXlmFKbULh1Kf8lJxSfI+WeCCyopv6q+/h+DQ/DJ2WV5Ao1FgPegRAveDOS4oLfmq/h6dn/DH + 4AJizD4UXJrCAUuzEDgbZrjgou2DiohshIcnQtgme5GTPYbkJKcQ1N8OckHW2REVi+RXuM8fxGaDG4oy + ALPZIQQ11Z+5QDk1oKJ/hjv7P2FTfCMOH3mFxMQ6IbhROYWOdrCnBI4dfwPr0V4+bRoY9UzXppMjcDdS + rC8hy3YhuFI2gTYf2A4Aza4f7N2/o/zaLB8qDYx6zszwr8P7k1thNFYIweXCMXgeAfedq2xxwjClZUeV + Jd2GtDNFETiJwfs8MBjKhMCWN8pgoLoqzE8miH1GjE7G4PsZjE7OQsm9ij2mFg7rdrug1xcJAa2l4w7W + r00Cgk/n38S7wBwC04u4UGxHrMHF4CbEJtyDLj5fCDIzhljfSxzeavRgyw4Zj9t64GvvQ0d3P3pfD2Kv + 2QqNvgFxDN6urYdWmyMElJMnevh60obRktA701PRtGlg1DOdSkXwzrisaMG/RZLWAE60OMW5fNhvAAAA + AElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABTUlEQVQ4T5WTLW7EMBCFc5QcwUfwEXwE + w4WGCw0DDQsDAwMDFxYWFgYWBi6bvjeOE+dHlRrpkyIr7/PM2GnSK0qaosQxSBwyofcSPogTn0C3Eq24 + 50rINAyP36PSf/WZz7SRJnCzCTkIbp93ZnkvF1ilCmi9FfwRXpZagFJYNp8wou8Vj/5LwEf2v6MCzMgG + cxQ4hFhNnNAj0AEioMLBiekQeDQyL/MuYCkclj4o2SarwkDBgDI7ewlngRP7oAAmFVT98mOuUcCw7lSF + TwKnR1XC2vO6I4+PbbA141vMhbPxKuA61xq+8MM6XHpun63EkyQNUeafWoAbxruw7ezMAUp0HpXkKMD1 + 5F0oFfCICiyVO56lFDgM2zgIeK95lHW4HpaCwJmr4B9h4hKroQDXkQL9A7e/kGCYgL0WuGvGHAUFnvcG + zrjAYW0gtNPKL6BnvsfvUJjCAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGDSURBVDhPrZFNSwJRGIX9NYGbFoUlFElY1EJQKEYhCJsi + LaVsERnRF5iCaSZJO1toCDVGFkgoFpWQWWRR2aIvUxm1BKN1wSnHCFw4TOCzue+9nPNw4eVVnav4Izzb + QfxeGZ5TWaxT/rK3irzmC7CsusvC1G4IkbNLboIiDieF4GGUKeTeClDpppF8eeEu2PIfwfrzizSdw3Hk + EnKlFpkMzV2wH77AosOFTV8A+vkl9CiHuJeLJNNZjM8tYWB0FkTvMAwmy/8ERTR6CwjlGAi1Ccence6C + 1NsXzN4PKIxJLLgeIJ2MoXvmFraNBKK3eXZRIveJPvs7FIYniEkXZENOdE+GIZ2Ko10TwLK7tJmKmL0F + EEYarYM+NMnt0C1sQzpx/lcSEnZ2gcKY/gs0dlmZuWvmjjmpwA1qxVp2AWFIMAF/OAGBzMjMI7ZrtJCb + 4Df3o4Zfxy7QrdxDRFKol5khkpR2H4qmIOzUQNBGwrsXYxccnNOQqNbQ0KGGZ+eEPVwdeLxvqqrf4wGh + TNAAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHkSURBVDhPvZHfS1NhHIf3p5QypLr2D4goMwoMCi/qIugH + Xe1Cr7qKDIMkZixwNhfWLGWbnuki0kXKzLU023KubBNPJrbRdOzocm6e2dPOO21mMS+CHvjcvOf9PF++ + 79H9M+7RT2iRRsIi9sEAXe43yAvf2LpSHq28G9uAnytNT4jMLewtcQ2Ht2pF8ps/aOt+gccX5lxD694S + +1BQFD1RkN5DSFa4Z3uONKbgHE3h8KZ4OJTC1J8UiSzmfhd2uf1CoJHbyKOsZokl0kKwm+aeJaov+wjO + rpQkVqdXfOz0bWAcVLghfaXxkUz3y2VxvpMGSwL3uMKh+gHezSSLEnNhX23vtYzKUirDfGyFj/Iy1mdx + UWqR8iKhwtQLxjgH659y4EwvVXWPiwJt3/Ws+muywRrlqvkDdx3zQrCN8l1ldnEd3/QqFmkS/akHJYGS + zjLzOUEwEsMf+sLI2zmaOou/93pPGoM5zvk7UU7fnBKxSBPoT7SXBNW1F/9Io2lKCNTCeomUyrS8xnBA + wfUqyf1eP5U1ptJD/o1LzeNCsHPydtqdr6k4aiwvOHvNSya3ibU/QIdrEkvfhJislc32MfYfuV1eUGPw + FF7bIVJVZ0N/soPK421UHGstlFvYd/hWecF/Qqf7CR0A5wwgSQA2AAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJSSURBVDhPtZJrSJNRGMdf6IN9KbpQn/pUEH2JIoLqQ0Zh + FqYZRmJG1iKmUqKyLB2pqSm6vC1Nm5GXoeatEsVJ0RASR3eNzegikRq5lrV3857Fr/d9ddlICoL+8OfA + Oef/e57zcIT/os7WLMw302muSGJ2689qqi7A44q8IzjtNYzarzHQm8tZtT8FmRqu6LToMxN+B8qhCbGR + KVcDE85ajKUaxoaryEuL4UVXIudPB5Ko2oy98xjDptXERuz3hsgAOTzlqqMk6yjdllzE90UM9Wp5azlB + S1kwkeG+1CSv4mmBQPThfd6Ahqq8GYB4A11yBKmaMLQxoZyLDkGjDiZOFUhUuB+FsWsUQFiArzegtlzH + pFjPpMPA2GA2jucx2KqWK7ZWLqO7dBGP9D5KWLbfto3eAKMhi3FHBeP9GYy9PMXos4OIrYvJrzSRbWjm + wuV6EnVG4tLLiEzSExGf4w0oL05nZEDPaK+akceBuO9v4uPtFUrYo6npbzhdE/QPOQmNSiPouHYOUpaf + gvgqA/dDf9wd63G1r2SgUlAqyyq/1anYUGfG2mdXwne7bOwJUc1AinOS+NxzBpd5HWLbUhyNPvRdF5S2 + v05/54tbqvzBifWNHUvPOwLC4/CXwrv2HsB3+w6EwosJOB5ESeElfGpayGD1AmwlArHSm+W2PR1clToo + MrbT0mFTVtlbN6xFuJQar3wQz5Q9VksD+7XyPctrJdx4p5s605M5gKz8lJPSDwtGFbKboJ1blAN52vKb + PdXm80/AfDokTVu+8DfPXv9XCcIPTvjvLQ8YoakAAAAASUVORK5CYII= + + + + 593, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAERSURBVDhPrZDbSgJRGIXnpewd6jXsjSQvIrwoI0RQMChU + 0iiDPCGiE3ZCRkvR8VzTeBhnyR5/ccaZNnPhB4t9sdf6Ln5hb8QeathNJFVFKF5C8DqL4ksDVHWGDf7j + LHyPg6NjviSaFqlu5yQYR+KpupaIkrMknCxT3Y7v/NYYb0ITK1c3BarbWWhLQ7IR0cTKReyZ6lZ0XYei + ztHpK4bAc+h1FgQijzSxMptrGIxVSO0xX3AaStFki7bUMVFmaMm/eJMGfIH/MkGzLep0AXn4h/r3CJV3 + mS9gn2bY4UY/UzQ7E9TqfeTFtnuB+XAfzSHKr11kSl/uBebDiZ89ZCst3OUkdwL28sIVsE83ock+EIQV + 2Mz2wxeg6/UAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJHSURBVDhPxZBdSNNhFMb/F110ZZEVhVBgeeHNICiiuggp + olAUyyxI0oSaH1QYC3N+tKnp5ubm1JUua5uuqdNKMwr7kApFItTUkWZqVhSVYmao5Nevvy7UoYR3HXh4 + 4XCe33nOKyy3lAY7l9RWMo0O/raWXxEyo5spVYTNvOGyfIRPfW+ptOkXqaPl6T83hcRmExSdgzAz3NVm + YWyoYla/B+1M9JtxWLPpaH22JORIjI6gKAMB0jyEimIdo4OlbuaprwVMOOMovammpDADc34qppwUrmnl + 5Kni3aFlFg2j3y1z5mnRTJccnNIltQhwq0jFry+mOXNtpWZWDx1Z1NhV3C3JwGFOw25SYjVe5oYhiUKd + HKMmwQUrMWUw/CF3NnZvvYKqUh1TvUroS3fXe7HXkwidMngTS2t5KLbregSzMY2f3Wr4qKW6LJvGR1rX + 0MLor8OhKYTJBn/GHvvxrliCTBrsOqXIoOBHh5K+hmSq7FqmexTQHuUytkaKxuNMNgYyVneA4Qd7GKjc + hjLaRzxH7gIU6JIZaEvgtk1D8wsxSWecCDgNzWFMvwxm/PkhRmr3Mli1nW9lvjRdWc0Jf+/5jzRmyWmv + S+GOLQu6U6BFjPvqKOP1AYw88WOoZif9DgmfLVtxaj1RSLdwNvrkPCA3M54KqxrnvRia9MKcGrUrqFOt + 5H7qKsqT1mGO9+Lqhc2ELdw+U/r0i+gVZ8hMiCDx3DHORwZyKnQ/hw/uYt9uCTskPvh6e7Fp41rWr/Fg + g6eHO+A/lyD8ARfG3mk9fv1YAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIySURBVDhPrZLfS5NRGMfff6H7boIuuq2pMZyL1eAt11CW + DcOKsB9vpFmaLtNExco0av6CbIVLJ61Wk3BSkT/AFCkRZSpZmrmiJQ41xSaCwdfznL15XEUX0Reem5f3 + 8znnec4j/Zc8fxYGla91CS3eRTx0z6OpMYS7jmnU1X6B/VYA18snUVoyjsKCt8jLHcH5c36ouCQR2NUJ + 1Nas4G9ZXlmFKbULh1Kf8lJxSfI+WeCCyopv6q+/h+DQ/DJ2WV5Ao1FgPegRAveDOS4oLfmq/h6dn/DH + 4AJizD4UXJrCAUuzEDgbZrjgou2DiohshIcnQtgme5GTPYbkJKcQ1N8OckHW2REVi+RXuM8fxGaDG4oy + ALPZIQQ11Z+5QDk1oKJ/hjv7P2FTfCMOH3mFxMQ6IbhROYWOdrCnBI4dfwPr0V4+bRoY9UzXppMjcDdS + rC8hy3YhuFI2gTYf2A4Aza4f7N2/o/zaLB8qDYx6zszwr8P7k1thNFYIweXCMXgeAfedq2xxwjClZUeV + Jd2GtDNFETiJwfs8MBjKhMCWN8pgoLoqzE8miH1GjE7G4PsZjE7OQsm9ij2mFg7rdrug1xcJAa2l4w7W + r00Cgk/n38S7wBwC04u4UGxHrMHF4CbEJtyDLj5fCDIzhljfSxzeavRgyw4Zj9t64GvvQ0d3P3pfD2Kv + 2QqNvgFxDN6urYdWmyMElJMnevh60obRktA701PRtGlg1DOdSkXwzrisaMG/RZLWAE60OMW5fNhvAAAA + AElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGDSURBVDhPrZFNSwJRGIX9NYGbFoUlFElY1EJQKEYhCJsi + LaVsERnRF5iCaSZJO1toCDVGFkgoFpWQWWRR2aIvUxm1BKN1wSnHCFw4TOCzue+9nPNw4eVVnav4Izzb + QfxeGZ5TWaxT/rK3irzmC7CsusvC1G4IkbNLboIiDieF4GGUKeTeClDpppF8eeEu2PIfwfrzizSdw3Hk + EnKlFpkMzV2wH77AosOFTV8A+vkl9CiHuJeLJNNZjM8tYWB0FkTvMAwmy/8ERTR6CwjlGAi1Ccence6C + 1NsXzN4PKIxJLLgeIJ2MoXvmFraNBKK3eXZRIveJPvs7FIYniEkXZENOdE+GIZ2Ko10TwLK7tJmKmL0F + EEYarYM+NMnt0C1sQzpx/lcSEnZ2gcKY/gs0dlmZuWvmjjmpwA1qxVp2AWFIMAF/OAGBzMjMI7ZrtJCb + 4Df3o4Zfxy7QrdxDRFKol5khkpR2H4qmIOzUQNBGwrsXYxccnNOQqNbQ0KGGZ+eEPVwdeLxvqqrf4wGh + TNAAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHkSURBVDhPvZHfS1NhHIf3p5QypLr2D4goMwoMCi/qIugH + Xe1Cr7qKDIMkZixwNhfWLGWbnuki0kXKzLU023KubBNPJrbRdOzocm6e2dPOO21mMS+CHvjcvOf9PF++ + 79H9M+7RT2iRRsIi9sEAXe43yAvf2LpSHq28G9uAnytNT4jMLewtcQ2Ht2pF8ps/aOt+gccX5lxD694S + +1BQFD1RkN5DSFa4Z3uONKbgHE3h8KZ4OJTC1J8UiSzmfhd2uf1CoJHbyKOsZokl0kKwm+aeJaov+wjO + rpQkVqdXfOz0bWAcVLghfaXxkUz3y2VxvpMGSwL3uMKh+gHezSSLEnNhX23vtYzKUirDfGyFj/Iy1mdx + UWqR8iKhwtQLxjgH659y4EwvVXWPiwJt3/Ws+muywRrlqvkDdx3zQrCN8l1ldnEd3/QqFmkS/akHJYGS + zjLzOUEwEsMf+sLI2zmaOou/93pPGoM5zvk7UU7fnBKxSBPoT7SXBNW1F/9Io2lKCNTCeomUyrS8xnBA + wfUqyf1eP5U1ptJD/o1LzeNCsHPydtqdr6k4aiwvOHvNSya3ibU/QIdrEkvfhJislc32MfYfuV1eUGPw + FF7bIVJVZ0N/soPK421UHGstlFvYd/hWecF/Qqf7CR0A5wwgSQA2AAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJSSURBVDhPtZJrSJNRGMdf6IN9KbpQn/pUEH2JIoLqQ0Zh + FqYZRmJG1iKmUqKyLB2pqSm6vC1Nm5GXoeatEsVJ0RASR3eNzegikRq5lrV3857Fr/d9ddlICoL+8OfA + Oef/e57zcIT/os7WLMw302muSGJ2689qqi7A44q8IzjtNYzarzHQm8tZtT8FmRqu6LToMxN+B8qhCbGR + KVcDE85ajKUaxoaryEuL4UVXIudPB5Ko2oy98xjDptXERuz3hsgAOTzlqqMk6yjdllzE90UM9Wp5azlB + S1kwkeG+1CSv4mmBQPThfd6Ahqq8GYB4A11yBKmaMLQxoZyLDkGjDiZOFUhUuB+FsWsUQFiArzegtlzH + pFjPpMPA2GA2jucx2KqWK7ZWLqO7dBGP9D5KWLbfto3eAKMhi3FHBeP9GYy9PMXos4OIrYvJrzSRbWjm + wuV6EnVG4tLLiEzSExGf4w0oL05nZEDPaK+akceBuO9v4uPtFUrYo6npbzhdE/QPOQmNSiPouHYOUpaf + gvgqA/dDf9wd63G1r2SgUlAqyyq/1anYUGfG2mdXwne7bOwJUc1AinOS+NxzBpd5HWLbUhyNPvRdF5S2 + v05/54tbqvzBifWNHUvPOwLC4/CXwrv2HsB3+w6EwosJOB5ESeElfGpayGD1AmwlArHSm+W2PR1clToo + MrbT0mFTVtlbN6xFuJQar3wQz5Q9VksD+7XyPctrJdx4p5s605M5gKz8lJPSDwtGFbKboJ1blAN52vKb + PdXm80/AfDokTVu+8DfPXv9XCcIPTvjvLQ8YoakAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFNSURBVDhPlZMtbsQwEIVzlBzBR/ARfATDhYYLDQMNCwMD + AwMXFhYWBhYGLpu+N44T50eVGumTIivv88zYadIrSpqixDFIHDKh9xI+iBOfQLcSrbjnSsg0DI/fo9J/ + 9ZnPtJEmcLMJOQhun3dmeS8XWKUKaL0V/BFellqAUlg2nzCi7xWP/kvAR/a/owLMyAZzFDiEWE2c0CPQ + ASKgwsGJ6RB4NDIv8y5gKRyWPijZJqvCQMGAMjt7CWeBE/ugACYVVP3yY65RwLDuVIVPAqdHVcLa87oj + j49tsDXjW8yFs/Eq4DrXGr7wwzpcem6frcSTJA1R5p9agBvGu7Dt7MwBSnQeleQowPXkXSgV8IgKLJU7 + nqUUOAzbOAh4r3mUdbgeloLAmavgH2HiEquhANeRAv0Dt7+QYJiAvRa4a8YcBQWe9wbOuMBhbSC008ov + oGe+x+9QmMIAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIVSURBVDhPtVJNaxNRFM1PyE+Yn1AUXLjK0uWgDWQZwUUX + KsGFBEEcCkIwqBEpGiydsSo2kupsasdo7Yi2toh0sFZjG5JpiZo20/TpVOmH5njvm8BYahEXHji8+968 + c+55l4n8F0zM+rhVWkHmdg29A/PoK1Yw8uIjOp/3xpvqBgrjLeilZbjNLXxZ34bwt6jexMVCGRndQenl + 0p+NWHzPXoP3rQ3bAbQhQM0E5Np2BKprbZzrm8TIs8puE+68+r0NwwZiacCwALEBCVcAqet8JlAjk1PZ + JzsNJt6u4+FMS3ZmMV9mmFNAMhesbBZLC6oFdOsd8oVXocmdx018Ej9k1FgqiJ0zgS6qlR6BVI4iEFRN + IJlxMF/1cfTMcGiQvbskB6ZqgairJ6BCTJKYu9tlAUW1oSRsNDwfB+JXQ4PzN6s07W0ZPxDS5aSgJEFn + 06Y9CaOqSauJRvMr9qmXQ4P8/RoWvU16eyBUEq5kbigwiKoOMTBQ0zbKlTq6TxihwejkZ1iOJwfEwmiC + BQ49yaW50J7Fh0xJw3IxbM3hwo2x0ICRHZzFgveTunYERK5lgo5YMxx8WPFw5Li+U8wYm66jNz+Naov+ + Beqiao58N5NrPluoryJO0QeKU7sNGKPPazh9aRzGo/eYmVvEMk270fTlmzl2N3XW9xL/jv7iaxw7+wAH + E9ew//AVxE8OItv/9O/Cf0ck8gud2vKswuxNZgAAAABJRU5ErkJggg== + + + + 328, 17 + + + 703, 17 + + + 45 + + \ No newline at end of file diff --git a/BarcodeEdit/Icon2.ico b/BarcodeEdit/Icon2.ico new file mode 100644 index 0000000..ee69233 Binary files /dev/null and b/BarcodeEdit/Icon2.ico differ diff --git a/BarcodeEdit/Icon3.ico b/BarcodeEdit/Icon3.ico new file mode 100644 index 0000000..9cf839f Binary files /dev/null and b/BarcodeEdit/Icon3.ico differ diff --git a/BarcodeEdit/Program.cs b/BarcodeEdit/Program.cs new file mode 100644 index 0000000..c578d90 --- /dev/null +++ b/BarcodeEdit/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace BarcodeTerminator +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main(string[] args) + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + if (args.Length > 0) + { + Application.Run(new FrmBarcodeEdit(args[0])); + + } + else + { + Application.Run(new FrmBarcodeEdit()); + } + + } + } +} diff --git a/BarcodeEdit/Properties/AssemblyInfo.cs b/BarcodeEdit/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..05bd045 --- /dev/null +++ b/BarcodeEdit/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("条形码模板编辑")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("徐恒晓")] +[assembly: AssemblyProduct("BarcodeEdit")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("84919fb0-2c19-467f-8953-110afe3e5984")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BarcodeEdit/Properties/Resources.Designer.cs b/BarcodeEdit/Properties/Resources.Designer.cs new file mode 100644 index 0000000..064c712 --- /dev/null +++ b/BarcodeEdit/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace BarcodeEdit.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BarcodeEdit.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/BarcodeEdit/Properties/Resources.resx b/BarcodeEdit/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/BarcodeEdit/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/BarcodeEdit/Properties/Settings.Designer.cs b/BarcodeEdit/Properties/Settings.Designer.cs new file mode 100644 index 0000000..2db9c28 --- /dev/null +++ b/BarcodeEdit/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace BarcodeEdit.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.13.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/BarcodeEdit/Properties/Settings.settings b/BarcodeEdit/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/BarcodeEdit/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/BarcodeEdit/Properties/app.manifest b/BarcodeEdit/Properties/app.manifest new file mode 100644 index 0000000..8981e8d --- /dev/null +++ b/BarcodeEdit/Properties/app.manifest @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BarcodeEdit/app.config b/BarcodeEdit/app.config new file mode 100644 index 0000000..786a845 --- /dev/null +++ b/BarcodeEdit/app.config @@ -0,0 +1,3 @@ + + + diff --git a/BarcodeEdit/条形码模板编辑.csproj b/BarcodeEdit/条形码模板编辑.csproj new file mode 100644 index 0000000..7064467 --- /dev/null +++ b/BarcodeEdit/条形码模板编辑.csproj @@ -0,0 +1,130 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {391D9558-8718-4466-815D-6F31A7EE0394} + WinExe + Properties + BarcodeTerminator + 条形码模板编辑 + v4.0 + 512 + + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + Icon2.ico + + + + + + + + + + + + Form + + + FrmBarcodeEdit.cs + + + + + + + + + + + FrmBarcodeEdit.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {27BF7401-A558-475B-9A64-30B64F6F1451} + ImportData + + + {7A35F89B-1043-4DF7-B2B9-721EEDB519A2} + MyDataStructure + + + {ACE5C531-6DD6-4CF6-B8C8-8CBE042EAF79} + VestShapes + + + {D2B38F2A-662B-481E-9F01-9975938A102D} + 帮助 + + + {57D32784-CAD9-4A7D-BEC9-E12712B026ED} + 打印库 + + + {23C29E24-E030-4847-8481-F7F95D9317F9} + 数据库操作 + + + {1C42CDDB-6449-4773-AA22-4061150685EA} + 选择打印机 + + + + + \ No newline at end of file diff --git a/BarcodeManager.sln b/BarcodeManager.sln new file mode 100644 index 0000000..c7ccd4b --- /dev/null +++ b/BarcodeManager.sln @@ -0,0 +1,90 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.32510.428 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BarcodeManager", "BarcodeManager\BarcodeManager.csproj", "{95B91518-B786-45C3-819C-4E243A490766}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BarcodeEdit", "BarcodeEdit\BarcodeEdit.csproj", "{0DA6FB53-139C-415E-9508-10A0A8E3D311}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Help", "Help\Help.csproj", "{998DA8FB-1CC7-467A-85A5-404FADAC5ED8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibShapes", "LibShapes\LibShapes.csproj", "{EE859868-A204-44E8-85B3-B080AE587C38}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibShapesTests", "LibShapesTests\LibShapesTests.csproj", "{2A458D82-324D-40C5-9398-1F1EC605DD9E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + x86|Any CPU = x86|Any CPU + x86|x86 = x86|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {95B91518-B786-45C3-819C-4E243A490766}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {95B91518-B786-45C3-819C-4E243A490766}.Debug|Any CPU.Build.0 = Debug|Any CPU + {95B91518-B786-45C3-819C-4E243A490766}.Debug|x86.ActiveCfg = Debug|x86 + {95B91518-B786-45C3-819C-4E243A490766}.Debug|x86.Build.0 = Debug|x86 + {95B91518-B786-45C3-819C-4E243A490766}.Release|Any CPU.ActiveCfg = Release|Any CPU + {95B91518-B786-45C3-819C-4E243A490766}.Release|Any CPU.Build.0 = Release|Any CPU + {95B91518-B786-45C3-819C-4E243A490766}.Release|x86.ActiveCfg = Release|Any CPU + {95B91518-B786-45C3-819C-4E243A490766}.x86|Any CPU.ActiveCfg = x86|x86 + {95B91518-B786-45C3-819C-4E243A490766}.x86|Any CPU.Build.0 = x86|x86 + {95B91518-B786-45C3-819C-4E243A490766}.x86|x86.ActiveCfg = x86|x86 + {95B91518-B786-45C3-819C-4E243A490766}.x86|x86.Build.0 = x86|x86 + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.Debug|x86.ActiveCfg = Debug|x86 + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.Debug|x86.Build.0 = Debug|x86 + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.Release|Any CPU.Build.0 = Release|Any CPU + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.Release|x86.ActiveCfg = Release|Any CPU + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.x86|Any CPU.ActiveCfg = x86|x86 + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.x86|Any CPU.Build.0 = x86|x86 + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.x86|x86.ActiveCfg = x86|x86 + {0DA6FB53-139C-415E-9508-10A0A8E3D311}.x86|x86.Build.0 = x86|x86 + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.Debug|x86.ActiveCfg = Debug|x86 + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.Debug|x86.Build.0 = Debug|x86 + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.Release|Any CPU.Build.0 = Release|Any CPU + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.Release|x86.ActiveCfg = Release|Any CPU + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.x86|Any CPU.ActiveCfg = x86|x86 + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.x86|Any CPU.Build.0 = x86|x86 + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.x86|x86.ActiveCfg = x86|x86 + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8}.x86|x86.Build.0 = x86|x86 + {EE859868-A204-44E8-85B3-B080AE587C38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.Debug|x86.ActiveCfg = Debug|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.Debug|x86.Build.0 = Debug|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.Release|Any CPU.Build.0 = Release|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.Release|x86.ActiveCfg = Release|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.Release|x86.Build.0 = Release|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.x86|Any CPU.ActiveCfg = Debug|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.x86|Any CPU.Build.0 = Debug|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.x86|x86.ActiveCfg = Debug|Any CPU + {EE859868-A204-44E8-85B3-B080AE587C38}.x86|x86.Build.0 = Debug|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.Debug|x86.ActiveCfg = Debug|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.Debug|x86.Build.0 = Debug|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.Release|Any CPU.Build.0 = Release|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.Release|x86.ActiveCfg = Release|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.Release|x86.Build.0 = Release|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.x86|Any CPU.ActiveCfg = Debug|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.x86|Any CPU.Build.0 = Debug|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.x86|x86.ActiveCfg = Debug|Any CPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E}.x86|x86.Build.0 = Debug|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6C5C8BC7-8B1A-45C8-B5DE-2368E8C5126B} + EndGlobalSection +EndGlobal diff --git a/BarcodeManager/BarcodeManager.csproj b/BarcodeManager/BarcodeManager.csproj new file mode 100644 index 0000000..07fdf1a --- /dev/null +++ b/BarcodeManager/BarcodeManager.csproj @@ -0,0 +1,195 @@ + + + + + Debug + AnyCPU + {95B91518-B786-45C3-819C-4E243A490766} + WinExe + Properties + BarcodeManager + BarcodeManager + v4.8 + 512 + false + + 发布\ + true + Disk + false + Foreground + 7 + Days + false + false + true + zh-CN + 条形码打印管理专家 + 徐恒晓 + false + 7 + 8.0.0.%2a + false + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + none + true + bin\Release\ + TRACE + prompt + 4 + false + + + 25B5B89BD4E6F594D23EFFC25316378CBA4F3AE0 + + + BarcodeManager_1_TemporaryKey.pfx + + + true + + + false + + + bin\x86\ + false + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + false + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + false + + + bin\x86\x86\ + x86 + false + + + Icon1.ico + + + + + + + + + + + + + + + Form + + + FrmMain2.cs + + + + + FrmMain2.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + False + Microsoft .NET Framework 4 %28x86 和 x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 4.5 + true + + + + + + + + {0da6fb53-139c-415e-9508-10a0a8e3d311} + BarcodeEdit + + + {998da8fb-1cc7-467a-85a5-404fadac5ed8} + Help + + + {ee859868-a204-44e8-85b3-b080ae587c38} + LibShapes + + + + + \ No newline at end of file diff --git a/BarcodeManager/FrmMain2.Designer.cs b/BarcodeManager/FrmMain2.Designer.cs new file mode 100644 index 0000000..c48ec84 --- /dev/null +++ b/BarcodeManager/FrmMain2.Designer.cs @@ -0,0 +1,545 @@ + +namespace BarcodeManager +{ + partial class FrmMain2 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.label1 = new System.Windows.Forms.Label(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.canvas = new Io.Github.Kerwinxu.LibShapes.Core.UserControlCanvas(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.btn_load_excel = new System.Windows.Forms.Button(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.label6 = new System.Windows.Forms.Label(); + this.combo_printers = new System.Windows.Forms.ComboBox(); + this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); + this.label2 = new System.Windows.Forms.Label(); + this.btn_load_model = new System.Windows.Forms.Button(); + this.combo_models = new System.Windows.Forms.ComboBox(); + this.btn_edit_model = new System.Windows.Forms.Button(); + this.btn_new_model = new System.Windows.Forms.Button(); + this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); + this.label3 = new System.Windows.Forms.Label(); + this.combo_qty_var_names = new System.Windows.Forms.ComboBox(); + this.label7 = new System.Windows.Forms.Label(); + this.btn_print_qty = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.txt_loss_ratio = new System.Windows.Forms.TextBox(); + this.txt_print_qty2 = new System.Windows.Forms.Label(); + this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel(); + this.btn_increase_print = new System.Windows.Forms.Button(); + this.label8 = new System.Windows.Forms.Label(); + this.txt_qty2 = new System.Windows.Forms.TextBox(); + this.btn_print_2 = new System.Windows.Forms.Button(); + this.btn_all_print = new System.Windows.Forms.Button(); + this.chk_isFull = new System.Windows.Forms.CheckBox(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.flowLayoutPanel2.SuspendLayout(); + this.flowLayoutPanel3.SuspendLayout(); + this.flowLayoutPanel4.SuspendLayout(); + this.flowLayoutPanel5.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.linkLabel1); + this.splitContainer1.Panel1.Controls.Add(this.label1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Size = new System.Drawing.Size(892, 479); + this.splitContainer1.SplitterDistance = 52; + this.splitContainer1.TabIndex = 0; + // + // linkLabel1 + // + this.linkLabel1.Font = new System.Drawing.Font("SimSun", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.linkLabel1.Location = new System.Drawing.Point(7, 9); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(37, 432); + this.linkLabel1.TabIndex = 1; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "软件定制请淘宝搜索\"鑫意雅\""; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // label1 + // + this.label1.Font = new System.Drawing.Font("SimSun", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(4, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(40, 408); + this.label1.TabIndex = 0; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.dataGridView1); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.splitContainer3); + this.splitContainer2.Size = new System.Drawing.Size(836, 479); + this.splitContainer2.SplitterDistance = 294; + this.splitContainer2.TabIndex = 0; + // + // dataGridView1 + // + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataGridView1.Location = new System.Drawing.Point(0, 0); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.RowTemplate.Height = 23; + this.dataGridView1.Size = new System.Drawing.Size(836, 294); + this.dataGridView1.TabIndex = 0; + this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick); + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.canvas); + this.splitContainer3.Panel1.SizeChanged += new System.EventHandler(this.splitContainer3_Panel1_SizeChanged); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.tableLayoutPanel1); + this.splitContainer3.Panel2.SizeChanged += new System.EventHandler(this.splitContainer3_Panel2_SizeChanged); + this.splitContainer3.Size = new System.Drawing.Size(836, 181); + this.splitContainer3.SplitterDistance = 306; + this.splitContainer3.TabIndex = 0; + // + // canvas + // + this.canvas.GriddingInterval = 2; + this.canvas.isAlignDridding = false; + this.canvas.isDrawDridding = false; + this.canvas.IsEdit = false; + this.canvas.isShift = false; + this.canvas.Location = new System.Drawing.Point(3, 12); + this.canvas.Name = "canvas"; + this.canvas.SelectShape = null; + this.canvas.Size = new System.Drawing.Size(300, 150); + this.canvas.TabIndex = 0; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel3, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel4, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel5, 0, 4); + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 5; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(511, 162); + this.tableLayoutPanel1.TabIndex = 0; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.btn_load_excel); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(505, 26); + this.flowLayoutPanel1.TabIndex = 0; + // + // btn_load_excel + // + this.btn_load_excel.Location = new System.Drawing.Point(3, 3); + this.btn_load_excel.Name = "btn_load_excel"; + this.btn_load_excel.Size = new System.Drawing.Size(105, 23); + this.btn_load_excel.TabIndex = 0; + this.btn_load_excel.Text = "导入excel表格"; + this.btn_load_excel.UseVisualStyleBackColor = true; + this.btn_load_excel.Click += new System.EventHandler(this.btn_load_excel_Click); + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.Controls.Add(this.label6); + this.flowLayoutPanel2.Controls.Add(this.combo_printers); + this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 35); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(505, 26); + this.flowLayoutPanel2.TabIndex = 1; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(3, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(65, 12); + this.label6.TabIndex = 4; + this.label6.Text = "选择打印机"; + // + // combo_printers + // + this.combo_printers.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.combo_printers.FormattingEnabled = true; + this.combo_printers.Location = new System.Drawing.Point(74, 3); + this.combo_printers.Name = "combo_printers"; + this.combo_printers.Size = new System.Drawing.Size(331, 20); + this.combo_printers.TabIndex = 3; + // + // flowLayoutPanel3 + // + this.flowLayoutPanel3.Controls.Add(this.label2); + this.flowLayoutPanel3.Controls.Add(this.btn_load_model); + this.flowLayoutPanel3.Controls.Add(this.combo_models); + this.flowLayoutPanel3.Controls.Add(this.btn_edit_model); + this.flowLayoutPanel3.Controls.Add(this.btn_new_model); + this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel3.Location = new System.Drawing.Point(3, 67); + this.flowLayoutPanel3.Name = "flowLayoutPanel3"; + this.flowLayoutPanel3.Size = new System.Drawing.Size(505, 26); + this.flowLayoutPanel3.TabIndex = 2; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(3, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(65, 12); + this.label2.TabIndex = 0; + this.label2.Text = "条形码模板"; + // + // btn_load_model + // + this.btn_load_model.Location = new System.Drawing.Point(74, 3); + this.btn_load_model.Name = "btn_load_model"; + this.btn_load_model.Size = new System.Drawing.Size(53, 23); + this.btn_load_model.TabIndex = 1; + this.btn_load_model.Text = "导入"; + this.btn_load_model.UseVisualStyleBackColor = true; + this.btn_load_model.Click += new System.EventHandler(this.btn_load_model_Click); + // + // combo_models + // + this.combo_models.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.combo_models.FormattingEnabled = true; + this.combo_models.Location = new System.Drawing.Point(133, 3); + this.combo_models.Name = "combo_models"; + this.combo_models.Size = new System.Drawing.Size(154, 20); + this.combo_models.TabIndex = 2; + this.combo_models.SelectedIndexChanged += new System.EventHandler(this.combo_models_SelectedIndexChanged); + // + // btn_edit_model + // + this.btn_edit_model.Location = new System.Drawing.Point(293, 3); + this.btn_edit_model.Name = "btn_edit_model"; + this.btn_edit_model.Size = new System.Drawing.Size(53, 23); + this.btn_edit_model.TabIndex = 3; + this.btn_edit_model.Text = "编辑"; + this.btn_edit_model.UseVisualStyleBackColor = true; + this.btn_edit_model.Click += new System.EventHandler(this.btn_edit_model_Click); + // + // btn_new_model + // + this.btn_new_model.Location = new System.Drawing.Point(352, 3); + this.btn_new_model.Name = "btn_new_model"; + this.btn_new_model.Size = new System.Drawing.Size(53, 23); + this.btn_new_model.TabIndex = 4; + this.btn_new_model.Text = "新建"; + this.btn_new_model.UseVisualStyleBackColor = true; + this.btn_new_model.Click += new System.EventHandler(this.btn_new_model_Click); + // + // flowLayoutPanel4 + // + this.flowLayoutPanel4.Controls.Add(this.label3); + this.flowLayoutPanel4.Controls.Add(this.combo_qty_var_names); + this.flowLayoutPanel4.Controls.Add(this.label7); + this.flowLayoutPanel4.Controls.Add(this.btn_print_qty); + this.flowLayoutPanel4.Controls.Add(this.label4); + this.flowLayoutPanel4.Controls.Add(this.txt_loss_ratio); + this.flowLayoutPanel4.Controls.Add(this.txt_print_qty2); + this.flowLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel4.Location = new System.Drawing.Point(3, 99); + this.flowLayoutPanel4.Name = "flowLayoutPanel4"; + this.flowLayoutPanel4.Size = new System.Drawing.Size(505, 26); + this.flowLayoutPanel4.TabIndex = 3; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(3, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(65, 12); + this.label3.TabIndex = 1; + this.label3.Text = "要打印数量"; + // + // combo_qty_var_names + // + this.combo_qty_var_names.FormattingEnabled = true; + this.combo_qty_var_names.Location = new System.Drawing.Point(74, 3); + this.combo_qty_var_names.Name = "combo_qty_var_names"; + this.combo_qty_var_names.Size = new System.Drawing.Size(74, 20); + this.combo_qty_var_names.TabIndex = 3; + this.combo_qty_var_names.TextChanged += new System.EventHandler(this.combo_qty_var_names_TextChanged); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(154, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(53, 12); + this.label7.TabIndex = 8; + this.label7.Text = "打印数量"; + // + // btn_print_qty + // + this.btn_print_qty.Location = new System.Drawing.Point(213, 3); + this.btn_print_qty.Name = "btn_print_qty"; + this.btn_print_qty.Size = new System.Drawing.Size(42, 21); + this.btn_print_qty.TabIndex = 4; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(261, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(41, 12); + this.label4.TabIndex = 5; + this.label4.Text = "加损耗"; + // + // txt_loss_ratio + // + this.txt_loss_ratio.Location = new System.Drawing.Point(308, 3); + this.txt_loss_ratio.Name = "txt_loss_ratio"; + this.txt_loss_ratio.Size = new System.Drawing.Size(30, 21); + this.txt_loss_ratio.TabIndex = 6; + this.txt_loss_ratio.Text = "0"; + // + // txt_print_qty2 + // + this.txt_print_qty2.AutoSize = true; + this.txt_print_qty2.Location = new System.Drawing.Point(344, 0); + this.txt_print_qty2.Name = "txt_print_qty2"; + this.txt_print_qty2.Size = new System.Drawing.Size(143, 12); + this.txt_print_qty2.TabIndex = 7; + this.txt_print_qty2.Text = "%,损耗超过0至少打印一张"; + // + // flowLayoutPanel5 + // + this.flowLayoutPanel5.Controls.Add(this.btn_increase_print); + this.flowLayoutPanel5.Controls.Add(this.label8); + this.flowLayoutPanel5.Controls.Add(this.txt_qty2); + this.flowLayoutPanel5.Controls.Add(this.btn_print_2); + this.flowLayoutPanel5.Controls.Add(this.btn_all_print); + this.flowLayoutPanel5.Controls.Add(this.chk_isFull); + this.flowLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel5.Location = new System.Drawing.Point(3, 131); + this.flowLayoutPanel5.Name = "flowLayoutPanel5"; + this.flowLayoutPanel5.Size = new System.Drawing.Size(505, 28); + this.flowLayoutPanel5.TabIndex = 4; + // + // btn_increase_print + // + this.btn_increase_print.Location = new System.Drawing.Point(3, 3); + this.btn_increase_print.Name = "btn_increase_print"; + this.btn_increase_print.Size = new System.Drawing.Size(87, 23); + this.btn_increase_print.TabIndex = 9; + this.btn_increase_print.Text = "按损耗打印"; + this.toolTip1.SetToolTip(this.btn_increase_print, "数据按照表格中已经选择的一行或者多行"); + this.btn_increase_print.UseVisualStyleBackColor = true; + this.btn_increase_print.Click += new System.EventHandler(this.btn_increase_print_Click); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(96, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(107, 12); + this.label8.TabIndex = 10; + this.label8.Text = "手动输入打印数量:"; + // + // txt_qty2 + // + this.txt_qty2.Location = new System.Drawing.Point(209, 3); + this.txt_qty2.Name = "txt_qty2"; + this.txt_qty2.Size = new System.Drawing.Size(42, 21); + this.txt_qty2.TabIndex = 11; + // + // btn_print_2 + // + this.btn_print_2.Location = new System.Drawing.Point(257, 3); + this.btn_print_2.Name = "btn_print_2"; + this.btn_print_2.Size = new System.Drawing.Size(70, 23); + this.btn_print_2.TabIndex = 12; + this.btn_print_2.Text = "手动打印"; + this.btn_print_2.UseVisualStyleBackColor = true; + this.btn_print_2.Click += new System.EventHandler(this.btn_print_2_Click); + // + // btn_all_print + // + this.btn_all_print.Location = new System.Drawing.Point(333, 3); + this.btn_all_print.Name = "btn_all_print"; + this.btn_all_print.Size = new System.Drawing.Size(61, 23); + this.btn_all_print.TabIndex = 8; + this.btn_all_print.Text = "全部打印"; + this.toolTip1.SetToolTip(this.btn_all_print, "数据按照这个表格中的所有行"); + this.btn_all_print.UseVisualStyleBackColor = true; + this.btn_all_print.Click += new System.EventHandler(this.btn_all_print_Click); + // + // chk_isFull + // + this.chk_isFull.AutoSize = true; + this.chk_isFull.Location = new System.Drawing.Point(400, 3); + this.chk_isFull.Name = "chk_isFull"; + this.chk_isFull.Size = new System.Drawing.Size(72, 16); + this.chk_isFull.TabIndex = 13; + this.chk_isFull.Text = "充满打印"; + this.toolTip1.SetToolTip(this.chk_isFull, "比如一张纸上打印2行2列的模型,而输入的打印数量为1,如果为充满打印则表示,实际打印4个。"); + this.chk_isFull.UseVisualStyleBackColor = true; + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + // + // FrmMain2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(892, 479); + this.Controls.Add(this.splitContainer1); + this.Name = "FrmMain2"; + this.Text = "条形码打印管理专家 - 专注于快速高效的打印条形码"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmMain2_FormClosed); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel2.ResumeLayout(false); + this.flowLayoutPanel2.PerformLayout(); + this.flowLayoutPanel3.ResumeLayout(false); + this.flowLayoutPanel3.PerformLayout(); + this.flowLayoutPanel4.ResumeLayout(false); + this.flowLayoutPanel4.PerformLayout(); + this.flowLayoutPanel5.ResumeLayout(false); + this.flowLayoutPanel5.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5; + private System.Windows.Forms.Button btn_load_excel; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox combo_printers; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btn_load_model; + private System.Windows.Forms.ComboBox combo_models; + private System.Windows.Forms.Button btn_edit_model; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox combo_qty_var_names; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox btn_print_qty; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txt_loss_ratio; + private System.Windows.Forms.Label txt_print_qty2; + private System.Windows.Forms.Button btn_increase_print; + private System.Windows.Forms.Button btn_all_print; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private Io.Github.Kerwinxu.LibShapes.Core.UserControlCanvas canvas; + private System.Windows.Forms.Button btn_new_model; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox txt_qty2; + private System.Windows.Forms.Button btn_print_2; + private System.Windows.Forms.CheckBox chk_isFull; + private System.Windows.Forms.ToolTip toolTip1; + } +} \ No newline at end of file diff --git a/BarcodeManager/FrmMain2.cs b/BarcodeManager/FrmMain2.cs new file mode 100644 index 0000000..fa2da49 --- /dev/null +++ b/BarcodeManager/FrmMain2.cs @@ -0,0 +1,497 @@ +using BarcodeTerminator; +using Io.Github.Kerwinxu.LibShapes.Core; +using Io.Github.Kerwinxu.LibShapes.Core.Print; +using Io.Github.Kerwinxu.LibShapes.Core.Serialize; +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Printing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace BarcodeManager +{ + public partial class FrmMain2 : Form + { + public FrmMain2() + { + InitializeComponent(); + + // 画布要自适应大小。 + canvas_resize(); + // 表格控件要自适应大小 + tableLayout_resize(); + // 要整行选取 + dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dataGridView1.ReadOnly = true; // 不修改。 + // 初始化打印机 + init_printers(); + // 加载以前的模板文件路径 + load_shapesFileNames(); + // 加载到组合框。 + combo_models_init(); + // 默认选择多行 + this.dataGridView1.MultiSelect = true; + + } + + /// + /// 加载过的模型文件路径 + /// + private List shapesFileNames; + + private string file_conf = "shapesFileNames.json"; + + ISerialize jsonSerialize = new JsonSerialize(); + private void load_shapesFileNames() + { + if (System.IO.File.Exists(file_conf)) + { + shapesFileNames = jsonSerialize.DeserializeObjectFromFile>(file_conf); + + } + else + { + shapesFileNames = new List(); + } + + } + + private void combo_models_init() + { + this.combo_models.Items.Clear(); + this.combo_models.Items.AddRange( + shapesFileNames.Select(x => System.IO.Path.GetFileNameWithoutExtension(x)) // 取得文件名 + .ToArray() + ); + if (this.combo_models.Items.Count > 0) + { + this.combo_models.Text = this.combo_models.Items[0].ToString(); + } + } + + private void save_shapesFileNames() + { + jsonSerialize.SerializeObjectToFile(shapesFileNames, file_conf); + } + + + private void init_printers() + { + // 初始化打印机 + // 加载打印机的 + foreach (var item in PrinterSettings.InstalledPrinters) + { + combo_printers.Items.Add(item); + } + // 这里有一个默认的打印机 + var doc = new PrintDocument(); + combo_printers.Text = doc.DefaultPageSettings.PrinterSettings.PrinterName; + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(@"https://xinyiya.taobao.com/"); + } + + private void canvas_resize() + { + int i = 5; + this.canvas.Location = new Point(i, i); + this.canvas.Width = this.splitContainer3.Panel1.Width - 2 * i; + this.canvas.Height = this.splitContainer3.Panel1.Height - 2 * i; + } + + private void tableLayout_resize() + { + int i = 5; + this.tableLayoutPanel1.Location = new Point(i, i); + this.tableLayoutPanel1.Width = this.splitContainer3.Panel2.Width - 2 * i; + this.tableLayoutPanel1.Height = this.splitContainer3.Panel2.Height - 2 * i; + } + + + private void splitContainer3_Panel2_SizeChanged(object sender, EventArgs e) + { + tableLayout_resize(); + } + + + private void btn_load_excel_Click(object sender, EventArgs e) + { + // todo 导入excel表格 + openFileDialog1.Filter = "excel文件|*.xls;*.xlsx"; + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + var dt = ExcelData.LoadExcel(openFileDialog1.FileName); + dataGridView1.DataSource = dt; // 这个显示数据 + // 将原先的变量清空 + combo_qty_var_names.Items.Clear(); + // 新的变量名称 + combo_qty_var_names.Items.AddRange(getColumnNames(dt)); + if (dt.Rows.Count > 0) row_selected(0); + + } + else + { + // 如果没有导入文件,这里的数据就算 + dataGridView1.DataSource = null; + } + } + + private string[] getColumnNames(DataTable dt) + { + List columnNameList = new List(); + foreach (DataColumn col in dt.Columns) + { + columnNameList.Add(col.ColumnName);//获取到DataColumn列对象的列名 + } + return columnNameList.ToArray(); + } + + private void splitContainer3_Panel1_SizeChanged(object sender, EventArgs e) + { + canvas_resize(); + } + + /// + /// + /// + /// + /// + private Dictionary getVars(int index) + { + Dictionary result = new Dictionary(); ; + // + foreach (DataGridViewColumn item in dataGridView1.Columns) + { + var column_name = item.HeaderText; + var value = this.dataGridView1.Rows[index].Cells[column_name].Value.ToString(); + result[column_name] = value; + } + return result; + } + + /// + /// 选择单元格事件 + /// + /// + /// + private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex > -1) + { + row_selected(e.RowIndex); + } + } + + /// + /// 行选择更改, + /// + /// + private void row_selected(int index) + { + var dict = getVars(index); // 取得变量 + if (this.canvas != null) canvas.setVars(dict); // 将变量发送给画布 + if (!string.IsNullOrEmpty(combo_qty_var_names.Text) && dict.ContainsKey(combo_qty_var_names.Text)) + { + btn_print_qty.Text = dict[combo_qty_var_names.Text]; + } + else + { + btn_print_qty.Text = string.Empty; + } + } + + private void combo_qty_var_names_TextChanged(object sender, EventArgs e) + { + if (this.dataGridView1.DataSource != null && this.dataGridView1.CurrentRow.Index > -1) + { + row_selected(this.dataGridView1.CurrentRow.Index); + } + } + + private void FrmMain2_FormClosed(object sender, FormClosedEventArgs e) + { + save_shapesFileNames(); + } + + private void btn_load_model_Click(object sender, EventArgs e) + { + openFileDialog1.Filter = "模板文件|*.json"; + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + load_shapes_model(openFileDialog1.FileName); + load_shapes_model(); + } + } + + private void load_shapes_model(string file_path) + { + // 这里要判断一下是否有这个路径了 + if (shapesFileNames.Contains(file_path)) + { + combo_models.SelectedIndex = shapesFileNames.IndexOf(file_path); + } + else + { + // 添加新的。 + shapesFileNames.Insert(0, file_path); + combo_models.Items.Insert(0, System.IO.Path.GetFileNameWithoutExtension(file_path)); + combo_models.SelectedIndex = 0; + } + } + /// + /// 这个只是从组合框中读取的 + /// + private void load_shapes_model() + { + if (shapesFileNames.Count > 0) + { + string file_path = shapesFileNames[combo_models.SelectedIndex]; // 看看选择的是哪个 + this.canvas.shapes = Shapes.load(file_path); + this.canvas.zoomToScreen(); + this.canvas.Refresh(); + + } + + } + + + + private void btn_edit_model_Click(object sender, EventArgs e) + { + // todo 编辑模板 + // 首先寻找是哪个模板 + string file_path = shapesFileNames.Where(x => x.Contains(combo_models.Text)).FirstOrDefault(); + if (file_path != null) + { + FrmBarcodeEdit frmBarcodeEdit = null; + if (this.dataGridView1.DataSource != null) + { + frmBarcodeEdit = new FrmBarcodeEdit(file_path, (DataTable)this.dataGridView1.DataSource); + } + else + { + frmBarcodeEdit = new FrmBarcodeEdit(file_path); + } + + // 这里打开 + if (frmBarcodeEdit.ShowDialog() == DialogResult.OK) + { + // 这里要更新啊。 + load_shapes_model(file_path); + load_shapes_model(); + } + + } + + + } + + private void btn_new_model_Click(object sender, EventArgs e) + { + FrmBarcodeEdit frmBarcodeEdit = null; + if (this.dataGridView1.DataSource != null) + { + frmBarcodeEdit = new FrmBarcodeEdit((DataTable)this.dataGridView1.DataSource); + } + else + { + frmBarcodeEdit = new FrmBarcodeEdit(); + } + frmBarcodeEdit.ShowDialog(); + + // 这里打开 + if ( string.IsNullOrEmpty(frmBarcodeEdit.getModelFileName())) + { + // 这里要更新啊。 + load_shapes_model(frmBarcodeEdit.getModelFileName()); + load_shapes_model(); + } + } + /// + /// 重新读取shapes + /// + /// + private Shapes GetShapes() + { + if (shapesFileNames.Count == 0) + { + return null; + } + // 这里取得是哪个 + return Shapes.load(shapesFileNames[combo_models.SelectedIndex]); + + } + + private void btn_increase_print_Click(object sender, EventArgs e) + { + // 根据损耗打印 + // 这里首先判断一下是否有这一个列 + if (this.dataGridView1.DataSource == null) return; + try + { + var columns = getColumnNames((DataTable)this.dataGridView1.DataSource); + if (columns.Contains(combo_qty_var_names.Text)) + { + // 这里表示有打印数量,要取得所有的选择的表格 + var vars = new List>();// 变量的集合 + var nums = new List(); // 数量的集合 + var ratio = int.Parse(txt_loss_ratio.Text); // 上涨的比例 + foreach (DataGridViewRow item in this.dataGridView1.SelectedRows) + { + var dict = getVars(item.Index); + vars.Add(dict); + int n = int.Parse(dict[combo_qty_var_names.Text]); + int n2 = n * ratio / 100; // 损耗 + if (n2 ==0 && ratio > 0) + { + n2 = 1; + } + nums.Add(n+n2); + } + // 取得模板 + var _shapes = GetShapes(); + if (_shapes == null) { MessageBox.Show("没有模板文件");return; } + // 发送给打印机 + PrintItem printItem = new PrintItem(); + printItem.PrinterName = combo_printers.Text; + printItem.Shapes = _shapes; + printItem.Valss = vars; + printItem.PrintCounts = nums; + printItem.isFullPrint = chk_isFull.Checked; + // + PrintManagerImpl printManagerImpl = new PrintManagerImpl(); + printManagerImpl.addPrintItem(printItem); + } + else + { + MessageBox.Show("没有打印数量"); + } + } + catch (Exception ex) + { + MessageBox.Show("错误:" + ex.Message); + //throw; + } + + + } + + private void btn_all_print_Click(object sender, EventArgs e) + { + // 这里首先判断一下是否有这一个列 + if (this.dataGridView1.DataSource == null) return; + try + { + var columns = getColumnNames((DataTable)this.dataGridView1.DataSource); + if (columns.Contains(combo_qty_var_names.Text)) + { + // 这里表示有打印数量,要取得所有的选择的表格 + var vars = new List>();// 变量的集合 + var nums = new List(); // 数量的集合 + var ratio = int.Parse(txt_loss_ratio.Text); // 上涨的比例 + foreach (DataGridViewRow item in this.dataGridView1.Rows) // 全部跟损耗的区别是这里是权表 + { + var dict = getVars(item.Index); + vars.Add(dict); + int n = int.Parse(dict[combo_qty_var_names.Text]); + int n2 = n * ratio / 100; // 损耗 + if (n2 == 0 && ratio > 0) + { + n2 = 1; + } + nums.Add(n + n2); + } + // 取得模板 + var _shapes = GetShapes(); + if (_shapes == null) { MessageBox.Show("没有模板文件"); return; } + // 发送给打印机 + PrintItem printItem = new PrintItem(); + printItem.PrinterName = combo_printers.Text; + printItem.Shapes = _shapes; + printItem.Valss = vars; + printItem.PrintCounts = nums; + printItem.isFullPrint = chk_isFull.Checked; + // + PrintManagerImpl printManagerImpl = new PrintManagerImpl(); + printManagerImpl.addPrintItem(printItem); + } + else + { + MessageBox.Show("没有打印数量"); + } + } + catch (Exception ex) + { + MessageBox.Show("错误:" + ex.Message); + //throw; + } + + } + + private void btn_print_2_Click(object sender, EventArgs e) + { + // 这里首先判断一下是否有这一个列 + // 这里判断一下有没有数量 + int num = 0; + if(!int.TryParse(txt_qty2.Text, out num)) + { + MessageBox.Show("数量不对"); + return; + } + + + if (this.dataGridView1.DataSource == null) return; + try + { + var columns = getColumnNames((DataTable)this.dataGridView1.DataSource); + if (columns.Contains(combo_qty_var_names.Text)) + { + // 这里表示有打印数量,要取得所有的选择的表格 + var vars = new List>();// 变量的集合 + var nums = new List(); // 数量的集合 + foreach (DataGridViewRow item in this.dataGridView1.SelectedRows) + { + var dict = getVars(item.Index); + vars.Add(dict); + nums.Add(num); // 跟损耗打印的不同是,这里是固定的数量。 + } + // 取得模板 + var _shapes = GetShapes(); + if (_shapes == null) { MessageBox.Show("没有模板文件"); return; } + // 发送给打印机 + PrintItem printItem = new PrintItem(); + printItem.PrinterName = combo_printers.Text; + printItem.Shapes = _shapes; + printItem.Valss = vars; + printItem.PrintCounts = nums; + printItem.isFullPrint = chk_isFull.Checked; + // + PrintManagerImpl printManagerImpl = new PrintManagerImpl(); + printManagerImpl.addPrintItem(printItem); + } + else + { + MessageBox.Show("没有打印数量"); + } + } + catch (Exception ex) + { + MessageBox.Show("错误:" + ex.Message); + //throw; + } + + } + + private void combo_models_SelectedIndexChanged(object sender, EventArgs e) + { + load_shapes_model(); + } + } +} diff --git a/BarcodeManager/FrmMain2.resx b/BarcodeManager/FrmMain2.resx new file mode 100644 index 0000000..489980b --- /dev/null +++ b/BarcodeManager/FrmMain2.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 165, 17 + + + 17, 17 + + + 44 + + \ No newline at end of file diff --git a/BarcodeManager/Icon1.ico b/BarcodeManager/Icon1.ico new file mode 100644 index 0000000..4d7e4c1 Binary files /dev/null and b/BarcodeManager/Icon1.ico differ diff --git a/BarcodeManager/Program.cs b/BarcodeManager/Program.cs new file mode 100644 index 0000000..1612637 --- /dev/null +++ b/BarcodeManager/Program.cs @@ -0,0 +1,21 @@ +using BarcodeManager; +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace BarcodeTerminator +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new FrmMain2()); + } + } +} diff --git a/BarcodeManager/Properties/AssemblyInfo.cs b/BarcodeManager/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e411812 --- /dev/null +++ b/BarcodeManager/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("条形码设计打印管理专家")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("徐恒晓")] +[assembly: AssemblyProduct("BarcodeManager")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("2c4c0182-507b-4882-9d67-ebec1cd60fd6")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BarcodeManager/Properties/Resources.Designer.cs b/BarcodeManager/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1197ee4 --- /dev/null +++ b/BarcodeManager/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace BarcodeManager.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BarcodeManager.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/BarcodeManager/Properties/Resources.resx b/BarcodeManager/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/BarcodeManager/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/BarcodeManager/Properties/Settings.Designer.cs b/BarcodeManager/Properties/Settings.Designer.cs new file mode 100644 index 0000000..16beb88 --- /dev/null +++ b/BarcodeManager/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace BarcodeManager.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.13.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/BarcodeManager/Properties/Settings.settings b/BarcodeManager/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/BarcodeManager/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/BarcodeManager/app.config b/BarcodeManager/app.config new file mode 100644 index 0000000..3e0e37c --- /dev/null +++ b/BarcodeManager/app.config @@ -0,0 +1,3 @@ + + + diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeEdit.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeEdit.exe.deploy new file mode 100644 index 0000000..c8284c8 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeEdit.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.application b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.application new file mode 100644 index 0000000..4f4e0f1 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.application @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + RjQUMtnNdkURd7lja0l01S6iZ4Y= + + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.exe.config.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.exe.config.deploy new file mode 100644 index 0000000..fcd0c93 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.exe.config.deploy @@ -0,0 +1,3 @@ + + + diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.exe.deploy new file mode 100644 index 0000000..c16e000 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.exe.manifest b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.exe.manifest new file mode 100644 index 0000000..200e889 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/BarcodeManager.exe.manifest @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RZGbUHbePJsmPWf723e7owqaPtc= + + + + + + + + + + + + AvTLzL3+jtOfmt+l63YGtLlpc4Y= + + + + + + + + + + + + rr7waGFe0phv/pITkJvyJHPTiHA= + + + + + + + + + + + + qL83oaywpVi5dE/ck4zb2aPZ+gc= + + + + + + + + + + + + 8TfritS7RmUWzC9djJQYdV6NXes= + + + + + + + + + + + + g6aXWk0ZOmDq7nMzmRg6J3A7ibk= + + + + + + + + + + + + dxBRIo9X/lOw1kFwCqXsvuJxy1o= + + + + + + + + + + + + RcO+4TLWFibFJ2HgafGdKyds4ZQ= + + + + + + + + + + + + lnY8o9faEY6L71X6alY2JGxYK+8= + + + + + + + + + + + + 7hXigXAmAlpOqptA7qhI1M14eV8= + + + + + + + + + + + + 458dHxHeusVS53doo4MPz4m661o= + + + + + + + + + + + + mY6ZtnEmFlEAXuv9Mnfy4ugrlVA= + + + + + + + + + + G5inYVx9MX6YO6/wAgEQ8Qp6Z74= + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/ClsBarcodePrint.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/ClsBarcodePrint.dll.deploy new file mode 100644 index 0000000..42cf9f5 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/ClsBarcodePrint.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/ClsImport.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/ClsImport.dll.deploy new file mode 100644 index 0000000..66f0703 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/ClsImport.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/DataBase.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/DataBase.dll.deploy new file mode 100644 index 0000000..052f548 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/DataBase.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/Help.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/Help.exe.deploy new file mode 100644 index 0000000..0da61c2 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/Help.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/MyDataStructure.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/MyDataStructure.dll.deploy new file mode 100644 index 0000000..58d8d44 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/MyDataStructure.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/SaveImage.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/SaveImage.exe.deploy new file mode 100644 index 0000000..218fba9 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/SaveImage.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/SelectPrinter.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/SelectPrinter.exe.deploy new file mode 100644 index 0000000..ae48fe0 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/SelectPrinter.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/StreamPlus.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/StreamPlus.dll.deploy new file mode 100644 index 0000000..337cc1f Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/StreamPlus.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/VestShapes.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/VestShapes.dll.deploy new file mode 100644 index 0000000..45552ed Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/VestShapes.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/zxing.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/zxing.dll.deploy new file mode 100644 index 0000000..aa7bcf1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_1/zxing.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeEdit.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeEdit.exe.deploy new file mode 100644 index 0000000..6dd794a Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeEdit.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.application b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.application new file mode 100644 index 0000000..2b1e308 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.application @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + uAuT42eJtlWjPVVD0N+tgWl/X5s= + + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.exe.config.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.exe.config.deploy new file mode 100644 index 0000000..fcd0c93 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.exe.config.deploy @@ -0,0 +1,3 @@ + + + diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.exe.deploy new file mode 100644 index 0000000..026e026 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.exe.manifest b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.exe.manifest new file mode 100644 index 0000000..c4a3e79 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/BarcodeManager.exe.manifest @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KxDVLFE3KrLoVDIHkiIhGMjPvXA= + + + + + + + + + + + + 9NqXdyh6iaShhnbn/5hM65uhYv4= + + + + + + + + + + + + bsO58MihHmYR0kH4lnvAhVA7RTQ= + + + + + + + + + + + + 4QtWPcTtQ26Mu2CSg+Wv5KZYWm8= + + + + + + + + + + + + iyb25ZeDtJF1DPk82bWYja1mnRE= + + + + + + + + + + + + gynJ9El4PvLMIDfIb3N5erBLWRU= + + + + + + + + + + + + dEyySUziKDz0JhtSO0bssyiZ5Ls= + + + + + + + + + + + + s+Qu0O0ACKUTHsmKFymYDdVa+QA= + + + + + + + + + + + + sj2pQEBrfq/IkGmG+kQmcRkLyyQ= + + + + + + + + + + + + 0DvsbmgKGtD+O9KOaJ/MukEdvDY= + + + + + + + + + + + + hE9PPC1THrzpLSqaBgbHqMhzM44= + + + + + + + + + + + + mY6ZtnEmFlEAXuv9Mnfy4ugrlVA= + + + + + + + + + + G5inYVx9MX6YO6/wAgEQ8Qp6Z74= + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/ClsBarcodePrint.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/ClsBarcodePrint.dll.deploy new file mode 100644 index 0000000..0954ee1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/ClsBarcodePrint.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/ClsImport.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/ClsImport.dll.deploy new file mode 100644 index 0000000..7e44a6f Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/ClsImport.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/DataBase.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/DataBase.dll.deploy new file mode 100644 index 0000000..ec8c849 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/DataBase.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/Help.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/Help.exe.deploy new file mode 100644 index 0000000..2158f3e Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/Help.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/MyDataStructure.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/MyDataStructure.dll.deploy new file mode 100644 index 0000000..8a55342 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/MyDataStructure.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/SaveImage.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/SaveImage.exe.deploy new file mode 100644 index 0000000..9ca8e07 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/SaveImage.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/SelectPrinter.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/SelectPrinter.exe.deploy new file mode 100644 index 0000000..4e5d9d0 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/SelectPrinter.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/StreamPlus.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/StreamPlus.dll.deploy new file mode 100644 index 0000000..7ca0466 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/StreamPlus.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/VestShapes.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/VestShapes.dll.deploy new file mode 100644 index 0000000..f46b440 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/VestShapes.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/zxing.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/zxing.dll.deploy new file mode 100644 index 0000000..aa7bcf1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_2/zxing.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeEdit.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeEdit.exe.deploy new file mode 100644 index 0000000..c8284c8 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeEdit.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.application b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.application new file mode 100644 index 0000000..7b1f092 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.application @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + F7aeg8k1vrIeBOGF7iaODdEruIQ= + + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.exe.config.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.exe.config.deploy new file mode 100644 index 0000000..fcd0c93 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.exe.config.deploy @@ -0,0 +1,3 @@ + + + diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.exe.deploy new file mode 100644 index 0000000..3552be9 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.exe.manifest b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.exe.manifest new file mode 100644 index 0000000..0d4661b --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/BarcodeManager.exe.manifest @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RZGbUHbePJsmPWf723e7owqaPtc= + + + + + + + + + + + + BMVkILQed71jR0/hnvlMpEPP6R0= + + + + + + + + + + + + rr7waGFe0phv/pITkJvyJHPTiHA= + + + + + + + + + + + + qL83oaywpVi5dE/ck4zb2aPZ+gc= + + + + + + + + + + + + 8TfritS7RmUWzC9djJQYdV6NXes= + + + + + + + + + + + + g6aXWk0ZOmDq7nMzmRg6J3A7ibk= + + + + + + + + + + + + dxBRIo9X/lOw1kFwCqXsvuJxy1o= + + + + + + + + + + + + RcO+4TLWFibFJ2HgafGdKyds4ZQ= + + + + + + + + + + + + lnY8o9faEY6L71X6alY2JGxYK+8= + + + + + + + + + + + + 7hXigXAmAlpOqptA7qhI1M14eV8= + + + + + + + + + + + + 458dHxHeusVS53doo4MPz4m661o= + + + + + + + + + + + + mY6ZtnEmFlEAXuv9Mnfy4ugrlVA= + + + + + + + + + + G5inYVx9MX6YO6/wAgEQ8Qp6Z74= + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/ClsBarcodePrint.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/ClsBarcodePrint.dll.deploy new file mode 100644 index 0000000..42cf9f5 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/ClsBarcodePrint.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/ClsImport.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/ClsImport.dll.deploy new file mode 100644 index 0000000..66f0703 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/ClsImport.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/DataBase.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/DataBase.dll.deploy new file mode 100644 index 0000000..052f548 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/DataBase.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/Help.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/Help.exe.deploy new file mode 100644 index 0000000..0da61c2 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/Help.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/MyDataStructure.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/MyDataStructure.dll.deploy new file mode 100644 index 0000000..58d8d44 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/MyDataStructure.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/SaveImage.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/SaveImage.exe.deploy new file mode 100644 index 0000000..218fba9 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/SaveImage.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/SelectPrinter.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/SelectPrinter.exe.deploy new file mode 100644 index 0000000..ae48fe0 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/SelectPrinter.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/StreamPlus.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/StreamPlus.dll.deploy new file mode 100644 index 0000000..337cc1f Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/StreamPlus.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/VestShapes.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/VestShapes.dll.deploy new file mode 100644 index 0000000..45552ed Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/VestShapes.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/zxing.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/zxing.dll.deploy new file mode 100644 index 0000000..aa7bcf1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_3/zxing.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeEdit.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeEdit.exe.deploy new file mode 100644 index 0000000..70ea0c8 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeEdit.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.application b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.application new file mode 100644 index 0000000..db9f780 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.application @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + xTUgfwmFZCVzNiD5XtJZ68FWJZQ= + + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.exe.config.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.exe.config.deploy new file mode 100644 index 0000000..fcd0c93 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.exe.config.deploy @@ -0,0 +1,3 @@ + + + diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.exe.deploy new file mode 100644 index 0000000..d4038d7 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.exe.manifest b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.exe.manifest new file mode 100644 index 0000000..1bf86b3 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/BarcodeManager.exe.manifest @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KxDVLFE3KrLoVDIHkiIhGMjPvXA= + + + + + + + + + + + + QgAFG7qHB8cN90L4QbdYfePH58E= + + + + + + + + + + + + bsO58MihHmYR0kH4lnvAhVA7RTQ= + + + + + + + + + + + + 4QtWPcTtQ26Mu2CSg+Wv5KZYWm8= + + + + + + + + + + + + iyb25ZeDtJF1DPk82bWYja1mnRE= + + + + + + + + + + + + gynJ9El4PvLMIDfIb3N5erBLWRU= + + + + + + + + + + + + dEyySUziKDz0JhtSO0bssyiZ5Ls= + + + + + + + + + + + + bNAdCR5AJIMqOGxnnht8pvx3h3E= + + + + + + + + + + + + RSYhArMgEfRJjYuoQoZK2khAqhQ= + + + + + + + + + + + + 0DvsbmgKGtD+O9KOaJ/MukEdvDY= + + + + + + + + + + + + hE9PPC1THrzpLSqaBgbHqMhzM44= + + + + + + + + + + + + mY6ZtnEmFlEAXuv9Mnfy4ugrlVA= + + + + + + + + + + G5inYVx9MX6YO6/wAgEQ8Qp6Z74= + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/ClsBarcodePrint.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/ClsBarcodePrint.dll.deploy new file mode 100644 index 0000000..0954ee1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/ClsBarcodePrint.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/ClsImport.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/ClsImport.dll.deploy new file mode 100644 index 0000000..7e44a6f Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/ClsImport.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/DataBase.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/DataBase.dll.deploy new file mode 100644 index 0000000..ec8c849 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/DataBase.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/Help.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/Help.exe.deploy new file mode 100644 index 0000000..2158f3e Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/Help.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/MyDataStructure.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/MyDataStructure.dll.deploy new file mode 100644 index 0000000..8a55342 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/MyDataStructure.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/SaveImage.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/SaveImage.exe.deploy new file mode 100644 index 0000000..e7a7fbe Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/SaveImage.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/SelectPrinter.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/SelectPrinter.exe.deploy new file mode 100644 index 0000000..de83d15 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/SelectPrinter.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/StreamPlus.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/StreamPlus.dll.deploy new file mode 100644 index 0000000..7ca0466 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/StreamPlus.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/VestShapes.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/VestShapes.dll.deploy new file mode 100644 index 0000000..f46b440 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/VestShapes.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/zxing.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/zxing.dll.deploy new file mode 100644 index 0000000..aa7bcf1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_4/zxing.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeEdit.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeEdit.exe.deploy new file mode 100644 index 0000000..121f3fc Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeEdit.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.application b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.application new file mode 100644 index 0000000..7acf0f0 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.application @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + ab+YuVy+KJUWJ7P/bRkmdeNNbMQ= + + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.exe.config.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.exe.config.deploy new file mode 100644 index 0000000..fcd0c93 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.exe.config.deploy @@ -0,0 +1,3 @@ + + + diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.exe.deploy new file mode 100644 index 0000000..347dace Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.exe.manifest b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.exe.manifest new file mode 100644 index 0000000..06f3c8a --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/BarcodeManager.exe.manifest @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Qx57h6fEUH5IFszswe4ErKb2t8Y= + + + + + + + + + + + + /pdBYZP0VT29MPobTOKOWk1kapg= + + + + + + + + + + + + bsO58MihHmYR0kH4lnvAhVA7RTQ= + + + + + + + + + + + + 4QtWPcTtQ26Mu2CSg+Wv5KZYWm8= + + + + + + + + + + + + iyb25ZeDtJF1DPk82bWYja1mnRE= + + + + + + + + + + + + 8hm90bgpC5fbdPjjLMtk4u5rWRs= + + + + + + + + + + + + dEyySUziKDz0JhtSO0bssyiZ5Ls= + + + + + + + + + + + + bNAdCR5AJIMqOGxnnht8pvx3h3E= + + + + + + + + + + + + RSYhArMgEfRJjYuoQoZK2khAqhQ= + + + + + + + + + + + + 0DvsbmgKGtD+O9KOaJ/MukEdvDY= + + + + + + + + + + + + hE9PPC1THrzpLSqaBgbHqMhzM44= + + + + + + + + + + + + mY6ZtnEmFlEAXuv9Mnfy4ugrlVA= + + + + + + + + + + G5inYVx9MX6YO6/wAgEQ8Qp6Z74= + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/ClsBarcodePrint.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/ClsBarcodePrint.dll.deploy new file mode 100644 index 0000000..0954ee1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/ClsBarcodePrint.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/ClsImport.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/ClsImport.dll.deploy new file mode 100644 index 0000000..7e44a6f Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/ClsImport.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/DataBase.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/DataBase.dll.deploy new file mode 100644 index 0000000..ec8c849 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/DataBase.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/Help.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/Help.exe.deploy new file mode 100644 index 0000000..5622794 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/Help.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/MyDataStructure.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/MyDataStructure.dll.deploy new file mode 100644 index 0000000..8a55342 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/MyDataStructure.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/SaveImage.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/SaveImage.exe.deploy new file mode 100644 index 0000000..e7a7fbe Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/SaveImage.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/SelectPrinter.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/SelectPrinter.exe.deploy new file mode 100644 index 0000000..de83d15 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/SelectPrinter.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/StreamPlus.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/StreamPlus.dll.deploy new file mode 100644 index 0000000..7ca0466 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/StreamPlus.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/VestShapes.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/VestShapes.dll.deploy new file mode 100644 index 0000000..f46b440 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/VestShapes.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/zxing.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/zxing.dll.deploy new file mode 100644 index 0000000..aa7bcf1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_5/zxing.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeEdit.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeEdit.exe.deploy new file mode 100644 index 0000000..45241ab Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeEdit.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.application b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.application new file mode 100644 index 0000000..0076f22 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.application @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + Av7AzgaVVo13Kt0z9yw4JqU5rts= + + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.exe.config.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.exe.config.deploy new file mode 100644 index 0000000..fcd0c93 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.exe.config.deploy @@ -0,0 +1,3 @@ + + + diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.exe.deploy new file mode 100644 index 0000000..f86005c Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.exe.manifest b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.exe.manifest new file mode 100644 index 0000000..7be8d25 --- /dev/null +++ b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/BarcodeManager.exe.manifest @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OH0Cu7myu45BtwmY+0/p5QZH4ao= + + + + + + + + + + + + lAdfnTLKfDYAd1nHijy7DIa/yk8= + + + + + + + + + + + + bsO58MihHmYR0kH4lnvAhVA7RTQ= + + + + + + + + + + + + 4QtWPcTtQ26Mu2CSg+Wv5KZYWm8= + + + + + + + + + + + + iyb25ZeDtJF1DPk82bWYja1mnRE= + + + + + + + + + + + + 8hm90bgpC5fbdPjjLMtk4u5rWRs= + + + + + + + + + + + + dEyySUziKDz0JhtSO0bssyiZ5Ls= + + + + + + + + + + + + bNAdCR5AJIMqOGxnnht8pvx3h3E= + + + + + + + + + + + + RSYhArMgEfRJjYuoQoZK2khAqhQ= + + + + + + + + + + + + 0DvsbmgKGtD+O9KOaJ/MukEdvDY= + + + + + + + + + + + + hE9PPC1THrzpLSqaBgbHqMhzM44= + + + + + + + + + + + + mY6ZtnEmFlEAXuv9Mnfy4ugrlVA= + + + + + + + + + + G5inYVx9MX6YO6/wAgEQ8Qp6Z74= + + + + + + + + + 6h0JgTHaz8sO03pWd5G9YnQowyw= + + + \ No newline at end of file diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/ClsBarcodePrint.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/ClsBarcodePrint.dll.deploy new file mode 100644 index 0000000..0954ee1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/ClsBarcodePrint.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/ClsImport.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/ClsImport.dll.deploy new file mode 100644 index 0000000..7e44a6f Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/ClsImport.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/DataBase.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/DataBase.dll.deploy new file mode 100644 index 0000000..ec8c849 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/DataBase.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/Help.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/Help.exe.deploy new file mode 100644 index 0000000..5622794 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/Help.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/Icon1.ico.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/Icon1.ico.deploy new file mode 100644 index 0000000..4d7e4c1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/Icon1.ico.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/MyDataStructure.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/MyDataStructure.dll.deploy new file mode 100644 index 0000000..8a55342 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/MyDataStructure.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/SaveImage.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/SaveImage.exe.deploy new file mode 100644 index 0000000..e7a7fbe Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/SaveImage.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/SelectPrinter.exe.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/SelectPrinter.exe.deploy new file mode 100644 index 0000000..de83d15 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/SelectPrinter.exe.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/StreamPlus.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/StreamPlus.dll.deploy new file mode 100644 index 0000000..7ca0466 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/StreamPlus.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/VestShapes.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/VestShapes.dll.deploy new file mode 100644 index 0000000..f46b440 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/VestShapes.dll.deploy differ diff --git a/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/zxing.dll.deploy b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/zxing.dll.deploy new file mode 100644 index 0000000..aa7bcf1 Binary files /dev/null and b/BarcodeManager/发布/Application Files/BarcodeManager_8_0_0_6/zxing.dll.deploy differ diff --git a/BarcodeManager/发布/BarcodeManager.application b/BarcodeManager/发布/BarcodeManager.application new file mode 100644 index 0000000..0076f22 --- /dev/null +++ b/BarcodeManager/发布/BarcodeManager.application @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + Av7AzgaVVo13Kt0z9yw4JqU5rts= + + + + \ No newline at end of file diff --git a/Help/FrmHelp.cs b/Help/FrmHelp.cs new file mode 100644 index 0000000..7e3ba1c --- /dev/null +++ b/Help/FrmHelp.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace BarcodeTerminator +{ + public partial class FrmHelp : Form + { + public FrmHelp() + { + InitializeComponent(); + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.Dispose(); + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start("https://xinyiya.taobao.com/"); + } + } +} diff --git a/Help/FrmHelp.designer.cs b/Help/FrmHelp.designer.cs new file mode 100644 index 0000000..12ecdcd --- /dev/null +++ b/Help/FrmHelp.designer.cs @@ -0,0 +1,117 @@ +namespace BarcodeTerminator +{ + partial class FrmHelp + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmHelp)); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.btnClose = new System.Windows.Forms.Button(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.label1 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(34, 12); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(437, 313); + this.textBox1.TabIndex = 0; + this.textBox1.Text = resources.GetString("textBox1.Text"); + // + // btnClose + // + this.btnClose.Location = new System.Drawing.Point(300, 342); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(75, 23); + this.btnClose.TabIndex = 0; + this.btnClose.Text = "关闭"; + this.btnClose.UseVisualStyleBackColor = true; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Location = new System.Drawing.Point(170, 347); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(77, 12); + this.linkLabel1.TabIndex = 1; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "鑫意雅淘宝店"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // pictureBox1 + // + this.pictureBox1.Image = global::Help.Properties.Resources.wxreceivables; + this.pictureBox1.Location = new System.Drawing.Point(477, 12); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(253, 313); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(475, 342); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(245, 12); + this.label1.TabIndex = 3; + this.label1.Text = "开发不易,如帮到您,请支援作者继续开发。"; + // + // FrmHelp + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(755, 383); + this.Controls.Add(this.label1); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.linkLabel1); + this.Controls.Add(this.btnClose); + this.Controls.Add(this.textBox1); + this.Name = "FrmHelp"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "帮助"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/Help/FrmHelp.resx b/Help/FrmHelp.resx new file mode 100644 index 0000000..180c2e8 --- /dev/null +++ b/Help/FrmHelp.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 本软件最大的特点就是简单,根据你的自定义模板和有数据的EXCEL表格就可以实现批量打印,像如下的Excel表格是很常见的格式,本软件是自动把第一行当作“变量名”,而把第二行开始的数据当作“变量值”,在模板编辑窗体中,只需要定义这些变量的位置或者格式等信息就可以了,变量值是自动替换的,也可以画线段,椭圆等图形,还可以定义条形码纸张,比如说40mm x 40mm,条形码纸之间的水平间距是2mm,每行有2个条形码纸。连续的条形码纸,只要你把你需要的垂直间距加到高度上就可以了。 + +本软件画图是单位是毫米,有刻度尺. + +多个EXCEL表格可以用同一个模板打印,同样,一个EXCEL表格可以选择多种模板打印,这个是很方便选择的. + + + +款号 品名 数量 条形码 +1 男装T恤 342 123456789012 +2 女装T恤 42342 123456789013 +3 男装休闲长裤 4242 123456789014 +4 女装休闲长裤 42 123456789015 +5 男装牛仔长裤 4242 123456789016 +6 女装牛仔长裤 42 123456789017 +7 男装长袖衬衫 452 123456789018 +8 女装长袖衬衫 5432 123456789019 + + \ No newline at end of file diff --git a/Help/Help.csproj b/Help/Help.csproj new file mode 100644 index 0000000..28a2ecb --- /dev/null +++ b/Help/Help.csproj @@ -0,0 +1,132 @@ + + + + + Debug + AnyCPU + {998DA8FB-1CC7-467A-85A5-404FADAC5ED8} + WinExe + Properties + Help + Help + v4.8 + 512 + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + none + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + false + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + false + + + bin\x86\ + false + + + bin\x86\x86\ + x86 + false + + + LocalIntranet + + + true + + + Properties\app.manifest + + + + + + + + + + + + + + + + Form + + + FrmHelp.cs + + + + + FrmHelp.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + \ No newline at end of file diff --git a/Help/Program.cs b/Help/Program.cs new file mode 100644 index 0000000..fb46cc2 --- /dev/null +++ b/Help/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace BarcodeTerminator +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new FrmHelp()); + } + } +} diff --git a/Help/Properties/AssemblyInfo.cs b/Help/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ae458b1 --- /dev/null +++ b/Help/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Help")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Help")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("7292018c-0f36-4812-b287-b50d300125ec")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Help/Properties/Resources.Designer.cs b/Help/Properties/Resources.Designer.cs new file mode 100644 index 0000000..959efd6 --- /dev/null +++ b/Help/Properties/Resources.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace Help.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Help.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap wxreceivables { + get { + object obj = ResourceManager.GetObject("wxreceivables", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Help/Properties/Resources.resx b/Help/Properties/Resources.resx new file mode 100644 index 0000000..bc93265 --- /dev/null +++ b/Help/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\wxreceivables.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Help/Properties/Settings.Designer.cs b/Help/Properties/Settings.Designer.cs new file mode 100644 index 0000000..b1e9e71 --- /dev/null +++ b/Help/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace Help.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.13.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Help/Properties/Settings.settings b/Help/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Help/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Help/Properties/app.manifest b/Help/Properties/app.manifest new file mode 100644 index 0000000..8981e8d --- /dev/null +++ b/Help/Properties/app.manifest @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Help/app.config b/Help/app.config new file mode 100644 index 0000000..3e0e37c --- /dev/null +++ b/Help/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Help/wxreceivables.jpg b/Help/wxreceivables.jpg new file mode 100644 index 0000000..da82bcb Binary files /dev/null and b/Help/wxreceivables.jpg differ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9488acd --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2015, kerwinxu +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/LibShapes/Core/Command/CommandCreate.cs b/LibShapes/Core/Command/CommandCreate.cs new file mode 100644 index 0000000..17c4710 --- /dev/null +++ b/LibShapes/Core/Command/CommandCreate.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + /// + /// 新建形状的命令, + /// + public class CommandCreate : ShapeCommand + { + public override void Redo() + { + this.canvas.shapes.lstShapes.Add(this.NewShape); + //throw new NotImplementedException(); + } + + public override void Undo() + { + this.canvas.shapes.lstShapes.Remove(this.NewShape); + //throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/Command/CommandDelete.cs b/LibShapes/Core/Command/CommandDelete.cs new file mode 100644 index 0000000..7ae9cd5 --- /dev/null +++ b/LibShapes/Core/Command/CommandDelete.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + public class CommandDelete : ShapeCommand + { + /// + /// 从哪一项删除的。 + /// + public int index { get; set; } + + public override void Redo() + { + // 重新删除 + this.index = this.canvas.shapes.lstShapes.IndexOf(this.NewShape); + this.canvas.shapes.lstShapes.Remove(this.NewShape); + //throw new NotImplementedException(); + } + + public override void Undo() + { + // 从这个位置重新插入。 + this.canvas.shapes.lstShapes.Insert(this.index, this.NewShape); + //throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/Command/CommandMove.cs b/LibShapes/Core/Command/CommandMove.cs new file mode 100644 index 0000000..3a2f0a2 --- /dev/null +++ b/LibShapes/Core/Command/CommandMove.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + /// + /// 这个实际上没有用到,我用CommandResize来统一了。 + /// + public class CommandMove : ShapeCommand + { + } +} diff --git a/LibShapes/Core/Command/CommandPropertyChanged.cs b/LibShapes/Core/Command/CommandPropertyChanged.cs new file mode 100644 index 0000000..df18518 --- /dev/null +++ b/LibShapes/Core/Command/CommandPropertyChanged.cs @@ -0,0 +1,23 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + public class CommandPropertyChanged : ShapeCommand + { + public override void Redo() + { + this.canvas.shapes.replaceShape(this.OldShape.ID, this.NewShape); + //throw new NotImplementedException(); + } + + public override void Undo() + { + this.canvas.shapes.replaceShape(this.OldShape.ID, this.OldShape); + //throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/Command/CommandRecorder.cs b/LibShapes/Core/Command/CommandRecorder.cs new file mode 100644 index 0000000..0ec8d39 --- /dev/null +++ b/LibShapes/Core/Command/CommandRecorder.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + public class CommandRecorder:ICommandRecorder + { + // 保存一堆的命令 + private List commands = new List(); + // 当前的下标 + private int current_index = -1; + + public void addCommand(ICommand command) + { + // 这里要判断是否是最后一个 + if (current_index < commands.Count - 1) + { + // 说明后边还有,首先删除后边的 + commands.RemoveRange(current_index + 1, commands.Count - current_index-1); + } + // 添加进去 + commands.Add(command); + // 重新设置 + current_index += 1; + } + + public bool isRedoAble() + { + return current_index < this.commands.Count - 1; + //throw new NotImplementedException(); + } + + public bool isUndoAble() + { + return current_index > 0; + //throw new NotImplementedException(); + } + + public void Redo() + { + // + current_index += 1;// 往后退一步 + if (current_index >= commands.Count) current_index = commands.Count - 1;// 不能再前进了。 + // 这里表示有操作 + if (current_index >= 0 && current_index < commands.Count) + { + commands[current_index].Redo(); + } + + } + + public void Undo() + { + // 这里表示有操作 + if (current_index >= 0 && current_index < commands.Count) + { + commands[current_index].Undo(); + } + current_index -= 1;// 往后退一步 + if (current_index < 0) current_index = -1;// 有最小的不能再退 + } + } +} diff --git a/LibShapes/Core/Command/CommandResize.cs b/LibShapes/Core/Command/CommandResize.cs new file mode 100644 index 0000000..9be8947 --- /dev/null +++ b/LibShapes/Core/Command/CommandResize.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + public class CommandResize : ShapeCommand + { + + } +} diff --git a/LibShapes/Core/Command/CommandShapeBackward.cs b/LibShapes/Core/Command/CommandShapeBackward.cs new file mode 100644 index 0000000..efaf420 --- /dev/null +++ b/LibShapes/Core/Command/CommandShapeBackward.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + class CommandShapeBackward : ShapeCommand + { + // todo 命令 + } +} diff --git a/LibShapes/Core/Command/CommandShapeBackwardToEnd.cs b/LibShapes/Core/Command/CommandShapeBackwardToEnd.cs new file mode 100644 index 0000000..19c1756 --- /dev/null +++ b/LibShapes/Core/Command/CommandShapeBackwardToEnd.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + class CommandShapeBackwardToEnd : ShapeCommand + { + // todo 命令 + } +} diff --git a/LibShapes/Core/Command/CommandShapeCancelGroup.cs b/LibShapes/Core/Command/CommandShapeCancelGroup.cs new file mode 100644 index 0000000..8f42b07 --- /dev/null +++ b/LibShapes/Core/Command/CommandShapeCancelGroup.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + class CommandShapeCancelGroup : ShapeCommand + { + // todo 命令 + } +} diff --git a/LibShapes/Core/Command/CommandShapeForward.cs b/LibShapes/Core/Command/CommandShapeForward.cs new file mode 100644 index 0000000..a5d6547 --- /dev/null +++ b/LibShapes/Core/Command/CommandShapeForward.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + public class CommandShapeForward:ShapeCommand + { + // todo 命令 + } +} diff --git a/LibShapes/Core/Command/CommandShapeForwardToFront.cs b/LibShapes/Core/Command/CommandShapeForwardToFront.cs new file mode 100644 index 0000000..e0939e2 --- /dev/null +++ b/LibShapes/Core/Command/CommandShapeForwardToFront.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + class CommandShapeForwardToFront:ShapeCommand + { + // todo 命令 + } +} diff --git a/LibShapes/Core/Command/CommandShapeMergeGroup.cs b/LibShapes/Core/Command/CommandShapeMergeGroup.cs new file mode 100644 index 0000000..7276ecf --- /dev/null +++ b/LibShapes/Core/Command/CommandShapeMergeGroup.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + class CommandShapeMergeGroup : ShapeCommand + { + // todo 命令 + } +} diff --git a/LibShapes/Core/Command/CommandShapesChanged.cs b/LibShapes/Core/Command/CommandShapesChanged.cs new file mode 100644 index 0000000..80ce8f1 --- /dev/null +++ b/LibShapes/Core/Command/CommandShapesChanged.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +/** + * 我这里做一个省事,所有的更改都改成这种更改,而不是单独的区分了。 + * + * **/ + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + + /// + /// Shapes的更改 + /// + public class CommandShapesChanged:ICommand + { + /// + /// 原先的 + /// + public Shapes OldShapes { get; set; } + + /// + /// 新的 + /// + public Shapes NewShapes { get; set; } + + /// + /// 画布 + /// + public UserControlCanvas canvas { get; set; } + + public void Redo() + { + this.canvas.shapes = NewShapes; + //throw new NotImplementedException(); + } + + public void Undo() + { + this.canvas.shapes = OldShapes; + //throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/Command/ICommand.cs b/LibShapes/Core/Command/ICommand.cs new file mode 100644 index 0000000..e093f93 --- /dev/null +++ b/LibShapes/Core/Command/ICommand.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + public interface ICommand + { + void Undo(); + + void Redo(); + } +} diff --git a/LibShapes/Core/Command/ICommandRecorder.cs b/LibShapes/Core/Command/ICommandRecorder.cs new file mode 100644 index 0000000..f847c98 --- /dev/null +++ b/LibShapes/Core/Command/ICommandRecorder.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + public interface ICommandRecorder + { + void addCommand(ICommand command); + + void Undo(); + + void Redo(); + + bool isUndoAble(); + + bool isRedoAble(); + } +} diff --git a/LibShapes/Core/Command/ShapeCommand.cs b/LibShapes/Core/Command/ShapeCommand.cs new file mode 100644 index 0000000..f26ecd1 --- /dev/null +++ b/LibShapes/Core/Command/ShapeCommand.cs @@ -0,0 +1,35 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command +{ + /// + /// 形状方面的命令。 + /// + public abstract class ShapeCommand: ICommand + { + /// + /// 原先的形状 + /// + public ShapeEle OldShape { get; set; } + + /// + /// 新的形状 + /// + public ShapeEle NewShape { get; set; } + + /// + /// 画布 + /// + public UserControlCanvas canvas { get; set; } + + // 如下是两个操作。 + + public virtual void Undo() { this.canvas.shapes.replaceShape(this.OldShape.ID, this.NewShape); } + + public virtual void Redo() { this.canvas.shapes.replaceShape(this.OldShape.ID, this.OldShape); } + } +} diff --git a/LibShapes/Core/Converter/BarcodeEncodingConverter.cs b/LibShapes/Core/Converter/BarcodeEncodingConverter.cs new file mode 100644 index 0000000..b77845e --- /dev/null +++ b/LibShapes/Core/Converter/BarcodeEncodingConverter.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using ZXing; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Converter +{ + /// + /// 显示条形码编码类型 + /// + [Serializable] + //[ProtoContract] + public class BarcodeEncodingConverter : StringConverter + { + //我现在只能用这种静态的方式来搞定这个了。 + //public static string[] arrVarName = { "AZTEC", "EAN13", "EAN8", "CODE_39", "QR_CODE" }; + + public static Dictionary dictBarcode = new Dictionary(); + + static BarcodeEncodingConverter() + { + //支持这么多编码。 + dictBarcode.Add("AZTEC", BarcodeFormat.AZTEC); + dictBarcode.Add("CODABAR", BarcodeFormat.CODABAR); + dictBarcode.Add("CODE_39", BarcodeFormat.CODE_39); + dictBarcode.Add("CODE_93", BarcodeFormat.CODE_93); + dictBarcode.Add("CODE_128", BarcodeFormat.CODE_128); + dictBarcode.Add("DATA_MATRIX", BarcodeFormat.DATA_MATRIX); + dictBarcode.Add("EAN_8", BarcodeFormat.EAN_8); + dictBarcode.Add("EAN_13", BarcodeFormat.EAN_13); + dictBarcode.Add("ITF", BarcodeFormat.ITF); + dictBarcode.Add("MAXICODE", BarcodeFormat.MAXICODE); + dictBarcode.Add("PDF_417", BarcodeFormat.PDF_417); + dictBarcode.Add("QR_CODE", BarcodeFormat.QR_CODE); + dictBarcode.Add("RSS_14", BarcodeFormat.RSS_14); + dictBarcode.Add("RSS_EXPANDED", BarcodeFormat.RSS_EXPANDED); + dictBarcode.Add("UPC_A", BarcodeFormat.UPC_A); + dictBarcode.Add("UPC_E", BarcodeFormat.UPC_E); + dictBarcode.Add("All_1D", BarcodeFormat.All_1D); + dictBarcode.Add("UPC_EAN_EXTENSION", BarcodeFormat.UPC_EAN_EXTENSION); + dictBarcode.Add("MSI", BarcodeFormat.MSI); + dictBarcode.Add("PLESSEY", BarcodeFormat.PLESSEY); + dictBarcode.Add("IMB", BarcodeFormat.IMB); + + } + + + //覆盖 GetStandardValuesSupported 方法并返回 true ,表示此对象支持可以从列表中选取的一组标准值。 + public override bool GetStandardValuesSupported(ITypeDescriptorContext context) + { + return true; + } + /// + /// 覆盖 GetStandardValues 方法并返回填充了标准值的 StandardValuesCollection 。 + /// 创建 StandardValuesCollection 的方法之一是在构造函数中提供一个值数组。 + /// 对于选项窗口应用程序,您可以使用填充了建议的默认文件名的 String 数组。 + /// + /// + /// + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) + { + //return new StandardValuesCollection(arrVarName); + return new StandardValuesCollection(dictBarcode.Keys); + } + //如下这样就会变成组合框 + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) + { + return false; + } + + + } +} diff --git a/LibShapes/Core/Converter/QrCodeErrorCorrectionLevelConverter.cs b/LibShapes/Core/Converter/QrCodeErrorCorrectionLevelConverter.cs new file mode 100644 index 0000000..779d083 --- /dev/null +++ b/LibShapes/Core/Converter/QrCodeErrorCorrectionLevelConverter.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using ZXing.QrCode.Internal; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Converter +{ + /// + /// + /// + public class QrCodeErrorCorrectionLevelConverter : StringConverter + { + // 1. 一个静态的属性 + public static Dictionary level = new Dictionary(); + + // 2. 静态的构造方法,主要是构造上边的属性 + static QrCodeErrorCorrectionLevelConverter() + { + level.Add("容错7%", ErrorCorrectionLevel.L); + level.Add("容错15%", ErrorCorrectionLevel.M); + level.Add("容错25%", ErrorCorrectionLevel.Q); + level.Add("容错30%", ErrorCorrectionLevel.H); + + } + + //3. 覆盖 GetStandardValuesSupported 方法并返回 true ,表示此对象支持可以从列表中选取的一组标准值。 + public override bool GetStandardValuesSupported(ITypeDescriptorContext context) + { + return true; + } + + //4. + /// + /// 覆盖 GetStandardValues 方法并返回填充了标准值的 StandardValuesCollection 。 + /// 创建 StandardValuesCollection 的方法之一是在构造函数中提供一个值数组。 + /// 对于选项窗口应用程序,您可以使用填充了建议的默认文件名的 String 数组。 + /// + /// + /// + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) + { + //return new StandardValuesCollection(arrVarName); + return new StandardValuesCollection(level.Keys); + } + + //5. + //如下这样就会变成组合框 + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) + { + return false; + } + + } +} diff --git a/LibShapes/Core/Event/ObjectSelectEventArgs.cs b/LibShapes/Core/Event/ObjectSelectEventArgs.cs new file mode 100644 index 0000000..0b414ea --- /dev/null +++ b/LibShapes/Core/Event/ObjectSelectEventArgs.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Event +{ + /// + /// 对象被选择事件 + /// + public class ObjectSelectEventArgs : EventArgs + { + /// + /// 这个被选择了 + /// + public Object obj { get; set; } + + public ObjectSelectEventArgs(Object obj) + { + this.obj = obj; + } + } +} diff --git a/LibShapes/Core/Event/StateChangedEventArgs.cs b/LibShapes/Core/Event/StateChangedEventArgs.cs new file mode 100644 index 0000000..636a63a --- /dev/null +++ b/LibShapes/Core/Event/StateChangedEventArgs.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Event +{ + /// + /// 状态改变的事件 + /// + public class StateChangedEventArgs : EventArgs + { + public State.State CurrentState { get; set; } + + public StateChangedEventArgs(State.State state) + { + this.CurrentState = state; + } + } +} diff --git a/LibShapes/Core/Paper/FrmPaperSetting.Designer.cs b/LibShapes/Core/Paper/FrmPaperSetting.Designer.cs new file mode 100644 index 0000000..e95dc47 --- /dev/null +++ b/LibShapes/Core/Paper/FrmPaperSetting.Designer.cs @@ -0,0 +1,900 @@ + +namespace Io.Github.Kerwinxu.LibShapes.Core.Paper +{ + partial class FrmPaperSetting + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPagePaper = new System.Windows.Forms.TabPage(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.comboPrinters = new System.Windows.Forms.ComboBox(); + this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.comboPaperSizes = new System.Windows.Forms.ComboBox(); + this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.btn_paper_ok = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.label1 = new System.Windows.Forms.Label(); + this.txt_paper_width = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.txt_paper_height = new System.Windows.Forms.TextBox(); + this.groupBox10 = new System.Windows.Forms.GroupBox(); + this.radioButton2 = new System.Windows.Forms.RadioButton(); + this.radioButton1 = new System.Windows.Forms.RadioButton(); + this.tabPageLayout = new System.Windows.Forms.TabPage(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.chkCustomInterval = new System.Windows.Forms.CheckBox(); + this.txtHorizontalInterval = new System.Windows.Forms.TextBox(); + this.txtVerticalInterval = new System.Windows.Forms.TextBox(); + this.label12 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.chkCustomModelSize = new System.Windows.Forms.CheckBox(); + this.txtModelWidth = new System.Windows.Forms.TextBox(); + this.txtModelHeight = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.txtMaginsTop = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.txtMaginsLeft = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.txtMaginsRight = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.txtMaginsBottom = new System.Windows.Forms.TextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.UpDownNumberOfColumn = new System.Windows.Forms.NumericUpDown(); + this.UpDownNumberOfLine = new System.Windows.Forms.NumericUpDown(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.tabPageShapes = new System.Windows.Forms.TabPage(); + this.groupBoxRect = new System.Windows.Forms.GroupBox(); + this.chkEllipseHole = new System.Windows.Forms.CheckBox(); + this.txtEllipseHoleRadius = new System.Windows.Forms.TextBox(); + this.lblEllipseHoleRadius = new System.Windows.Forms.Label(); + this.txtRoundRadius = new System.Windows.Forms.TextBox(); + this.lblRoundRadius = new System.Windows.Forms.Label(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.radioButtonRoundRect = new System.Windows.Forms.RadioButton(); + this.radioButtonEllipse = new System.Windows.Forms.RadioButton(); + this.radioButtonRect = new System.Windows.Forms.RadioButton(); + this.btnCancel = new System.Windows.Forms.Button(); + this.btnOk = new System.Windows.Forms.Button(); + this.lblModelSize = new System.Windows.Forms.Label(); + this.lblPaperSize = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.tabControl1.SuspendLayout(); + this.tabPagePaper.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.groupBox9.SuspendLayout(); + this.groupBox7.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.groupBox10.SuspendLayout(); + this.tabPageLayout.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.UpDownNumberOfColumn)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.UpDownNumberOfLine)).BeginInit(); + this.tabPageShapes.SuspendLayout(); + this.groupBoxRect.SuspendLayout(); + this.groupBox5.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPagePaper); + this.tabControl1.Controls.Add(this.tabPageLayout); + this.tabControl1.Controls.Add(this.tabPageShapes); + this.tabControl1.Location = new System.Drawing.Point(12, 12); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(318, 419); + this.tabControl1.TabIndex = 1; + // + // tabPagePaper + // + this.tabPagePaper.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.tabPagePaper.Controls.Add(this.flowLayoutPanel1); + this.tabPagePaper.Location = new System.Drawing.Point(4, 22); + this.tabPagePaper.Name = "tabPagePaper"; + this.tabPagePaper.Padding = new System.Windows.Forms.Padding(3); + this.tabPagePaper.Size = new System.Drawing.Size(310, 393); + this.tabPagePaper.TabIndex = 0; + this.tabPagePaper.Text = "纸张"; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.groupBox6); + this.flowLayoutPanel1.Controls.Add(this.groupBox9); + this.flowLayoutPanel1.Controls.Add(this.groupBox7); + this.flowLayoutPanel1.Controls.Add(this.groupBox10); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(304, 387); + this.flowLayoutPanel1.TabIndex = 0; + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.comboPrinters); + this.groupBox6.Location = new System.Drawing.Point(3, 3); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(298, 58); + this.groupBox6.TabIndex = 5; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "打印机"; + // + // comboPrinters + // + this.comboPrinters.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboPrinters.FormattingEnabled = true; + this.comboPrinters.Location = new System.Drawing.Point(6, 20); + this.comboPrinters.Name = "comboPrinters"; + this.comboPrinters.Size = new System.Drawing.Size(286, 20); + this.comboPrinters.TabIndex = 1; + this.comboPrinters.SelectedIndexChanged += new System.EventHandler(this.comboPrinters_SelectedIndexChanged); + // + // groupBox9 + // + this.groupBox9.Controls.Add(this.comboPaperSizes); + this.groupBox9.Location = new System.Drawing.Point(3, 67); + this.groupBox9.Name = "groupBox9"; + this.groupBox9.Size = new System.Drawing.Size(298, 58); + this.groupBox9.TabIndex = 4; + this.groupBox9.TabStop = false; + this.groupBox9.Text = "纸张大小"; + // + // comboPaperSizes + // + this.comboPaperSizes.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboPaperSizes.FormattingEnabled = true; + this.comboPaperSizes.Location = new System.Drawing.Point(6, 20); + this.comboPaperSizes.Name = "comboPaperSizes"; + this.comboPaperSizes.Size = new System.Drawing.Size(286, 20); + this.comboPaperSizes.TabIndex = 1; + this.comboPaperSizes.SelectedValueChanged += new System.EventHandler(this.comboPaperSizes_SelectedValueChanged); + // + // groupBox7 + // + this.groupBox7.Controls.Add(this.btn_paper_ok); + this.groupBox7.Controls.Add(this.tableLayoutPanel1); + this.groupBox7.Location = new System.Drawing.Point(3, 131); + this.groupBox7.Name = "groupBox7"; + this.groupBox7.Size = new System.Drawing.Size(298, 97); + this.groupBox7.TabIndex = 6; + this.groupBox7.TabStop = false; + this.groupBox7.Text = "纸张自定义"; + // + // btn_paper_ok + // + this.btn_paper_ok.Location = new System.Drawing.Point(189, 55); + this.btn_paper_ok.Name = "btn_paper_ok"; + this.btn_paper_ok.Size = new System.Drawing.Size(75, 23); + this.btn_paper_ok.TabIndex = 1; + this.btn_paper_ok.Text = "确定"; + this.btn_paper_ok.UseVisualStyleBackColor = true; + this.btn_paper_ok.Click += new System.EventHandler(this.btn_paper_ok_Click); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 3; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 48.3871F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 51.6129F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 31F)); + this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.txt_paper_width, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.label14, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.label15, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.txt_paper_height, 1, 1); + this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 20); + 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(177, 62); + this.tableLayoutPanel1.TabIndex = 0; + // + // label1 + // + this.label1.Anchor = System.Windows.Forms.AnchorStyles.None; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(14, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(41, 12); + this.label1.TabIndex = 0; + this.label1.Text = "宽度:"; + // + // txt_paper_width + // + this.txt_paper_width.Location = new System.Drawing.Point(73, 3); + this.txt_paper_width.Name = "txt_paper_width"; + this.txt_paper_width.Size = new System.Drawing.Size(63, 21); + this.txt_paper_width.TabIndex = 2; + // + // label14 + // + this.label14.Anchor = System.Windows.Forms.AnchorStyles.None; + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(152, 9); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 12); + this.label14.TabIndex = 4; + this.label14.Text = "mm"; + // + // label2 + // + this.label2.Anchor = System.Windows.Forms.AnchorStyles.None; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(14, 40); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(41, 12); + this.label2.TabIndex = 1; + this.label2.Text = "高度:"; + // + // label15 + // + this.label15.Anchor = System.Windows.Forms.AnchorStyles.None; + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(152, 40); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 12); + this.label15.TabIndex = 5; + this.label15.Text = "mm"; + // + // txt_paper_height + // + this.txt_paper_height.Location = new System.Drawing.Point(73, 34); + this.txt_paper_height.Name = "txt_paper_height"; + this.txt_paper_height.Size = new System.Drawing.Size(63, 21); + this.txt_paper_height.TabIndex = 3; + // + // groupBox10 + // + this.groupBox10.Controls.Add(this.radioButton2); + this.groupBox10.Controls.Add(this.radioButton1); + this.groupBox10.Location = new System.Drawing.Point(3, 234); + this.groupBox10.Name = "groupBox10"; + this.groupBox10.Size = new System.Drawing.Size(298, 69); + this.groupBox10.TabIndex = 5; + this.groupBox10.TabStop = false; + this.groupBox10.Text = "方向"; + // + // radioButton2 + // + this.radioButton2.AutoSize = true; + this.radioButton2.Location = new System.Drawing.Point(6, 42); + this.radioButton2.Name = "radioButton2"; + this.radioButton2.Size = new System.Drawing.Size(47, 16); + this.radioButton2.TabIndex = 4; + this.radioButton2.Text = "横向"; + this.radioButton2.UseVisualStyleBackColor = true; + // + // radioButton1 + // + this.radioButton1.AutoSize = true; + this.radioButton1.Checked = true; + this.radioButton1.Location = new System.Drawing.Point(6, 20); + this.radioButton1.Name = "radioButton1"; + this.radioButton1.Size = new System.Drawing.Size(47, 16); + this.radioButton1.TabIndex = 4; + this.radioButton1.TabStop = true; + this.radioButton1.Text = "纵向"; + this.radioButton1.UseVisualStyleBackColor = true; + // + // tabPageLayout + // + this.tabPageLayout.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.tabPageLayout.Controls.Add(this.groupBox4); + this.tabPageLayout.Controls.Add(this.groupBox3); + this.tabPageLayout.Controls.Add(this.groupBox2); + this.tabPageLayout.Controls.Add(this.groupBox1); + this.tabPageLayout.Location = new System.Drawing.Point(4, 22); + this.tabPageLayout.Name = "tabPageLayout"; + this.tabPageLayout.Padding = new System.Windows.Forms.Padding(3); + this.tabPageLayout.Size = new System.Drawing.Size(310, 393); + this.tabPageLayout.TabIndex = 1; + this.tabPageLayout.Text = "布局"; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.chkCustomInterval); + this.groupBox4.Controls.Add(this.txtHorizontalInterval); + this.groupBox4.Controls.Add(this.txtVerticalInterval); + this.groupBox4.Controls.Add(this.label12); + this.groupBox4.Controls.Add(this.label13); + this.groupBox4.Location = new System.Drawing.Point(6, 284); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(291, 100); + this.groupBox4.TabIndex = 19; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "模板间距"; + // + // chkCustomInterval + // + this.chkCustomInterval.AutoSize = true; + this.chkCustomInterval.Enabled = false; + this.chkCustomInterval.Location = new System.Drawing.Point(193, 45); + this.chkCustomInterval.Name = "chkCustomInterval"; + this.chkCustomInterval.Size = new System.Drawing.Size(72, 16); + this.chkCustomInterval.TabIndex = 18; + this.chkCustomInterval.Text = "手动设置"; + this.chkCustomInterval.UseVisualStyleBackColor = true; + this.chkCustomInterval.Visible = false; + this.chkCustomInterval.CheckedChanged += new System.EventHandler(this.chkCustomInterval_CheckedChanged); + // + // txtHorizontalInterval + // + this.txtHorizontalInterval.Enabled = false; + this.txtHorizontalInterval.Location = new System.Drawing.Point(56, 23); + this.txtHorizontalInterval.Name = "txtHorizontalInterval"; + this.txtHorizontalInterval.Size = new System.Drawing.Size(76, 21); + this.txtHorizontalInterval.TabIndex = 14; + this.txtHorizontalInterval.Text = "0"; + this.txtHorizontalInterval.TextChanged += new System.EventHandler(this.txtHorizontalInterval_TextChanged); + // + // txtVerticalInterval + // + this.txtVerticalInterval.Enabled = false; + this.txtVerticalInterval.Location = new System.Drawing.Point(56, 60); + this.txtVerticalInterval.Name = "txtVerticalInterval"; + this.txtVerticalInterval.Size = new System.Drawing.Size(76, 21); + this.txtVerticalInterval.TabIndex = 17; + this.txtVerticalInterval.Text = "0"; + this.txtVerticalInterval.TextChanged += new System.EventHandler(this.txtHorizontalInterval_TextChanged); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(9, 63); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(29, 12); + this.label12.TabIndex = 15; + this.label12.Text = "垂直"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(9, 26); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(29, 12); + this.label13.TabIndex = 16; + this.label13.Text = "水平"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.chkCustomModelSize); + this.groupBox3.Controls.Add(this.txtModelWidth); + this.groupBox3.Controls.Add(this.txtModelHeight); + this.groupBox3.Controls.Add(this.label4); + this.groupBox3.Controls.Add(this.label7); + this.groupBox3.Location = new System.Drawing.Point(6, 178); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(291, 100); + this.groupBox3.TabIndex = 17; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "模板大小"; + // + // chkCustomModelSize + // + this.chkCustomModelSize.AutoSize = true; + this.chkCustomModelSize.Checked = true; + this.chkCustomModelSize.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkCustomModelSize.Location = new System.Drawing.Point(193, 43); + this.chkCustomModelSize.Name = "chkCustomModelSize"; + this.chkCustomModelSize.Size = new System.Drawing.Size(72, 16); + this.chkCustomModelSize.TabIndex = 18; + this.chkCustomModelSize.Text = "手动设置"; + this.chkCustomModelSize.UseVisualStyleBackColor = true; + this.chkCustomModelSize.CheckedChanged += new System.EventHandler(this.chkCustomModelSize_CheckedChanged); + // + // txtModelWidth + // + this.txtModelWidth.Location = new System.Drawing.Point(53, 23); + this.txtModelWidth.Name = "txtModelWidth"; + this.txtModelWidth.Size = new System.Drawing.Size(76, 21); + this.txtModelWidth.TabIndex = 14; + this.txtModelWidth.Text = "10"; + this.txtModelWidth.TextChanged += new System.EventHandler(this.txtModelWidth_TextChanged); + // + // txtModelHeight + // + this.txtModelHeight.Location = new System.Drawing.Point(53, 60); + this.txtModelHeight.Name = "txtModelHeight"; + this.txtModelHeight.Size = new System.Drawing.Size(76, 21); + this.txtModelHeight.TabIndex = 17; + this.txtModelHeight.Text = "10"; + this.txtModelHeight.TextChanged += new System.EventHandler(this.txtModelWidth_TextChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(9, 63); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(29, 12); + this.label4.TabIndex = 15; + this.label4.Text = "高度"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(9, 26); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(29, 12); + this.label7.TabIndex = 16; + this.label7.Text = "宽度"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.txtMaginsTop); + this.groupBox2.Controls.Add(this.label8); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.txtMaginsLeft); + this.groupBox2.Controls.Add(this.label10); + this.groupBox2.Controls.Add(this.txtMaginsRight); + this.groupBox2.Controls.Add(this.label11); + this.groupBox2.Controls.Add(this.txtMaginsBottom); + this.groupBox2.Location = new System.Drawing.Point(3, 76); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(291, 96); + this.groupBox2.TabIndex = 16; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "边距"; + // + // txtMaginsTop + // + this.txtMaginsTop.Location = new System.Drawing.Point(56, 20); + this.txtMaginsTop.Name = "txtMaginsTop"; + this.txtMaginsTop.Size = new System.Drawing.Size(76, 21); + this.txtMaginsTop.TabIndex = 6; + this.txtMaginsTop.Text = "0"; + this.txtMaginsTop.TextChanged += new System.EventHandler(this.txtMaginsTop_TextChanged); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(149, 60); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(17, 12); + this.label8.TabIndex = 7; + this.label8.Text = "右"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(12, 60); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(17, 12); + this.label9.TabIndex = 8; + this.label9.Text = "下"; + // + // txtMaginsLeft + // + this.txtMaginsLeft.Location = new System.Drawing.Point(196, 20); + this.txtMaginsLeft.Name = "txtMaginsLeft"; + this.txtMaginsLeft.Size = new System.Drawing.Size(76, 21); + this.txtMaginsLeft.TabIndex = 13; + this.txtMaginsLeft.Text = "0"; + this.txtMaginsLeft.TextChanged += new System.EventHandler(this.txtMaginsTop_TextChanged); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(149, 23); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 12); + this.label10.TabIndex = 9; + this.label10.Text = "左"; + // + // txtMaginsRight + // + this.txtMaginsRight.Location = new System.Drawing.Point(196, 57); + this.txtMaginsRight.Name = "txtMaginsRight"; + this.txtMaginsRight.Size = new System.Drawing.Size(76, 21); + this.txtMaginsRight.TabIndex = 12; + this.txtMaginsRight.Text = "0"; + this.txtMaginsRight.TextChanged += new System.EventHandler(this.txtMaginsTop_TextChanged); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(12, 23); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 12); + this.label11.TabIndex = 10; + this.label11.Text = "上"; + // + // txtMaginsBottom + // + this.txtMaginsBottom.Location = new System.Drawing.Point(56, 57); + this.txtMaginsBottom.Name = "txtMaginsBottom"; + this.txtMaginsBottom.Size = new System.Drawing.Size(76, 21); + this.txtMaginsBottom.TabIndex = 11; + this.txtMaginsBottom.Text = "0"; + this.txtMaginsBottom.TextChanged += new System.EventHandler(this.txtMaginsTop_TextChanged); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.UpDownNumberOfColumn); + this.groupBox1.Controls.Add(this.UpDownNumberOfLine); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Location = new System.Drawing.Point(3, 6); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(296, 64); + this.groupBox1.TabIndex = 15; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "布局"; + // + // UpDownNumberOfColumn + // + this.UpDownNumberOfColumn.Location = new System.Drawing.Point(196, 20); + this.UpDownNumberOfColumn.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.UpDownNumberOfColumn.Name = "UpDownNumberOfColumn"; + this.UpDownNumberOfColumn.Size = new System.Drawing.Size(76, 21); + this.UpDownNumberOfColumn.TabIndex = 6; + this.UpDownNumberOfColumn.Value = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.UpDownNumberOfColumn.ValueChanged += new System.EventHandler(this.UpDownNumberOfLine_ValueChanged); + // + // UpDownNumberOfLine + // + this.UpDownNumberOfLine.Location = new System.Drawing.Point(56, 21); + this.UpDownNumberOfLine.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.UpDownNumberOfLine.Name = "UpDownNumberOfLine"; + this.UpDownNumberOfLine.Size = new System.Drawing.Size(76, 21); + this.UpDownNumberOfLine.TabIndex = 5; + this.UpDownNumberOfLine.Value = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.UpDownNumberOfLine.ValueChanged += new System.EventHandler(this.UpDownNumberOfLine_ValueChanged); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(12, 23); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(41, 12); + this.label5.TabIndex = 1; + this.label5.Text = "行数:"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(149, 23); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(41, 12); + this.label6.TabIndex = 2; + this.label6.Text = "列数:"; + // + // tabPageShapes + // + this.tabPageShapes.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.tabPageShapes.Controls.Add(this.groupBoxRect); + this.tabPageShapes.Controls.Add(this.groupBox5); + this.tabPageShapes.Location = new System.Drawing.Point(4, 22); + this.tabPageShapes.Name = "tabPageShapes"; + this.tabPageShapes.Padding = new System.Windows.Forms.Padding(3); + this.tabPageShapes.Size = new System.Drawing.Size(310, 393); + this.tabPageShapes.TabIndex = 2; + this.tabPageShapes.Text = "形状"; + // + // groupBoxRect + // + this.groupBoxRect.Controls.Add(this.chkEllipseHole); + this.groupBoxRect.Controls.Add(this.txtEllipseHoleRadius); + this.groupBoxRect.Controls.Add(this.lblEllipseHoleRadius); + this.groupBoxRect.Controls.Add(this.txtRoundRadius); + this.groupBoxRect.Controls.Add(this.lblRoundRadius); + this.groupBoxRect.Location = new System.Drawing.Point(6, 119); + this.groupBoxRect.Name = "groupBoxRect"; + this.groupBoxRect.Size = new System.Drawing.Size(298, 139); + this.groupBoxRect.TabIndex = 1; + this.groupBoxRect.TabStop = false; + this.groupBoxRect.Text = "选项"; + // + // chkEllipseHole + // + this.chkEllipseHole.AutoSize = true; + this.chkEllipseHole.Location = new System.Drawing.Point(15, 73); + this.chkEllipseHole.Name = "chkEllipseHole"; + this.chkEllipseHole.Size = new System.Drawing.Size(36, 16); + this.chkEllipseHole.TabIndex = 7; + this.chkEllipseHole.Text = "孔"; + this.chkEllipseHole.UseVisualStyleBackColor = true; + // + // txtEllipseHoleRadius + // + this.txtEllipseHoleRadius.Location = new System.Drawing.Point(72, 95); + this.txtEllipseHoleRadius.Name = "txtEllipseHoleRadius"; + this.txtEllipseHoleRadius.Size = new System.Drawing.Size(100, 21); + this.txtEllipseHoleRadius.TabIndex = 5; + // + // lblEllipseHoleRadius + // + this.lblEllipseHoleRadius.AutoSize = true; + this.lblEllipseHoleRadius.Location = new System.Drawing.Point(34, 98); + this.lblEllipseHoleRadius.Name = "lblEllipseHoleRadius"; + this.lblEllipseHoleRadius.Size = new System.Drawing.Size(29, 12); + this.lblEllipseHoleRadius.TabIndex = 4; + this.lblEllipseHoleRadius.Text = "孔径"; + // + // txtRoundRadius + // + this.txtRoundRadius.Location = new System.Drawing.Point(72, 42); + this.txtRoundRadius.Name = "txtRoundRadius"; + this.txtRoundRadius.Size = new System.Drawing.Size(100, 21); + this.txtRoundRadius.TabIndex = 2; + // + // lblRoundRadius + // + this.lblRoundRadius.AutoSize = true; + this.lblRoundRadius.Location = new System.Drawing.Point(13, 48); + this.lblRoundRadius.Name = "lblRoundRadius"; + this.lblRoundRadius.Size = new System.Drawing.Size(53, 12); + this.lblRoundRadius.TabIndex = 1; + this.lblRoundRadius.Text = "圆角半径"; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.radioButtonRoundRect); + this.groupBox5.Controls.Add(this.radioButtonEllipse); + this.groupBox5.Controls.Add(this.radioButtonRect); + this.groupBox5.Location = new System.Drawing.Point(6, 18); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(298, 95); + this.groupBox5.TabIndex = 0; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "模板形状"; + // + // radioButtonRoundRect + // + this.radioButtonRoundRect.AutoSize = true; + this.radioButtonRoundRect.Location = new System.Drawing.Point(15, 44); + this.radioButtonRoundRect.Name = "radioButtonRoundRect"; + this.radioButtonRoundRect.Size = new System.Drawing.Size(71, 16); + this.radioButtonRoundRect.TabIndex = 2; + this.radioButtonRoundRect.Text = "圆角矩形"; + this.radioButtonRoundRect.UseVisualStyleBackColor = true; + this.radioButtonRoundRect.CheckedChanged += new System.EventHandler(this.radioButtonRect_CheckedChanged); + // + // radioButtonEllipse + // + this.radioButtonEllipse.AutoSize = true; + this.radioButtonEllipse.Location = new System.Drawing.Point(15, 66); + this.radioButtonEllipse.Name = "radioButtonEllipse"; + this.radioButtonEllipse.Size = new System.Drawing.Size(47, 16); + this.radioButtonEllipse.TabIndex = 1; + this.radioButtonEllipse.Text = "椭圆"; + this.radioButtonEllipse.UseVisualStyleBackColor = true; + this.radioButtonEllipse.CheckedChanged += new System.EventHandler(this.radioButtonRect_CheckedChanged); + // + // radioButtonRect + // + this.radioButtonRect.AutoSize = true; + this.radioButtonRect.Checked = true; + this.radioButtonRect.Location = new System.Drawing.Point(15, 20); + this.radioButtonRect.Name = "radioButtonRect"; + this.radioButtonRect.Size = new System.Drawing.Size(47, 16); + this.radioButtonRect.TabIndex = 0; + this.radioButtonRect.TabStop = true; + this.radioButtonRect.Text = "方框"; + this.radioButtonRect.UseVisualStyleBackColor = true; + this.radioButtonRect.CheckedChanged += new System.EventHandler(this.radioButtonRect_CheckedChanged); + // + // btnCancel + // + this.btnCancel.Location = new System.Drawing.Point(447, 437); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 15; + this.btnCancel.Text = "取消"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnOk + // + this.btnOk.Location = new System.Drawing.Point(140, 437); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(75, 23); + this.btnOk.TabIndex = 14; + this.btnOk.Text = "确定"; + this.btnOk.UseVisualStyleBackColor = true; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // lblModelSize + // + this.lblModelSize.AutoSize = true; + this.lblModelSize.Location = new System.Drawing.Point(366, 402); + this.lblModelSize.Name = "lblModelSize"; + this.lblModelSize.Size = new System.Drawing.Size(65, 12); + this.lblModelSize.TabIndex = 13; + this.lblModelSize.Text = "模板大小:"; + // + // lblPaperSize + // + this.lblPaperSize.AutoSize = true; + this.lblPaperSize.Location = new System.Drawing.Point(366, 376); + this.lblPaperSize.Name = "lblPaperSize"; + this.lblPaperSize.Size = new System.Drawing.Size(65, 12); + this.lblPaperSize.TabIndex = 12; + this.lblPaperSize.Text = "纸张尺寸:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(331, 20); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(29, 12); + this.label3.TabIndex = 11; + this.label3.Text = "预览"; + // + // pictureBox1 + // + this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pictureBox1.Location = new System.Drawing.Point(331, 38); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(336, 335); + this.pictureBox1.TabIndex = 10; + this.pictureBox1.TabStop = false; + this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint); + // + // FrmPaperSetting + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(677, 475); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnOk); + this.Controls.Add(this.lblModelSize); + this.Controls.Add(this.lblPaperSize); + this.Controls.Add(this.label3); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.tabControl1); + this.Name = "FrmPaperSetting"; + this.Text = "纸张设置"; + this.tabControl1.ResumeLayout(false); + this.tabPagePaper.ResumeLayout(false); + this.flowLayoutPanel1.ResumeLayout(false); + this.groupBox6.ResumeLayout(false); + this.groupBox9.ResumeLayout(false); + this.groupBox7.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.groupBox10.ResumeLayout(false); + this.groupBox10.PerformLayout(); + this.tabPageLayout.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.UpDownNumberOfColumn)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.UpDownNumberOfLine)).EndInit(); + this.tabPageShapes.ResumeLayout(false); + this.groupBoxRect.ResumeLayout(false); + this.groupBoxRect.PerformLayout(); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPagePaper; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.ComboBox comboPrinters; + private System.Windows.Forms.GroupBox groupBox9; + private System.Windows.Forms.ComboBox comboPaperSizes; + private System.Windows.Forms.GroupBox groupBox7; + private System.Windows.Forms.Button btn_paper_ok; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txt_paper_width; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox txt_paper_height; + private System.Windows.Forms.GroupBox groupBox10; + private System.Windows.Forms.RadioButton radioButton2; + private System.Windows.Forms.RadioButton radioButton1; + private System.Windows.Forms.TabPage tabPageLayout; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.CheckBox chkCustomInterval; + private System.Windows.Forms.TextBox txtHorizontalInterval; + private System.Windows.Forms.TextBox txtVerticalInterval; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.CheckBox chkCustomModelSize; + private System.Windows.Forms.TextBox txtModelWidth; + private System.Windows.Forms.TextBox txtModelHeight; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox txtMaginsTop; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox txtMaginsLeft; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox txtMaginsRight; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox txtMaginsBottom; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.NumericUpDown UpDownNumberOfColumn; + private System.Windows.Forms.NumericUpDown UpDownNumberOfLine; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TabPage tabPageShapes; + private System.Windows.Forms.GroupBox groupBoxRect; + private System.Windows.Forms.CheckBox chkEllipseHole; + private System.Windows.Forms.TextBox txtEllipseHoleRadius; + private System.Windows.Forms.Label lblEllipseHoleRadius; + private System.Windows.Forms.TextBox txtRoundRadius; + private System.Windows.Forms.Label lblRoundRadius; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.RadioButton radioButtonRoundRect; + private System.Windows.Forms.RadioButton radioButtonEllipse; + private System.Windows.Forms.RadioButton radioButtonRect; + private System.Windows.Forms.Button btnCancel; + private System.Windows.Forms.Button btnOk; + private System.Windows.Forms.Label lblModelSize; + private System.Windows.Forms.Label lblPaperSize; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.PictureBox pictureBox1; + } +} \ No newline at end of file diff --git a/LibShapes/Core/Paper/FrmPaperSetting.cs b/LibShapes/Core/Paper/FrmPaperSetting.cs new file mode 100644 index 0000000..7c872fb --- /dev/null +++ b/LibShapes/Core/Paper/FrmPaperSetting.cs @@ -0,0 +1,381 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Printing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Paper +{ + + public partial class FrmPaperSetting : Form , IPaperSetting + { + + /// + /// 修改的是这个变量 + /// + private Paper paper = new Paper(); + + /// + /// 这个是要返回的 + /// + private Paper result; + + public FrmPaperSetting() + { + InitializeComponent(); + init_printer(); + } + + public FrmPaperSetting(Paper paper):this() + { + this.paper = paper; + isOnlyOne = true; + paper_to_ui(); + isOnlyOne = false; + } + + /// + /// 初始化打印机 + /// + private void init_printer() + { + foreach (var item in PrinterSettings.InstalledPrinters) + { + comboPrinters.Items.Add(item); + } + + } + + public Paper GetPaper() + { + return this.result; + //throw new NotImplementedException(); + } + + + private bool isOnlyOne; + + /// + /// 界面上数据发生改变 + /// + private void change() + { + // 有这个标志,表示当前只能有一个在修改。 + if (isOnlyOne) + { + return; + } + + isOnlyOne = true; + // 先更新数据 + if (ui_to_paper() && compute()) + { + paper_to_ui(); // 然后计算,最后更新到界面 + this.pictureBox1.Refresh(); + this.lblModelSize.Text = $"模板大小:{this.paper.ModelWidth} * {this.paper.ModelHeight}"; + this.lblPaperSize.Text = $"纸张大小:{this.paper.PaperWidth} * {this.paper.PaperHeight}"; + } + isOnlyOne = false; + } + + + + private bool compute() + { + // 我这里简化一下,自定义模板尺寸和自定义模板的间距,两个得有一个是可以手动设置,而另一个是自动的 + // 解方程 纸张的宽度 = 左边距 + 列数 * 模板的宽度 + (列数-1)*模板的间距 + 右边距 + if (!chkCustomModelSize.Checked) + { + // 这个模板间距是手动设置的,那么我就要计算的是模板的大小了 + this.paper.ModelWidth = (this.paper.PaperWidth - this.paper.Left - this.paper.Right - (this.paper.Cols - 1) * this.paper.HorizontalIntervalDistance) / this.paper.Cols; + this.paper.ModelHeight = (this.paper.PaperHeight - this.paper.Top - this.paper.Bottom - (this.paper.Rows - 1) * this.paper.VerticalIntervalDistance) / this.paper.Rows; + if (this.paper.ModelHeight < 0 || this.paper.ModelWidth < 0) + { + return false; + } + + } + // 这里暂时只支持是否手动更改模板的尺寸,不支持自动计算模板间距。 + + //else + //{ + // // 自定义了模板,要求的是模板的边距了 + // // 这里要判断是否是一行或者一列 + // if(this.paper.Cols == 1) + // { + // this.paper.HorizontalIntervalDistance = 0; + // } + // else + // { + // this.paper.HorizontalIntervalDistance = (this.paper.PaperWidth - this.paper.Left - this.paper.Right - this.paper.Cols * this.paper.ModelWidth) / (this.paper.Cols - 1); + // } + // if (this.paper.Rows == 1) + // { + // this.paper.VerticalIntervalDistance = 0; + // } + // else + // { + // this.paper.VerticalIntervalDistance = (this.paper.PaperHeight - this.paper.Top - this.paper.Bottom - this.paper.Rows * this.paper.ModelHeight) / (this.paper.Rows - 1); + // } + + // if (this.paper.HorizontalIntervalDistance < 0 || this.paper.VerticalIntervalDistance < 0) + // { + // return false; + // } + //} + + + return true; + } + + private bool ui_to_paper() + { + // 这里将ui中的信息全部转到paper中 + try + { + this.paper.PaperWidth = float.Parse(txt_paper_width.Text); + this.paper.PaperHeight = float.Parse(txt_paper_height.Text); + this.paper.Landscape = !radioButton1.Checked;// 纵向 + this.paper.Rows = (int)UpDownNumberOfLine.Value; + this.paper.Cols = (int)UpDownNumberOfColumn.Value; + this.paper.Top = float.Parse(txtMaginsTop.Text); + this.paper.Bottom = float.Parse(txtMaginsBottom.Text); + this.paper.Left = float.Parse(txtMaginsLeft.Text); + this.paper.Right = float.Parse(txtMaginsRight.Text); + // + this.paper.ModelWidth = float.Parse(txtModelWidth.Text); + this.paper.ModelHeight = float.Parse(txtModelHeight.Text); + // + this.paper.HorizontalIntervalDistance = float.Parse(txtHorizontalInterval.Text); + this.paper.VerticalIntervalDistance = float.Parse(txtVerticalInterval.Text); + if (radioButtonRect.Checked) + { + this.paper.ModelShape = new Shape.ShapeRectangle(); // 矩形 + + }else if (radioButtonRoundRect.Checked) + { + this.paper.ModelShape = new Shape.ShapeRoundedRectangle(); // 圆角矩形 + } + else + { + this.paper.ModelShape = new Shape.ShapeEllipse(); // 椭圆 + } + // 设置填充白色 + this.paper.ModelShape.IsFill = true; + this.paper.ModelShape.FillColor = Color.White; + // 设置这个纸张的宽和高 + this.paper.ModelShape.Height = this.paper.ModelHeight; + this.paper.ModelShape.Width = this.paper.ModelWidth; + + return true; + } + catch (Exception ex) + { + MessageBox.Show("转换失败:" + ex.Message); + return false; + //throw; + } + } + + private void paper_to_ui() + { + txt_paper_width.Text = this.paper.PaperWidth.ToString(); + txt_paper_height.Text = this.paper.PaperHeight.ToString(); + if (this.paper.Landscape) radioButton2.Checked = true; else radioButton1.Checked = true; + UpDownNumberOfLine.Value = this.paper.Rows; + UpDownNumberOfColumn.Value = this.paper.Cols; + txtMaginsTop.Text = this.paper.Top.ToString(); + txtMaginsBottom.Text = this.paper.Bottom.ToString(); + txtMaginsLeft.Text = this.paper.Left.ToString(); + txtMaginsRight.Text = this.paper.Right.ToString(); + txtModelWidth.Text = this.paper.ModelWidth.ToString(); + txtModelHeight.Text = this.paper.ModelHeight.ToString(); + txtHorizontalInterval.Text = this.paper.HorizontalIntervalDistance.ToString(); + txtVerticalInterval.Text = this.paper.VerticalIntervalDistance.ToString(); + + if (this.paper.ModelShape is Shape.ShapeRectangle) + { + radioButtonRect.Checked = true; + } + else if (this.paper.ModelShape is Shape.ShapeRoundedRectangle) + { + radioButtonRoundRect.Checked = true; + } + else + { + radioButtonEllipse.Checked = true; + } + + } + + Dictionary dict_paperSize = new Dictionary(); + + private void comboPrinters_SelectedIndexChanged(object sender, EventArgs e) + { + dict_paperSize.Clear(); + // 打印机更改后需要更改有多少的纸张。 + PrintDocument printDocument = new PrintDocument(); + printDocument.PrinterSettings.PrinterName = comboPrinters.Text;// 打印机的名称 + foreach (System.Drawing.Printing.PaperSize item in printDocument.PrinterSettings.PaperSizes) + { + dict_paperSize[item.ToString()] = item; + } + + // 加载到组合框 + string _old = comboPaperSizes.Text; + comboPaperSizes.Items.Clear(); + comboPaperSizes.Items.AddRange(dict_paperSize.Keys.ToArray()); + + // 我这里看看是否有这个纸张 + if (dict_paperSize.ContainsKey(_old)) + { + //comboPaperSizes.Text = _old; + } + else + { + // 这里有新的纸张 + comboPaperSizes.SelectedIndex = 0; + } + } + + + private void comboPaperSizes_SelectedValueChanged(object sender, EventArgs e) + { + if (dict_paperSize.ContainsKey(comboPaperSizes.Text)) + { + var _papersize = dict_paperSize[comboPaperSizes.Text]; + // 请注意,这里边的单位是以百分之一英寸为单位 + txt_paper_height.Text = (_papersize.Height*0.254).ToString(); + txt_paper_width.Text = (_papersize.Width*0.254).ToString(); + change(); + } + + } + + private void chkCustomInterval_CheckedChanged(object sender, EventArgs e) + { + txtHorizontalInterval.Enabled = chkCustomInterval.Checked; + txtVerticalInterval.Enabled = chkCustomInterval.Checked; + + if (chkCustomInterval.Checked) + { + chkCustomModelSize.Checked = false; + } + + } + + private void chkCustomModelSize_CheckedChanged(object sender, EventArgs e) + { + // 这里要变成灰色的 + txtModelHeight.Enabled = chkCustomModelSize.Checked; + txtModelWidth.Enabled = chkCustomModelSize.Checked; + + if (chkCustomModelSize.Checked) + { + chkCustomInterval.Checked = false; + } + + + } + + private void btn_paper_ok_Click(object sender, EventArgs e) + { + change(); + } + + private void UpDownNumberOfLine_ValueChanged(object sender, EventArgs e) + { + change(); + } + + private void txtMaginsTop_TextChanged(object sender, EventArgs e) + { + change(); + } + + private void txtModelWidth_TextChanged(object sender, EventArgs e) + { + // 要判断是否是手动 + if(chkCustomModelSize.Checked) change(); + } + + private void txtHorizontalInterval_TextChanged(object sender, EventArgs e) + { + // 要判断是否是手动 + if (chkCustomInterval.Checked) change(); + } + + private void btnOk_Click(object sender, EventArgs e) + { + // + this.DialogResult = DialogResult.OK; // 返回ok + this.Close(); // 关闭 + result = paper; // 设置这个要返回的。 + } + + private void radioButtonRect_CheckedChanged(object sender, EventArgs e) + { + change(); + } + + private void pictureBox1_Paint(object sender, PaintEventArgs e) + { + try + { + // 做一个图形 + Shapes shapes = new Shapes(); + // 做一张纸 + Shape.ShapeRectangle rect1 = new Shape.ShapeRectangle() + { + X = 0, + Y = 0, + Width = this.paper.PaperWidth, // todo 这里要注意横向 + Height = this.paper.PaperHeight, + PenColor = Color.Red, + PenWidth = 1, + IsFill = true, + FillColor = Color.White, + }; + shapes.lstShapes.Add(rect1); + ////如下是绘制模板。 + for (int i = 0; i < this.paper.Cols; i++) + { + for (int j = 0; j < this.paper.Rows; j++) + { + var tmp = this.paper.ModelShape.DeepClone(); + tmp.X = this.paper.Left + i * (this.paper.ModelWidth + this.paper.HorizontalIntervalDistance); + tmp.Y = this.paper.Top + j * (this.paper.ModelHeight + this.paper.VerticalIntervalDistance); + tmp.Width = this.paper.ModelWidth; + tmp.Height = this.paper.ModelHeight; + tmp.PenColor = Color.Black; + tmp.PenWidth = 1; + tmp.IsFill = true; + tmp.FillColor = Color.AliceBlue; + shapes.lstShapes.Add(tmp); + } + + } + // 这里做一个放大 + shapes.zoomTo(e.Graphics.DpiX, e.Graphics.DpiY, this.pictureBox1.Width, this.pictureBox1.Height, 5); + // 显示 + + shapes.Draw(e.Graphics, shapes.GetMatrix(), false); + } + catch (Exception) + { + + //throw; + } + + } + + private void btnCancel_Click(object sender, EventArgs e) + { + this.Close(); + } + } +} diff --git a/LibShapes/Core/Paper/FrmPaperSetting.resx b/LibShapes/Core/Paper/FrmPaperSetting.resx new file mode 100644 index 0000000..7080a7d --- /dev/null +++ b/LibShapes/Core/Paper/FrmPaperSetting.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/LibShapes/Core/Paper/IPaperSetting.cs b/LibShapes/Core/Paper/IPaperSetting.cs new file mode 100644 index 0000000..db34943 --- /dev/null +++ b/LibShapes/Core/Paper/IPaperSetting.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Paper +{ + /// + /// 取得纸张设置的接口 + /// + interface IPaperSetting + { + /// + /// 取得纸张的信息 + /// + /// + Paper GetPaper(); + } +} diff --git a/LibShapes/Core/Paper/Paper.cs b/LibShapes/Core/Paper/Paper.cs new file mode 100644 index 0000000..98f28f4 --- /dev/null +++ b/LibShapes/Core/Paper/Paper.cs @@ -0,0 +1,124 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Paper +{ + /// + /// 纸张尺寸的 + /// + public class Paper + { + /// + /// 纸张宽度 + /// + [DescriptionAttribute("纸张宽度"), DisplayName("纸张宽度"), CategoryAttribute("纸张")] + public float PaperWidth { get; set; } + + /// + /// 纸张高度 + /// + [DescriptionAttribute("纸张高度"), DisplayName("纸张高度"), CategoryAttribute("纸张")] + public float PaperHeight { get; set; } + /// + /// 上边距 + /// + [DescriptionAttribute("上边距"), DisplayName("上边距"), CategoryAttribute("边距")] + public float Top { get; set; } + /// + /// 左边距 + /// + [DescriptionAttribute("左边距"), DisplayName("左边距"), CategoryAttribute("边距")] + public float Left { get; set; } + + /// + /// 右边距 + /// + [DescriptionAttribute("右边距"), DisplayName("右边距"), CategoryAttribute("边距")] + public float Right { get; set; } + + /// + /// 下边距 + /// + [DescriptionAttribute("下边距"), DisplayName("下边距"), CategoryAttribute("边距")] + public float Bottom { get; set; } + + /// + /// 行数 + /// + [DescriptionAttribute("一张纸上的模板的行数"), DisplayName("行数"), CategoryAttribute("模板")] + public int Rows { get; set; } + + /// + /// 列数 + /// + [DescriptionAttribute("一张纸上的模板的列数"), DisplayName("列数"), CategoryAttribute("模板")] + public int Cols { get; set; } + + /// + /// 水平间隔 + /// + [DescriptionAttribute("模板之间的水平间隔"), DisplayName("水平间隔"), CategoryAttribute("模板")] + public float HorizontalIntervalDistance { get; set; } + + /// + /// 竖直间隔 + /// + [DescriptionAttribute("模板之间的竖直间隔"), DisplayName("竖直间隔"), CategoryAttribute("模板")] + public float VerticalIntervalDistance { get; set; } + + /// + /// 模板宽度 + /// + [DescriptionAttribute("模板之间的模板宽度"), DisplayName("模板宽度"), CategoryAttribute("模板")] + public float ModelWidth { get; set; } + + /// + /// 模板高度 + /// + [DescriptionAttribute("模板之间的模板高度"), DisplayName("模板高度"), CategoryAttribute("模板")] + public float ModelHeight { get; set; } + + /// + /// 横向打印 + /// + [DescriptionAttribute("如果页面应横向打印,则为 true;反之,则为 false。 默认值由打印机决定。"), DisplayName("横向打印"), CategoryAttribute("打印机")] + public bool Landscape { get; set; } + + /// + /// 横向方向的角度 + /// + [DescriptionAttribute("有效的旋转值为 90 度和 270 度。 如果不支持横向,则唯一有效的旋转值为 0 度"), DisplayName("横向方向的角度"), CategoryAttribute("打印机")] + public int LandscapeAngle { get; set; } + + /// + /// 模板的形状 + /// + [Browsable(false)]//不在PropertyGrid上显示 + public ShapeEle ModelShape; + + //public void createModelShape() + //{ + // // 这个是生成一个特殊的 + // ModelShape = new ShapeRectangle() + // { + // X = 0, + // Y = 0, + // Width = ModelWidth, + // Height = ModelHeight, + // IsFill = true, // 填充 + // FillColor = Color.White, // 填充白色。 + // }; + //} + + public Paper() + { + //createModelShape(); // 默认创建一个空白的。 + } + + } +} diff --git a/LibShapes/Core/PointTransform.cs b/LibShapes/Core/PointTransform.cs new file mode 100644 index 0000000..7f2ce23 --- /dev/null +++ b/LibShapes/Core/PointTransform.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core +{ + /// + /// 这个是虚拟坐标跟画布上的坐标转换的 + /// Offset 是偏移,而Zoom是放大倍数 + /// + public class PointTransform + { + public float OffsetX { get; set; } + + public float OffsetY { get; set; } + + private float _zoom=1; // 默认值1 + + public float Zoom + { + get { return _zoom; } + set { _zoom= value; if (value <= 0) _zoom = 1; } // 如果小于等于0,就用默认值1吧。 + } + + /// + /// 这个转成画布的坐标 + /// + /// + /// + public PointF CanvasToVirtualPoint(PointF pointF) + { + return new PointF() { + X = (pointF.X - OffsetX) / Zoom , // 这个是加偏移 + Y = (pointF.Y - OffsetY) / Zoom + }; + } + + /// + /// 这个转成虚拟的坐标 + /// + /// + /// + public PointF VirtualToCanvasPoint(PointF pointF) + { + return new PointF() + { + X = OffsetX + pointF.X * Zoom , + Y = OffsetY + pointF.Y * Zoom + }; + } + + + public Matrix GetMatrix() + { + Matrix matrix = new Matrix(); + matrix.Translate(OffsetX, OffsetY); + matrix.Scale(Zoom, Zoom); + return matrix; + } + + /// + /// 像素转成毫米 + /// + /// + /// + /// + public static PointF pixToMM(float dpiX, float dpiY, PointF pointF) + { + return new PointF(pointF.X/ dpiX * 25.4f,pointF.Y/ dpiY * 25.4f); + } + + } +} diff --git a/LibShapes/Core/Print/AbstractPrintItemFactory.cs b/LibShapes/Core/Print/AbstractPrintItemFactory.cs new file mode 100644 index 0000000..1dc484e --- /dev/null +++ b/LibShapes/Core/Print/AbstractPrintItemFactory.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Print +{ + public abstract class AbstractPrintItemFactory : IPrintItemFactory + { + /// + /// 用这个来保存PrintItem + /// + protected Dictionary dict_printItem = new Dictionary(); + + + public PrintItem GetPrintItem(string name) + { + if (dict_printItem.ContainsKey(name)) + { + return dict_printItem[name]; + } + return null; + //throw new NotImplementedException(); + } + + + /// + /// 删除,受到保护的,外部不能随便调用的。 + /// + /// + protected void deletePrintItem(string name) + { + dict_printItem.Remove(name); + //throw new NotImplementedException(); + } + + /// + /// 外部不能随便的增加 + /// + /// + /// + protected void registerPrintItem(string name, PrintItem printItem) + { + if (! dict_printItem.ContainsKey(name)) + { + // 没有才添加 + dict_printItem[name] = printItem; + } + //throw new NotImplementedException(); + } + + public string registerPrintItem(PrintItem printItem) + { + string id = getNoRepeatId(); // 先取得一个不重复的id + registerPrintItem(id, printItem); // 注册 + return id; // 返回这个id + } + + public abstract string getNoRepeatId(); + + } +} diff --git a/LibShapes/Core/Print/IPrintItemFactory.cs b/LibShapes/Core/Print/IPrintItemFactory.cs new file mode 100644 index 0000000..721268e --- /dev/null +++ b/LibShapes/Core/Print/IPrintItemFactory.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Print +{ + /// + /// 这个是取得PrintItem + /// + interface IPrintItemFactory + { + /// + /// 根据名字取得PrintItem + /// + /// + /// + PrintItem GetPrintItem(string name); + + } +} diff --git a/LibShapes/Core/Print/IPrintManager.cs b/LibShapes/Core/Print/IPrintManager.cs new file mode 100644 index 0000000..b3a28bb --- /dev/null +++ b/LibShapes/Core/Print/IPrintManager.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Print +{ + /// + /// 打印管理者 + /// + interface IPrintManager + { + /// + /// 添加一个新的打印 + /// + /// + void addPrintItem(PrintItem printItem); + } +} diff --git a/LibShapes/Core/Print/PrintItem.cs b/LibShapes/Core/Print/PrintItem.cs new file mode 100644 index 0000000..5e7b5db --- /dev/null +++ b/LibShapes/Core/Print/PrintItem.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +/** + * 外部往里边传入这个变量, + * 内部把这个拆分成一张纸,比如一张纸上有10个模板,那么就10个变量集合,不用打印数量,打印机了。 + * + * */ + +namespace Io.Github.Kerwinxu.LibShapes.Core.Print +{ + /// + /// 打印项目 + /// + public class PrintItem + { + /// + /// 打印机名称 + /// + public string PrinterName { get; set; } + + /// + /// 图形 + /// + public Shapes Shapes { get; set; } + + /// + /// 变量的集合 + /// + public List> Valss { get; set; } + + /// + /// 打印数量 + /// + public List PrintCounts { get; set; } + + /// + /// 是否充满打印, + /// + public bool isFullPrint { get; set; } + + /// + /// 构造函数 + /// + public PrintItem() + { + // 初始化变量 + Valss = new List>(); + PrintCounts = new List(); + } + + } +} diff --git a/LibShapes/Core/Print/PrintManagerImpl.cs b/LibShapes/Core/Print/PrintManagerImpl.cs new file mode 100644 index 0000000..10647d7 --- /dev/null +++ b/LibShapes/Core/Print/PrintManagerImpl.cs @@ -0,0 +1,239 @@ +using System; +using System.Collections.Generic; +using System.Drawing.Drawing2D; +using System.Drawing.Printing; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Print +{ + /// + /// 打印管理者的实现 + /// + public class PrintManagerImpl : AbstractPrintItemFactory, IPrintManager + { + /// + /// 打印的时候需要的id,区分不同的打印的。 + /// + private int _id = 0; + + public void addPrintItem(PrintItem printItem) + { + // 这里收到一个打印的部分,然后需要拆分, + // 思路是,首先区分是否充满,充满的话,就是按照整数去打印,而不充满的,是要填充的。 + if (printItem.Valss.Count != printItem.PrintCounts.Count) throw new SizeNotEqual(); + // 判断是否是充满打印,由具体的函数去负责处理。 + if (printItem.isFullPrint) + { + addPrintItemFullPrint(printItem); + } + else + { + addPrintItemNotFullPrint(printItem); + + } + + //throw new NotImplementedException(); + } + + /// + /// 不是充满的打印。 + /// + /// + protected void addPrintItemNotFullPrint(PrintItem printItem) + { + // 如下的提取出来是方便减少代码的。 + int rows = printItem.Shapes.Paper.Rows; + int cols = printItem.Shapes.Paper.Cols; + // 一个临时的打印变量。 + PrintItem printItem_tmp = new PrintItem(); + printItem_tmp.PrinterName = printItem.PrinterName; + printItem_tmp.Shapes = printItem.Shapes; + // 循环条件是还有要打印的。 + while (printItem.Valss.Count > 0) + { + // 判断前面的是否为空,为空表示下边的这个可以一次性打印几张。 + if (printItem_tmp.Valss.Count == 0) + { + // 判断是否判断是否大于一张 + if (printItem.PrintCounts.First() >= rows* cols) + { + + // 填充指定数量的变量 + for (int i = 0; i < rows*cols; i++) + { + printItem_tmp.Valss.Add(printItem.Valss.First()); + } + int num = printItem.PrintCounts.First() / (rows * cols);// 取整 + printItem.PrintCounts[0] -= num * rows * cols; // 减去指定的数量 + sendToPrinter(printItem_tmp, num); // 发送给打印机 + printItem_tmp = new PrintItem(); // 重新 + printItem_tmp.PrinterName = printItem.PrinterName; + printItem_tmp.Shapes = printItem.Shapes; + } + else + { + // 这里表示不够一页啊 + for (int i = 0; i < printItem.PrintCounts.First(); i++) + { + printItem_tmp.Valss.Add(printItem.Valss.First()); + } + // 添加上去 + printItem.PrintCounts[0] = 0; + + } + + } + else + { + // 添加指定的多个。这里表示这次打印的数量是1张。 + // 这里判断是否够一张 + if (printItem.PrintCounts.First() + printItem_tmp.Valss.Count >= rows * cols) + { + // 看看还却多少。 + int i_max = rows * cols - printItem_tmp.Valss.Count; + for (int i = 0; i < i_max; i++) + { + printItem.Valss.Add(printItem.Valss.First()); + } + // 减去指定的多少。 + printItem.PrintCounts[0] -= i_max; // 减去指定的数量 + sendToPrinter(printItem_tmp, 1); // 发送给打印机 + printItem_tmp = new PrintItem(); // 重新 + printItem_tmp.PrinterName = printItem.PrinterName; + printItem_tmp.Shapes = printItem.Shapes; + } + else + { + for (int i = 0; i < printItem.PrintCounts.First(); i++) + { + printItem_tmp.Valss.Add(printItem.Valss.First()); + } + printItem.PrintCounts[0] = 0;// 不够减,看看下一个把。 + } + + } + + // 这里删除空白的 + while (printItem.PrintCounts.Count > 0 && printItem.PrintCounts.First() == 0) + { + // 删除第一个。 + printItem.Valss.RemoveAt(0); + printItem.PrintCounts.RemoveAt(0); + } + + } + + // 如果还有数据,就打印吧 + if (printItem_tmp.Valss.Count != 0) + { + sendToPrinter(printItem_tmp, 1); // 发送给打印机 + } + + } + + + /// + /// 充满的打印。 + /// + /// + protected void addPrintItemFullPrint(PrintItem printItem) + { + // 如下的提取出来是方便减少代码的。 + int rows = printItem.Shapes.Paper.Rows; + int cols = printItem.Shapes.Paper.Cols; + // 每一个都是充满打印。 + for (int i = 0; i < printItem.Valss.Count; i++) + { + PrintItem printItem_tmp = new PrintItem(); // + printItem_tmp.PrinterName = printItem.PrinterName; // 打印机 + printItem_tmp.Shapes = printItem.Shapes; + for (int j = 0; j < rows * cols; j++) + { + printItem_tmp.Valss.Add(printItem.Valss[i]); // 添加多次就是啦。 + } + // 这里计算打印的数量 + int num = (int)((printItem.PrintCounts[i] + 0.5) / (rows + cols)); + // 发送给打印机 + sendToPrinter(printItem_tmp, num); + } + } + + + /// + /// 发送给打印机 + /// + /// + /// + protected void sendToPrinter(PrintItem printItem, int printnum) + { + // 这里真正的发给打印机 + PrintDocument printDocument = new PrintDocument(); + printDocument.PrinterSettings.PrinterName = printItem.PrinterName; // 设置打印机 + printDocument.PrinterSettings.Copies = (short)printnum; // 设置打印数量 + printDocument.PrintController = new StandardPrintController(); // + printDocument.OriginAtMargins = false; // 如果图形起始于页面边距,则为 true;如果图形原点位于该页可打印区域的左上角,则为 false。 默认值为 false。 + printDocument.DefaultPageSettings.PaperSize = new PaperSize( + "custom", + (int)(printItem.Shapes.Paper.PaperWidth / 10 / 2.54 * 100), + (int)(printItem.Shapes.Paper.PaperHeight / 10 / 2.54 * 100) + ); + //printDocument.DefaultPageSettings.Landscape = printItem.Shapes.Paper.Landscape; // 横向打印 + + // 然后设置打印的id + string id = registerPrintItem(printItem); + printDocument.DocumentName = id; // 这个id跟printItem是存在一一对应关系的 + printDocument.PrintPage += PrintDocument_PrintPage; // 打印事件处理 + printDocument.Print(); // 打印。 + printDocument.Dispose(); + + } + + private void PrintDocument_PrintPage(object sender, PrintPageEventArgs e) + { + // 这里真正的打印,首先取得打印的数据 + PrintDocument printDocument = sender as PrintDocument; + // 这里取得打印的数据了 + PrintItem printItem = GetPrintItem(printDocument.DocumentName); + // 先提取出数据 + int rows = printItem.Shapes.Paper.Rows; + int cols = printItem.Shapes.Paper.Cols; + float top = printItem.Shapes.Paper.Top; + float left = printItem.Shapes.Paper.Left; + float modelWidth = printItem.Shapes.Paper.ModelWidth; + float modelHeight = printItem.Shapes.Paper.ModelHeight; + float hor = printItem.Shapes.Paper.HorizontalIntervalDistance;// 模板的水平间隔 + float ver = printItem.Shapes.Paper.VerticalIntervalDistance; // 模板的垂直间隔 + var valsss = printItem.Valss; // 变量集合。 + var shapes = printItem.Shapes; // 形状 + // 循环打印 + for (int i = 0; i < rows; i++) + { + for (int j = 0; j < cols; j++) + { + // 更改变量 + // 这里要判断一下是否超过索引 + if (i * rows + j >= printItem.Valss.Count) break; + shapes.Vars = valsss[i * rows + j]; + // 然后计算偏移 + Matrix matrix = new Matrix(); + matrix.Translate( + left + j * (modelWidth + hor), + top + i * (modelHeight + ver) + ); + // 绘图 + shapes.Draw(e.Graphics, matrix, false); + + } + } + + //throw new NotImplementedException(); + } + + public override string getNoRepeatId() + { + return (++_id).ToString();// 假设打印的部分很小,足够了把。 + //throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/Print/SizeNotEqual.cs b/LibShapes/Core/Print/SizeNotEqual.cs new file mode 100644 index 0000000..abe71d7 --- /dev/null +++ b/LibShapes/Core/Print/SizeNotEqual.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Print +{ + /// + /// 尺寸不相等的异常 + /// + public class SizeNotEqual :Exception + { + } +} diff --git a/LibShapes/Core/SelectStrategy.cs b/LibShapes/Core/SelectStrategy.cs new file mode 100644 index 0000000..742cede --- /dev/null +++ b/LibShapes/Core/SelectStrategy.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core +{ + /// + /// 选择策略,主要是两种, + /// + public class SelectStrategy + { + /// + /// 靠近在这个范围内就算选择了。 + /// + private static float tolerance = 0.5f; + + /// + /// 两个点是否距离足够近 + /// + /// + /// + /// + public static bool isNear(PointF p1, PointF p2) + { + return Utils.DistanceCalculation.distance(p1, p2) <= tolerance; + } + + /// + /// 一个点跟一个线段是否靠的非常近。 + /// + /// + /// + /// + /// + public static bool isNear(PointF p0, PointF p1, PointF p2) + { + return Utils.DistanceCalculation.pointToLine(p0, p1, p2) <= tolerance; + } + } +} diff --git a/LibShapes/Core/Serialize/AbstractSerialize.cs b/LibShapes/Core/Serialize/AbstractSerialize.cs new file mode 100644 index 0000000..2fcba7a --- /dev/null +++ b/LibShapes/Core/Serialize/AbstractSerialize.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Serialize +{ + public abstract class AbstractSerialize : ISerialize + { + // 实现了如下的两个方法。 + + public void SerializeObjectToFile(object obj, string file_path) + { + System.IO.File.WriteAllText(file_path, SerializeObject(obj)); + } + + public T DeserializeObjectFromFile(string file_path) + { + return DeserializeObject(System.IO.File.ReadAllText(file_path)); + } + + + // 如下的等待具体的类去实现。 + + public abstract T DeserializeObject(string value); + + public abstract string SerializeObject(object obj); + + } +} diff --git a/LibShapes/Core/Serialize/ISerialize.cs b/LibShapes/Core/Serialize/ISerialize.cs new file mode 100644 index 0000000..1b81202 --- /dev/null +++ b/LibShapes/Core/Serialize/ISerialize.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Serialize +{ + /// + /// 序列化接口 + /// + public interface ISerialize + { + /// + /// 序列化 + /// + /// + /// + string SerializeObject(Object obj); + + /// + /// 反序列化 + /// + /// + /// + /// + T DeserializeObject(string value); + + // 这里表示从文件中序列化和反序列化 + + /// + /// 序列化到文件 + /// + /// + /// + void SerializeObjectToFile(Object obj, string file_path); + + + T DeserializeObjectFromFile(string file_path); + } +} diff --git a/LibShapes/Core/Serialize/JsonSerialize.cs b/LibShapes/Core/Serialize/JsonSerialize.cs new file mode 100644 index 0000000..40287ab --- /dev/null +++ b/LibShapes/Core/Serialize/JsonSerialize.cs @@ -0,0 +1,41 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Serialize +{ + /// + /// json的序列化 + /// + public class JsonSerialize : AbstractSerialize + { + public override T DeserializeObject(string value) + { + return JsonConvert.DeserializeObject(value,jsonSerializerSettings); + //throw new NotImplementedException(); + } + + public override string SerializeObject(object obj) + { + + return JsonConvert.SerializeObject(obj, Formatting.Indented, jsonSerializerSettings); + //throw new NotImplementedException(); + } + + /// + /// 有这个是确保反序列化到正确的类型。 + /// + private JsonSerializerSettings jsonSerializerSettings = new JsonSerializerSettings() + { + TypeNameHandling = TypeNameHandling.Auto, // 自动的,All的话会有问题。 + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.MicrosoftDateFormat, + DateFormatString = "yyyy-MM-dd HH:mm:ss", //空值处理 + //NullValueHandling = NullValueHandling.Ignore, //高级用法九中的`Bool`类型转换设置 + ReferenceLoopHandling = ReferenceLoopHandling.Serialize, // 循环引用的的解决方式,如下如下两种设置。 + PreserveReferencesHandling = PreserveReferencesHandling.Objects, // + Formatting = Formatting.Indented, // 缩进的 + }; + } +} diff --git a/LibShapes/Core/Shape/EnumConverter.cs b/LibShapes/Core/Shape/EnumConverter.cs new file mode 100644 index 0000000..44e1af7 --- /dev/null +++ b/LibShapes/Core/Shape/EnumConverter.cs @@ -0,0 +1,207 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 枚举转换器 + /// 用此类之前,必须保证在枚举项中定义了Description + /// + public class EnumConverter : ExpandableObjectConverter + { + /// + /// 枚举项集合 + /// + Dictionary dic; + + /// + /// 构造函数 + /// + public EnumConverter() + { + dic = new Dictionary(); + } + /// + /// 加载枚举项集合 + /// + /// + private void LoadDic(ITypeDescriptorContext context) + { + dic = GetEnumValueDesDic(context.PropertyDescriptor.PropertyType); + } + + /// + /// 是否可从来源转换 + /// + /// + /// + /// + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (sourceType == typeof(string)) + return true; + + return base.CanConvertFrom(context, sourceType); + } + /// + /// 从来源转换 + /// + /// + /// + /// + /// + public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) + { + if (value is string) + { + //如果是枚举 + if (context.PropertyDescriptor.PropertyType.IsEnum) + { + if (dic.Count <= 0) + LoadDic(context); + if (dic.Values.Contains(value.ToString())) + { + foreach (object obj in dic.Keys) + { + if (dic[obj] == value.ToString()) + { + return obj; + } + } + } + } + } + + return base.ConvertFrom(context, culture, value); + } + /// + /// 是否可转换 + /// + /// + /// + /// + public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + { + return true; + } + /// + /// + /// + /// + /// + public override bool GetStandardValuesSupported(ITypeDescriptorContext context) + { + return true; + } + + /// + /// + /// + /// + /// + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) + { + return true; + } + /// + /// + /// + /// + /// + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) + { + //ListAttribute listAttribute = (ListAttribute)context.PropertyDescriptor.Attributes[typeof(ListAttribute)]; + //StandardValuesCollection vals = new TypeConverter.StandardValuesCollection(listAttribute._lst); + + //Dictionary dic = GetEnumValueDesDic(typeof(PKGenerator)); + + //StandardValuesCollection vals = new TypeConverter.StandardValuesCollection(dic.Keys); + + if (dic == null || dic.Count <= 0) + LoadDic(context); + + StandardValuesCollection vals = new TypeConverter.StandardValuesCollection(dic.Keys); + + return vals; + } + + /// + /// + /// + /// + /// + /// + /// + /// + public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) + { + //DescriptionAttribute.GetCustomAttribute( + //EnumDescription + //List> mList = UserCombox.ToListForBind(value.GetType()); + //foreach (KeyValuePair mItem in mList) + //{ + // if (mItem.Key.Equals(value)) + // { + // return mItem.Value; + // } + //} + //return "Error!"; + + //绑定控件 + // FieldInfo fieldinfo = value.GetType().GetField(value.ToString()); + //Object[] objs = fieldinfo.GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), false); + //if (objs == null || objs.Length == 0) + //{ + // return value.ToString(); + //} + //else + //{ + // System.ComponentModel.DescriptionAttribute da = (System.ComponentModel.DescriptionAttribute)objs[0]; + // return da.Description; + //} + + if (dic.Count <= 0) + LoadDic(context); + + foreach (object key in dic.Keys) + { + if (key.ToString() == value.ToString() || dic[key] == value.ToString()) + { + return dic[key].ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + + /// + /// 记载枚举的值+描述 + /// + /// + /// + public Dictionary GetEnumValueDesDic(Type enumType) + { + Dictionary dic = new Dictionary(); + FieldInfo[] fieldinfos = enumType.GetFields(); + foreach (FieldInfo field in fieldinfos) + { + if (field.FieldType.IsEnum) + { + Object[] objs = field.GetCustomAttributes(typeof(DescriptionAttribute), false); + if (objs.Length > 0) + { + dic.Add(Enum.Parse(enumType, field.Name), ((DescriptionAttribute)objs[0]).Description); + } + } + + } + + return dic; + } + + } +} diff --git a/LibShapes/Core/Shape/ShapeArc.cs b/LibShapes/Core/Shape/ShapeArc.cs new file mode 100644 index 0000000..b65e2cc --- /dev/null +++ b/LibShapes/Core/Shape/ShapeArc.cs @@ -0,0 +1,78 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 椭圆弧 + /// + public class ShapeArc : ShapeRectangle + { + public ShapeArc() + { + // 设置默认的角度 + StartAngle = 0; + SweepAngle = 90; + } + + [DescriptionAttribute("弧线的起始角度"), DisplayName("弧线的起始角度"), CategoryAttribute("外观")] + public float StartAngle { get; set; } + + + [DescriptionAttribute("startAngle 和弧线末尾之间的角度"), DisplayName("夹角"), CategoryAttribute("外观")] + public float SweepAngle { get; set; } + + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + //throw new NotImplementedException(); + } + + public override System.Drawing.RectangleF GetBounds(Matrix matrix) + { + // 这个实际上是矩形的 + GraphicsPath path = base.GetGraphicsPathWithAngle(); + // 这里加上旋转 + Matrix matrix1 = new Matrix(); + // 这里按照中心点旋转, + var rect = path.GetBounds(); + var centerPoint = new PointF() { X = rect.X + rect.Width / 2, Y = rect.Y + rect.Height / 2 }; + matrix1.RotateAt(Angle, centerPoint); + Matrix matrix2 = matrix.Clone(); + matrix2.Multiply(matrix1); + // 应用这个转换 + path.Transform(matrix2); + return path.GetBounds(); + //return base.GetBounds(matrix); + } + + public override GraphicsPath GetGraphicsPathWithAngle() + { + GraphicsPath path = new GraphicsPath(); + var rect = new System.Drawing.RectangleF() + { + X = getX(), + Y = getY(), + Width = getWidth(), + Height = getHeight(), + }; + + var rect2 = correctRectangle(rect); + path.AddArc( + rect2, + StartAngle, + SweepAngle); + + return path; + //return base.GetGraphicsPathWithAngle(); + } + } +} diff --git a/LibShapes/Core/Shape/ShapeBarcode.cs b/LibShapes/Core/Shape/ShapeBarcode.cs new file mode 100644 index 0000000..8297e22 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeBarcode.cs @@ -0,0 +1,162 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Converter; +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using ZXing; +using ZXing.Common; +using ZXing.QrCode; +using ZXing.QrCode.Internal; +using ZXing.Rendering; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + + public class ShapeBarcode : ShapeVar + { + /// + /// 构造函数 + /// + public ShapeBarcode() + { + QrCodeErrorLevel = "容错7%"; // 默认这个 + Encoding = "CODE_39"; // 默认编码 + StaticText = "690123456789"; // 默认数字 + isIncludeLabel = true; // 默认包含标签。 + IsFill = true; + Font = new Font("Arial", 8); // 默认的字体 + } + + #region 一堆属性 + + /// + /// qr二维码的容错率 + /// + [TypeConverter(typeof(QrCodeErrorCorrectionLevelConverter)), DescriptionAttribute("QR Code编码的容错率"), DisplayName("QR Code容错率"), CategoryAttribute("条形码设置")] + public string QrCodeErrorLevel { get; set; } + + /// + /// 编码类型 + /// + [TypeConverter(typeof(BarcodeEncodingConverter)), DescriptionAttribute("编码"), DisplayName("编码"), CategoryAttribute("条形码设置")] + public string Encoding { get; set; } + + /// + /// 字体 + /// + [DescriptionAttribute("请注意,这个字体是打印机上实际的字体,在界面上不会放大缩小。"), DisplayName("字体"), CategoryAttribute("字体")] + public Font Font { get; set; } + + [DescriptionAttribute("是否包含标签"), DisplayName("包含标签"), CategoryAttribute("条形码设置")] + public bool isIncludeLabel { get; set; } + + #endregion + + + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + //throw new NotImplementedException(); + } + + public override void Draw(Graphics g, Matrix matrix) + { + // 请注意,我这个算法是有瑕疵的, + // 这个角度实际上应该是最小内接矩形的角度, + // 这个是个小项目,应用场景是简单的图形操作, + // 如果群组里套图形加上群组有角度,会产生偏差。 + // 1.0首先取得没有变换前的坐标 + var path = GetGraphicsPath(matrix); + var rect = path.GetBounds(); // 外接矩形,如果是内接矩形是最准的。 + // 这里需要将尺寸单位更改一下,我的画布是mm,而这个zxing估计是像素吧 + var rect2 = new Rectangle() + { + //X = (int)(rect.X / 25.4 * g.DpiX), + //Y = (int)(rect.Y / 25.4 * g.DpiY), + Width = (int)(rect.Width / 25.4 * g.DpiX), + Height = (int)(rect.Height / 25.4 * g.DpiX), + }; + // 我这里改成,一开始就是1比1 + + // 中心点的坐标 + var centerPoint = new PointF() + { + X = rect.X + rect.Width / 2, + Y = rect.Y + rect.Height / 2 + }; + // 2. 取得条形码图像 + BarcodeWriter writer = new BarcodeWriter() { + Renderer = new BitmapRenderer() { + DpiX = g.DpiX, + DpiY = g.DpiY, + TextFont = this.Font, + } + }; + + writer.Format = BarcodeEncodingConverter.dictBarcode[Encoding]; // 编码 + EncodingOptions options = new EncodingOptions() + { + Width = rect2.Width, // 图像的宽和高 + Height = rect2.Height, + PureBarcode = !isIncludeLabel, // 是否包括标签。 + Margin = 2, + }; + if (Encoding == "QR_CODE") + { + options = new QrCodeEncodingOptions() { + Width = (int)rect2.Width, // 图像的宽和高 + Height = (int)rect2.Height, + PureBarcode = !isIncludeLabel, // 是否包括标签。 + Margin = 2, + ErrorCorrection=QrCodeErrorCorrectionLevelConverter.level[QrCodeErrorLevel], + }; + + } + writer.Options = options; + var text = getText(); + if (string.IsNullOrEmpty(text)) + { + // 如果没有,就话一个矩形吧。就什么都不做。 + + + } + else + { + var bitmap = writer.Write(text); // 生成条形码图像。 + if (bitmap != null) + { + // 3. 转换。 + Matrix matrix1 = new Matrix(); + matrix1.RotateAt(this.Angle, centerPoint); + g.Transform = matrix1; // 应用这个变换。 + // 4. + g.DrawImage(bitmap, rect.X, rect.Y, rect.Width, rect.Height); + + //5. + g.ResetTransform(); // 取消这个变换 + } + } + + //base.Draw(g, matrix); + } + + + + public override GraphicsPath GetGraphicsPathWithAngle() + { + // 这个直接是返回父类的, + return base.GetGraphicsPathWithAngle(); + } + + + + } +} diff --git a/LibShapes/Core/Shape/ShapeEle.cs b/LibShapes/Core/Shape/ShapeEle.cs new file mode 100644 index 0000000..8159253 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeEle.cs @@ -0,0 +1,357 @@ +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 形状的基类 + /// + public abstract class ShapeEle + { + + /// + /// 构造函数 + /// + public ShapeEle() + { + // 提供一些默认的参数 + PenWidth = 1; + PenColor = Color.Black; + + } + + + #region 一堆属性 + #region 设计 + /// + /// 唯一的标识符 + /// + [CategoryAttribute("设计")] + public int ID { get; set; } + + #endregion + + #region 布局 + + [CategoryAttribute("布局")] + public float X { get; set; } + + [CategoryAttribute("布局")] + public float Y { get; set; } + + [DescriptionAttribute("宽度"), DisplayName("宽度"), CategoryAttribute("布局")] + public float Width { get; set; } + + [DescriptionAttribute("高度"), DisplayName("高度"), CategoryAttribute("布局")] + public float Height { get; set; } + + [DescriptionAttribute("角度"), DisplayName("角度"), CategoryAttribute("外观")] + public float Angle { get; set; } + + + #endregion + + #region 外观 + + [DescriptionAttribute("边框颜色"), DisplayName("边框颜色"), CategoryAttribute("外观")] + public Color PenColor { get; set; } + + [DescriptionAttribute("边框粗细"), DisplayName("边框粗细"), CategoryAttribute("外观")] + public float PenWidth { get; set; } + + [DescriptionAttribute("虚线的样式"), DisplayName("虚线的样式"), CategoryAttribute("外观")] + public DashStyle PenDashStyle { get; set; } + + [DescriptionAttribute("是否填充"), DisplayName("是否填充"), CategoryAttribute("外观")] + public bool IsFill { get; set; } + + [DescriptionAttribute("填充颜色"), DisplayName("填充颜色"), CategoryAttribute("外观")] + public Color FillColor { get; set; } + + + #region 如下的几个是为了更改大小或者移动的时候用的 + float x_add, y_add, width_add, height_add; + #endregion + + #endregion + + #endregion + + #region 操作 + + public virtual void Draw(Graphics g, Matrix matrix) { + // 首先取得绘图路径 + try + { + var path = GetGraphicsPath(matrix); + // 定义画笔 + Pen pen = new Pen(PenColor); + pen.Width = PenWidth; // 画笔的粗细 + pen.DashStyle = PenDashStyle; // 虚线的样式 + g.DrawPath(pen, path); // 画边框 + if (IsFill) // 如果填充 + { + Brush brush = new SolidBrush(FillColor); + g.FillPath(brush, path); + } + path.Dispose(); + } + catch (Exception ex) + { + + //throw; + } + + } + + + /// + /// 这个返回的是屏幕画布上的真实的坐标体系 + /// + /// + /// + public virtual GraphicsPath GetGraphicsPath(Matrix matrix) + { + GraphicsPath path = null; + if (getWidth() == 0 || getHeight() == 0) + { + // 这里表示只是一条线段或者一个点了 + path = new GraphicsPath(); + path.AddLine(new PointF(getX(), getY()), new PointF(getX() + getWidth(), getY() + getHeight())); + } + else + { + path = GetGraphicsPathWithAngle(); + } + + // 这里加上旋转 + Matrix matrix1 = new Matrix(); + // 这里按照中心点旋转, + var rect = path.GetBounds(); + var centerPoint = new PointF() { X = rect.X + rect.Width / 2, Y = rect.Y + rect.Height / 2 }; + matrix1.RotateAt(Angle, centerPoint); + Matrix matrix2 = matrix.Clone(); + matrix2.Multiply(matrix1); + // 应用这个转换 + path.Transform(matrix2); + // 返回这个路径 + return path; + + } + + /// + /// 矫正矩形,宽和高都不能是复数 + /// + /// + /// + protected RectangleF correctRectangle(RectangleF rect) + { + RectangleF rect2 = new RectangleF() { + X = rect.X, + Y = rect.Y, + Width = rect.Width, + Height = rect.Height, + }; + if (rect2.Width < 0) + { + rect2.X += rect2.Width; + rect2.Width = -rect2.Width; + } + if (rect2.Height < 0) + { + rect2.Y += rect2.Height; + rect2.Height = -rect2.Height; + } + + return rect2; + } + + /// + /// 返回不包括旋转的路径,且这个是虚拟世界的坐标,不用考虑画布中实际的坐标。 + /// + /// + public virtual GraphicsPath GetGraphicsPathWithAngle() + { + GraphicsPath path = new GraphicsPath(); + + var rect = new System.Drawing.RectangleF() + { + X = getX(), + Y = getY(), + Width = getWidth(), + Height = getHeight() + }; + var rect2 = correctRectangle(rect); + + path.AddRectangle(rect2); + return path; + } + + /// + /// 返回外接矩形 + /// + /// + public virtual RectangleF GetBounds(Matrix matrix) + { + // 请注意,这里是以旋转后的。 + return GetGraphicsPath(matrix).GetBounds(); + } + + /// + /// 选择的容忍度 + /// + private Pen pen_select_tolerance = new Pen(Color.White) { + Width = DistanceCalculation.select_tolerance + }; + + /// + /// 这个点是否在这个图形的轮廓上 + /// + /// + /// + public virtual bool isOutlineVisible(Matrix matrix, PointF mousePointF) + { + + var pen = new Pen(new SolidBrush(this.PenColor), this.PenWidth); + return GetGraphicsPath(matrix).IsOutlineVisible(mousePointF, pen); + + //return GetGraphicsPath(matrix).IsVisible(mousePointF); + } + + /// + /// 这个点是否在这个图形的的内部 + /// + /// + /// + public virtual bool isVisible(Matrix matrix, PointF mousePointF) + { + return GetGraphicsPath(matrix).IsVisible(mousePointF); + + //return GetGraphicsPath(matrix).IsVisible(mousePointF); + } + + + /// + /// 这个表示是否被包含在这个矩形内 + /// + /// + /// + public virtual bool isBeContains(Matrix matrix, RectangleF rect) + { + var rect2 = GetBounds(matrix); + return rect.Contains(rect2); + } + + + + public virtual void setVals(Dictionary vars) + { + // 什么都不做,子类如果需要,就自己实现。 + } + + /// + /// 根据这个矩形更改 + /// + /// + public void Change(RectangleF rect) + { + x_add = rect.X; + y_add = rect.Y; + width_add = rect.Width; + height_add = rect.Height; + } + + + public virtual void ChangeComplated() + { + // 将更改固定下来 + X += x_add; + Y += y_add; + Width += width_add; + Height += height_add; + // 清零 + x_add = 0; + y_add = 0; + width_add = 0; + height_add = 0; + + // 这里要注意矫正 todo + if (Width < 0) + { + X += Width; + Width = -Width; + } + if (Height < 0) + { + Y += Height; + Height = -Height; + } + + } + + /// + /// 深度拷贝 + /// + /// + /// + public abstract ShapeEle DeepClone(); + + public override bool Equals(object obj) + { + // 首先判断是否是 + + var shape = obj as ShapeEle; + if (shape == null) return false; // 转换失败就是不同啦 + + return this.X == shape.X && + this.Y == shape.Y && + this.Width == shape.Width && + this.Height == shape.Height && + this.Angle == shape.Angle && + this.ID == shape.ID && + this.PenColor == shape.PenColor && + this.PenWidth == shape.PenWidth && + this.PenDashStyle == shape.PenDashStyle && + this.IsFill == shape.IsFill && + this.FillColor == shape.FillColor; + + //return base.Equals(obj); + } + + + #region 如下的几个是添加add后的参数 + protected float getX() + { + return X + x_add; + } + protected float getY() + { + return Y + y_add; + } + protected float getWidth() + { + return Width + width_add; + } + protected float getHeight() + { + return Height + height_add; + } + + + #endregion + + #endregion + + public override int GetHashCode() + { + return ID * base.GetHashCode(); + //return base.GetHashCode(); + } + } +} diff --git a/LibShapes/Core/Shape/ShapeEllipse.cs b/LibShapes/Core/Shape/ShapeEllipse.cs new file mode 100644 index 0000000..105f8b6 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeEllipse.cs @@ -0,0 +1,41 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 椭圆 + /// + public class ShapeEllipse : ShapeEle + { + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + } + + public override GraphicsPath GetGraphicsPathWithAngle() + { + GraphicsPath path = new GraphicsPath(); + + var rect = new System.Drawing.RectangleF() + { + X = getX(), + Y = getY(), + Width = getWidth(), + Height = getHeight() + }; + var rect2 = correctRectangle(rect); + + path.AddEllipse(rect2); // 跟矩形不同的是这里的是AddEllipse + return path; + + //return base.GetGraphicsPathWithAngle(); + } + } +} diff --git a/LibShapes/Core/Shape/ShapeGroup.cs b/LibShapes/Core/Shape/ShapeGroup.cs new file mode 100644 index 0000000..6490df0 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeGroup.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + public class ShapeGroup : ShapeMulti + { + /// + /// 这个重新是因为这个要真正的绘制,而ShapeMultiSelect不需要,ShapeMultiSelect里保存的只是多个形状的引用。 + /// + /// + /// + public override void Draw(Graphics g, Matrix matrix) + { + // 这里首先要注意的是这个可以旋转的 + Matrix matrix1 = matrix.Clone(); + var rect = GetGraphicsPathWithAngle().GetBounds(); + var centerPoint = new PointF() { + X = rect.X + rect.Width / 2, + Y = rect.Y + rect.Height / 2 + }; + matrix1.RotateAt(Angle, centerPoint); + + foreach (var item in shapes) + { + item.Draw(g, matrix1); + } + } + + + + /// + /// 这个其实是取得了含有角度的。 + /// + /// + public override GraphicsPath GetGraphicsPathWithAngle() + { + // 这个不需要返回什么。 + return null; + + } + + public override ShapeEle DeepClone() + { + // 首先组建一个新的 + ShapeGroup group = new ShapeGroup(); + if (shapes != null) + { + foreach (var item in shapes) + { + group.shapes.Add(item.DeepClone()); + } + } + + + return group; + //throw new NotImplementedException(); + } + + public override bool Equals(object obj) + { + var shape = obj as ShapeGroup; + if (shape == null) return false; // 转换失败就是不同啦 + // 群组,需要判断每一个是否相同。 + if (shapes.Count != shape.shapes.Count) return false; + for (int i = 0; i < shapes.Count; i++) + { + if (shapes[i] != shape.shapes[i]) + { + return false; + } + } + return true; + //return base.Equals(obj); + } + + public override int GetHashCode() + { + return this.ID; + return base.GetHashCode(); + } + } +} diff --git a/LibShapes/Core/Shape/ShapeImage.cs b/LibShapes/Core/Shape/ShapeImage.cs new file mode 100644 index 0000000..57a2440 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeImage.cs @@ -0,0 +1,155 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.IO; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + + + /// + /// 图片 + /// + public class ShapeImage : ShapeVar + { + + public ShapeImage() + { + IsFill = true; // 这样可以方便的选择。 + } + + // 这个不用ShapeVar中的StaticText,是因为我不想显示,并且也不用GetText,是因为这个默认情况下,变量意味着路径,而Img意味着静态的图片。 + [Browsable(false)]//不在PropertyGrid上显示 + public string Img { get; set; } + + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + } + + public override void Draw(Graphics g, Matrix matrix) + { + // 请注意,我这个算法是有瑕疵的, + // 这个角度实际上应该是最小内接矩形的角度, + // 这个是个小项目,应用场景是简单的图形操作, + // 如果群组里套图形加上群组有角度,会产生偏差。 + // 1.0首先取得没有变换前的坐标 + var path = GetGraphicsPath(matrix); + var rect = path.GetBounds(); // 外接矩形,如果是内接矩形是最准的。 + var centerPoint = new PointF() // 中心点的坐标 + { + X = rect.X + rect.Width/2, + Y= rect.Y + rect.Height/2 + }; + // 2. 取得图片对象 + var bitmap = getImg(); + if (bitmap != null) + { + // 3. 转换。 + Matrix matrix1 = new Matrix(); + matrix1.RotateAt(this.Angle, centerPoint); + g.Transform = matrix1; // 应用这个变换。 + // 4. + // todo 以后添加上拉伸的判断。 + g.DrawImage(bitmap, rect.X, rect.Y, rect.Width, rect.Height); + + //5. + g.ResetTransform(); // 取消这个变换 + } + + //base.Draw(g, matrix); + } + + + + private Bitmap getImg() + { + try + { + if (string.IsNullOrEmpty(this.VarName)) + { + return Base64StringToImage(this.Img); + } + else + { + // 这里表示是有路径 + if (File.Exists(this.VarValue)) + { + // 如果路径存在 + return (Bitmap)Image.FromFile(this.VarValue); + } + return null; + } + } + catch (Exception) + { + + //throw; + } + + return null; + } + + public override GraphicsPath GetGraphicsPathWithAngle() + { + return base.GetGraphicsPathWithAngle(); + } + + #region 文本和图像的转换 + public static string ImgToBase64String(Bitmap bmp) + { + try + { + //如下是为了预防GDI一般性错误而深度复制 + Bitmap bmp2 = new Bitmap(bmp); + + MemoryStream ms = new MemoryStream(); + bmp2.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); + byte[] arr = new byte[ms.Length]; + ms.Position = 0; + ms.Read(arr, 0, (int)ms.Length); + ms.Close(); + String strbaser64 = Convert.ToBase64String(arr); + + bmp2.Dispose(); + + return strbaser64; + + } + catch (Exception ex) + { + return ""; + } + } + + //base64编码的文本 转为图片 + public static Bitmap Base64StringToImage(string strbaser64) + { + try + { + + byte[] arr = Convert.FromBase64String(strbaser64); + MemoryStream ms = new MemoryStream(arr); + Bitmap bmp = new Bitmap(ms); + ms.Close(); + + return bmp; + } + catch (Exception ex) + { + return new Bitmap(10, 10); + } + } + + + + #endregion + } +} diff --git a/LibShapes/Core/Shape/ShapeLine.cs b/LibShapes/Core/Shape/ShapeLine.cs new file mode 100644 index 0000000..ed8dacc --- /dev/null +++ b/LibShapes/Core/Shape/ShapeLine.cs @@ -0,0 +1,50 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 线段 + /// + public class ShapeLine : ShapeEle + { + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + //throw new NotImplementedException(); + } + + public override GraphicsPath GetGraphicsPathWithAngle() + { + GraphicsPath path = new GraphicsPath(); + path.AddLine(getX(), getY(), getX()+getWidth(), getY()+getHeight()); + return path; + + //throw new NotImplementedException(); + } + + ///// + ///// 是否取得线段的。 + ///// + ///// + ///// + ///// + //public override bool isContains(Matrix matrix, PointF mousePointF) + //{ + // // 这里用点到线段的距离来判断的, + // var path = GetGraphicsPath(matrix);// 取得路径 + // var points = path.PathPoints; // 取得路径上的点 + // bool b = SelectStrategy.isNear(mousePointF, points[0], points[1]); + // return b; + // //return base.isContains(matrix, mousePointF); + + //} + } +} diff --git a/LibShapes/Core/Shape/ShapeMulti.cs b/LibShapes/Core/Shape/ShapeMulti.cs new file mode 100644 index 0000000..38fd776 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeMulti.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 多个形状的集合 + /// + public class ShapeMulti:ShapeEle + { + public List shapes = new List(); + + public override ShapeEle DeepClone() + { + // 首先组建一个新的 + ShapeMulti group = new ShapeMulti(); + if (shapes != null) + { + foreach (var item in shapes) + { + group.shapes.Add(item.DeepClone()); + } + } + return group; + //throw new NotImplementedException(); + } + + /// + /// 取得 + /// + /// + /// + public override GraphicsPath GetGraphicsPath(Matrix matrix) + { + // 这里要先算子形状的所有的路径 + GraphicsPath path = new GraphicsPath(); + foreach (var item in shapes) + { + path.AddPath(item.GetGraphicsPath(matrix), false); + } + // 然后对这个进行旋转 + var rect = path.GetBounds(); + var centerPoints = new PointF() + { + X = rect.X + rect.Width / 2, + Y = rect.Y + rect.Height / 2 + }; + Matrix matrix1 = new Matrix(); + matrix1.RotateAt(Angle, centerPoints); + path.Transform(matrix1); + return path; + + } + + public override bool Equals(object obj) + { + var shape = obj as ShapeMulti; + if (shape == null) return false; // 转换失败就是不同啦 + // 群组,需要判断每一个是否相同。 + if (shapes.Count != shape.shapes.Count) return false; + for (int i = 0; i < shapes.Count; i++) + { + if (shapes[i] != shape.shapes[i]) + { + return false; + } + } + return true; + //return base.Equals(obj); + } + + public override int GetHashCode() + { + return this.ID; + return base.GetHashCode(); + } + } +} diff --git a/LibShapes/Core/Shape/ShapeMultiSelect.cs b/LibShapes/Core/Shape/ShapeMultiSelect.cs new file mode 100644 index 0000000..f6ffba6 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeMultiSelect.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 选择了多个形状后,就放在这里边。 + /// + public class ShapeMultiSelect: ShapeMulti + { + public override ShapeEle DeepClone() + { + // 首先组建一个新的 + ShapeMultiSelect group = new ShapeMultiSelect(); + if (shapes != null) + { + foreach (var item in shapes) + { + group.shapes.Add(item.DeepClone()); + } + } + return group; + + //return base.DeepClone(); + } + + } +} diff --git a/LibShapes/Core/Shape/ShapePie.cs b/LibShapes/Core/Shape/ShapePie.cs new file mode 100644 index 0000000..63c8026 --- /dev/null +++ b/LibShapes/Core/Shape/ShapePie.cs @@ -0,0 +1,48 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 扇形,跟弧度的区别是没有那个边框吧。 + /// + public class ShapePie : ShapeArc + { + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + } + + public override GraphicsPath GetGraphicsPathWithAngle() + { + GraphicsPath path = new GraphicsPath(); + var rect = new System.Drawing.RectangleF() + { + X = getX(), + Y = getY(), + Width = getWidth(), + Height = getHeight(), + }; + + var rect2 = correctRectangle(rect); + path.AddPie( + rect2.X, + rect2.Y, + rect2.Width, + rect2.Height, + StartAngle, + SweepAngle); + + return path; + //return base.GetGraphicsPathWithAngle(); + } + + + } +} diff --git a/LibShapes/Core/Shape/ShapeRectangle.cs b/LibShapes/Core/Shape/ShapeRectangle.cs new file mode 100644 index 0000000..ac98799 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeRectangle.cs @@ -0,0 +1,36 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 矩形 + /// + public class ShapeRectangle : ShapeEle + { + // 我将这个部分移动到ShapeEle部分了,默认情况下就是这种。 + //public override GraphicsPath GetGraphicsPathWithAngle() + //{ + // GraphicsPath path = new GraphicsPath(); + // path.AddRectangle(new System.Drawing.RectangleF() { + // X = getX(), + // Y = getY(), + // Width = getWidth(), + // Height = getHeight() + // }); + // return path; + // //throw new NotImplementedException(); + //} + + public override ShapeEle DeepClone() + { + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + //throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/Shape/ShapeRoundedRectangle.cs b/LibShapes/Core/Shape/ShapeRoundedRectangle.cs new file mode 100644 index 0000000..8ca0c91 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeRoundedRectangle.cs @@ -0,0 +1,70 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Drawing; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 圆角矩形 + /// + public class ShapeRoundedRectangle : ShapeEle + { + + [DescriptionAttribute("圆角半径"), DisplayName("圆角半径"), CategoryAttribute("布局")] + public float Radius { get; set; } + /// + /// 构造函数 + /// + public ShapeRoundedRectangle() + { + // 有些参数默认不能是0 + Radius = 2; + } + + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + //throw new NotImplementedException(); + } + + public override GraphicsPath GetGraphicsPathWithAngle() + { + var _x = getX(); + var _y = getY(); + var _width = getWidth(); + var _height = getHeight(); + var path = new GraphicsPath(); + // 这里要注意判断圆角半径可能是0的情况。 + path.StartFigure(); + // 上边 + path.AddLine(new PointF(_x + Radius, _y), new PointF(_x + _width - Radius, _y)); + // 右上角 + if(Radius > 0) path.AddArc(new RectangleF(_x + _width - Radius * 2 , _y, Radius* 2, Radius * 2), 270, 90); + // 右边 + path.AddLine(new PointF(_x + _width, _y + Radius), new PointF(_x + _width, _y + _height - Radius)); + // 右下角 + if (Radius > 0) path.AddArc(new RectangleF(_x + _width - Radius * 2, _y + _height - Radius * 2, Radius*2, Radius*2), 0, 90); + // 下边 + path.AddLine(new PointF(_x + Radius, _y + _height), new PointF(_x + _width - Radius , _y + _height)); + // 右下角 + if (Radius > 0) path.AddArc(new RectangleF(_x, _y + _height - Radius*2, Radius*2, Radius*2), 90, 90); + // 左边 + path.AddLine(new PointF(_x, _y + Radius ), new PointF(_x, _y + _height - Radius)); + // 左上角 + if (Radius > 0) path.AddArc(new RectangleF(_x, _y, Radius*2, Radius*2), 180, 90); + path.CloseFigure(); + + + return path; + + //return base.GetGraphicsPathWithAngle(); + } + } +} diff --git a/LibShapes/Core/Shape/ShapeStretch.cs b/LibShapes/Core/Shape/ShapeStretch.cs new file mode 100644 index 0000000..048268a --- /dev/null +++ b/LibShapes/Core/Shape/ShapeStretch.cs @@ -0,0 +1,29 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 拉伸 + /// + public class ShapeStretch : ShapeEle + { + + + [DescriptionAttribute("拉伸"), DisplayName("拉伸"), CategoryAttribute("外观")] + public bool isStretch { get; set; } + + + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + //throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/Shape/ShapeText.cs b/LibShapes/Core/Shape/ShapeText.cs new file mode 100644 index 0000000..11bb460 --- /dev/null +++ b/LibShapes/Core/Shape/ShapeText.cs @@ -0,0 +1,171 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + // todo 这个以后支持拉伸。 + + /// + /// 文本 + /// + public class ShapeText : ShapeVar + { + #region 文本的属性 + [DescriptionAttribute("前缀"), DisplayName("前缀"), CategoryAttribute("文本")] + public string Piefix { get; set; } + + + [DescriptionAttribute("后缀"), DisplayName("后缀"), CategoryAttribute("文本")] + public string Suffix { get; set; } + #endregion + + #region 字体方面的属性 + + [DescriptionAttribute("字体"), DisplayName("字体"), CategoryAttribute("字体")] + public Font Font { get; set; } + + [DescriptionAttribute("水平对齐方式"), DisplayName("水平对齐方式"), CategoryAttribute("字体")] + public StringAlignment Alignment { get; set; } + + [DescriptionAttribute("垂直对齐方式"), DisplayName("垂直对齐方式"), CategoryAttribute("字体")] + public StringAlignment LineAlignment { get; set; } + + #endregion + + public ShapeText() : base() + { + // 设置摩尔默认的字体。 + Font = new Font("Arial", 8); + Piefix = "前缀"; + StaticText = "文本"; + Suffix = "后缀"; + PenWidth = 0; + IsFill = true; + FillColor = Color.Black; + } + + + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + //throw new NotImplementedException(); + } + + public override string getText() + { + return Piefix + (string.IsNullOrEmpty(this.VarName) ? StaticText : this.VarValue) + Suffix; + } + + public override bool isVisible(Matrix matrix, PointF mousePointF) + { + // todo 这个是判断文本框的内部。 + return base.isVisible(matrix, mousePointF); + } + + public override bool isOutlineVisible(Matrix matrix, PointF mousePointF) + { + // 这个会 + return base.isOutlineVisible(matrix, mousePointF) || isVisible(matrix, mousePointF); + } + + public override GraphicsPath GetGraphicsPathWithAngle() + { + GraphicsPath path = new GraphicsPath(); + var rect = new RectangleF() + { + X = getX(), + Y = getY(), + Width = getWidth(), + Height = getWidth(), + }; + path.AddString( + getText(), + Font.FontFamily, + (int)Font.Style, + Font.Size, + rect, + new StringFormat() { Alignment=Alignment, LineAlignment=LineAlignment} + ); + + return path; + //throw new NotImplementedException(); + } + + public override bool isBeContains(Matrix matrix, RectangleF rect) + { + // 这个要判断是否整个文本内容是否在这个矩形内,而不是单独的看这个文本的框。 + // 这里要判断是否有文字,有时候没有文字,就按照基类的吧 + RectangleF rect2; + if(getText() != string.Empty) + { + // 如果有文字,返回文字的范围 + rect2 = GetTrueBounds(matrix); + } + else + { + // 如果没有文字,就选择外边边框的范围 + rect2 = GetBounds(matrix); + } + + return rect.Contains(rect2); + //return base.isBeContains(matrix, rect); + } + + /// + /// 这个返回的是矩形边框 + /// + /// + /// + public override RectangleF GetBounds(Matrix matrix) + { + // 这里不用这个文本图形的GetGraphicsPathWithAngle,而是调用矩形的。 + GraphicsPath path = base.GetGraphicsPathWithAngle(); + // 这里加上旋转 + Matrix matrix1 = new Matrix(); + // 这里按照中心点旋转, + var rect = path.GetBounds(); + var centerPoint = new PointF() { X = rect.X + rect.Width / 2, Y = rect.Y + rect.Height / 2 }; + matrix1.RotateAt(Angle, centerPoint); + Matrix matrix2 = matrix.Clone(); + matrix2.Multiply(matrix1); + // 应用这个转换 + path.Transform(matrix2); + // 返回这个矩形 + return path.GetBounds(); + //return base.GetBounds(matrix); + } + + /// + /// 返回的是实际文字的边框 + /// + /// + /// + public RectangleF GetTrueBounds(Matrix matrix) + { + + GraphicsPath path = GetGraphicsPathWithAngle(); + // 这里加上旋转 + Matrix matrix1 = new Matrix(); + // 这里按照中心点旋转, + var rect = path.GetBounds(); + // 我这里做一个判断,如果这里上边的全是0,那么就手动计算宽度和高度吧 + var centerPoint = new PointF() { X = rect.X + rect.Width / 2, Y = rect.Y + rect.Height / 2 }; + matrix1.RotateAt(Angle, centerPoint); + Matrix matrix2 = matrix.Clone(); + matrix2.Multiply(matrix1); + // 应用这个转换 + path.Transform(matrix2); + // 返回这个路径 + return path.GetBounds(); + //return base.GetBounds(matrix); + } + } +} diff --git a/LibShapes/Core/Shape/ShapeVar.cs b/LibShapes/Core/Shape/ShapeVar.cs new file mode 100644 index 0000000..0c3563c --- /dev/null +++ b/LibShapes/Core/Shape/ShapeVar.cs @@ -0,0 +1,70 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape +{ + /// + /// 变量,主要是支持外部输入变量 + /// + public class ShapeVar : ShapeStretch + { + + [DescriptionAttribute("对应excel中的一列数据"), DisplayName("变量名"), CategoryAttribute("变量")] + public string VarName { get; set; } + + + [Browsable(false)]//不在PropertyGrid上显示 + public string VarValue { get; set; } + + [DescriptionAttribute("没有指定变量时的文本"), DisplayName("文本"), CategoryAttribute("文本")] + public string StaticText { get; set; } + + + public override ShapeEle DeepClone() + { + // 这里用json的方式 + string json = JsonConvert.SerializeObject(this); + return JsonConvert.DeserializeObject(json); + //throw new NotImplementedException(); + } + + public override void setVals(Dictionary vars) + { + if (VarName != null) + { + //首先判断是否有这个 + if (vars.ContainsKey(VarName)) + { + VarValue = vars[VarName]; // 这个变量的值 + } + else + { + VarValue = string.Empty; // 没有是空字符串。 + } + } + + } + + /// + /// 取得文本 + /// + /// + public virtual string getText() + { + return string.IsNullOrEmpty(this.VarName) ? StaticText : this.VarValue; + } + + public override bool Equals(object obj) + { + var shape = obj as ShapeVar; + if (shape == null) return false; // 转换失败就是不同啦 + + return base.Equals(obj) && this.VarName == shape.VarName; + } + + } +} diff --git a/LibShapes/Core/Shapes.cs b/LibShapes/Core/Shapes.cs new file mode 100644 index 0000000..db8de80 --- /dev/null +++ b/LibShapes/Core/Shapes.cs @@ -0,0 +1,363 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Serialize; +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + + +namespace Io.Github.Kerwinxu.LibShapes.Core +{ + /// + /// 图形的集合 + /// + public class Shapes + { + #region 保存读取相关 + + private static ISerialize serialize = new JsonSerialize(); + + /// + /// 读取 + /// + /// + /// + public static Shapes load(string filename) + { + if (serialize != null + && ! string.IsNullOrEmpty(filename) + && System.IO.File.Exists(filename)) + { + return serialize.DeserializeObject(System.IO.File.ReadAllText(filename)); + } + else + { + return null; + } + } + + /// + /// 写入 + /// + /// + public void save(string filename) + { + // 写入文件 + if (serialize != null) + { + System.IO.File.WriteAllText(filename, serialize.SerializeObject(this)); + } + } + + + #endregion + + + #region 一堆属性,这些可以被json保存 + // 图形的集合 + public List lstShapes { get; set; } + /// + /// 坐标转换 + /// + public PointTransform pointTransform { get; set; } + + /// + /// 纸张的信息 + /// + public Paper.Paper Paper { get; set; } + + /// + /// 变量信息 + /// + private Dictionary _vars; + + public Dictionary Vars + { + get { return _vars; } + set { + _vars = value; + // 然后这里直接更新吧。 + if (value != null && lstShapes != null && lstShapes.Count > 0) + { + foreach (var item in lstShapes) + { + item.setVals(value); + } + } + + } + } + + + #endregion + + #region 构造函数 + + public Shapes() + { + lstShapes = new List(); + pointTransform = new PointTransform(); + //Paper = new Paper.Paper(); + Vars = new Dictionary(); + } + + #endregion + + #region 一堆方法 + + /// + /// + /// + /// + /// 偏移和放大 + /// 是否打印模板背景 + public void Draw(Graphics g, Matrix matrix, bool isShowModelBackground=true) + { + // 1. 先初始化 + initGraphics(g); + // 2. 绘制模板背景 + if (isShowModelBackground && this.Paper != null && this.Paper.ModelShape != null) + { + // 这个纸张的绘制,x,y都是0,width和height是模板的宽和高,不是纸张的。 + this.Paper.ModelShape.X = 0; + this.Paper.ModelShape.Y = 0; + this.Paper.ModelShape.Draw(g, matrix); + } + // 3. 显示所有的图形。 + if (lstShapes != null && lstShapes.Count > 0) + { + foreach (var item in lstShapes) + { + item.Draw(g, matrix); // 绘图每一个 + } + } + } + + /// + /// 这个返回偏移和放大后的矩阵 + /// + /// + public Matrix GetMatrix() + { + return pointTransform.GetMatrix(); + } + + /// + /// 这个主要是用来初始化的,高精度的 + /// + /// + private void initGraphics(Graphics g) + { + g.SmoothingMode = SmoothingMode.HighQuality; // 高质量 + g.PixelOffsetMode = PixelOffsetMode.HighQuality; // 指定高质量、低速度呈现。 + g.PageUnit = GraphicsUnit.Millimeter; //将毫米设置为度量单位 + } + + /// + /// 鼠标单机选择一个形状 + /// + /// + /// + public ShapeEle getSelectShape(PointF pointF) + { + if (lstShapes != null && lstShapes.Count > 0) + { + foreach (var shape in lstShapes) + { + if (shape.IsFill) + { + if (shape.isVisible(pointTransform.GetMatrix(), pointF)) + { + return shape; + } + } + else + { + if (shape.isOutlineVisible(pointTransform.GetMatrix(), pointF)) + { + return shape; + } + + } + + } + } + return null; + } + + /// + /// 选择矩形框内的形状 + /// + /// + /// + public List getSelectShapes(RectangleF rect) + { + var matrix = pointTransform.GetMatrix(); + if (lstShapes!= null && lstShapes.Count > 0) + { + return lstShapes.Where(x => x.isBeContains(matrix, rect)).ToList(); + } + return null; + + } + + public int getNextId() + { + // 首先取得所有的id + var ids = getIds(this.lstShapes); + + if (ids.Count == 0) + { + return 1; + } + + int i = ids.Max() + 1; + while (ids.Contains(i)) + { + i++; // 不重复的, + } + return i; // 这里简单一点。 + + } + + /// + /// 取得所有的id + /// + /// + /// + private ListgetIds(List shapeeles) + { + List ids = shapeeles.Where(x => !(x is ShapeGroup)).Select(x => x.ID).ToList(); + foreach (var item in shapeeles.Where(x => x is ShapeGroup)) + { + ids.AddRange(getIds(((ShapeGroup)item).shapes)); + } + return ids; + } + + /// + /// 根据某个id取得相应的形状。 + /// + /// + /// + public ShapeEle getShape(int id) + { + return getShape(lstShapes, id); + } + + private ShapeEle getShape(List shapeeles, int id) + { + if (shapeeles!=null) + { + foreach (var item in shapeeles) + { + if (item.ID == id) + { + return item; + } + + if (item is ShapeGroup) // 如果是群组 + { + var tmp = getShape(((ShapeGroup)item).shapes,id); + if (tmp != null) return tmp; + } + } + + } + + return null; + } + + /// + /// 将这个id的形状替换了。 + /// + /// + /// + public void replaceShape(int id, ShapeEle shape) + { + replaceShape(lstShapes, id, shape); + } + + private void replaceShape(List shapeeles, int id, ShapeEle shape) + { + // 遍历所有的形状 + for (int i = 0; i < shapeeles.Count; i++) + { + if (shapeeles[i] is ShapeGroup) + { + replaceShape(((ShapeGroup)shapeeles[i]).shapes, id, shape); + } + + if (shapeeles[i].ID == id) + { + // 找到了 + shapeeles.RemoveAt(i); + shapeeles.Insert(i, shape); + return; + } + } + } + + + /// + /// 这个是缩放到指定的大小。 + /// + /// + /// + /// 像素宽度 + /// 像素高度 + /// 像素间距 + public void zoomTo(float dpix, float dpiy, float width, float height, float spacing) + { + // 然后计算放大 + var width2 = (width - spacing * 2) / dpix * 25.4; // 转成mm + var height2 = (height - spacing * 2) / dpiy * 25.4; // 转成mm + // 然后计算所有图形的的宽度和高度 + ShapeGroup group = new ShapeGroup(); + group.shapes = lstShapes.Select(x => x).ToList();// 这里用复制的方式 + // 这里要判断是否有纸张 + if (this.Paper != null && this.Paper.ModelShape != null) + { + group.shapes.Add(this.Paper.ModelShape); + } + // 如果没有图形,就直接退出 + if (group.shapes.Count == 0) return; + // + var rect = group.GetBounds(new Matrix());// 取得不存在放大偏移的情况下,这个的尺寸 + // 这里解方程,思路是,画布的宽度=倍数*(形状总宽度+两边间距的宽度) + //width/dpix*25.4 = zoom * (rect.Width + spacing*2/dpix*25.4 /zoom) + // width/dpix*25.4 = zoom * (rect.Width + spacing*2/dpix*25.4 + var scale1 = (width / dpix * 25.4f - spacing * 2 / dpix * 25.4f) / rect.Width; + var scale2 = (height / dpiy * 25.4f - spacing * 2 / dpiy * 25.4f) / rect.Height; + // 取得较小值 + this.pointTransform.Zoom = scale1 < scale2 ? scale1 : scale2; // 取得较小值。 + // 然后这里有一个偏移,要算正负两个方向的偏移,要流出两边的spacing,主要留出左边和上边就可以了。 + this.pointTransform.OffsetX = - rect.X + spacing / dpix * 25.4f ; + this.pointTransform.OffsetY = - rect.Y + spacing / dpix * 25.4f ; + } + + /// + /// 深度复制一个 + /// + /// + public Shapes DeepClone() + { + //这里用json的方式 + JsonSerialize jsonSerialize = new JsonSerialize(); + string json = jsonSerialize.SerializeObject(this); + // 可能原因是存在自定义对象的集合,所以这里要用复杂的方式去做 + + + + return jsonSerialize.DeserializeObject(json); + } + + #endregion + + + + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/IChangeStrategy.cs b/LibShapes/Core/State/ChangeStrategy/IChangeStrategy.cs new file mode 100644 index 0000000..61eca15 --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/IChangeStrategy.cs @@ -0,0 +1,37 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + /// + /// 更改策略 + /// + interface IChangeStrategy + { + /// + /// 是否合适这个策略 + /// + /// + /// + /// + bool isRight(PointF [] pointFs, PointF start_pointF); + + + /// + /// 这个策略的执行, + /// + /// + void action(ShapeEle shape, PointF start_pointF, PointF end_pointF); + + /// + /// 更改成的鼠标样式 + /// + /// + Cursor changeCursor(); + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/MoveMode.cs b/LibShapes/Core/State/ChangeStrategy/MoveMode.cs new file mode 100644 index 0000000..49cf13b --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/MoveMode.cs @@ -0,0 +1,39 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + /// + /// 移动 + /// + public class MoveMode : IChangeStrategy + { + public void action(ShapeEle shape, PointF start_pointF, PointF end_pointF) + { + // 这个是更改xy的 + RectangleF rect = new RectangleF() { + X = end_pointF.X-start_pointF.X, + Y = end_pointF.Y - start_pointF.Y + }; + shape.Change(rect); + //throw new NotImplementedException(); + } + + public Cursor changeCursor() + { + return Cursors.Hand; + throw new NotImplementedException(); + } + + public bool isRight(PointF[] pointFs, PointF start_pointF) + { + return true;// 一般是最后一项。 + throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/ResizeModeEast.cs b/LibShapes/Core/State/ChangeStrategy/ResizeModeEast.cs new file mode 100644 index 0000000..c21b852 --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/ResizeModeEast.cs @@ -0,0 +1,45 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + public class ResizeModeEast : IChangeStrategy + { + public void action(ShapeEle shape, PointF start_pointF, PointF end_pointF) + { + // 右边的话,是更改x,或者width, + RectangleF rect = new RectangleF(); + var diff = end_pointF.X - start_pointF.X; + if (shape.Width < 0) + { + rect.X = diff; + } + else + { + rect.Width = diff; + } + shape.Change(rect); + //throw new NotImplementedException(); + } + + public Cursor changeCursor() + { + return Cursors.PanEast; + //throw new NotImplementedException(); + } + + public bool isRight(PointF[] pointFs, PointF start_pointF) + { + // 判断一句是跟右边的线足够的近。 + return DistanceCalculation.pointToLine(start_pointF, pointFs[1], pointFs[2]) <= DistanceCalculation.select_tolerance; + + //throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/ResizeModeNorth.cs b/LibShapes/Core/State/ChangeStrategy/ResizeModeNorth.cs new file mode 100644 index 0000000..f64b42e --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/ResizeModeNorth.cs @@ -0,0 +1,54 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + /// + /// 北方更改大小 + /// + public class ResizeModeNorth : IChangeStrategy + { + public void action(ShapeEle shape, PointF start_pointF, PointF end_pointF) + { + // 右边的话,是更改x,或者width, + RectangleF rect = new RectangleF(); + var diff = end_pointF.Y - start_pointF.Y; + if (shape.Height < 0) + { + rect.Height = -diff; + rect.Height = diff; + Trace.WriteLine($"修改h:{rect}"); + } + else + { + rect.Y = diff; + rect.Height = -diff; + Trace.WriteLine($"修改y:{rect}"); + } + shape.Change(rect); + + //throw new NotImplementedException(); + } + + public Cursor changeCursor() + { + return Cursors.PanNorth; + //throw new NotImplementedException(); + } + + public bool isRight(PointF[] pointFs, PointF start_pointF) + { + + return DistanceCalculation.pointToLine(start_pointF, pointFs[0], pointFs[1]) <= DistanceCalculation.select_tolerance; + + //throw new NotImplementedException(); + } + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/ResizeModeNorthEast.cs b/LibShapes/Core/State/ChangeStrategy/ResizeModeNorthEast.cs new file mode 100644 index 0000000..26aaf20 --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/ResizeModeNorthEast.cs @@ -0,0 +1,59 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + /// + /// 东北方向更改 + /// + public class ResizeModeNorthEast : IChangeStrategy + { + public void action(ShapeEle shape, PointF start_pointF, PointF end_pointF) + { + RectangleF rect = new RectangleF(); + var diffx = end_pointF.X - start_pointF.X; + var diffy = end_pointF.Y - start_pointF.Y; + if (shape.Width < 0) + { + rect.X = diffx; + rect.Width = -diffx; + } + else + { + rect.Width = diffx; + } + + if (shape.Height < 0) + { + rect.Y = -diffy; + rect.Height = diffy; + } + else + { + rect.Y = diffy; + rect.Height = -diffy; + } + Trace.WriteLine($"更改:{rect}"); + shape.Change(rect); + } + + public Cursor changeCursor() + { + return Cursors.PanNE; + //throw new NotImplementedException(); + } + + public bool isRight(PointF[] pointFs, PointF start_pointF) + { + return DistanceCalculation.distance(start_pointF, pointFs[1]) <= DistanceCalculation.select_tolerance * 2; + + } + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/ResizeModeNorthWest.cs b/LibShapes/Core/State/ChangeStrategy/ResizeModeNorthWest.cs new file mode 100644 index 0000000..6e84843 --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/ResizeModeNorthWest.cs @@ -0,0 +1,54 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + /// + /// 西北 + /// + public class ResizeModeNorthWest : IChangeStrategy + { + public void action(ShapeEle shape, PointF start_pointF, PointF end_pointF) + { + RectangleF rect = new RectangleF(); + var diffx = end_pointF.X - start_pointF.X; + var diffy = end_pointF.Y - start_pointF.Y; + if (shape.Width < 0) + { + rect.Width = -diffx; + } + else + { + rect.X = diffx; + rect.Width = -diffx; + } + if (shape.Height < 0) + { + rect.Height = -diffy; + } + else + { + rect.Y = diffy; + rect.Height = -diffy; + } + shape.Change(rect); + } + + public Cursor changeCursor() + { + return Cursors.PanNW; + //throw new NotImplementedException(); + } + + public bool isRight(PointF[] pointFs, PointF start_pointF) + { + return DistanceCalculation.distance(start_pointF, pointFs[0]) <= DistanceCalculation.select_tolerance * 2 ; + } + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/ResizeModeSorthWest.cs b/LibShapes/Core/State/ChangeStrategy/ResizeModeSorthWest.cs new file mode 100644 index 0000000..27b9dc4 --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/ResizeModeSorthWest.cs @@ -0,0 +1,53 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + /// + /// 西南 + /// + public class ResizeModeSorthWest : IChangeStrategy + { + public void action(ShapeEle shape, PointF start_pointF, PointF end_pointF) + { + RectangleF rect = new RectangleF(); + var diffx = end_pointF.X - start_pointF.X; + var diffy = end_pointF.Y - start_pointF.Y; + if (shape.Width < 0) + { + rect.Width = -diffx; + } + else + { + rect.X = diffx; + rect.Width = -diffx; + } + if (shape.Height < 0) + { + rect.Y = diffy; + rect.Height = -diffy; + } + else + { + rect.Height = diffy; + } + shape.Change(rect); + } + + public Cursor changeCursor() + { + return Cursors.PanSW; + //throw new NotImplementedException(); + } + public bool isRight(PointF[] pointFs, PointF start_pointF) + { + return DistanceCalculation.distance(start_pointF, pointFs[3]) <= DistanceCalculation.select_tolerance * 2; + } + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/ResizeModeSouth.cs b/LibShapes/Core/State/ChangeStrategy/ResizeModeSouth.cs new file mode 100644 index 0000000..f0acdca --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/ResizeModeSouth.cs @@ -0,0 +1,44 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + /// + /// 南方更改 + /// + public class ResizeModeSouth : IChangeStrategy + { + public void action(ShapeEle shape, PointF start_pointF, PointF end_pointF) + { + // 右边的话,是更改x,或者width, + RectangleF rect = new RectangleF(); + var diff = end_pointF.Y - start_pointF.Y; + if (shape.Height < 0) + { + rect.Y = diff; + } + else + { + rect.Height = diff; + } + shape.Change(rect); + } + + public Cursor changeCursor() + { + return Cursors.PanSouth; + throw new NotImplementedException(); + } + + public bool isRight(PointF[] pointFs, PointF start_pointF) + { + return DistanceCalculation.pointToLine(start_pointF, pointFs[2], pointFs[3]) <= DistanceCalculation.select_tolerance; + } + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/ResizeModeSouthEast.cs b/LibShapes/Core/State/ChangeStrategy/ResizeModeSouthEast.cs new file mode 100644 index 0000000..7761f68 --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/ResizeModeSouthEast.cs @@ -0,0 +1,52 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + /// + /// 东南方向更改 + /// + public class ResizeModeSouthEast : IChangeStrategy + { + public void action(ShapeEle shape, PointF start_pointF, PointF end_pointF) + { + RectangleF rect = new RectangleF(); + var diffx = end_pointF.X - start_pointF.X; + var diffy = end_pointF.Y - start_pointF.Y; + if (shape.Width < 0) + { + rect.X = diffx; + } + else + { + rect.Width = diffx; + } + if (shape.Height < 0) + { + rect.Y = diffy; + } + else + { + rect.Height = diffy; + } + shape.Change(rect); + } + + public Cursor changeCursor() + { + return Cursors.PanSE; + throw new NotImplementedException(); + } + + public bool isRight(PointF[] pointFs, PointF start_pointF) + { + return DistanceCalculation.distance(start_pointF, pointFs[2]) <= DistanceCalculation.select_tolerance * 2; + } + } +} diff --git a/LibShapes/Core/State/ChangeStrategy/ResizeModeWest.cs b/LibShapes/Core/State/ChangeStrategy/ResizeModeWest.cs new file mode 100644 index 0000000..b4a6d50 --- /dev/null +++ b/LibShapes/Core/State/ChangeStrategy/ResizeModeWest.cs @@ -0,0 +1,42 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy +{ + public class ResizeModeWest : IChangeStrategy + { + public void action(ShapeEle shape, PointF start_pointF, PointF end_pointF) + { + // 右边的话,是更改x,或者width, + RectangleF rect = new RectangleF(); + var diff = end_pointF.X - start_pointF.X; + if (shape.Width < 0) + { + rect.Width = -diff; + } + else + { + rect.X = diff; + rect.Width = -diff; + } + shape.Change(rect); + } + + public Cursor changeCursor() + { + return Cursors.PanWest; + throw new NotImplementedException(); + } + + public bool isRight(PointF[] pointFs, PointF start_pointF) + { + return DistanceCalculation.pointToLine(start_pointF, pointFs[0], pointFs[3]) <= DistanceCalculation.select_tolerance; + } + } +} diff --git a/LibShapes/Core/State/ShapeRectSelect.cs b/LibShapes/Core/State/ShapeRectSelect.cs new file mode 100644 index 0000000..dd86a9b --- /dev/null +++ b/LibShapes/Core/State/ShapeRectSelect.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State +{ + public class ShapeRectSelect:State + { + + protected PointF endPoint; + + private Pen penSelectShape = new Pen(Color.Black) + { // 选择框的画笔 + DashStyle = DashStyle.Dash, + Width = 0.2f + }; + + public ShapeRectSelect(UserControlCanvas canvas, PointF start_pointF) : base(canvas, start_pointF) + { + + } + public ShapeRectSelect(UserControlCanvas canvas) : base(canvas) + { + + } + + public void Draw(Graphics g) + { + // 这个其实是绘制一个矩形。 + g.DrawRectangle( + penSelectShape, + startPoint.X, + startPoint.Y, + endPoint.X-startPoint.X, + endPoint.Y - startPoint.Y); + } + + public override void LeftMouseDown(PointF pointF) + { + startPoint = pointF; // 只是保存开始地址 + base.LeftMouseDown(pointF); + } + + public override void LeftMouseMove(PointF pointF) + { + // 保存 + endPoint = pointF; + this.canvas.Refresh(); // 刷新。 + + //base.LeftMouseMove(pointF); + } + + public override void LeftMouseUp(PointF pointF) + { + // 这里看一下是否有选择图形 + endPoint = pointF; + var _rect = new RectangleF(startPoint.X, startPoint.Y, endPoint.X - startPoint.X, endPoint.Y - startPoint.Y); + var _shapes = this.canvas.shapes.getSelectShapes(_rect); + if (_shapes!=null && _shapes.Count > 0) + { + // 要更改成选择模式 + this.canvas.state = new StateSelected(this.canvas); + // 如果只是选择了一个。 + if (_shapes.Count == 1) + { + this.canvas.changeSelect(_shapes[0]); // + } + else + { + var multi = new Shape.ShapeMultiSelect(); + multi.shapes.AddRange(_shapes); + this.canvas.changeSelect(multi); // 这个只是通知,但起始这个做不了修改的。 + } + } + else + { + // 说明没有选择图形 + this.canvas.changeSelect(null); + this.canvas.state = new StateStandby(this.canvas); + } + + this.canvas.Refresh(); + + //base.LeftMouseUp(pointF); + } + } +} diff --git a/LibShapes/Core/State/State.cs b/LibShapes/Core/State/State.cs new file mode 100644 index 0000000..c3a7787 --- /dev/null +++ b/LibShapes/Core/State/State.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State +{ + public abstract class State + { + /// + /// 画布 + /// + public UserControlCanvas canvas { get; set; } + + public PointF startPoint { get; set; } + + + public State(UserControlCanvas canvas, PointF start_pointF) + { + this.canvas = canvas; + this.startPoint = start_pointF; + } + + public State(UserControlCanvas canvas) + { + this.canvas = canvas; + } + + public virtual void LeftMouseDown(PointF pointF) { } + public virtual void LeftMouseMove(PointF pointF) { } + public virtual void LeftMouseUp(PointF pointF) {} + + public virtual void RightMouseClick(PointF pointF) { } + + /// + /// 将画布的坐标转成虚拟的坐标 + /// + /// + /// + protected PointF cantosPointToVirtualPoint(PointF pointF) + { + return this.canvas.shapes.pointTransform.CanvasToVirtualPoint(pointF); + } + + } +} diff --git a/LibShapes/Core/State/StateCanvasMove.cs b/LibShapes/Core/State/StateCanvasMove.cs new file mode 100644 index 0000000..9c7a6c2 --- /dev/null +++ b/LibShapes/Core/State/StateCanvasMove.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State +{ + /// + /// 画布整体的移动 + /// + public class StateCanvasMove:State + { + public StateCanvasMove(UserControlCanvas canvas, PointF start_pointF) : base(canvas, start_pointF) + { + + } + public StateCanvasMove(UserControlCanvas canvas) : base(canvas) + { + + } + + // 移动的话,我这个类会保存原先的偏移 + private float old_offsetX, old_offsetY; + + private Shapes oldShapes; + + public override void LeftMouseDown(PointF pointF) + { + this.oldShapes = this.canvas.shapes.DeepClone(); + // 保存偏移 + old_offsetX = this.canvas.shapes.pointTransform.OffsetX; + old_offsetY = this.canvas.shapes.pointTransform.OffsetY; + startPoint = pointF; + + base.LeftMouseDown(pointF); + } + + public override void LeftMouseMove(PointF pointF) + { + float diffx = pointF.X - startPoint.X; + float diffy = pointF.Y - startPoint.Y; + // 然后修改偏移 + this.canvas.shapes.pointTransform.OffsetX = old_offsetX + diffx; + this.canvas.shapes.pointTransform.OffsetY = old_offsetY + diffy; + + //base.LeftMouseMove(pointF); + } + + public override void LeftMouseUp(PointF pointF) + { + // 保存命令, + this.canvas.commandRecorder.addCommand(new Command.CommandShapesChanged() { + canvas = this.canvas, + OldShapes = this.oldShapes, + NewShapes = this.canvas.shapes.DeepClone(), + }); + //base.LeftMouseUp(pointF); + } + } +} diff --git a/LibShapes/Core/State/StateCanvasZoom.cs b/LibShapes/Core/State/StateCanvasZoom.cs new file mode 100644 index 0000000..699ad06 --- /dev/null +++ b/LibShapes/Core/State/StateCanvasZoom.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State +{ + /// + /// 画布的放大和缩小 + /// + public class StateCanvasZoom:State + { + public StateCanvasZoom(UserControlCanvas canvas, PointF start_pointF) : base(canvas, start_pointF) + { + + } + public StateCanvasZoom(UserControlCanvas canvas) : base(canvas) + { + + } + + public override void RightMouseClick(PointF pointF) + { + var oldShapes = this.canvas.shapes.DeepClone(); + this.canvas.reduce(pointF); + // 保存命令, + this.canvas.commandRecorder.addCommand(new Command.CommandShapesChanged() + { + canvas = this.canvas, + OldShapes = oldShapes, + NewShapes = this.canvas.shapes.DeepClone(), + }); + //base.RightMouseClick(pointF); + } + + public override void LeftMouseUp(PointF pointF) + { + var oldShapes = this.canvas.shapes.DeepClone(); + this.canvas.zoom(pointF); + // 保存命令, + this.canvas.commandRecorder.addCommand(new Command.CommandShapesChanged() + { + canvas =this.canvas, + OldShapes = oldShapes, + NewShapes = this.canvas.shapes.DeepClone(), + }); + //base.LeftMouseUp(pointF); + } + } +} diff --git a/LibShapes/Core/State/StateChanging.cs b/LibShapes/Core/State/StateChanging.cs new file mode 100644 index 0000000..873cc92 --- /dev/null +++ b/LibShapes/Core/State/StateChanging.cs @@ -0,0 +1,121 @@ +using Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State +{ + /// + /// 更改状态,都是选择后才有的。 + /// + public class StateChanging:State + { + public StateChanging(UserControlCanvas canvas, PointF start_pointF) : base(canvas, start_pointF) + { + + } + public StateChanging(UserControlCanvas canvas) : base(canvas) + { + + } + + /// + /// 原先的 + /// + private Shapes oldShapes; + + /// + /// 当前选择的策略 + /// + private IChangeStrategy changeStrategy; + + /// + /// 所有的策略 + /// + private IChangeStrategy[] changeStrategies = { + // 先4个角点 + new ChangeStrategy.ResizeModeNorthEast(), + new ChangeStrategy.ResizeModeNorthWest(), + new ChangeStrategy.ResizeModeSorthWest(), + new ChangeStrategy.ResizeModeSouthEast(), + // 然后4个方向 + new ChangeStrategy.ResizeModeEast(), + new ChangeStrategy.ResizeModeNorth(), + new ChangeStrategy.ResizeModeSouth(), + new ChangeStrategy.ResizeModeWest(), + // 最后是移动 + new ChangeStrategy.MoveMode() + }; + + public override void LeftMouseDown(PointF pointF) + { + oldShapes = this.canvas.shapes.DeepClone(); + + // 这个首先看一下是在四面还是八方上,运算是不同的。 + // 这里取得坐标 + var path = new GraphicsPath(); + path.AddRectangle(this.canvas.SelectShape.GetBounds(this.canvas.shapes.GetMatrix())); + if (path.PointCount == 0) return; + var points = path.PathPoints; + foreach (var item in changeStrategies) + { + if (item.isRight(points, pointF)) + { + changeStrategy = item; + Cursor cursor = item.changeCursor(); + if (cursor != null) this.canvas.Cursor = cursor;// 更改鼠标样式。 + return; + } + } + changeStrategy = null; + //base.LeftMouseDown(pointF); + } + + public override void LeftMouseMove(PointF pointF) + { + if (changeStrategy != null && this.canvas.SelectShape != null) + { + // 这里要判断是否对齐网格 + changeStrategy.action( + this.canvas.SelectShape, + cantosPointToVirtualPoint(this.startPoint), + cantosPointToVirtualPoint(this.canvas.gridAlign(pointF))); + this.canvas.Refresh(); + } + //base.LeftMouseMove(pointF); + } + + + + public override void LeftMouseUp(PointF pointF) + { + // 结束更改操作,然后转成选择模式 + if (changeStrategy != null && this.canvas.SelectShape != null) + { + changeStrategy.action( + this.canvas.SelectShape, + cantosPointToVirtualPoint(this.startPoint), + cantosPointToVirtualPoint(this.canvas.gridAlign(pointF))); + var old = this.canvas.SelectShape.DeepClone(); // 保存旧的 + this.canvas.SelectShape.ChangeComplated(); // 更改状态 + // + this.canvas.commandRecorder.addCommand( // 发送命令 + new Command.CommandShapesChanged() + { + canvas = this.canvas, + OldShapes = this.oldShapes, + NewShapes = this.canvas.shapes.DeepClone() + }) ; + } + // 转成 + this.canvas.state = new StateSelected(this.canvas); + this.canvas.Cursor = Cursors.Default;// 换到原先的鼠标样式 + this.canvas.Refresh(); + //base.LeftMouseUp(pointF); + } + } +} diff --git a/LibShapes/Core/State/StateCreate.cs b/LibShapes/Core/State/StateCreate.cs new file mode 100644 index 0000000..48b22f8 --- /dev/null +++ b/LibShapes/Core/State/StateCreate.cs @@ -0,0 +1,106 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Core.State.ChangeStrategy; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State +{ + /// + /// 创建状态。 + /// + public class StateCreate:State + { + public StateCreate(UserControlCanvas canvas, PointF start_pointF) : base(canvas, start_pointF) + { + + } + public StateCreate(UserControlCanvas canvas) : base(canvas) + { + + } + + private Shapes oldShapes; + + public ShapeEle shape { get; set; } + + public StateCreate(UserControlCanvas canvas, ShapeEle shape):base(canvas) + { + this.shape = shape; // 保存要创建的图形 + } + + private IChangeStrategy strategy = new ResizeModeSouthEast(); // 更改的策略 + private ShapeEle newshape; // 建立的图形。 + + public override void LeftMouseDown(PointF pointF) + { + oldShapes = this.canvas.shapes.DeepClone(); + // 这里先创建一个拷贝 + newshape = shape.DeepClone(); + // 判断是否需要对齐 + startPoint = this.canvas.gridAlign(pointF); + // 这里的坐标要转换成虚拟中的坐标 + var point3 = cantosPointToVirtualPoint(startPoint); + // 这个x和y就有了 + newshape.X = point3.X; + newshape.Y = point3.Y; + // 然后计算id + newshape.ID = this.canvas.shapes.getNextId(); + Trace.WriteLine($"增加了一个新的图形,id:{newshape.ID}"); + // 然后添加到图形中 + this.canvas.addShape(newshape); + // 刷新 + this.canvas.Refresh(); + + //base.LeftMouseDown(pointF); + } + + public override void LeftMouseMove(PointF pointF) + { + // 判断是否需要对齐 + var point2 = cantosPointToVirtualPoint(this.canvas.gridAlign(pointF)); + strategy.action(newshape, cantosPointToVirtualPoint(startPoint), point2); + // 刷新 + this.canvas.Refresh(); + base.LeftMouseMove(pointF); + } + + public override void LeftMouseUp(PointF pointF) + { + // 这里有一个特殊的情况,就是宽和高都是0的情况下,会死机 + + var point2 = cantosPointToVirtualPoint(this.canvas.gridAlign(pointF)); + strategy.action(newshape, cantosPointToVirtualPoint(startPoint), point2); + newshape.ChangeComplated(); + + if (newshape.Width == 0 && newshape.Height == 0) + { + this.canvas.deleteShapes(newshape); + } + else + { + // 更改成选择模式 + this.canvas.state = new StateSelected(this.canvas); + // 需要发送命令 + this.canvas.commandRecorder.addCommand( + new Command.CommandShapesChanged() + { + canvas=this.canvas, + OldShapes = this.oldShapes, + NewShapes = this.canvas.shapes.DeepClone() + } + ) ; + // 这里还是发出改变通知 + this.canvas.changeSelect(newshape); + } + + //base.LeftMouseUp(pointF); + // 刷新 + this.canvas.Refresh(); + } + + } +} diff --git a/LibShapes/Core/State/StateSelected.cs b/LibShapes/Core/State/StateSelected.cs new file mode 100644 index 0000000..b4ffdff --- /dev/null +++ b/LibShapes/Core/State/StateSelected.cs @@ -0,0 +1,73 @@ +using Io.Github.Kerwinxu.LibShapes.Utils; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State +{ + + + public class StateSelected:State + { + public StateSelected(UserControlCanvas canvas, PointF start_pointF) : base(canvas, start_pointF) + { + + } + public StateSelected(UserControlCanvas canvas) : base(canvas) + { + + } + + public override void LeftMouseDown(PointF pointF) + { + // 首先判断一下是否在这个选择矩形的范围内 + // 在的话就是更改模式了,比如更改尺寸和移动。我这个在选择框上是更改尺寸,而在内部是移动 + // 如果不在,就转成待机模式 + // 1. 这里判断一下是否在矩形框的范围内 + GraphicsPath path = new GraphicsPath(); + // 这里要判断一下是否是ShapeMultiSelect + if (this.canvas.SelectShape is Shape.ShapeMultiSelect) + { + // 那么最简单的方式是取消所有的选择,然后运行待机模式的选择 + this.canvas.changeSelect(null); + this.canvas.state = new StateStandby(this.canvas); + this.canvas.state.LeftMouseDown(pointF); + } + else + { + // 如果选择的图形是其他类型 + // 看看是否被选择了吧。 + var rect = this.canvas.SelectShape.GetBounds(this.canvas.shapes.GetMatrix()); + // 放大范围, + // 这里根据宽度和高度的情况酌情放大范围 + float select_tolerance = 1; + if (rect.Width < 4 || rect.Height < 4) select_tolerance = Math.Min(rect.Height, rect.Width) / 4; + + rect.X -= select_tolerance; + rect.Y -= select_tolerance; + rect.Width += select_tolerance * 2; + rect.Height += select_tolerance * 2; + path.AddRectangle(rect); + // 判断是否 + if (path.IsVisible(pointF)) + { + this.canvas.state = new StateChanging(this.canvas, pointF); + this.canvas.state.LeftMouseDown(pointF); + } + else + { + // 转成待机模式 + this.canvas.changeSelect(null); + this.canvas.state = new StateStandby(this.canvas); + this.canvas.state.LeftMouseDown(pointF); + } + } + + + //base.LeftMouseDown(pointF); + } + } +} diff --git a/LibShapes/Core/State/StateStandby.cs b/LibShapes/Core/State/StateStandby.cs new file mode 100644 index 0000000..a13f96f --- /dev/null +++ b/LibShapes/Core/State/StateStandby.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Io.Github.Kerwinxu.LibShapes.Core.State +{ + public class StateStandby : State + { + + public StateStandby(UserControlCanvas canvas, PointF start_pointF):base(canvas,start_pointF) + { + + } + + public StateStandby(UserControlCanvas canvas) : base(canvas) + { + this.canvas.changeSelect(null);// null表示没有选择,然后就是纸张。 + } + + public override void LeftMouseDown(PointF pointF) + { + // 首先看看是否有选择的图形 + var shape = this.canvas.shapes.getSelectShape(pointF); + if (shape != null) + { + this.canvas.changeSelect(shape); // 选择这个 + this.canvas.state = new StateSelected(this.canvas, pointF); // 改变状态 + this.canvas.state.LeftMouseDown(pointF); // 调用他的处理 + } + else + { + this.canvas.changeSelect(null); + this.canvas.state = new ShapeRectSelect(this.canvas, pointF); + this.canvas.state.LeftMouseDown(pointF); + } + + this.canvas.Refresh(); + //base.LeftMouseDown(e); + } + + } +} diff --git a/LibShapes/Core/UserControlCanvas.Designer.cs b/LibShapes/Core/UserControlCanvas.Designer.cs new file mode 100644 index 0000000..58ddd95 --- /dev/null +++ b/LibShapes/Core/UserControlCanvas.Designer.cs @@ -0,0 +1,46 @@ + +namespace Io.Github.Kerwinxu.LibShapes.Core +{ + partial class UserControlCanvas + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // UserControlCanvas + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Name = "UserControlCanvas"; + this.Paint += new System.Windows.Forms.PaintEventHandler(this.UserControlCanvas_Paint); + this.ResumeLayout(false); + + } + + #endregion + } +} diff --git a/LibShapes/Core/UserControlCanvas.cs b/LibShapes/Core/UserControlCanvas.cs new file mode 100644 index 0000000..b693b5a --- /dev/null +++ b/LibShapes/Core/UserControlCanvas.cs @@ -0,0 +1,1067 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Command; +using Io.Github.Kerwinxu.LibShapes.Core.Event; +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +/** + 这个画布需要对外联系的是 + 1. 各种属性 + 2. objectSelected : 选择的对象更改事件。 + * + * **/ + +namespace Io.Github.Kerwinxu.LibShapes.Core +{ + + + + /// + /// 画布 + /// + public partial class UserControlCanvas : UserControl + { + + #region 构造函数 + public UserControlCanvas() + { + InitializeComponent(); + init(); + } + + private void init() + { + // 这里设置默认颜色 + GriddingInterval = 2; // 默认网格2mm + commandRecorder = new CommandRecorder(); // 默认的命令记录器 + shapes = new Shapes(); // 默认的形状 + state = new State.StateStandby(this); // 默认是待机状态。 + // 这里先取得dpi + var g = this.CreateGraphics(); + var _dpix = g.DpiX; + var _dpiy = g.DpiY; + g.Dispose(); + // 一堆的事件 + // 如下的鼠标事件,先将坐标转换成毫米了。 + bool isLeftDown = false; // 左键是否按下。移动的时候需要判断是否按下的。 + // todo 加入键盘事件的处理, + this.MouseDown += (sender, e) => { if (!IsEdit) return; isLeftDown = true; if (e.Button == MouseButtons.Left) this.state.LeftMouseDown(PointTransform.pixToMM(_dpix, _dpiy, new PointF(e.X, e.Y))); this.Refresh(); }; + this.MouseMove += (sender, e) => { if (!IsEdit) return; if (!isLeftDown) return; if (e.Button == MouseButtons.Left) this.state.LeftMouseMove(PointTransform.pixToMM(_dpix, _dpiy, new PointF(e.X, e.Y))); this.Refresh(); }; + this.MouseUp += (sender, e) => { if (!IsEdit) return; isLeftDown = false; if (e.Button == MouseButtons.Left) this.state.LeftMouseUp(PointTransform.pixToMM(_dpix, _dpiy, new PointF(e.X, e.Y))); this.Refresh(); }; + this.MouseClick += (sender, e) => { if (!IsEdit) return; if (e.Button == MouseButtons.Right) this.state.RightMouseClick(PointTransform.pixToMM(_dpix, _dpiy, new PointF(e.X, e.Y))); this.Refresh(); }; + // 双缓冲,这里需要打开。 + this.DoubleBuffered = true; + // 说是推荐如上的这个, + //this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true); + // 这里有一个特殊的设置,如果偏移为空的话,这里默认的偏移是有这个刻度尺的 + if (shapes.pointTransform == null || + (shapes.pointTransform != null && shapes.pointTransform.OffsetX == 0 && shapes.pointTransform.OffsetY == 0) + ) + { + // 稍微多留一点出来。 + shapes.pointTransform.OffsetX = scaleWidth * 1.5f; + shapes.pointTransform.OffsetY = scaleWidth * 1.5f; + } + } + + #endregion + + #region 一堆的常量 + + private float scaleWidth = 6; // 刻度尺的宽度,这个是固定的,单位是mm + private float scaleLineWidth = 0.1f; // 刻度尺上的刻度线的宽度。 + private Font scaleTextFont = new Font("Arial", 6); // 刻度尺上文字的字体。 + private float minIntervalpixel = 5; // 比如网格,如果小于这个,就不打印了。 + private Color scaleBackColor = Color.Orange; + private float grid_width = 0.25f; // 绘制的网格的宽度 + private Brush grid_brush = new SolidBrush(Color.Black); // 网格的 + private Pen penSelectShape = new Pen(Color.Pink) { // 选择框的画笔 + DashStyle=DashStyle.Dash, + Width = 1f + }; + + #endregion + + #region 属性 + + // 如下的很多设置成属性是因为我方便从别的地方设置,这个属性其实是有个set方法的。 + + + /// + /// 是否可以编辑 + /// + public bool IsEdit { get; set; } + + /// + /// 形状 + /// + public Shapes shapes; + + /// + /// 显示网格 + /// + public bool isDrawDridding { get; set; } + + /// + /// 网格间隔 + /// + public int GriddingInterval { get; set; } // 默认是1,2,5mm + + /// + /// 对齐网格,这个在移动和更改尺寸的时候用到。 + /// + public bool isAlignDridding { get; set; } + + /// + /// 命令记录的 + /// + internal ICommandRecorder commandRecorder { get; set; } + + + /// + /// 是否安装了shift键 + /// + public bool isShift { get; set; } + + private State.State _state; + /// + /// 现在的状态 + /// + public State.State state { get { return _state; } set { _state = value; onStateChanged(); } } + + /// + /// 当前选择的图形 + /// + public ShapeEle SelectShape { get; set; } + + #endregion + + #region 事件 + + #region 选择更改事件 + + + // 委托 + public delegate void ObjectSelected(object sender, ObjectSelectEventArgs e); + // 事件 + public event ObjectSelected objectSelected; + + private void onObjectSelected(Object obj) + { + // 首先生成参数 + var args = new ObjectSelectEventArgs(obj); + // 然后看看是否有监听的。 + if (objectSelected != null) + { + objectSelected(this, args); + } + } + + /// + /// 给外部调用的,可以更改当前的选择。 + /// + /// + public void changeSelect(Object obj) + { + SelectShape = obj as ShapeEle; + + this.oldShapes = this.shapes.DeepClone(); + + if (SelectShape == null) + { + // 这里是设置纸张。 + onObjectSelected(shapes.Paper); + }else + { + onObjectSelected(obj); + } + } + + #endregion + + #region 状态更改事件 + + // 委托 + public delegate void StateChanged(object sender, StateChangedEventArgs e); + // 事件 + public event StateChanged stateChanged; + + private void onStateChanged() + { + // 首先生成参数 + var args = new StateChangedEventArgs(this.state); + // 然后看看是否有监听的。 + if (stateChanged != null) + { + stateChanged(this, args); + } + } + + #endregion + + + #region 属性更改事件处理, + + + private Shapes oldShapes; + public void propertyValueChanged(object s, PropertyValueChangedEventArgs e) + { + this.Refresh(); + // 这里时在发送给propertyGrid前就有保存。 + this.commandRecorder.addCommand(new Command.CommandShapesChanged() + { + canvas =this, + OldShapes = this.oldShapes, + NewShapes = this.shapes.DeepClone(), + }) ; + } + + #endregion + + #endregion + + #region 绘图相关 + + /// + /// 绘图 + /// + /// + /// + private void UserControlCanvas_Paint(object sender, PaintEventArgs e) + { + if (this.shapes == null) {return; } + // 这里要重新更新一下变量,这样相当于更新一遍。 + this.shapes.Vars = this.shapes.Vars; + // 如下的取消了双缓冲,是因为并不能达到预期,反倒是非常闪烁。 + // 最简单的方式是设置属性 this.DoubleBuffered = true; + // 这里重新绘图用上了双缓冲 + // 1. 首先在内存中建立Graphics对象 + //BufferedGraphicsContext currentContext = BufferedGraphicsManager.Current; + //BufferedGraphics myBuffer = currentContext.Allocate(e.Graphics, e.ClipRectangle); + //Graphics g = myBuffer.Graphics; + // 1. 取得Graphics对象 + Graphics g = e.Graphics; + // 全局的偏移和缩放,全局不涉及旋转,因为刻度尺。 + var matrix = shapes.GetMatrix(); + // 背景色,默认用这个控件的背景色填充。 + g.Clear(this.BackColor); + // 2. 形状绘图 + if (this.shapes != null) + { + // 绘图,并且用上了偏移和缩放。 + shapes.Draw(g, matrix); + } + // 3. 绘制网格 + if (isDrawDridding) + { + drawGrid(g); + } + // 4. 绘制选择框 + drawSelectRect(g); + // 5. 绘制刻度尺 + drawScale(g); + // 6. 这里绘制虚线,要选择哪些东西的 + if (this.state is State.ShapeRectSelect) + { + ((State.ShapeRectSelect)this.state).Draw(g); + } + + // 7. 刷新双缓冲 + //myBuffer.Render(e.Graphics); + //g.Dispose(); + //myBuffer.Dispose();//释放资源 + } + + + /// + /// 绘制网格 + /// + /// + private void drawGrid(Graphics g) + { + // 我的思路是,首先判断是否小于最小 + if (GriddingInterval / 25.4 * g.DpiX * shapes.pointTransform.Zoom < minIntervalpixel) return; + // 如下是计算范围 + PointF p1 = new PointF(0, 0); + PointF p2 = new PointF(this.Width / g.DpiX * 25.4f, this.Height / g.DpiY * 25.4f); + var point1 = shapes.pointTransform.CanvasToVirtualPoint(p1); // 左上角画布的坐标 + var point2 = shapes.pointTransform.CanvasToVirtualPoint(p2); // 右下角的坐标 + // 画笔 + Pen pen = new Pen(Color.Black); + pen.Width = 0.1f; // 画笔的用很细的。 + int x_start = (int)point1.X / GriddingInterval * GriddingInterval; + int y_start = (int)point1.Y / GriddingInterval * GriddingInterval; + int i_count = (int)(point2.X - point1.X) / GriddingInterval; + int j_count = (int)(point2.Y - point1.Y) / GriddingInterval; + // 然后这里绘制 + for (int i = 0; i < i_count; i++) + { + for (int j = 0; j < j_count; j++) + { + // 我这里是将坐标转成画布的坐标 + var point3 = new PointF( + x_start + i * GriddingInterval, + y_start + j * GriddingInterval); + var point4 = shapes.pointTransform.VirtualToCanvasPoint(point3); + // 这里进行绘制,这里实际上是绘制一个圆 + var point5 = new PointF(point4.X - grid_width/2, point4.Y - grid_width/2); + var rect = new RectangleF(point5, new SizeF(grid_width, grid_width)); + // + g.FillEllipse(grid_brush, rect); + } + } + + + } + + /// + /// 绘制选择框 + /// + /// + private void drawSelectRect(Graphics g) + { + if(this.SelectShape != null) + { + // 如果有图形,就取得边框,这个边框的尺寸控件是画布的尺寸控件,已经做过转换了。 + var rect = SelectShape.GetBounds(shapes.GetMatrix()); + // 然后绘制这个边框就是了。 + GraphicsPath path = new GraphicsPath(); + path.AddRectangle(rect); + g.DrawPath(penSelectShape, path); + + + } + } + + /// + /// 绘制刻度。 + /// + /// + private void drawScale(Graphics g) + { + // 这个刻度值是在上边和左边的。 + // 1 . 首先绘制刻度的背景 + // 如下是计算范围 + var point1 = shapes.pointTransform.CanvasToVirtualPoint(new PointF(0, 0)); // 左上角虚拟的坐标 + var point2 = shapes.pointTransform.CanvasToVirtualPoint(new PointF(this.Width / g.DpiX * 25.4f, this.Height / g.DpiY * 25.4f)); // 右下角的坐标 + // 如下的是计算这个自定义控件的宽度和高度,请注意,这里不算缩放。 + float w = this.Width / g.DpiX * 25.4f; + float h = this.Height / g.DpiY * 25.4f ; + // 控件大小不变,这个如下的就是固定的。 + g.FillRectangle( + new SolidBrush(this.scaleBackColor), + new RectangleF(0,0, w, scaleWidth) + ); + g.FillRectangle( + new SolidBrush(this.scaleBackColor), + new RectangleF(0, 0, scaleWidth, h) + ); + // 2.然后是各个刻度,先水平,后竖直 + Pen pen = new Pen(Color.Black); + pen.Width = scaleLineWidth; + // 2.1 水平刻度 + horizontal_scale_line(g, pen, point1.X, point2.X, 1, 0.5f); + horizontal_scale_line(g, pen, point1.X, point2.X, 2, 1); + horizontal_scale_line(g, pen, point1.X, point2.X, 5, 2); + horizontal_scale_line(g, pen, point1.X, point2.X, 10, 3); + horizontal_scale_text(g, new SolidBrush(Color.Black), point1.X, point2.X); + // 2.2 垂直刻度 + vertical_scale_line(g, pen, point1.Y, point2.Y, 1, 0.5f); + vertical_scale_line(g, pen, point1.Y, point2.Y, 2, 1); + vertical_scale_line(g, pen, point1.Y, point2.Y, 5, 2); + vertical_scale_line(g, pen, point1.Y, point2.Y, 10, 3); + vertical_scale_text(g, new SolidBrush(Color.Black), point1.Y, point2.Y); + + // 3. 左上角有重复的,这里直接空白出来 + g.FillRectangle( + new SolidBrush(this.scaleBackColor), + new RectangleF(0, 0, scaleWidth, scaleWidth) + ); + + } + + /// + /// 水平刻度尺 + /// + /// + /// 开始的x坐标 + /// 结束的x坐标 + /// y坐标 + /// 间隔 + /// 线的长度 + private void horizontal_scale_line(Graphics g, Pen pen, float start_x, float end_x, int intInterval, float line_length) + { + // 变量 + int x_start = (int)(start_x-1)/ intInterval * intInterval; + int x_end = (int)(end_x+1)/ intInterval * intInterval; + int i_count = (x_end - x_start) / intInterval +1; + // 这里要计算一下是否太密了。 + if (intInterval / 25.4 * g.DpiX * shapes.pointTransform.Zoom < minIntervalpixel) return; + if (intInterval / 25.4 * g.DpiY * shapes.pointTransform.Zoom < minIntervalpixel) return; + // 这里是按照画布的坐标绘制的 + // 其y坐标为y,另外向上有line_length的长度 + // 这个首先算出起始的坐标是多少 + for (int i = 0; i < i_count; i++) + { + PointF p1 = new PointF(x_start + i * intInterval, 0); // 虚拟的坐标。 + // 这里计算在画布中的坐标是多少 + var p3 = shapes.pointTransform.VirtualToCanvasPoint(p1); + p3.Y = scaleWidth; // 这个是固定的。 + var p4 = new PointF(p3.X, p3.Y - line_length); + g.DrawLine(pen, p3, p4); + } + + } + + /// + /// 这个是绘制文本的 + /// + /// + /// + /// + /// + private void horizontal_scale_text(Graphics g, Brush brush, float start_x, float end_x) + { + int intInterval = 10; + int x_start = (int)(start_x - 1) / intInterval * intInterval; + int x_end = (int)(end_x + 1) / intInterval * intInterval; + int i_count = (x_end - x_start) / intInterval + 1; + for (int i = 0; i < i_count; i++) + { + // 这里写文字 + int j = x_start + i * intInterval ; + string _text = (j/ intInterval).ToString(); // 显示的是cm,默认的是毫米 + // 然后求x坐标 + var p1 = new PointF(j, 0); + var p2 = shapes.pointTransform.VirtualToCanvasPoint(p1); + p2.Y = 0;// 手动更改成0 + // 这个p2坐标就是文字中线的位置,这里还要往左边移动一些。 + var _size = g.MeasureString(_text, scaleTextFont); + // 然后这个转成 + p2.X -= _size.Width / 2; + g.DrawString(_text, scaleTextFont, brush, p2); + } + } + + /// + /// 竖直的刻度尺 + /// + /// + /// 开始的x坐标 + /// 结束的x坐标 + /// y坐标 + /// 间隔 + /// 线的长度 + private void vertical_scale_line(Graphics g, Pen pen, float start_y, float end_y, int intInterval, float line_length) + { + // 变量 + int y_start = (int)(start_y - 1) / intInterval * intInterval; + int y_end = (int)(end_y + 1) / intInterval * intInterval; + int i_count = (y_end - y_start) / intInterval + 1; + // 这里要计算一下是否太密了。 + if (intInterval / 25.4 * g.DpiY * shapes.pointTransform.Zoom < minIntervalpixel) return; + if (intInterval / 25.4 * g.DpiY * shapes.pointTransform.Zoom < minIntervalpixel) return; + // 这里是按照画布的坐标绘制的 + // 其y坐标为y,另外向上有line_length的长度 + // 这个首先算出起始的坐标是多少 + for (int i = 0; i < i_count; i++) + { + PointF p1 = new PointF(0, y_start + i * intInterval); // 虚拟的坐标。 + // 这里计算在画布中的坐标是多少 + var p3 = shapes.pointTransform.VirtualToCanvasPoint(p1); + p3.X = scaleWidth; // 这个是固定的。 + var p4 = new PointF(p3.X - line_length, p3.Y); + g.DrawLine(pen, p3, p4); + } + + } + + /// + /// 这个是绘制文本的 + /// + /// + /// + /// + /// + private void vertical_scale_text(Graphics g, Brush brush, float start_y, float end_y) + { + int intInterval = 10; + int y_start = (int)(start_y - 1) / intInterval * intInterval; + int y_end = (int)(end_y + 1) / intInterval * intInterval; + int i_count = (y_end - y_start) / intInterval + 1; + for (int i = 0; i < i_count; i++) + { + // 这里写文字 + int j = y_start + i * intInterval; + string _text = (j / intInterval).ToString(); // 显示的是cm,默认的是毫米 + // 然后求x坐标 + var p1 = new PointF(0, j); + var p2 = shapes.pointTransform.VirtualToCanvasPoint(p1); + p2.X = 0;// 手动更改成0 + // 这个p2坐标就是文字中线的位置,这里还要往左边移动一些。 + var _size = g.MeasureString(_text, scaleTextFont); + // 然后这个转成 + p2.Y -= _size.Height / 2; + g.DrawString(_text, scaleTextFont, brush, p2); + } + } + + #endregion + + #region 请注意,如下的几个操作都只是处理顶层的 + + /// + /// 以某个点为中心放大 + /// + /// + public void zoom(PointF point) + { + // 1. 取得这个点在虚拟画布上的地址 + var point2 = this.shapes.pointTransform.CanvasToVirtualPoint(point); + // 2. 更新偏移 + this.shapes.pointTransform.OffsetX -= point2.X * (this.shapes.pointTransform.Zoom ); + this.shapes.pointTransform.OffsetY -= point2.Y * (this.shapes.pointTransform.Zoom ); + // 3 放大 + this.shapes.pointTransform.Zoom *= 2; + // 4. 刷新 + this.Refresh(); + + } + + /// + /// 以某个点为中心缩小。 + /// + /// + public void reduce(PointF point) + { + // 1. 取得这个点在虚拟画布上的地址 + var point2 = this.shapes.pointTransform.CanvasToVirtualPoint(point); + // 2. 更新偏移 + this.shapes.pointTransform.OffsetX += point2.X * (this.shapes.pointTransform.Zoom/2); + this.shapes.pointTransform.OffsetY += point2.Y * (this.shapes.pointTransform.Zoom/2); + // 3 放大 + this.shapes.pointTransform.Zoom /= 2; + // 4. 刷新 + this.Refresh(); + } + + /// + /// 放大到屏幕 + /// + public void zoomToScreen() + { + if (shapes != null) + { + var g = this.CreateGraphics(); + shapes.zoomTo( + g.DpiX, + g.DpiY, + this.Width, + this.Height, + scaleWidth/25.4f*g.DpiX* 1.5f // scaleWidth/25.4f*g.DpiX表示刻度尺实际的像素宽度, + // 而*1.5,表示两边流出1.5倍数的距离,这样,图形也不会太靠近边界。 + ); + this.Refresh(); + } + } + + + /// + /// 添加一个新的形状 + /// + /// + public void addShape(ShapeEle shape) + { + // 只是在顶层添加。 + shapes.lstShapes.Add(shape); + changeSelect(shape); // 添加后是当作当前选择的。 + } + + /// + /// 删除, + /// + public void deleteShapes(ShapeEle shape) + { + //返回的是第几个项目删除的。 + if (shape is ShapeMultiSelect) // 这里表示选择了多个。 + { + // 这里说明是选择的一堆,这里一个一个的删除 + foreach (var item in ((ShapeMultiSelect)shape).shapes) + { + deleteShapes(item); + } + } + else + { + // 这里说明可能是一个形状。 + var index = shapes.lstShapes.IndexOf(shape); + if (index == -1) return; + var oldShapes = this.shapes.DeepClone(); + shapes.lstShapes.Remove(shape);// 请注意,这里只是删除顶层的。 + // 这里添加command + commandRecorder.addCommand(new Command.CommandShapesChanged() { + canvas=this, + OldShapes = oldShapes, + NewShapes = this.shapes.DeepClone() + }); + } + + this.Refresh();// 刷新。 + } + + /// + /// 删除已经选中的形状 + /// + public void deleteShapes() + { + // 这里要判断一下是否是群组 + if (SelectShape != null) + { + deleteShapes(SelectShape); + } + + } + + // todo 请注意,如下的几个全部要添加命令 + + public void forward(int id) + { + // todo 添加命令。 + var shape = shapes.getShape(id); + int index = shapes.lstShapes.IndexOf(shape);// 取得下标 + if (index > 0) + { + // 如果不是最前面的 + shapes.lstShapes.Remove(shape); + shapes.lstShapes.Insert(index - 1, shape); + } + } + public void forwardToFront(int id) + { + // todo 添加命令。 + var shape = shapes.getShape(id); + int index = shapes.lstShapes.IndexOf(shape);// 取得下标 + if (index > 0) + { + // 如果不是最前面的 + shapes.lstShapes.Remove(shape); + shapes.lstShapes.Insert(0, shape); + } + } + + public void backward(int id) + { + // todo 添加命令。 + var shape = shapes.getShape(id); + int index = shapes.lstShapes.IndexOf(shape);// 取得下标 + if (index >= 0 && index < shapes.lstShapes.Count-1) + { + // 如果不是最前面的 + shapes.lstShapes.Remove(shape); + shapes.lstShapes.Insert(index + 1, shape); + } + } + public void backwardToEnd(int id) + { + // todo 添加命令。 + var shape = shapes.getShape(id); + int index = shapes.lstShapes.IndexOf(shape);// 取得下标 + if (index >= 0 && index < shapes.lstShapes.Count - 1) + { + // 如果不是最前面的 + shapes.lstShapes.Remove(shape); + shapes.lstShapes.Insert(shapes.lstShapes.Count-1, shape); + } + } + + + public void forward() + { + //这里用当前的 + if (SelectShape != null) + { + forward(SelectShape.ID); + } + } + public void forwardToFront() + { + if (SelectShape != null) + { + forwardToFront(SelectShape.ID); + } + } + public void backward() + { + //这里用当前的 + if (SelectShape != null) + { + backward(SelectShape.ID); + } + } + public void backwardToEnd() + { + //这里用当前的 + if (SelectShape != null) + { + backwardToEnd(SelectShape.ID); + } + } + + + + /// + /// 组成群组 + /// + /// + public ShapeGroup mergeGroup(List shapes) + { + // todo 添加命令。 + ShapeGroup group = new ShapeGroup(); + group.shapes.AddRange(shapes); + group.ID = this.shapes.getNextId(); + foreach (var item in shapes) + { + this.shapes.lstShapes.Remove(item); // 从旧的里边删除。 + } + addShape(group); + return group; + } + + /// + /// 取消这个群组 + /// + /// + public void cancelGroup(ShapeGroup group) + { + this.shapes.lstShapes.Remove(group); + foreach (var item in group.shapes) + { + this.shapes.lstShapes.Add(item); + } + } + + /// + /// 将选择的组成群组 + /// + public void mergeGroup() + { + if (SelectShape is ShapeGroup) + { + var group = mergeGroup(((ShapeGroup)SelectShape).shapes); + changeSelect(group); + } + + } + + /// + /// 将选择的取消群组 + /// + public void cancelGroup() + { + // 得判断 + if (SelectShape is ShapeGroup) + { + cancelGroup((ShapeGroup)SelectShape); + changeSelect(null);// 取消选择 + } + } + + #region 各种对齐 + + + /// + /// 上对齐 + /// + public void align_top() { + if (this.SelectShape is Shape.ShapeMultiSelect) + { + // + float _y = ((Shape.ShapeMultiSelect)this.SelectShape).shapes[0].Y; + foreach (var item in ((Shape.ShapeMultiSelect)this.SelectShape).shapes) + { + item.Y = _y; + } + this.Refresh(); + } + + } + + /// + /// 下对齐 + /// + public void align_bottom() { + + if (this.SelectShape is Shape.ShapeMultiSelect) + { + // + float _y = ((Shape.ShapeMultiSelect)this.SelectShape).shapes[0].Y; + float _height = ((Shape.ShapeMultiSelect)this.SelectShape).shapes[0].Height; + float _y_height = _y + _height; + foreach (var item in ((Shape.ShapeMultiSelect)this.SelectShape).shapes) + { + item.Y = _y_height - item.Height; // 减去高度,得到新的y + } + this.Refresh(); + } + } + + + /// + /// 左对齐 + /// + public void align_left() { + if (this.SelectShape is Shape.ShapeMultiSelect) + { + // + float _x = ((Shape.ShapeMultiSelect)this.SelectShape).shapes[0].X; + foreach (var item in ((Shape.ShapeMultiSelect)this.SelectShape).shapes) + { + item.X = _x; + } + this.Refresh(); + } + + } + + /// + /// 右对齐 + /// + public void align_right() + { + if (this.SelectShape is Shape.ShapeMultiSelect) + { + float _x = ((Shape.ShapeMultiSelect)this.SelectShape).shapes[0].X; + float _width = ((Shape.ShapeMultiSelect)this.SelectShape).shapes[0].Width; + float _y_width = _x + _width; + foreach (var item in ((Shape.ShapeMultiSelect)this.SelectShape).shapes) + { + item.X = _y_width - item.Width; // 减去高度,得到新的y + } + this.Refresh(); + } + } + + /// + /// 水平居中。 + /// + public void align_center() { + if (this.SelectShape is ShapeMultiSelect) + { + // 首先取得哪个的宽度是最宽的 + float _x=0, _width=0; + foreach (var item in ((Shape.ShapeMultiSelect)this.SelectShape).shapes) + { + if (item.Width > _width) + { + _x = item.X; + _width = item.Width; + } + } + + // 然后所有的都超这个对齐 + float _center = _x + _width / 2; + foreach (var item in ((Shape.ShapeMultiSelect)this.SelectShape).shapes) + { + item.X = _center - item.Width / 2; + } + + this.Refresh(); + + } + + } + + /// + /// 垂直居中。 + /// + public void align_midele() { + if (this.SelectShape is ShapeMultiSelect) + { + // 首先取得哪个的宽度是最宽的 + float _y = 0, _height = 0; + foreach (var item in ((Shape.ShapeMultiSelect)this.SelectShape).shapes) + { + if (item.Height > _height) + { + _y = item.Y; + _height = item.Height; + } + } + + // 然后所有的都超这个对齐 + float _midele = _y + _height / 2; + foreach (var item in ((Shape.ShapeMultiSelect)this.SelectShape).shapes) + { + item.Y = _midele - item.Height / 2; + } + + this.Refresh(); + + } + } + + #endregion + + #region 撤销重做 + /// + /// 撤销 + /// + public void undo() + { + this.commandRecorder.Undo(); + this.Refresh(); + } + + public void redo() + { + this.commandRecorder.Redo(); + this.Refresh(); + } + + #endregion + + #region 剪切复制粘贴 + + /// + /// 复制的保存在这里 + /// + private ShapeEle _copy_shape; + + /// + /// 剪切 + /// + public void cut() + { + // + if (SelectShape != null) + { + _copy_shape = SelectShape.DeepClone();// 先保存 + deleteShapes(SelectShape);// 删除 + } + } + + /// + /// 复制 + /// + public void copy() + { + if (SelectShape != null) + { + _copy_shape = SelectShape.DeepClone();// 跟剪切的区别是这里不删除。 + } + } + + /// + /// 粘贴 + /// + public void paste() + { + // 我这里先思考一下思路,这个本质上是复制, + // 首先要判断一下是否是ShapeMultiSelect,如果是,表示要复制内部的,而如果不是,那么只是复制这一个。 + if (_copy_shape is Shape.ShapeMultiSelect) + { + ShapeMultiSelect shapeMultiSelect = new ShapeMultiSelect(); + // 这个里边所有的形状都复制 + foreach (var item in ((ShapeMultiSelect)_copy_shape).shapes) + { + // 说明这里就一个形状 + addShape(item); + currectIdAndYadd(item, 5); // 这个会更新id以及向下移动 + shapeMultiSelect.shapes.Add(item); + } + // + changeSelect(shapeMultiSelect); + } + else + { + // 说明这里就一个形状 + addShape(_copy_shape); + currectIdAndYadd(_copy_shape, 5); // 这个会更新id以及向下移动 + changeSelect(_copy_shape); // 这个是当前的id + } + + // 设置新的。 + _copy_shape = _copy_shape.DeepClone(); + + this.Refresh(); + + } + + /// + /// 矫正id的,并且矫正的需要y加上一个指定的数字的。 + /// + /// + /// + private void currectIdAndYadd(ShapeEle shape, float y_add) + { + if (shape is ShapeMulti) + { + foreach (var item in ((ShapeMultiSelect)shape).shapes) + { + currectIdAndYadd(item, y_add); + } + } + else + { + shape.ID = shapes.getNextId(); + shape.Y += y_add; + } + } + + #endregion + + public void selectAll() + { + // todo 全选 + } + + + + #endregion + + public void setVars(Dictionary dict) + { + this.shapes.Vars = dict; + this.Refresh(); + } + + + #region 小函数 + + /// + /// 对齐网格后的坐标,这个主要是提供给更改尺寸的。 + /// + /// + /// + public PointF gridAlign(PointF point) + { + // 这里首先判断是否需要对齐网格 + if (isAlignDridding) + { + // 这里需要转换坐标 + var p1 = this.shapes.pointTransform.CanvasToVirtualPoint(point); // 先转成虚拟的坐标 + var p2 = new PointF() + { + X = ((int)Math.Round(p1.X / GriddingInterval, 0)) * GriddingInterval, // 对齐,四舍五入五 + Y = ((int)Math.Round(p1.Y / GriddingInterval, 0)) * GriddingInterval, + }; + return this.shapes.pointTransform.VirtualToCanvasPoint(p2); // 转成画布的坐标 + + } + else + { + return point; // 不用对齐,直接返回原先的。 + } + } + + #endregion + + } +} diff --git a/LibShapes/Core/UserControlCanvas.resx b/LibShapes/Core/UserControlCanvas.resx new file mode 100644 index 0000000..7080a7d --- /dev/null +++ b/LibShapes/Core/UserControlCanvas.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/LibShapes/Core/UserControlToolbox.Designer.cs b/LibShapes/Core/UserControlToolbox.Designer.cs new file mode 100644 index 0000000..f669c82 --- /dev/null +++ b/LibShapes/Core/UserControlToolbox.Designer.cs @@ -0,0 +1,582 @@ + +namespace Io.Github.Kerwinxu.LibShapes.Core +{ + partial class UserControlToolbox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UserControlToolbox)); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.btn_page_setting = new System.Windows.Forms.ToolStripButton(); + this.btn_zoom_screen = new System.Windows.Forms.ToolStripButton(); + this.toolStrip2 = new System.Windows.Forms.ToolStrip(); + this.btn_select = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.btn_rect = new System.Windows.Forms.ToolStripButton(); + this.btn_roundedrect = new System.Windows.Forms.ToolStripButton(); + this.btn_line = new System.Windows.Forms.ToolStripButton(); + this.btn_ellipse = new System.Windows.Forms.ToolStripButton(); + this.btn_arc = new System.Windows.Forms.ToolStripButton(); + this.btn_pie = new System.Windows.Forms.ToolStripButton(); + this.btn_img = new System.Windows.Forms.ToolStripButton(); + this.btn_text = new System.Windows.Forms.ToolStripButton(); + this.btn_barcode = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.btn_delete = new System.Windows.Forms.ToolStripButton(); + this.btn_merge_group = new System.Windows.Forms.ToolStripButton(); + this.btn_cancel_group = new System.Windows.Forms.ToolStripButton(); + this.btn_forward = new System.Windows.Forms.ToolStripButton(); + this.btn_forwardtofront = new System.Windows.Forms.ToolStripButton(); + this.btn_backward = new System.Windows.Forms.ToolStripButton(); + this.btn_wardtoend = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.combo_grid = new System.Windows.Forms.ToolStripDropDownButton(); + this.关闭ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.btn_align_grid = new System.Windows.Forms.ToolStripButton(); + this.btn_zoom = new System.Windows.Forms.ToolStripButton(); + this.btn_move_canvas = new System.Windows.Forms.ToolStripButton(); + this.toolStrip3 = new System.Windows.Forms.ToolStrip(); + this.btn_align_top = new System.Windows.Forms.ToolStripButton(); + this.btn_align_bottom = new System.Windows.Forms.ToolStripButton(); + this.btn_align_left = new System.Windows.Forms.ToolStripButton(); + this.btn_align_right = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.btn_align_center = new System.Windows.Forms.ToolStripButton(); + this.btn_align_middle = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); + this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.toolStrip1.SuspendLayout(); + this.toolStrip2.SuspendLayout(); + this.toolStrip3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit(); + this.SuspendLayout(); + // + // toolStrip1 + // + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btn_page_setting, + this.btn_zoom_screen}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(228, 25); + this.toolStrip1.TabIndex = 0; + this.toolStrip1.Text = "toolStrip1"; + // + // btn_page_setting + // + this.btn_page_setting.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_page_setting.Image = ((System.Drawing.Image)(resources.GetObject("btn_page_setting.Image"))); + this.btn_page_setting.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_page_setting.Name = "btn_page_setting"; + this.btn_page_setting.Size = new System.Drawing.Size(60, 22); + this.btn_page_setting.Text = "页面设置"; + this.btn_page_setting.Click += new System.EventHandler(this.btn_page_setting_Click); + // + // btn_zoom_screen + // + this.btn_zoom_screen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_zoom_screen.Image = ((System.Drawing.Image)(resources.GetObject("btn_zoom_screen.Image"))); + this.btn_zoom_screen.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_zoom_screen.Name = "btn_zoom_screen"; + this.btn_zoom_screen.Size = new System.Drawing.Size(72, 22); + this.btn_zoom_screen.Text = "放大到屏幕"; + this.btn_zoom_screen.Click += new System.EventHandler(this.btn_zoom_screen_Click); + // + // toolStrip2 + // + this.toolStrip2.Dock = System.Windows.Forms.DockStyle.Left; + this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btn_select, + this.toolStripSeparator5, + this.btn_rect, + this.btn_roundedrect, + this.btn_line, + this.btn_ellipse, + this.btn_arc, + this.btn_pie, + this.btn_img, + this.btn_text, + this.btn_barcode, + this.toolStripSeparator1, + this.btn_delete, + this.btn_merge_group, + this.btn_cancel_group, + this.btn_forward, + this.btn_forwardtofront, + this.btn_backward, + this.btn_wardtoend, + this.toolStripSeparator2, + this.combo_grid, + this.btn_align_grid, + this.btn_zoom, + this.btn_move_canvas}); + this.toolStrip2.Location = new System.Drawing.Point(0, 25); + this.toolStrip2.Name = "toolStrip2"; + this.toolStrip2.Size = new System.Drawing.Size(61, 548); + this.toolStrip2.TabIndex = 1; + this.toolStrip2.Text = "toolStrip2"; + // + // btn_select + // + this.btn_select.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_select.Image = ((System.Drawing.Image)(resources.GetObject("btn_select.Image"))); + this.btn_select.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_select.Name = "btn_select"; + this.btn_select.Size = new System.Drawing.Size(58, 21); + this.btn_select.Text = "选择"; + this.btn_select.Click += new System.EventHandler(this.btn_select_Click); + // + // toolStripSeparator5 + // + this.toolStripSeparator5.Name = "toolStripSeparator5"; + this.toolStripSeparator5.Size = new System.Drawing.Size(58, 6); + // + // btn_rect + // + this.btn_rect.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_rect.Image = ((System.Drawing.Image)(resources.GetObject("btn_rect.Image"))); + this.btn_rect.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_rect.Name = "btn_rect"; + this.btn_rect.Size = new System.Drawing.Size(58, 21); + this.btn_rect.Text = "矩形"; + this.btn_rect.Click += new System.EventHandler(this.btn_rect_Click); + // + // btn_roundedrect + // + this.btn_roundedrect.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_roundedrect.Image = ((System.Drawing.Image)(resources.GetObject("btn_roundedrect.Image"))); + this.btn_roundedrect.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_roundedrect.Name = "btn_roundedrect"; + this.btn_roundedrect.Size = new System.Drawing.Size(58, 21); + this.btn_roundedrect.Text = "圆角矩形"; + this.btn_roundedrect.Click += new System.EventHandler(this.btn_roundedrect_Click); + // + // btn_line + // + this.btn_line.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_line.Image = ((System.Drawing.Image)(resources.GetObject("btn_line.Image"))); + this.btn_line.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_line.Name = "btn_line"; + this.btn_line.Size = new System.Drawing.Size(58, 21); + this.btn_line.Text = "线段"; + this.btn_line.Click += new System.EventHandler(this.btn_line_Click); + // + // btn_ellipse + // + this.btn_ellipse.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_ellipse.Image = ((System.Drawing.Image)(resources.GetObject("btn_ellipse.Image"))); + this.btn_ellipse.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_ellipse.Name = "btn_ellipse"; + this.btn_ellipse.Size = new System.Drawing.Size(58, 21); + this.btn_ellipse.Text = "椭圆"; + this.btn_ellipse.Click += new System.EventHandler(this.btn_ellipse_Click); + // + // btn_arc + // + this.btn_arc.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_arc.Image = ((System.Drawing.Image)(resources.GetObject("btn_arc.Image"))); + this.btn_arc.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_arc.Name = "btn_arc"; + this.btn_arc.Size = new System.Drawing.Size(58, 21); + this.btn_arc.Text = "弧形"; + this.btn_arc.Click += new System.EventHandler(this.btn_arc_Click); + // + // btn_pie + // + this.btn_pie.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_pie.Image = ((System.Drawing.Image)(resources.GetObject("btn_pie.Image"))); + this.btn_pie.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_pie.Name = "btn_pie"; + this.btn_pie.Size = new System.Drawing.Size(58, 21); + this.btn_pie.Text = "扇形"; + this.btn_pie.Click += new System.EventHandler(this.btn_pie_Click); + // + // btn_img + // + this.btn_img.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_img.Image = ((System.Drawing.Image)(resources.GetObject("btn_img.Image"))); + this.btn_img.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_img.Name = "btn_img"; + this.btn_img.Size = new System.Drawing.Size(58, 21); + this.btn_img.Text = "图片"; + this.btn_img.Click += new System.EventHandler(this.btn_img_Click); + // + // btn_text + // + this.btn_text.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_text.Image = ((System.Drawing.Image)(resources.GetObject("btn_text.Image"))); + this.btn_text.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_text.Name = "btn_text"; + this.btn_text.Size = new System.Drawing.Size(58, 21); + this.btn_text.Text = "文本"; + this.btn_text.Click += new System.EventHandler(this.btn_text_Click); + // + // btn_barcode + // + this.btn_barcode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_barcode.Image = ((System.Drawing.Image)(resources.GetObject("btn_barcode.Image"))); + this.btn_barcode.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_barcode.Name = "btn_barcode"; + this.btn_barcode.Size = new System.Drawing.Size(58, 21); + this.btn_barcode.Text = "条形码"; + this.btn_barcode.Click += new System.EventHandler(this.btn_barcode_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(58, 6); + // + // btn_delete + // + this.btn_delete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_delete.Image = ((System.Drawing.Image)(resources.GetObject("btn_delete.Image"))); + this.btn_delete.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_delete.Name = "btn_delete"; + this.btn_delete.Size = new System.Drawing.Size(58, 21); + this.btn_delete.Text = "删除"; + this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click); + // + // btn_merge_group + // + this.btn_merge_group.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_merge_group.Image = ((System.Drawing.Image)(resources.GetObject("btn_merge_group.Image"))); + this.btn_merge_group.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_merge_group.Name = "btn_merge_group"; + this.btn_merge_group.Size = new System.Drawing.Size(58, 21); + this.btn_merge_group.Text = "组成群组"; + this.btn_merge_group.Click += new System.EventHandler(this.btn_merge_group_Click); + // + // btn_cancel_group + // + this.btn_cancel_group.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_cancel_group.Image = ((System.Drawing.Image)(resources.GetObject("btn_cancel_group.Image"))); + this.btn_cancel_group.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_cancel_group.Name = "btn_cancel_group"; + this.btn_cancel_group.Size = new System.Drawing.Size(58, 21); + this.btn_cancel_group.Text = "取消群组"; + this.btn_cancel_group.Click += new System.EventHandler(this.btn_cancel_group_Click); + // + // btn_forward + // + this.btn_forward.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_forward.Image = ((System.Drawing.Image)(resources.GetObject("btn_forward.Image"))); + this.btn_forward.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_forward.Name = "btn_forward"; + this.btn_forward.Size = new System.Drawing.Size(58, 21); + this.btn_forward.Text = "移前一位"; + this.btn_forward.Click += new System.EventHandler(this.btn_forward_Click); + // + // btn_forwardtofront + // + this.btn_forwardtofront.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_forwardtofront.Image = ((System.Drawing.Image)(resources.GetObject("btn_forwardtofront.Image"))); + this.btn_forwardtofront.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_forwardtofront.Name = "btn_forwardtofront"; + this.btn_forwardtofront.Size = new System.Drawing.Size(58, 21); + this.btn_forwardtofront.Text = "移到最前"; + this.btn_forwardtofront.Click += new System.EventHandler(this.btn_forwardtofront_Click); + // + // btn_backward + // + this.btn_backward.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_backward.Image = ((System.Drawing.Image)(resources.GetObject("btn_backward.Image"))); + this.btn_backward.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_backward.Name = "btn_backward"; + this.btn_backward.Size = new System.Drawing.Size(58, 21); + this.btn_backward.Text = "移后一位"; + this.btn_backward.Click += new System.EventHandler(this.btn_backward_Click); + // + // btn_wardtoend + // + this.btn_wardtoend.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_wardtoend.Image = ((System.Drawing.Image)(resources.GetObject("btn_wardtoend.Image"))); + this.btn_wardtoend.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_wardtoend.Name = "btn_wardtoend"; + this.btn_wardtoend.Size = new System.Drawing.Size(58, 21); + this.btn_wardtoend.Text = "移到最后"; + this.btn_wardtoend.Click += new System.EventHandler(this.btn_wardtoend_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(58, 6); + // + // combo_grid + // + this.combo_grid.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.combo_grid.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.关闭ToolStripMenuItem, + this.toolStripMenuItem2, + this.toolStripMenuItem3, + this.toolStripMenuItem4}); + this.combo_grid.Image = ((System.Drawing.Image)(resources.GetObject("combo_grid.Image"))); + this.combo_grid.ImageTransparentColor = System.Drawing.Color.Magenta; + this.combo_grid.Name = "combo_grid"; + this.combo_grid.Size = new System.Drawing.Size(58, 21); + this.combo_grid.Text = "网格"; + this.combo_grid.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.combo_grid_DropDownItemClicked); + // + // 关闭ToolStripMenuItem + // + this.关闭ToolStripMenuItem.Name = "关闭ToolStripMenuItem"; + this.关闭ToolStripMenuItem.Size = new System.Drawing.Size(100, 22); + this.关闭ToolStripMenuItem.Text = "关闭"; + // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(100, 22); + this.toolStripMenuItem2.Text = "1"; + // + // toolStripMenuItem3 + // + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.Size = new System.Drawing.Size(100, 22); + this.toolStripMenuItem3.Text = "2"; + // + // toolStripMenuItem4 + // + this.toolStripMenuItem4.Name = "toolStripMenuItem4"; + this.toolStripMenuItem4.Size = new System.Drawing.Size(100, 22); + this.toolStripMenuItem4.Text = "5"; + // + // btn_align_grid + // + this.btn_align_grid.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_align_grid.Image = ((System.Drawing.Image)(resources.GetObject("btn_align_grid.Image"))); + this.btn_align_grid.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_align_grid.Name = "btn_align_grid"; + this.btn_align_grid.Size = new System.Drawing.Size(58, 21); + this.btn_align_grid.Text = "对齐网格"; + this.btn_align_grid.Click += new System.EventHandler(this.btn_align_grid_Click); + // + // btn_zoom + // + this.btn_zoom.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_zoom.Image = ((System.Drawing.Image)(resources.GetObject("btn_zoom.Image"))); + this.btn_zoom.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_zoom.Name = "btn_zoom"; + this.btn_zoom.Size = new System.Drawing.Size(58, 21); + this.btn_zoom.Text = "放大缩小"; + this.btn_zoom.Click += new System.EventHandler(this.btn_zoom_Click); + // + // btn_move_canvas + // + this.btn_move_canvas.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btn_move_canvas.Image = ((System.Drawing.Image)(resources.GetObject("btn_move_canvas.Image"))); + this.btn_move_canvas.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_move_canvas.Name = "btn_move_canvas"; + this.btn_move_canvas.Size = new System.Drawing.Size(58, 21); + this.btn_move_canvas.Text = "移动画布"; + this.btn_move_canvas.Click += new System.EventHandler(this.btn_move_canvas_Click); + // + // toolStrip3 + // + this.toolStrip3.Dock = System.Windows.Forms.DockStyle.Left; + this.toolStrip3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btn_align_top, + this.btn_align_bottom, + this.btn_align_left, + this.btn_align_right, + this.toolStripSeparator3, + this.btn_align_center, + this.btn_align_middle, + this.toolStripSeparator4}); + this.toolStrip3.Location = new System.Drawing.Point(61, 25); + this.toolStrip3.Name = "toolStrip3"; + this.toolStrip3.Size = new System.Drawing.Size(24, 548); + this.toolStrip3.TabIndex = 2; + this.toolStrip3.Text = "toolStrip3"; + // + // btn_align_top + // + this.btn_align_top.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btn_align_top.Image = global::Io.Github.Kerwinxu.LibShapes.Properties.Resources.shape_align_top; + this.btn_align_top.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_align_top.Name = "btn_align_top"; + this.btn_align_top.Size = new System.Drawing.Size(21, 20); + this.btn_align_top.Text = "btn_align_top"; + this.btn_align_top.ToolTipText = "上对齐"; + this.btn_align_top.Click += new System.EventHandler(this.btn_align_top_Click); + // + // btn_align_bottom + // + this.btn_align_bottom.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btn_align_bottom.Image = global::Io.Github.Kerwinxu.LibShapes.Properties.Resources.shape_align_bottom; + this.btn_align_bottom.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_align_bottom.Name = "btn_align_bottom"; + this.btn_align_bottom.Size = new System.Drawing.Size(21, 20); + this.btn_align_bottom.Text = "btn_align_bottom"; + this.btn_align_bottom.ToolTipText = "下对齐"; + this.btn_align_bottom.Click += new System.EventHandler(this.btn_align_bottom_Click); + // + // btn_align_left + // + this.btn_align_left.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btn_align_left.Image = global::Io.Github.Kerwinxu.LibShapes.Properties.Resources.shape_align_left; + this.btn_align_left.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_align_left.Name = "btn_align_left"; + this.btn_align_left.Size = new System.Drawing.Size(21, 20); + this.btn_align_left.Text = "btn_align_left"; + this.btn_align_left.ToolTipText = "左对齐"; + this.btn_align_left.Click += new System.EventHandler(this.btn_align_left_Click); + // + // btn_align_right + // + this.btn_align_right.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btn_align_right.Image = global::Io.Github.Kerwinxu.LibShapes.Properties.Resources.align_right; + this.btn_align_right.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_align_right.Name = "btn_align_right"; + this.btn_align_right.Size = new System.Drawing.Size(21, 20); + this.btn_align_right.Text = "btn_align_right"; + this.btn_align_right.ToolTipText = "右对齐"; + this.btn_align_right.Click += new System.EventHandler(this.btn_align_right_Click); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(21, 6); + // + // btn_align_center + // + this.btn_align_center.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btn_align_center.Image = global::Io.Github.Kerwinxu.LibShapes.Properties.Resources.shape_align_center; + this.btn_align_center.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_align_center.Name = "btn_align_center"; + this.btn_align_center.Size = new System.Drawing.Size(21, 20); + this.btn_align_center.Text = "btn_align_center"; + this.btn_align_center.ToolTipText = "水平居中"; + this.btn_align_center.Click += new System.EventHandler(this.btn_align_center_Click); + // + // btn_align_middle + // + this.btn_align_middle.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btn_align_middle.Image = global::Io.Github.Kerwinxu.LibShapes.Properties.Resources.shape_align_middle; + this.btn_align_middle.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btn_align_middle.Name = "btn_align_middle"; + this.btn_align_middle.Size = new System.Drawing.Size(21, 20); + this.btn_align_middle.Text = "btn_align_middle"; + this.btn_align_middle.ToolTipText = "垂直居中"; + this.btn_align_middle.Click += new System.EventHandler(this.btn_align_middle_Click); + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(21, 6); + // + // propertyGrid1 + // + this.propertyGrid1.Location = new System.Drawing.Point(90, 28); + this.propertyGrid1.Name = "propertyGrid1"; + this.propertyGrid1.Size = new System.Drawing.Size(133, 539); + this.propertyGrid1.TabIndex = 3; + // + // errorProvider1 + // + this.errorProvider1.ContainerControl = this; + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + // + // UserControlToolbox + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.propertyGrid1); + this.Controls.Add(this.toolStrip3); + this.Controls.Add(this.toolStrip2); + this.Controls.Add(this.toolStrip1); + this.Name = "UserControlToolbox"; + this.Size = new System.Drawing.Size(228, 573); + this.Resize += new System.EventHandler(this.UserControlToolbox_Resize); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.toolStrip2.ResumeLayout(false); + this.toolStrip2.PerformLayout(); + this.toolStrip3.ResumeLayout(false); + this.toolStrip3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStrip toolStrip2; + private System.Windows.Forms.ToolStrip toolStrip3; + private System.Windows.Forms.ToolStripButton btn_select; + private System.Windows.Forms.ToolStripButton btn_page_setting; + private System.Windows.Forms.ToolStripButton btn_zoom_screen; + private System.Windows.Forms.PropertyGrid propertyGrid1; + private System.Windows.Forms.ErrorProvider errorProvider1; + private System.Windows.Forms.ToolStripButton btn_rect; + private System.Windows.Forms.ToolStripButton btn_roundedrect; + private System.Windows.Forms.ToolStripButton btn_line; + private System.Windows.Forms.ToolStripButton btn_ellipse; + private System.Windows.Forms.ToolStripButton btn_arc; + private System.Windows.Forms.ToolStripButton btn_pie; + private System.Windows.Forms.ToolStripButton btn_img; + private System.Windows.Forms.ToolStripButton btn_text; + private System.Windows.Forms.ToolStripButton btn_barcode; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripButton btn_delete; + private System.Windows.Forms.ToolStripButton btn_merge_group; + private System.Windows.Forms.ToolStripButton btn_cancel_group; + private System.Windows.Forms.ToolStripButton btn_forward; + private System.Windows.Forms.ToolStripButton btn_forwardtofront; + private System.Windows.Forms.ToolStripButton btn_backward; + private System.Windows.Forms.ToolStripButton btn_wardtoend; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripDropDownButton combo_grid; + private System.Windows.Forms.ToolStripButton btn_align_grid; + private System.Windows.Forms.ToolStripButton btn_zoom; + private System.Windows.Forms.ToolStripButton btn_align_left; + private System.Windows.Forms.ToolStripButton btn_align_right; + private System.Windows.Forms.ToolStripButton btn_align_top; + private System.Windows.Forms.ToolStripButton btn_align_bottom; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripButton btn_align_middle; + private System.Windows.Forms.ToolStripButton btn_align_center; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripButton btn_move_canvas; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.ToolStripMenuItem 关闭ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4; + } +} diff --git a/LibShapes/Core/UserControlToolbox.cs b/LibShapes/Core/UserControlToolbox.cs new file mode 100644 index 0000000..4c15577 --- /dev/null +++ b/LibShapes/Core/UserControlToolbox.cs @@ -0,0 +1,504 @@ +using Io.Github.Kerwinxu.LibShapes.Core.Event; +using Io.Github.Kerwinxu.LibShapes.Core.Paper; +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using Io.Github.Kerwinxu.LibShapes.Core.State; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + + +namespace Io.Github.Kerwinxu.LibShapes.Core +{ + public partial class UserControlToolbox : UserControl + { + public UserControlToolbox() + { + InitializeComponent(); + UserControlToolbox_Resize(this, null); // 更改尺寸。 + // 对象的属性更改时 + propertyGrid1.PropertyValueChanged += PropertyGrid1_PropertyValueChanged; + } + + private void PropertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) + { + // 发送给外接 + if (this.PropertyValueChanged != null) + { + this.PropertyValueChanged(s, e); + } + //throw new NotImplementedException(); + } + + /// + /// 这个工具箱是操作画布的,这里用一个属性关联 + /// + public UserControlCanvas canvas { get; set; } + + /// + /// 选择更改事件的处理 + /// + /// + /// + public void objectSelected(object sender, ObjectSelectEventArgs e) + { + propertyGrid1.SelectedObject = e.obj; + } + + /// + /// 状态更改事件的处理 + /// + /// + /// + public void stateChanged(object sender, StateChangedEventArgs e) + { + all_reset_1(); + // + if (e.CurrentState is StateCanvasZoom) + { + btn_zoom.Checked = true; + }else if (e.CurrentState is StateCanvasMove) + { + btn_move_canvas.Checked = true; + } + else + { + btn_select.Checked = true; + } + all_reset_2(); + if (e.CurrentState is StateCreate) + { + // 如果是创建模式,要看看是哪个形状的 + var tmp = e.CurrentState as StateCreate; + if (tmp.shape is ShapePie) + { + btn_pie.Checked = true; + } + else if (tmp.shape is ShapeArc) + { + btn_arc.Checked = true; + } + else if (tmp.shape is ShapeEllipse) + { + btn_ellipse.Checked = true; + } + else if (tmp.shape is ShapeRectangle) + { + btn_rect.Checked = true; + }else if (tmp.shape is ShapeRoundedRectangle) + { + btn_roundedrect.Checked = true; + } + else if (tmp.shape is ShapeLine) + { + btn_line.Checked = true; + } + else if (tmp.shape is ShapeImage) + { + btn_img.Checked = true; + } + else if (tmp.shape is ShapeText) + { + btn_text.Checked = true; + } + else if (tmp.shape is ShapeBarcode) + { + btn_barcode.Checked = true; + } + + } + } + + /// + /// 这里是属性更改事件 + /// + public event System.Windows.Forms.PropertyValueChangedEventHandler PropertyValueChanged; + + + + + /// + /// 将所有的设置成没有选中的状态 + /// + private void all_reset_1() + { + btn_select.Checked = false; + btn_zoom.Checked = false; + btn_move_canvas.Checked = false; + } + + private void all_reset_2() + { + btn_rect.Checked = false; + btn_roundedrect.Checked = false; + btn_line.Checked = false; + btn_arc.Checked = false; + btn_pie.Checked = false; + btn_img.Checked = false; + btn_text.Checked = false; + btn_barcode.Checked = false; + btn_ellipse.Checked = false; + } + + /// + /// 新建形状,方便创建形状的 + /// + /// + private void create_shape(ShapeEle shape) + { + if (canvas != null) + { + canvas.state = new StateCreate(this.canvas, shape); + } + } + + /// + /// 矩形 + /// + /// + /// + private void btn_rect_Click(object sender, EventArgs e) + { + create_shape(new ShapeRectangle()); + } + + /// + /// 圆角矩形 + /// + /// + /// + private void btn_roundedrect_Click(object sender, EventArgs e) + { + create_shape(new ShapeRoundedRectangle()); + } + + /// + /// 线段 + /// + /// + /// + private void btn_line_Click(object sender, EventArgs e) + { + create_shape(new ShapeLine()); + } + + /// + /// 椭圆 + /// + /// + /// + private void btn_ellipse_Click(object sender, EventArgs e) + { + create_shape(new ShapeEllipse()); + } + + /// + /// 椭圆弧 + /// + /// + /// + private void btn_arc_Click(object sender, EventArgs e) + { + create_shape(new ShapeArc()); + } + + /// + /// 扇形 + /// + /// + /// + private void btn_pie_Click(object sender, EventArgs e) + { + create_shape(new ShapePie()); + } + + private void btn_img_Click(object sender, EventArgs e) + { + // 这里首先要读取图片 + openFileDialog1.Filter = "图片文件|*.jpg;*.jpeg;*.png"; + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + // 这里要读取图片,然后转换。 + var shapeImg = new ShapeImage(); + shapeImg.Img = ShapeImage.ImgToBase64String((Bitmap)Bitmap.FromFile(openFileDialog1.FileName)); + create_shape(shapeImg); + } + } + /// + /// 文本 + /// + /// + /// + private void btn_text_Click(object sender, EventArgs e) + { + create_shape(new ShapeText()); + } + + /// + /// 条形码 + /// + /// + /// + private void btn_barcode_Click(object sender, EventArgs e) + { + create_shape(new ShapeBarcode()); + } + /// + /// 删除 + /// + /// + /// + private void btn_delete_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.deleteShapes(); + } + } + + /// + /// 组成群组 + /// + /// + /// + private void btn_merge_group_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.mergeGroup(); + } + } + + /// + /// 取消群组 + /// + /// + /// + private void btn_cancel_group_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.cancelGroup(); + } + } + + /// + /// 向前1位 + /// + /// + /// + private void btn_forward_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.forward(); + } + } + /// + /// 移动到最前 + /// + /// + /// + private void btn_forwardtofront_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.forwardToFront(); + } + } + + /// + /// 往后1位 + /// + /// + /// + private void btn_backward_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.backward(); + } + } + + private void btn_wardtoend_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.backwardToEnd(); + } + } + + /// + /// 对齐网格 + /// + /// + /// + private void btn_align_grid_Click(object sender, EventArgs e) + { + if(this.canvas != null) + { + this.btn_align_grid.Checked = !this.btn_align_grid.Checked; // 更改状态 + this.canvas.isAlignDridding = this.btn_align_grid.Checked; // 应用状态 + } + } + + /// + /// 放大缩小状态 + /// + /// + /// + private void btn_zoom_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.state = new StateCanvasZoom(this.canvas); + } + } + + /// + /// 移动画布的状态 + /// + /// + /// + private void btn_move_canvas_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.state = new StateCanvasMove(this.canvas); + } + } + + /// + /// 网格的 + /// + /// + /// + private void combo_grid_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + if (this.canvas != null) + { + switch (e.ClickedItem.Text) + { + case "关闭": + this.canvas.isDrawDridding = false; + break; + case "1": + this.canvas.GriddingInterval = 1; + this.canvas.isDrawDridding = true; + break; + case "2": + this.canvas.GriddingInterval = 2; + this.canvas.isDrawDridding = true; + break; + case "5": + this.canvas.GriddingInterval = 5; + this.canvas.isDrawDridding = true; + break; + default: + break; + } + + this.canvas.Refresh(); // 刷新。 + } + } + + private void btn_page_setting_Click(object sender, EventArgs e) + { + // + IPaperSetting paperSetting; + if (this.canvas.shapes.Paper != null) + { + paperSetting = new FrmPaperSetting(this.canvas.shapes.Paper); + } + else + { + paperSetting = new FrmPaperSetting(); + } + // 打开窗口 + if (((Form)paperSetting).ShowDialog() == DialogResult.OK) + { + //返回新的纸张设置。 + this.canvas.shapes.Paper = paperSetting.GetPaper(); + this.canvas.Refresh(); + } + + } + + private void btn_zoom_screen_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.zoomToScreen(); + } + } + + private void btn_align_top_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.align_top(); + } + } + + private void btn_align_bottom_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.align_bottom(); + } + } + + private void btn_align_left_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.align_left(); + } + } + + private void btn_align_right_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.align_right(); + } + } + + private void btn_align_center_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.align_center(); + } + } + + private void btn_align_middle_Click(object sender, EventArgs e) + { + if (this.canvas != null) + { + this.canvas.align_midele(); + } + } + + private void UserControlToolbox_Resize(object sender, EventArgs e) + { + // 这个会更改属性框的坐标 + var left_top_point = new Point(90, 28); // 左上角的坐标 + propertyGrid1.Location = left_top_point; + propertyGrid1.Width = this.Width - left_top_point.X - 10; + propertyGrid1.Height = this.Height - left_top_point.Y - 10; + + } + + private void btn_select_Click(object sender, EventArgs e) + { + // 转成待机模式 + this.canvas.SelectShape = null; + this.canvas.state = new StateStandby(this.canvas); + } + } +} diff --git a/LibShapes/Core/UserControlToolbox.resx b/LibShapes/Core/UserControlToolbox.resx new file mode 100644 index 0000000..6081294 --- /dev/null +++ b/LibShapes/Core/UserControlToolbox.resx @@ -0,0 +1,484 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + 127, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + 237, 17 + + + 347, 17 + + + 42 + + + 484, 17 + + \ No newline at end of file diff --git a/LibShapes/LibShapes.csproj b/LibShapes/LibShapes.csproj new file mode 100644 index 0000000..581d4a0 --- /dev/null +++ b/LibShapes/LibShapes.csproj @@ -0,0 +1,196 @@ + + + + + Debug + AnyCPU + {EE859868-A204-44E8-85B3-B080AE587C38} + Library + Properties + Io.Github.Kerwinxu.LibShapes + LibShapes + v4.8 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + none + true + bin\Release\ + TRACE + prompt + 4 + false + + + + ..\packages\ExcelDataReader.3.6.0\lib\net20\ExcelDataReader.dll + + + ..\packages\ExcelDataReader.DataSet.3.6.0\lib\net35\ExcelDataReader.DataSet.dll + + + ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll + + + ..\packages\Newtonsoft.Json.13.0.2\lib\net35\Newtonsoft.Json.dll + + + + + + + + + + + + + ..\packages\ZXing.Net.0.16.8\lib\net35\zxing.dll + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + FrmPaperSetting.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UserControl + + + UserControlCanvas.cs + + + UserControl + + + UserControlToolbox.cs + + + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + FrmPaperSetting.cs + + + UserControlCanvas.cs + + + UserControlToolbox.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + \ No newline at end of file diff --git a/LibShapes/Properties/AssemblyInfo.cs b/LibShapes/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..586c480 --- /dev/null +++ b/LibShapes/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LibShapes")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Hewlett-Packard")] +[assembly: AssemblyProduct("LibShapes")] +[assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ee859868-a204-44e8-85b3-b080ae587c38")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/LibShapes/Properties/Resources.Designer.cs b/LibShapes/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b471f1c --- /dev/null +++ b/LibShapes/Properties/Resources.Designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace Io.Github.Kerwinxu.LibShapes.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Io.Github.Kerwinxu.LibShapes.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap _20130410051542730_easyicon_net_24 { + get { + object obj = ResourceManager.GetObject("20130410051542730_easyicon_net_24", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap _20130410051552262_easyicon_net_24 { + get { + object obj = ResourceManager.GetObject("20130410051552262_easyicon_net_24", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap align_right { + get { + object obj = ResourceManager.GetObject("align-right", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap shape_align_bottom { + get { + object obj = ResourceManager.GetObject("shape_align_bottom", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap shape_align_center { + get { + object obj = ResourceManager.GetObject("shape_align_center", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap shape_align_left { + get { + object obj = ResourceManager.GetObject("shape_align_left", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap shape_align_middle { + get { + object obj = ResourceManager.GetObject("shape_align_middle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap shape_align_top { + get { + object obj = ResourceManager.GetObject("shape_align_top", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/LibShapes/Properties/Resources.resx b/LibShapes/Properties/Resources.resx new file mode 100644 index 0000000..6675e98 --- /dev/null +++ b/LibShapes/Properties/Resources.resx @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\png\20130410051542730_easyicon_net_24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\png\20130410051552262_easyicon_net_24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\png\align-right.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\png\shape_align_bottom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\png\shape_align_center.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\png\shape_align_left.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\png\shape_align_middle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\png\shape_align_top.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/LibShapes/ReamMe.txt b/LibShapes/ReamMe.txt new file mode 100644 index 0000000..b3ec67b --- /dev/null +++ b/LibShapes/ReamMe.txt @@ -0,0 +1,29 @@ +这个是将绘图打印的核心部分重写, + +重要的分类 + ShapeEle : 形状部分负责在虚拟空间的所有 + PaperSize : 纸张的尺寸以及行间距,列间距之类的 + Transform : 偏移的类,放大系数以及偏移原点的。 + Shapes : 包括如上的3个类,图形的集合,纸张尺寸以及转换的。 + UserControlCanvas : 面板类,图形方面的操作在这里边,包括鼠标和键盘操作 + UserControlToolbox : 工具箱,各种工具以及一个属性。 + IInvoke : 负责命令的执行 + CommandRecorder : 命令记录的,可以支持undo和redo + Command : 命令类, + PrintBarcode : 打印的部分。 + 状态枚举 + 上下左右,还有4个角。 + 移动 + 选择 + 矩形选择 + +我取消clsKeyValue,而转成Dictionary类型,并且输出转成json格式,我这个是是一个简化的图形设计,最大的功能是打印条形码, +所以功能方面是有精简的, + +ShapeEle中的形状保存的xy宽高等都是虚拟世界的尺寸,没有经过转换的 +GetGraphicsPathWithAngle中返回的是虚拟的路径。 +GetGraphicsPath(Matrix matrix) : 转换来的是实际的路径了 + +关于命令,我这里一律保存对象的深度拷贝, + + diff --git a/LibShapes/UML/Class/class.puml b/LibShapes/UML/Class/class.puml new file mode 100644 index 0000000..b8b2db1 --- /dev/null +++ b/LibShapes/UML/Class/class.puml @@ -0,0 +1,309 @@ +@startuml class + + +class ShapeEle{ + .. 属性 .. + +int Id + +float X + +float Y + +float Width + +float Height + +float Angle + + string VarName + + string VarValue + - float XAdd + - float YAdd + - float WidthAdd + - float HeightAdd + .. 公开方法 .. + + Draw(Graphics g) + + GraphicsPath getGraphicsPath(Matrix matrix) + + GraphicsPath getGraphicsPathNoOffsetRoute() + + RectangleF GetBounds() + + bool isContains(PointF mousePointF) + + bool isBeContains(RectangleF ract) + + move() + + resize() +} + + +class PointTransform{ + .. 属性 .. + float OffsetX + float OffsetY + float Zoom + .. 公开方法 .. + + PointF TransfromToVirtualPoint(PointF) + + Matrix GetMatrix() +} +note left of PointTransform + 这个是虚拟世界的坐标 + 跟屏幕上的坐标转换的 +end note + + +class PaperSize{ + float PaperWidth + float PaperHeight + float Top + flaot Left + float Right + float Bottom + int Cols + int Rows + float HorizontalIntervalDistance + float VerticalIntervalDistance + ShapeEle Shape +} +PaperSize o-- ShapeEle +note right of PaperSize::Top + 模板距离纸张顶部的距离 +end note +note right of PaperSize::Left + 模板距离纸张左边的距离 +end note +note right of PaperSize::Cols + 列数 +end note +note right of PaperSize::Rows + 行数 +end note +note right of PaperSize::HorizontalIntervalDistance + 模板之间的水平间隔 +end note +note right of PaperSize::VerticalIntervalDistance + 模板之间的垂直间隔 +end note + + +class Shapes{ + .. 属性 .. + + List lstShapes + + PointTransform PointTransform + + PaperSize PaperSize + + Dictionary keyvalue + .. 方法 .. + +ShapeEle getSelectShape() + +List getSelectShapes() + +Draw(Graphics g, Matrix matrix, bool isShowPaperBack=true) + +int getNextId() + +getShape(int Id) + + forward(ShapeEle shape) + + forwardToFront(ShapeEle shape) + + backward(ShapeEle shape) + + backwardToEnd(ShapeEle shape) + + void addGroup(List shapes) + - initGraphics(Graphics g) +} +Shapes o-- ShapeEle +Shapes o-- PointTransform +Shapes o-- PaperSize + +note right of Shapes::getSelectShape + 鼠标点击下取得一个选择的图形, +end note +note right of Shapes::getSelectShapes + 鼠标画矩形框下选择的图形。 +end note +note right of Shapes::DrawWithPaperBack + 绘图,连带纸张的背景。 +end note +note right of Shapes::Draw + 绘图,不带纸张 +end note +note right of Shapes::getNextId + 取得下一个可用的id +end note + + +class ShapeGroup{ + -- 属性 -- + Listgroup + -- 方法 -- + +Draw(Graphics g) + +bool isContains(PointF mousePointF) + +bool isBeContains(RactangleF ract) + +move() + +resize() +} +ShapeEle <|-- ShapeGroup + + +class ShapeLine{ + -- 方法 -- + + getGraphicsPath getGraphicsPathNoOffsetRoute() +} +ShapeEle <|-- ShapeLine + +class ShapeRectangle{ + -- 方法 -- + + getGraphicsPath getGraphicsPathNoOffsetRoute() +} +ShapeEle <|-- ShapeRectangle + + +class ShapeSelected{ + +} +ShapeRectangle <|-- ShapeSelected + +class ShapeText{ + + string PreText + + string SuffixText + + string MidText +} + + +class UserControlCanvas{ + -- 属性 -- + + Shapes Shapes + + bool isDrawDridding + + int GriddingInterval + + bool isAlignGridding + + ICommandRecorder commandRecorder + + Dictionary Vals + + ShapeEle SelectShapes + + State state + + isShift + -- 方法 + - keyDown() + - keyUp() + - MouseDown() + - MouseUp() + - print() + + Undo() + + Redo() +} +UserControlCanvas o-- Shapes +UserControlCanvas o-- ShapeGroup +UserControlCanvas o-- ICommandRecorder +UserControlCanvas o-- State +note right of UserControlCanvas::isDrawDridding + 显示网格 +end note +note right of UserControlCanvas::GriddingInterval + 网格间隔 +end note +note right of UserControlCanvas::isAlignGridding + 对齐网格 +end note +note right of UserControlCanvas::print + 这里会用到双缓冲BufferedGraphics, + 首先建立双缓冲,然后提高精度 + 首先绘制所有的图形 + 然后绘制虚拟选择框 + 然后绘制刻度表 + 最后刷新双缓冲 +end note + + +interface IInvoke{ + ExecuteCommand(Command command) +} + +interface ICommandRecorder{ + addCommand(Command command) + Undo() + Redo() +} + + +class CommandRecorder{ + -- 属性 -- + - Listcommands + -- 方法 -- + addCommand(Command command) + Undo() + Redo() +} +ICommandRecorder <|-- CommandRecorder + + +abstract class Command { + + string ID + +Undo() + +Redo() +} + +class MoveCommand{ + +float oldX + +float oldY + +float newX + +flaot newY +} +Command <|-- MoveCommand + +class ResizeCommand{ + float oldX + float oldY + float oldWidth + float oldHeight + float newX + flaot newY + float newWidth + float newHeight +} +Command <|-- ResizeCommand + +class PropertyChangedCommand{ + ShapeEle oldShape + ShapeEle newShape +} +Command <|-- PropertyChangedCommand + +abstract class CommandEx{ + Shapes Shapes +} +Command <|-- CommandEx + +class AddCommand{ + float X + float Y +} +CommandEx <|-- AddCommand + +class DeleteCommand{ +} +CommandEx <|-- DeleteCommand + + +class ResizeStrategy{ + +} + +abstract class State{ + -- 属性 -- + - UserControlCanvas canvas + - PointF startPoint + -- 构造函数 -- + State(UserControlCanvas canvas, PointF startPoint) + -- 方法 -- + + keyDown() + + keyup() + + LeftMouseDown() + + LeftMouseMove() + + LeftMouseUp() + + rightMouse() +} + +class StateStandby{ + +} +State <|-- StateStandby + +class StateCreate{ + +} +State <|-- StateCreate + +class StateSelected{ + +} +State <|-- StateSelected + +class StateRectSelected{ + +} +State <|-- StateRectSelected + +@enduml \ No newline at end of file diff --git a/LibShapes/UML/MouseDown.puml b/LibShapes/UML/MouseDown.puml new file mode 100644 index 0000000..fe039a7 --- /dev/null +++ b/LibShapes/UML/MouseDown.puml @@ -0,0 +1,23 @@ +@startuml MouseDown +'' MouseDown +start +: 保存鼠标在虚拟空间的坐标; +if (鼠标左键) then (yes) + if (是否在已经选择框内) then (yes) + if (是否在四周的点上) then (yes) + : 四周方向改变大小; + elseif (是否在四周的线上) then (yes) + : 向8方改变大小; + else (nothing) + : 移动图形模式; + endif + else (no) + if (是否在某个图形内) then (yes) + : 将这个设置成已选择形状; + else (no) + : 画矩阵多选模式; + endif + endif +endif +stop +@enduml \ No newline at end of file diff --git a/LibShapes/UML/MouseMove.puml b/LibShapes/UML/MouseMove.puml new file mode 100644 index 0000000..500edba --- /dev/null +++ b/LibShapes/UML/MouseMove.puml @@ -0,0 +1,16 @@ +@startuml MouseMove +'' MouseMove +start +: 取得这个点在虚拟世界的坐标; +: 计算现在坐标跟原先坐标的偏移; +if (状态是移动) then (yes) + : 发送移动事件; +elseif (状态是四面扩展) then (yes) + : 发送四面扩展事件; +elseif (状态是8方扩展) then (yes) + : 发送8方扩展事件; +elseif (状态是矩形选择) then (yes) + : 矩形选择绘图; +endif +stop +@enduml diff --git a/LibShapes/UML/MouseUp.puml b/LibShapes/UML/MouseUp.puml new file mode 100644 index 0000000..c93b3d8 --- /dev/null +++ b/LibShapes/UML/MouseUp.puml @@ -0,0 +1,17 @@ +@startuml MouseUp +start +: 取得这个点在虚拟世界的坐标; +: 计算现在坐标跟原先坐标的偏移; +if (状态是移动) then (yes) + : 记录移动事件; +elseif (状态是四面扩展) then (yes) + : 记录四面扩展事件; +elseif (状态是8方扩展) then (yes) + : 记录8方扩展事件; +elseif (状态是矩形选择) then (yes) + : 记录选择绘图; +endif +stop + + +@enduml \ No newline at end of file diff --git a/LibShapes/UML/class.puml b/LibShapes/UML/class.puml new file mode 100644 index 0000000..0a71e02 --- /dev/null +++ b/LibShapes/UML/class.puml @@ -0,0 +1,304 @@ +@startuml class + + +class ShapeEle{ + .. 属性 .. + +int Id + +float X + +float Y + +float XAdd + +float YAdd + +float Width + +float Height + +float Angle + + string VarName + + string VarValue + .. 公开方法 .. + + Draw(Graphics g) + + GraphicsPath getGraphicsPath() + + getGraphicsPath getGraphicsPathNoOffsetRoute() + + RectangleF GetBounds() + + bool isContains(PointF mousePointF) + + bool isContains(RactangleF ract) + + move() + + resize() +} + + +class PointTransform{ + .. 属性 .. + float OffsetX + float OffsetY + float Zoom + .. 公开方法 .. + +PointF TransfromToVirtualPoint(PointF) +} +note left of PointTransform + 这个是虚拟世界的坐标 + 跟屏幕上的坐标转换的 +end note + + +class PaperSize{ + float PaperWidth + float PaperHeight + float Top + flaot Left + float Right + float Bottom + int Cols + int Rows + float HorizontalIntervalDistance + float VerticalIntervalDistance + ShapeEle Shape +} +PaperSize o-- ShapeEle +note right of PaperSize::Top + 模板距离纸张顶部的距离 +end note +note right of PaperSize::Left + 模板距离纸张左边的距离 +end note +note right of PaperSize::Cols + 列数 +end note +note right of PaperSize::Rows + 行数 +end note +note right of PaperSize::HorizontalIntervalDistance + 模板之间的水平间隔 +end note +note right of PaperSize::VerticalIntervalDistance + 模板之间的垂直间隔 +end note + + +class Shapes{ + .. 属性 .. + + List lstShapes + + PointTransform PointTransform + + PaperSize PaperSize + + Dictionary keyvalue + .. 方法 .. + +ShapeEle getSelectShape() + +List getSelectShapes() + +DrawWithPaperBack(Graphics g, Transfrom trans) + +Draw(Graphics g, Transfrom trans) + +int getNextId() + + forward(ShapeEle shape) + + forwardToFront(ShapeEle shape) + + backward(ShapeEle shape) + + backwardToEnd(ShapeEle shape) + + ShapeGroup addGroup(List shapes) +} +Shapes o-- ShapeEle +Shapes o-- PointTransform +Shapes o-- PaperSize + +note right of Shapes::getSelectShape + 鼠标点击下取得一个选择的图形, +end note +note right of Shapes::getSelectShapes + 鼠标画矩形框下选择的图形。 +end note +note right of Shapes::DrawWithPaperBack + 绘图,连带纸张的背景。 +end note +note right of Shapes::Draw + 绘图,不带纸张 +end note +note right of Shapes::getNextId + 取得下一个可用的id +end note + + +class ShapeGroup{ + -- 属性 -- + Listgroup + -- 方法 -- + +Draw(Graphics g, Transfrom trans) + +bool isContains(PointF mousePointF) + +bool isContains(RactangleF ract) + +move() + +resize() +} +ShapeEle <|-- ShapeGroup + + +class ShapeLine{ + -- 属性 -- + Listgroup + -- 方法 -- + + Draw(Graphics g, Transfrom trans) + + getGraphicsPath getGraphicsPathNoOffsetRoute() + +bool isContains(PointF mousePointF) + +bool isContains(RactangleF ract) +} +ShapeEle <|-- ShapeLine + + +class ShapeSelected{ + + Draw(Graphics g, Transfrom trans) +} +ShapeEle <|-- ShapeSelected + +class ShapeText{ + + string PreText + + string SuffixText + + string MidText +} + + +class UserControlCanvas{ + -- 属性 -- + + Shapes Shapes + + bool isDrawDridding + + int GriddingInterval + + bool isAlignGridding + - ICommandRecorder commandRecorder + - Dictionary keyvalue + - ShapeGroup SelectShapes + - State state + -- 方法 + - keyDown() + - keyUp() + - MouseDown() + - MouseUp() + - print() + + Undo() + + Redo() + + setVals(Dictionary vals) +} +UserControlCanvas o-- Shapes +UserControlCanvas o-- ShapeGroup +UserControlCanvas o-- ICommandRecorder +UserControlCanvas o-- State +note right of UserControlCanvas::isDrawDridding + 显示网格 +end note +note right of UserControlCanvas::GriddingInterval + 网格间隔 +end note +note right of UserControlCanvas::isAlignGridding + 对齐网格 +end note +note right of UserControlCanvas::print + 这里会用到双缓冲BufferedGraphics, + 首先建立双缓冲,然后提高精度 + 首先绘制所有的图形 + 然后绘制虚拟选择框 + 然后绘制刻度表 + 最后刷新双缓冲 +end note + + +interface IInvoke{ + ExecuteCommand(Command command) +} + +interface ICommandRecorder{ + addCommand(Command command) + Undo() + Redo() +} + + +class CommandRecorder{ + -- 属性 -- + - Listcommands + -- 方法 -- + addCommand(Command command) + Undo() + Redo() +} +ICommandRecorder <|-- CommandRecorder + + +abstract class Command { + ShapeEle Shape + +Undo() + +Redo() +} + +class MoveCommand{ + float oldX + float oldY + float newX + flaot newY +} +Command <|-- MoveCommand + +class ResizeCommand{ + float oldX + float oldY + float oldWidth + float oldHeight + float newX + flaot newY + float newWidth + float newHeight +} +Command <|-- ResizeCommand + +class PropertyChangedCommand{ + ShapeEle oldShape + ShapeEle newShape +} +Command <|-- PropertyChangedCommand + +abstract class CommandEx{ + Shapes Shapes +} +Command <|-- CommandEx + +class AddCommand{ + float X + float Y +} +CommandEx <|-- AddCommand + +class DeleteCommand{ +} +CommandEx <|-- DeleteCommand + + +class ResizeStrategy{ + +} + +abstract class State{ + -- 属性 -- + - UserControlCanvas canvas + - PointF startPoint + -- 构造函数 -- + State(UserControlCanvas canvas, PointF startPoint) + -- 方法 -- + + keyDown() + + keyup() + + LeftMouseDown() + + LeftMouseMove() + + LeftMouseUp() + + rightMouse() +} + +class StateStandby{ + +} +State <|-- StateStandby + +class StateCreate{ + +} +State <|-- StateCreate + +class StateSelected{ + +} +State <|-- StateSelected + +class StateRectSelected{ + +} +State <|-- StateRectSelected + +@enduml \ No newline at end of file diff --git a/LibShapes/UML/state.puml b/LibShapes/UML/state.puml new file mode 100644 index 0000000..41b06eb --- /dev/null +++ b/LibShapes/UML/state.puml @@ -0,0 +1,44 @@ +@startuml state +[*] --> 鼠标左键按下 + + +鼠标左键按下 --> 创建模式 : 在工具栏选择了一个图形 +state 创建模式{ +创建图形中鼠标移动 --> 创建图形中鼠标弹起 +创建图形中鼠标弹起 --> [*] +创建图形中鼠标弹起 : 记录操作命令 +} + + +state 矩形选择模式{ +鼠标左键按下 : 记录鼠标位置 +鼠标左键按下 --> 矩形选择起始 : 原先没有选择图形,这次也没有 + + +矩形选择起始 --> 矩形选择中鼠标移动 +矩形选择中鼠标移动 --> 矩形选择中鼠标弹起 +矩形选择中鼠标弹起 : 记录操作命令 +矩形选择中鼠标弹起 --> [*] +} + +鼠标左键按下 --> 修改模式 : 原先选择了一个图形,且这次在这个图形上 +state 修改模式{ + 移动状态 --> 鼠标移动 + 更改大小状态 --> 鼠标移动 + 鼠标移动 --> 鼠标弹起 +} +鼠标左键按下 --> 选择模式 : 原先没有选择,现在选择一个 +state 选择模式{ + 选择图形后鼠标弹起 --> [*] +} + +鼠标弹起 --> [*] +鼠标弹起 : 这个要保存命令记录 + + +state 放大缩小模式{ + 放大2倍 --> [*] +} +鼠标左键按下 --> 放大缩小模式 + +@enduml \ No newline at end of file diff --git a/LibShapes/UML/state2.puml b/LibShapes/UML/state2.puml new file mode 100644 index 0000000..8916e6b --- /dev/null +++ b/LibShapes/UML/state2.puml @@ -0,0 +1,14 @@ +@startuml 状态图 + +[待机状态] --> [选择状态] : 原先没有选择图形,现在选择了一个 +[选择状态] --> [更改状态] : 在这个选择的内部 +[更改状态] --> [更改状态] : 可以多次更改 +[更改状态] --> [待机状态] : 单机和矩形都没选择 +[待机状态] --> [矩形选择状态] :当前没有选择 +[矩形选择状态] --> [选择状态] : 这个矩形框内有形状 +[创建形态] --> [选择状态] + + + + +@enduml \ No newline at end of file diff --git a/LibShapes/UML/useCase.puml b/LibShapes/UML/useCase.puml new file mode 100644 index 0000000..281e969 --- /dev/null +++ b/LibShapes/UML/useCase.puml @@ -0,0 +1,42 @@ +@startuml UseCase +left to right direction + +actor User + +rectangle 编辑图形 { + usecase "鼠标左键选择某个图形" as edit1 + usecase "鼠标左键更改某个图形的大小" as edit2 + usecase "鼠标左键更改某个图形的位置" as edit3 + usecase "手动更改某个图形的某个属性" as edit4 +} + +User --> edit1 +User --> edit2 +User --> edit3 +User --> edit4 + +rectangle 创建图形{ + usecase "选择要创建的是什么图形" as create1 + usecase "自定义创建的图形的大小" as create2 +} +User --> create1 +User --> create2 + +rectangle 整体操作{ + usecase "读取文件" as total1 + usecase "保存文件" as total2 + usecase "放大屏幕" as total3 + usecase "移动屏幕" as total4 + usecase "Undo" as total5 + usecase "Redo" as total6 +} + + +total1 <-- User +total2 <-- User +total3 <-- User +total4 <-- User +total5 <-- User +total6 <-- User + +@enduml \ No newline at end of file diff --git a/LibShapes/Utils/DistanceCalculation.cs b/LibShapes/Utils/DistanceCalculation.cs new file mode 100644 index 0000000..ea9f705 --- /dev/null +++ b/LibShapes/Utils/DistanceCalculation.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Utils +{ + /// + /// 距离计算的类, + /// + public class DistanceCalculation + { + /// + /// 选择的容忍度 + /// + public static float select_tolerance = 1f; + + /// + /// 两点之间的距离 + /// + /// + /// + /// + public static float distance(PointF p1, PointF p2) + { + return (float)Math.Sqrt((p1.X - p2.X) * (p1.X - p2.X) + (p1.Y - p2.Y) * (p1.Y - p2.Y)); + } + + /// + /// 点到线段的距离 + /// + /// 点 + /// 线段的点1 + /// 线段的点2 + /// + public static float pointToLine(PointF p0, PointF p1, PointF p2) + { + + float a = distance(p1, p2); // 求出这个线段的长度 + float b = distance(p0, p1); // 这个点跟线段的点1的长度 + float c = distance(p0, p2); // 这个点跟线段的点2的长度 + // 这里分几种情况 + if (c*c >= a*a + b*b) + { + // 如果这个特别的长,那么这个点就不考虑距离了 + return b; + }else if(b*b >= a * a + c * c) + { + // 同理 + return c; + } + else + { + float p = (a + b + c) / 2; // 半周长 + double s = Math.Sqrt(p * (p - a) * (p - b) * (p - c)); // 海伦公式求面积 + return (float)(2 * s / a); // 返回点到线的距离 + } + + } + } +} diff --git a/LibShapes/Utils/ExcelData.cs b/LibShapes/Utils/ExcelData.cs new file mode 100644 index 0000000..22d0204 --- /dev/null +++ b/LibShapes/Utils/ExcelData.cs @@ -0,0 +1,79 @@ +using ExcelDataReader; +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Text; + +namespace Io.Github.Kerwinxu.LibShapes.Utils +{ + /// + /// 这个是一个工具类,可以读取excel数据的 + /// + public class ExcelData + { + public static DataTable LoadExcel(string file_path) + { + using (var stream = File.Open(file_path, FileMode.Open, FileAccess.Read)) + { + using (var reader = ExcelReaderFactory.CreateReader(stream)) + { + + // Gets or sets a callback to obtain configuration options for a DataTable. + var conf = new ExcelDataSetConfiguration() + { + // Gets or sets a value indicating whether to set the DataColumn.DataType + // property in a second pass. + UseColumnDataType = true, + + // Gets or sets a callback to determine whether to include the current sheet + // in the DataSet. Called once per sheet before ConfigureDataTable. + FilterSheet = (tableReader, sheetIndex) => true, + + // Gets or sets a callback to obtain configuration options for a DataTable. + ConfigureDataTable = (tableReader) => new ExcelDataTableConfiguration() + { + // Gets or sets a value indicating the prefix of generated column names. + EmptyColumnNamePrefix = "Column", + + // Gets or sets a value indicating whether to use a row from the + // data as column names. 是否使用数据作为列名 + UseHeaderRow = true, + + //// Gets or sets a callback to determine which row is the header row. + //// Only called when UseHeaderRow = true. + //ReadHeaderRow = (rowReader) => + //{ + // // F.ex skip the first row and use the 2nd row as column headers: + // rowReader.Read(); + //}, + + // Gets or sets a callback to determine whether to include the + // current row in the DataTable. + FilterRow = (rowReader) => + { + return true; + }, + + // Gets or sets a callback to determine whether to include the specific + // column in the DataTable. Called once per column after reading the + // headers. + FilterColumn = (rowReader, columnIndex) => + { + return true; + } + } + }; + + var ds = reader.AsDataSet(conf); + // 这里方便只是导入第一个 + return ds.Tables[0]; + } + + } + + return null; + } + } +} diff --git a/LibShapes/packages.config b/LibShapes/packages.config new file mode 100644 index 0000000..ed4f79d --- /dev/null +++ b/LibShapes/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/LibShapes/png/20130410051542730_easyicon_net_24.png b/LibShapes/png/20130410051542730_easyicon_net_24.png new file mode 100644 index 0000000..3744fb5 Binary files /dev/null and b/LibShapes/png/20130410051542730_easyicon_net_24.png differ diff --git a/LibShapes/png/20130410051552262_easyicon_net_24.png b/LibShapes/png/20130410051552262_easyicon_net_24.png new file mode 100644 index 0000000..eed37b9 Binary files /dev/null and b/LibShapes/png/20130410051552262_easyicon_net_24.png differ diff --git a/LibShapes/png/align-right.png b/LibShapes/png/align-right.png new file mode 100644 index 0000000..c68d5f3 Binary files /dev/null and b/LibShapes/png/align-right.png differ diff --git a/LibShapes/png/shape_align_bottom.png b/LibShapes/png/shape_align_bottom.png new file mode 100644 index 0000000..640767e Binary files /dev/null and b/LibShapes/png/shape_align_bottom.png differ diff --git a/LibShapes/png/shape_align_center.png b/LibShapes/png/shape_align_center.png new file mode 100644 index 0000000..f5663d1 Binary files /dev/null and b/LibShapes/png/shape_align_center.png differ diff --git a/LibShapes/png/shape_align_left.png b/LibShapes/png/shape_align_left.png new file mode 100644 index 0000000..fbdc081 Binary files /dev/null and b/LibShapes/png/shape_align_left.png differ diff --git a/LibShapes/png/shape_align_middle.png b/LibShapes/png/shape_align_middle.png new file mode 100644 index 0000000..b1efb14 Binary files /dev/null and b/LibShapes/png/shape_align_middle.png differ diff --git a/LibShapes/png/shape_align_top.png b/LibShapes/png/shape_align_top.png new file mode 100644 index 0000000..00545c7 Binary files /dev/null and b/LibShapes/png/shape_align_top.png differ diff --git a/LibShapesTests/Core/Command/CommandRecorderTests.cs b/LibShapesTests/Core/Command/CommandRecorderTests.cs new file mode 100644 index 0000000..cdda9e6 --- /dev/null +++ b/LibShapesTests/Core/Command/CommandRecorderTests.cs @@ -0,0 +1,69 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Io.Github.Kerwinxu.LibShapes.Core.Command; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Command.Tests +{ + [TestClass()] + public class CommandRecorderTests + { + [TestMethod()] + public void UndoTest() + { + //// 这个是测试一下是否可以有undo和redo + //// 1. 先有画布 + //UserControlCanvas canvas = new UserControlCanvas(); + //// 2. 然后新建一个线段 + //Shape.ShapeLine line = new Shape.ShapeLine() { + // X=10, + // Y=20, + // Width=30, + // Height=40 + //}; + ////手动添加进去 + //canvas.addShape(line); + //// 需要手动建立这个新建命令 + //// todo + ////canvas.commandRecorder.addCommand( + //// new Command.CommandCreate() { + //// canvas = canvas, + //// NewShape=line + //// }); + //// 3. 添加一个矩形 + //Shape.ShapeRectangle rect = new Shape.ShapeRectangle() + //{ + // X = 50, + // Y = 60, + // Width = 70, + // Height = 80 + //}; + ////手动添加进去 + //canvas.addShape(rect); + //// 需要手动建立这个新建命令 + //canvas.commandRecorder.addCommand( + // new Command.CommandCreate() + // { + // canvas = canvas, + // NewShape = rect + // }); + //// 4. 删除最后一个 + //canvas.changeSelect(rect); + //canvas.deleteShapes(); + //// 5. 判断有几个形状 + //Assert.AreEqual(1, canvas.shapes.lstShapes.Count); + //// 6. 然后执行undo + //canvas.commandRecorder.Undo(); + //// 7. 判断有几个形状 + //Assert.AreEqual(2, canvas.shapes.lstShapes.Count); + //// 8. 执行redo + //canvas.commandRecorder.Redo(); + //// 9. 判断有几个形状 + //Assert.AreEqual(1, canvas.shapes.lstShapes.Count); + + } + } +} \ No newline at end of file diff --git a/LibShapesTests/Core/Shape/ShapeEleTests.cs b/LibShapesTests/Core/Shape/ShapeEleTests.cs new file mode 100644 index 0000000..d1cd713 --- /dev/null +++ b/LibShapesTests/Core/Shape/ShapeEleTests.cs @@ -0,0 +1,29 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Io.Github.Kerwinxu.LibShapes.Core.Shape; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Shape.Tests +{ + [TestClass()] + public class ShapeEleTests + { + [TestMethod()] + public void DeepCloneTest() + { + // 这里用一个线段来测试一下 + var line1 = new ShapeLine(); + line1.X = 10; + line1.Y = 20; + line1.Width = 30; + line1.Height = 40; + var line1_2 = line1.DeepClone(); + Assert.AreEqual(line1, (ShapeLine)line1_2); + + //Assert.Fail(); + } + } +} \ No newline at end of file diff --git a/LibShapesTests/Core/ShapesTests.cs b/LibShapesTests/Core/ShapesTests.cs new file mode 100644 index 0000000..8be07cf --- /dev/null +++ b/LibShapesTests/Core/ShapesTests.cs @@ -0,0 +1,27 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Io.Github.Kerwinxu.LibShapes.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Io.Github.Kerwinxu.LibShapes.Core.Serialize; + +namespace Io.Github.Kerwinxu.LibShapes.Core.Tests +{ + [TestClass()] + public class ShapesTests + { + [TestMethod()] + public void DeepCloneTest() + { + // 先测试一个空白的Shape + Shapes shapes = new Shapes(); + JsonSerialize jsonSerialize = new JsonSerialize(); + string json = jsonSerialize.SerializeObject(shapes); + var shapes2 = jsonSerialize.DeserializeObject(json); + Assert.AreNotEqual(shapes2, null); + //Assert.Fail(); + } + } +} \ No newline at end of file diff --git a/LibShapesTests/LibShapesTests.csproj b/LibShapesTests/LibShapesTests.csproj new file mode 100644 index 0000000..333a284 --- /dev/null +++ b/LibShapesTests/LibShapesTests.csproj @@ -0,0 +1,93 @@ + + + + Debug + AnyCPU + {2A458D82-324D-40C5-9398-1F1EC605DD9E} + Library + Properties + LibShapesTests + LibShapesTests + v4.8 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + {EE859868-A204-44E8-85B3-B080AE587C38} + LibShapes + + + + + + + False + + + False + + + False + + + False + + + + + + + + \ No newline at end of file diff --git a/LibShapesTests/Properties/AssemblyInfo.cs b/LibShapesTests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ddba7fa --- /dev/null +++ b/LibShapesTests/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LibShapesTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Hewlett-Packard")] +[assembly: AssemblyProduct("LibShapesTests")] +[assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2a458d82-324d-40c5-9398-1f1ec605dd9e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/LibShapesTests1/LibShapesTests1.csproj b/LibShapesTests1/LibShapesTests1.csproj new file mode 100644 index 0000000..db42b77 --- /dev/null +++ b/LibShapesTests1/LibShapesTests1.csproj @@ -0,0 +1,83 @@ + + + + Debug + AnyCPU + {72B5D56B-2001-49C9-8FFE-F028B831B080} + Library + Properties + LibShapesTests1 + LibShapesTests1 + v4.0 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + False + + + False + + + False + + + False + + + + + + + + \ No newline at end of file diff --git a/LibShapesTests1/Properties/AssemblyInfo.cs b/LibShapesTests1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8b15fa0 --- /dev/null +++ b/LibShapesTests1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LibShapesTests1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Hewlett-Packard")] +[assembly: AssemblyProduct("LibShapesTests1")] +[assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("72b5d56b-2001-49c9-8ffe-f028b831b080")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/README.md b/README.md new file mode 100644 index 0000000..55e2af5 --- /dev/null +++ b/README.md @@ -0,0 +1,55 @@ +# barcodeManager + +本软件可以实现根据模板批量打印条形码,条形码的数字,或者其他文本等,都可以做一个模板,然后具体的内容由EXCEL表格提供。 + +本软件分2个重要的组成部分,下载软件后,可以看到一个是条形码模板的编辑,一个是条形码管理专家。下面做一下介绍 + +## 条形码模板编辑 + +打开软件后,因为条形码纸张尺寸不同,首先应该设置的是纸张尺寸,如下: +![](img/jiaocheng1.png) +打开页面设置后,会出现如下的界面 + +![](img/jiaocheng2.png) + +不同的打印机有不同的纸张尺寸,请选择相关的打印机和相关的纸张尺寸,这里清注意,比如有一些A4纸大小的条形码纸张,还分成很多行列的,在这里,需要选择A4纸大小,然后行列数,请在“布局”中设置,对打印机而言,这个纸张尺寸就是A4大小,但对于我们想分隔成很多行列的,我们可以自己在这里设置。设置好纸张后,点击确定,到如下界面: + +![](img/jiaocheng3.png) + +可以看到上边有一块白色的地方,这个就是模板,在这上边画图形,还有请注意,比如上边选择的是2行2列的布局,这里的一块白色的,是其中一块的布局模板,如果2行2列的模板都不相同,那么在页面中,还是选择1行1列吧。 + +如下是绘制了一些简单的图形 +![](img/jiaocheng4.png) + +对于条形码而言,我们的条形码一般是自动更改的,这里要设置如下 +![](img/jiaocheng5.png) + +要设置这个变量名,这个变量名就是excel表格中的列名,比如如下的表格,我这里的列名就要设置成“条形码”,这样子,从excel表格中读取书的时候,条形码列中的条形码具体信息就会填充到条形码中,其他的,单行文本和多行文本同理。如下的款号、品名和数量,都可以设置成文本,然后打印的时候,会自动的根据具体的内容打印。 + + + + +|款号 | 品名 | 数量 | 条形码 | +|-----|-----|--------|----------| +|1 | 男装T恤 | 342 | 123456789012 | +|2 | 女装T恤 | 42342 | 123456789013 | +|3 | 男装休闲长裤 | 4242 | 123456789014 | +|4 | 女装休闲长裤 | 42 | 123456789015 | +|5 | 男装牛仔长裤 | 4242 | 123456789016 | +|6 | 女装牛仔长裤 | 42 | 123456789017 | +|7 | 男装长袖衬衫 | 452 | 123456789018 | +|8 | 女装长袖衬衫 | 5432 | 123456789019 | + + + +## 表形码管理专家 + +在这个管理专家中,我们可以快速的选择条形码模板,快速的选择excel表格,实现快速的打印。 + +![](img/jiaocheng6.png) + + +# 支援作者 +撸码不易,请支援作者继续开发 +![](img/weixinpay.jpg) +![](img/zhifubaopei.jpg) \ No newline at end of file diff --git a/data.xlsx b/data.xlsx new file mode 100644 index 0000000..c8148a4 Binary files /dev/null and b/data.xlsx differ diff --git a/img/jiaocheng1.png b/img/jiaocheng1.png new file mode 100644 index 0000000..471f373 Binary files /dev/null and b/img/jiaocheng1.png differ diff --git a/img/jiaocheng2.png b/img/jiaocheng2.png new file mode 100644 index 0000000..17c0041 Binary files /dev/null and b/img/jiaocheng2.png differ diff --git a/img/jiaocheng3.png b/img/jiaocheng3.png new file mode 100644 index 0000000..8bae7d9 Binary files /dev/null and b/img/jiaocheng3.png differ diff --git a/img/jiaocheng4.png b/img/jiaocheng4.png new file mode 100644 index 0000000..26db4aa Binary files /dev/null and b/img/jiaocheng4.png differ diff --git a/img/jiaocheng5.png b/img/jiaocheng5.png new file mode 100644 index 0000000..0681921 Binary files /dev/null and b/img/jiaocheng5.png differ diff --git a/img/jiaocheng6.png b/img/jiaocheng6.png new file mode 100644 index 0000000..63eae51 Binary files /dev/null and b/img/jiaocheng6.png differ diff --git a/img/weixinpay.jpg b/img/weixinpay.jpg new file mode 100644 index 0000000..f01cb8c Binary files /dev/null and b/img/weixinpay.jpg differ diff --git a/img/zhifubaopei.jpg b/img/zhifubaopei.jpg new file mode 100644 index 0000000..2181374 Binary files /dev/null and b/img/zhifubaopei.jpg differ diff --git a/model1.json b/model1.json new file mode 100644 index 0000000..a738b54 --- /dev/null +++ b/model1.json @@ -0,0 +1,98 @@ +{ + "$type": "Io.Github.Kerwinxu.LibShapes.Core.Shapes, LibShapes", + "lstShapes": { + "$type": "System.Collections.Generic.List`1[[Io.Github.Kerwinxu.LibShapes.Core.Shape.ShapeEle, LibShapes]], mscorlib", + "$values": [ + { + "$type": "Io.Github.Kerwinxu.LibShapes.Core.Shape.ShapeText, LibShapes", + "Piefix": "品名:", + "Suffix": "", + "Font": "Arial, 6pt", + "Alignment": 0, + "LineAlignment": 0, + "VarName": "品名", + "VarValue": "男装T恤", + "StaticText": "文本", + "isStretch": false, + "ID": 1, + "X": 0.902092, + "Y": 3.01065969, + "Width": 47.995, + "Height": 10.4424286, + "Angle": 0.0, + "PenColor": "Black", + "PenWidth": 0.0, + "PenDashStyle": 0, + "IsFill": true, + "FillColor": "Black" + }, + { + "$type": "Io.Github.Kerwinxu.LibShapes.Core.Shape.ShapeBarcode, LibShapes", + "QrCodeErrorLevel": "容错7%", + "Encoding": "CODE_39", + "Font": null, + "isIncludeLabel": true, + "VarName": "条形码", + "VarValue": "123456789010", + "StaticText": "690123456789", + "isStretch": false, + "ID": 2, + "X": 3.11106515, + "Y": 18.4734879, + "Width": 42.67338, + "Height": 27.4113731, + "Angle": 0.0, + "PenColor": "Black", + "PenWidth": 1.0, + "PenDashStyle": 0, + "IsFill": false, + "FillColor": "" + } + ] + }, + "pointTransform": { + "$type": "Io.Github.Kerwinxu.LibShapes.Core.PointTransform, LibShapes", + "OffsetX": 8.999999, + "OffsetY": 8.999999, + "Zoom": 2.6350832 + }, + "Paper": { + "$type": "Io.Github.Kerwinxu.LibShapes.Core.Paper.Paper, LibShapes", + "ModelShape": { + "$type": "Io.Github.Kerwinxu.LibShapes.Core.Shape.ShapeRectangle, LibShapes", + "ID": 0, + "X": 0.0, + "Y": 0.0, + "Width": 50.0, + "Height": 50.0, + "Angle": 0.0, + "PenColor": "Black", + "PenWidth": 1.0, + "PenDashStyle": 0, + "IsFill": true, + "FillColor": "White" + }, + "PaperWidth": 210.058, + "PaperHeight": 296.926, + "Top": 0.0, + "Left": 0.0, + "Right": 0.0, + "Bottom": 0.0, + "Rows": 4, + "Cols": 3, + "HorizontalIntervalDistance": 30.029, + "VerticalIntervalDistance": 32.3086662, + "ModelWidth": 50.0, + "ModelHeight": 50.0, + "Landscape": true, + "LandscapeAngle": 0 + }, + "Vars": { + "$type": "System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]], mscorlib", + "款号": "1", + "品名": "男装T恤", + "数量": "342", + "打印数量": "1", + "条形码": "123456789010" + } +} \ No newline at end of file diff --git a/uml.mdj b/uml.mdj new file mode 100644 index 0000000..c1e5108 --- /dev/null +++ b/uml.mdj @@ -0,0 +1,7728 @@ +{ + "_type": "Project", + "_id": "AAAAAAFF+h6SjaM2Hec=", + "name": "Untitled", + "ownedElements": [ + { + "_type": "UMLModel", + "_id": "AAAAAAFF+qBWK6M3Z8Y=", + "_parent": { + "$ref": "AAAAAAFF+h6SjaM2Hec=" + }, + "name": "Model", + "ownedElements": [ + { + "_type": "UMLClassDiagram", + "_id": "AAAAAAFF+qBtyKM79qY=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Main", + "defaultDiagram": true, + "ownedViews": [ + { + "_type": "UMLClassView", + "_id": "AAAAAAGDx0NxAF70SLM=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDx0NxAV71UTI=", + "_parent": { + "$ref": "AAAAAAGDx0NxAF70SLM=" + }, + "model": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDx0NxAV724II=", + "_parent": { + "$ref": "AAAAAAGDx0NxAV71UTI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1328, + "top": 848, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx0NxAV73bJI=", + "_parent": { + "$ref": "AAAAAAGDx0NxAV71UTI=" + }, + "font": "Arial;13;1", + "left": 1109, + "top": 551, + "width": 178.572265625, + "height": 13, + "text": "Transform" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx0NxAV74n5k=", + "_parent": { + "$ref": "AAAAAAGDx0NxAV71UTI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1328, + "top": 848, + "width": 82.56396484375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx0NxAV75cq8=", + "_parent": { + "$ref": "AAAAAAGDx0NxAV71UTI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1328, + "top": 848, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 1104, + "top": 544, + "width": 188.572265625, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDx0NxAV724II=" + }, + "nameLabel": { + "$ref": "AAAAAAGDx0NxAV73bJI=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDx0NxAV74n5k=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDx0NxAV75cq8=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDx0NxAV76U7M=", + "_parent": { + "$ref": "AAAAAAGDx0NxAF70SLM=" + }, + "model": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "subViews": [ + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx0Qfhl8nxmc=", + "_parent": { + "$ref": "AAAAAAGDx0NxAV76U7M=" + }, + "model": { + "$ref": "AAAAAAGDx0QfPl8kKW4=" + }, + "font": "Arial;13;0", + "left": 1109, + "top": 574, + "width": 178.572265625, + "height": 13, + "text": "+X", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx0Qzcl8uYAM=", + "_parent": { + "$ref": "AAAAAAGDx0NxAV76U7M=" + }, + "model": { + "$ref": "AAAAAAGDx0QzKl8rVLg=" + }, + "font": "Arial;13;0", + "left": 1109, + "top": 589, + "width": 178.572265625, + "height": 13, + "text": "+Y", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx0REIl81Ksg=", + "_parent": { + "$ref": "AAAAAAGDx0NxAV76U7M=" + }, + "model": { + "$ref": "AAAAAAGDx0RD3l8yCx4=" + }, + "font": "Arial;13;0", + "left": 1109, + "top": 604, + "width": 178.572265625, + "height": 13, + "text": "+Zoom", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 1104, + "top": 569, + "width": 188.572265625, + "height": 53 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDx0NxAV77Vrc=", + "_parent": { + "$ref": "AAAAAAGDx0NxAF70SLM=" + }, + "model": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDx5JpIWAa/Cw=", + "_parent": { + "$ref": "AAAAAAGDx0NxAV77Vrc=" + }, + "model": { + "$ref": "AAAAAAGDx5JoyGAXQzs=" + }, + "font": "Arial;13;0", + "left": 1109, + "top": 627, + "width": 178.572265625, + "height": 13, + "text": "+getRealPoint(PointF pointf)", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 1104, + "top": 622, + "width": 188.572265625, + "height": 23 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDx0NxAV78Eec=", + "_parent": { + "$ref": "AAAAAAGDx0NxAF70SLM=" + }, + "model": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 664, + "top": 424, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDx0NxAl79EDg=", + "_parent": { + "$ref": "AAAAAAGDx0NxAF70SLM=" + }, + "model": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 664, + "top": 424, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 1104, + "top": 544, + "width": 188.572265625, + "height": 101, + "nameCompartment": { + "$ref": "AAAAAAGDx0NxAV71UTI=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDx0NxAV76U7M=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDx0NxAV77Vrc=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDx0NxAV78Eec=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDx0NxAl79EDg=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDx2Zbpl9DylM=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDx2Zbp19EJc0=", + "_parent": { + "$ref": "AAAAAAGDx2Zbpl9DylM=" + }, + "model": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDx2Zbp19FBk8=", + "_parent": { + "$ref": "AAAAAAGDx2Zbp19EJc0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1856, + "top": 368, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx2Zbp19GOBE=", + "_parent": { + "$ref": "AAAAAAGDx2Zbp19EJc0=" + }, + "font": "Arial;13;1", + "left": 1413, + "top": 519, + "width": 171.4248046875, + "height": 13, + "text": "PaperSize" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx2ZbqF9HgFo=", + "_parent": { + "$ref": "AAAAAAGDx2Zbp19EJc0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1856, + "top": 368, + "width": 82.56396484375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx2ZbqF9ImPk=", + "_parent": { + "$ref": "AAAAAAGDx2Zbp19EJc0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1856, + "top": 368, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 1408, + "top": 512, + "width": 181.4248046875, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDx2Zbp19FBk8=" + }, + "nameLabel": { + "$ref": "AAAAAAGDx2Zbp19GOBE=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDx2ZbqF9HgFo=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDx2ZbqF9ImPk=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDx2ZbqV9Jlog=", + "_parent": { + "$ref": "AAAAAAGDx2Zbpl9DylM=" + }, + "model": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "subViews": [ + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx2dVtV9uQeo=", + "_parent": { + "$ref": "AAAAAAGDx2ZbqV9Jlog=" + }, + "model": { + "$ref": "AAAAAAGDx2dVb19rxpI=" + }, + "font": "Arial;13;0", + "left": 1413, + "top": 542, + "width": 171.4248046875, + "height": 13, + "text": "+Width", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx2dr9l91EnA=", + "_parent": { + "$ref": "AAAAAAGDx2ZbqV9Jlog=" + }, + "model": { + "$ref": "AAAAAAGDx2drsl9yAcU=" + }, + "font": "Arial;13;0", + "left": 1413, + "top": 557, + "width": 171.4248046875, + "height": 13, + "text": "+Height", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx2ep4V98CJU=", + "_parent": { + "$ref": "AAAAAAGDx2ZbqV9Jlog=" + }, + "model": { + "$ref": "AAAAAAGDx2eppV95NZw=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 2189, + "top": 828, + "width": 171.4248046875, + "height": 13, + "text": "+Rows", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx2i+HV+ERl4=", + "_parent": { + "$ref": "AAAAAAGDx2ZbqV9Jlog=" + }, + "model": { + "$ref": "AAAAAAGDx2i95V+Bn1E=" + }, + "font": "Arial;13;0", + "left": 1413, + "top": 572, + "width": 171.4248046875, + "height": 13, + "text": "+Cols", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx2k2I1+LNL4=", + "_parent": { + "$ref": "AAAAAAGDx2ZbqV9Jlog=" + }, + "model": { + "$ref": "AAAAAAGDx2k14l+IzF0=" + }, + "font": "Arial;13;0", + "left": 1413, + "top": 587, + "width": 171.4248046875, + "height": 13, + "text": "+HorizontalRepeatDistance", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 1408, + "top": 537, + "width": 181.4248046875, + "height": 68 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDx2Zbql9Kllc=", + "_parent": { + "$ref": "AAAAAAGDx2Zbpl9DylM=" + }, + "model": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "font": "Arial;13;0", + "left": 1408, + "top": 605, + "width": 181.4248046875, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDx2Zbq19Lka0=", + "_parent": { + "$ref": "AAAAAAGDx2Zbpl9DylM=" + }, + "model": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 928, + "top": 184, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDx2Zbq19Ml9s=", + "_parent": { + "$ref": "AAAAAAGDx2Zbpl9DylM=" + }, + "model": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 928, + "top": 184, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 1408, + "top": 512, + "width": 181.4248046875, + "height": 118, + "nameCompartment": { + "$ref": "AAAAAAGDx2Zbp19EJc0=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDx2ZbqV9Jlog=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDx2Zbql9Kllc=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDx2Zbq19Lka0=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDx2Zbq19Ml9s=" + } + }, + { + "_type": "UMLInterfaceView", + "_id": "AAAAAAGDx2mSoF+SS88=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDx2mSn1+Q3sI=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDx2mSoF+TzVw=", + "_parent": { + "$ref": "AAAAAAGDx2mSoF+SS88=" + }, + "model": { + "$ref": "AAAAAAGDx2mSn1+Q3sI=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDx2mSoF+UgOM=", + "_parent": { + "$ref": "AAAAAAGDx2mSoF+TzVw=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -144, + "top": -816, + "width": 68.68798828125, + "height": 13, + "text": "«interface»" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx2mSoF+VBmY=", + "_parent": { + "$ref": "AAAAAAGDx2mSoF+TzVw=" + }, + "font": "Arial;13;1", + "left": 189, + "top": 46, + "width": 88.0419921875, + "height": 13, + "text": "IPrinterSelect" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx2mSoF+W2fk=", + "_parent": { + "$ref": "AAAAAAGDx2mSoF+TzVw=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -144, + "top": -816, + "width": 82.56396484375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx2mSoV+XIWU=", + "_parent": { + "$ref": "AAAAAAGDx2mSoF+TzVw=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -144, + "top": -816, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 184, + "top": 39, + "width": 98.0419921875, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDx2mSoF+UgOM=" + }, + "nameLabel": { + "$ref": "AAAAAAGDx2mSoF+VBmY=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDx2mSoF+W2fk=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDx2mSoV+XIWU=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDx2mSoV+YbDI=", + "_parent": { + "$ref": "AAAAAAGDx2mSoF+SS88=" + }, + "model": { + "$ref": "AAAAAAGDx2mSn1+Q3sI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -72, + "top": -408, + "width": 10, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDx2mSoV+ZC24=", + "_parent": { + "$ref": "AAAAAAGDx2mSoF+SS88=" + }, + "model": { + "$ref": "AAAAAAGDx2mSn1+Q3sI=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDx2nQXl++XnY=", + "_parent": { + "$ref": "AAAAAAGDx2mSoV+ZC24=" + }, + "model": { + "$ref": "AAAAAAGDx2nQHV+7Aaw=" + }, + "font": "Arial;13;0", + "left": 189, + "top": 69, + "width": 88.0419921875, + "height": 13, + "text": "+getPrinter()", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 184, + "top": 64, + "width": 98.0419921875, + "height": 23 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDx2mSoV+adHc=", + "_parent": { + "$ref": "AAAAAAGDx2mSoF+SS88=" + }, + "model": { + "$ref": "AAAAAAGDx2mSn1+Q3sI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -72, + "top": -408, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDx2mSoV+blrs=", + "_parent": { + "$ref": "AAAAAAGDx2mSoF+SS88=" + }, + "model": { + "$ref": "AAAAAAGDx2mSn1+Q3sI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -72, + "top": -408, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 184, + "top": 16, + "width": 98.0419921875, + "height": 72, + "stereotypeDisplay": "icon", + "nameCompartment": { + "$ref": "AAAAAAGDx2mSoF+TzVw=" + }, + "suppressAttributes": true, + "attributeCompartment": { + "$ref": "AAAAAAGDx2mSoV+YbDI=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDx2mSoV+ZC24=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDx2mSoV+adHc=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDx2mSoV+blrs=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDx3KhyV/QWFA=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDx3KhyV/Rb+U=", + "_parent": { + "$ref": "AAAAAAGDx3KhyV/QWFA=" + }, + "model": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDx3KhyV/SEfA=", + "_parent": { + "$ref": "AAAAAAGDx3KhyV/Rb+U=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1600, + "top": -336, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx3KhyV/T7Kc=", + "_parent": { + "$ref": "AAAAAAGDx3KhyV/Rb+U=" + }, + "font": "Arial;13;1", + "left": 877, + "top": 287, + "width": 164.43603515625, + "height": 13, + "text": "Shapes" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx3KhyV/U6Fg=", + "_parent": { + "$ref": "AAAAAAGDx3KhyV/Rb+U=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1600, + "top": -336, + "width": 82.56396484375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDx3Khyl/VcKg=", + "_parent": { + "$ref": "AAAAAAGDx3KhyV/Rb+U=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1600, + "top": -336, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 872, + "top": 280, + "width": 174.43603515625, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDx3KhyV/SEfA=" + }, + "nameLabel": { + "$ref": "AAAAAAGDx3KhyV/T7Kc=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDx3KhyV/U6Fg=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDx3Khyl/VcKg=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDx3Khyl/WDmU=", + "_parent": { + "$ref": "AAAAAAGDx3KhyV/QWFA=" + }, + "model": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "subViews": [ + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx3K881/86mY=", + "_parent": { + "$ref": "AAAAAAGDx3Khyl/WDmU=" + }, + "model": { + "$ref": "AAAAAAGDx3K8tl/5O1I=" + }, + "font": "Arial;13;0", + "left": 877, + "top": 310, + "width": 164.43603515625, + "height": 13, + "text": "+lstShape: List", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx3L8K2AD8rI=", + "_parent": { + "$ref": "AAAAAAGDx3Khyl/WDmU=" + }, + "model": { + "$ref": "AAAAAAGDx3L77WAA8tk=" + }, + "font": "Arial;13;0", + "left": 877, + "top": 325, + "width": 164.43603515625, + "height": 13, + "text": "+Transform: Transform", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDx4X7lmAOJgA=", + "_parent": { + "$ref": "AAAAAAGDx3Khyl/WDmU=" + }, + "model": { + "$ref": "AAAAAAGDx4X7WWALEus=" + }, + "font": "Arial;13;0", + "left": 877, + "top": 340, + "width": 164.43603515625, + "height": 13, + "text": "+PaperSize: PaperSize", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 872, + "top": 305, + "width": 174.43603515625, + "height": 53 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDx3Khyl/X3xs=", + "_parent": { + "$ref": "AAAAAAGDx3KhyV/QWFA=" + }, + "model": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDykFn6MWmh74=", + "_parent": { + "$ref": "AAAAAAGDx3Khyl/X3xs=" + }, + "model": { + "$ref": "AAAAAAGDykFncMWj2yA=" + }, + "font": "Arial;13;0", + "left": 877, + "top": 363, + "width": 164.43603515625, + "height": 13, + "text": "+getSelectShapes()", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDykHwjsWu4PE=", + "_parent": { + "$ref": "AAAAAAGDx3Khyl/X3xs=" + }, + "model": { + "$ref": "AAAAAAGDykHwQ8WrTAg=" + }, + "font": "Arial;13;0", + "left": 877, + "top": 378, + "width": 164.43603515625, + "height": 13, + "text": "+DrawWithBack(Graphics g)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDzDOw2sqkZ1Q=", + "_parent": { + "$ref": "AAAAAAGDx3Khyl/X3xs=" + }, + "model": { + "$ref": "AAAAAAGDzDOwl8qhiuY=" + }, + "font": "Arial;13;0", + "left": 877, + "top": 393, + "width": 164.43603515625, + "height": 13, + "text": "+getNextId()", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 872, + "top": 358, + "width": 174.43603515625, + "height": 53 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDx3Khyl/Y4yw=", + "_parent": { + "$ref": "AAAAAAGDx3KhyV/QWFA=" + }, + "model": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 800, + "top": -168, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDx3Khyl/Z7OM=", + "_parent": { + "$ref": "AAAAAAGDx3KhyV/QWFA=" + }, + "model": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 800, + "top": -168, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 872, + "top": 280, + "width": 174.43603515625, + "height": 131, + "nameCompartment": { + "$ref": "AAAAAAGDx3KhyV/Rb+U=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDx3Khyl/WDmU=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDx3Khyl/X3xs=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDx3Khyl/Y4yw=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDx3Khyl/Z7OM=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyh4vNsTwFZ8=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyh4vN8TxPQg=", + "_parent": { + "$ref": "AAAAAAGDyh4vNsTwFZ8=" + }, + "model": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyh4vN8TywKA=", + "_parent": { + "$ref": "AAAAAAGDyh4vN8TxPQg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1344, + "top": 816, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyh4vN8TzuSU=", + "_parent": { + "$ref": "AAAAAAGDyh4vN8TxPQg=" + }, + "font": "Arial;13;3", + "left": 861, + "top": 503, + "width": 201.43017578125, + "height": 13, + "text": "ShapeEle" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyh4vN8T0UOw=", + "_parent": { + "$ref": "AAAAAAGDyh4vN8TxPQg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1344, + "top": 816, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyh4vN8T1Leo=", + "_parent": { + "$ref": "AAAAAAGDyh4vN8TxPQg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1344, + "top": 816, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 856, + "top": 496, + "width": 211.43017578125, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyh4vN8TywKA=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyh4vN8TzuSU=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyh4vN8T0UOw=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyh4vN8T1Leo=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyh4vOMT21rI=", + "_parent": { + "$ref": "AAAAAAGDyh4vNsTwFZ8=" + }, + "model": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "subViews": [ + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDzDKxW8qXoaI=", + "_parent": { + "$ref": "AAAAAAGDyh4vOMT21rI=" + }, + "model": { + "$ref": "AAAAAAGDzDKw6cqUZHM=" + }, + "font": "Arial;13;0", + "left": 861, + "top": 526, + "width": 201.43017578125, + "height": 13, + "text": "+Id", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyh5oMsUc12M=", + "_parent": { + "$ref": "AAAAAAGDyh4vOMT21rI=" + }, + "model": { + "$ref": "AAAAAAGDyh5n3sUZxIU=" + }, + "font": "Arial;13;0", + "left": 861, + "top": 541, + "width": 201.43017578125, + "height": 13, + "text": "+X", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyh6Aj8UjWVA=", + "_parent": { + "$ref": "AAAAAAGDyh4vOMT21rI=" + }, + "model": { + "$ref": "AAAAAAGDyh6ASsUgI5U=" + }, + "font": "Arial;13;0", + "left": 861, + "top": 556, + "width": 201.43017578125, + "height": 13, + "text": "+Y", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyh6QCMUqH1s=", + "_parent": { + "$ref": "AAAAAAGDyh4vOMT21rI=" + }, + "model": { + "$ref": "AAAAAAGDyh6PxcUn+4Q=" + }, + "font": "Arial;13;0", + "left": 861, + "top": 571, + "width": 201.43017578125, + "height": 13, + "text": "+Width", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyh6ijsUx9/U=", + "_parent": { + "$ref": "AAAAAAGDyh4vOMT21rI=" + }, + "model": { + "$ref": "AAAAAAGDyh6iZcUurOo=" + }, + "font": "Arial;13;0", + "left": 861, + "top": 586, + "width": 201.43017578125, + "height": 13, + "text": "+Height", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyh613sU4Jq8=", + "_parent": { + "$ref": "AAAAAAGDyh4vOMT21rI=" + }, + "model": { + "$ref": "AAAAAAGDyh61rcU1ruM=" + }, + "font": "Arial;13;0", + "left": 861, + "top": 601, + "width": 201.43017578125, + "height": 13, + "text": "+Angle", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 856, + "top": 521, + "width": 211.43017578125, + "height": 98 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyh4vOMT3Ssw=", + "_parent": { + "$ref": "AAAAAAGDyh4vNsTwFZ8=" + }, + "model": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDyh7yW8VIt3s=", + "_parent": { + "$ref": "AAAAAAGDyh4vOMT3Ssw=" + }, + "model": { + "$ref": "AAAAAAGDyh7yIcVFzos=" + }, + "font": "Arial;13;0", + "left": 861, + "top": 624, + "width": 201.43017578125, + "height": 13, + "text": "+Draw(Graphics g, Transform tran)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDyh/5hcVVLJ0=", + "_parent": { + "$ref": "AAAAAAGDyh4vOMT3Ssw=" + }, + "model": { + "$ref": "AAAAAAGDyh/5RcVSgws=" + }, + "font": "Arial;13;0", + "left": 861, + "top": 639, + "width": 201.43017578125, + "height": 13, + "text": "+isContains(PointF MousePoint)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDyiASz8VeVjs=", + "_parent": { + "$ref": "AAAAAAGDyh4vOMT3Ssw=" + }, + "model": { + "$ref": "AAAAAAGDyiASjcVbuN8=" + }, + "font": "Arial;13;0", + "left": 861, + "top": 654, + "width": 201.43017578125, + "height": 13, + "text": "+isContains(RectangleF rect)", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 856, + "top": 619, + "width": 211.43017578125, + "height": 53 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyh4vOMT4JLQ=", + "_parent": { + "$ref": "AAAAAAGDyh4vNsTwFZ8=" + }, + "model": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 672, + "top": 408, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyh4vOMT5d1A=", + "_parent": { + "$ref": "AAAAAAGDyh4vNsTwFZ8=" + }, + "model": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 672, + "top": 408, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 856, + "top": 496, + "width": 211.43017578125, + "height": 176, + "nameCompartment": { + "$ref": "AAAAAAGDyh4vN8TxPQg=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyh4vOMT21rI=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyh4vOMT3Ssw=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyh4vOMT4JLQ=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyh4vOMT5d1A=" + } + }, + { + "_type": "UMLNoteView", + "_id": "AAAAAAGDyin2x8WR0+4=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "font": "Arial;13;0", + "left": 1304, + "top": 568, + "width": 100, + "height": 50, + "text": "偏离的。" + }, + { + "_type": "UMLNoteLinkView", + "_id": "AAAAAAGDyin3C8WU9ac=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDyin2x8WR0+4=" + }, + "tail": { + "$ref": "AAAAAAGDx0NxAF70SLM=" + }, + "lineStyle": 1, + "points": "1293:593;1303:593" + }, + { + "_type": "UMLDependencyView", + "_id": "AAAAAAGDykLTDsW2Uc4=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDykLTDMW0tc0=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDykLTD8W35hc=", + "_parent": { + "$ref": "AAAAAAGDykLTDsW2Uc4=" + }, + "model": { + "$ref": "AAAAAAGDykLTDMW0tc0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 973, + "top": 446, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDykLTDsW2Uc4=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDykLTEMW4buc=", + "_parent": { + "$ref": "AAAAAAGDykLTDsW2Uc4=" + }, + "model": { + "$ref": "AAAAAAGDykLTDMW0tc0=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 988, + "top": 446, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDykLTDsW2Uc4=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDykLTEMW5YM4=", + "_parent": { + "$ref": "AAAAAAGDykLTDsW2Uc4=" + }, + "model": { + "$ref": "AAAAAAGDykLTDMW0tc0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 944, + "top": 447, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDykLTDsW2Uc4=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDyh4vNsTwFZ8=" + }, + "tail": { + "$ref": "AAAAAAGDx3KhyV/QWFA=" + }, + "lineStyle": 1, + "points": "959:411;960:495", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDykLTD8W35hc=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDykLTEMW4buc=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDykLTEMW5YM4=" + } + }, + { + "_type": "UMLDependencyView", + "_id": "AAAAAAGDykLgs8XHsMA=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDykLgs8XFTXQ=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDykLgs8XIOXA=", + "_parent": { + "$ref": "AAAAAAGDykLgs8XHsMA=" + }, + "model": { + "$ref": "AAAAAAGDykLgs8XFTXQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1094, + "top": 460, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDykLgs8XHsMA=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDykLgs8XJeEk=", + "_parent": { + "$ref": "AAAAAAGDykLgs8XHsMA=" + }, + "model": { + "$ref": "AAAAAAGDykLgs8XFTXQ=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1105, + "top": 450, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDykLgs8XHsMA=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDykLgs8XKYLg=", + "_parent": { + "$ref": "AAAAAAGDykLgs8XHsMA=" + }, + "model": { + "$ref": "AAAAAAGDykLgs8XFTXQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1073, + "top": 481, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDykLgs8XHsMA=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDx0NxAF70SLM=" + }, + "tail": { + "$ref": "AAAAAAGDx3KhyV/QWFA=" + }, + "lineStyle": 1, + "points": "1021:411;1148:543", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDykLgs8XIOXA=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDykLgs8XJeEk=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDykLgs8XKYLg=" + } + }, + { + "_type": "UMLDependencyView", + "_id": "AAAAAAGDykLugcXYHuA=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDykLugcXWEQM=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDykLugsXZ8yg=", + "_parent": { + "$ref": "AAAAAAGDykLugcXYHuA=" + }, + "model": { + "$ref": "AAAAAAGDykLugcXWEQM=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1231, + "top": 437, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDykLugcXYHuA=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDykLugsXahuw=", + "_parent": { + "$ref": "AAAAAAGDykLugcXYHuA=" + }, + "model": { + "$ref": "AAAAAAGDykLugcXWEQM=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1237, + "top": 423, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDykLugcXYHuA=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDykLugsXbbf0=", + "_parent": { + "$ref": "AAAAAAGDykLugcXYHuA=" + }, + "model": { + "$ref": "AAAAAAGDykLugcXWEQM=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1220, + "top": 464, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDykLugcXYHuA=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDx2Zbpl9DylM=" + }, + "tail": { + "$ref": "AAAAAAGDx3KhyV/QWFA=" + }, + "lineStyle": 1, + "points": "1046:382;1407:532", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDykLugsXZ8yg=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDykLugsXahuw=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDykLugsXbbf0=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyk0FJcXqOs8=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyk0FJMXo3AQ=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyk0FJcXrPOY=", + "_parent": { + "$ref": "AAAAAAGDyk0FJcXqOs8=" + }, + "model": { + "$ref": "AAAAAAGDyk0FJMXo3AQ=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyk0FJsXsEDM=", + "_parent": { + "$ref": "AAAAAAGDyk0FJcXrPOY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -976, + "top": 16, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyk0FJsXt+Tw=", + "_parent": { + "$ref": "AAAAAAGDyk0FJcXrPOY=" + }, + "font": "Arial;13;1", + "left": 45, + "top": 87, + "width": 81.630859375, + "height": 13, + "text": "PrintBarcode" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyk0FJsXuwBQ=", + "_parent": { + "$ref": "AAAAAAGDyk0FJcXrPOY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -976, + "top": 16, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyk0FJsXv45s=", + "_parent": { + "$ref": "AAAAAAGDyk0FJcXrPOY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -976, + "top": 16, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 40, + "top": 80, + "width": 91.630859375, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyk0FJsXsEDM=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyk0FJsXt+Tw=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyk0FJsXuwBQ=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyk0FJsXv45s=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyk0FJsXwkrU=", + "_parent": { + "$ref": "AAAAAAGDyk0FJcXqOs8=" + }, + "model": { + "$ref": "AAAAAAGDyk0FJMXo3AQ=" + }, + "font": "Arial;13;0", + "left": 40, + "top": 105, + "width": 91.630859375, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyk0FJsXxBzU=", + "_parent": { + "$ref": "AAAAAAGDyk0FJcXqOs8=" + }, + "model": { + "$ref": "AAAAAAGDyk0FJMXo3AQ=" + }, + "font": "Arial;13;0", + "left": 40, + "top": 115, + "width": 91.630859375, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyk0FJ8XyEo8=", + "_parent": { + "$ref": "AAAAAAGDyk0FJcXqOs8=" + }, + "model": { + "$ref": "AAAAAAGDyk0FJMXo3AQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -488, + "top": 8, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyk0FJ8XzKVk=", + "_parent": { + "$ref": "AAAAAAGDyk0FJcXqOs8=" + }, + "model": { + "$ref": "AAAAAAGDyk0FJMXo3AQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -488, + "top": 8, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 40, + "top": 80, + "width": 91.630859375, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDyk0FJcXrPOY=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyk0FJsXwkrU=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyk0FJsXxBzU=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyk0FJ8XyEo8=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyk0FJ8XzKVk=" + } + }, + { + "_type": "UMLInterfaceView", + "_id": "AAAAAAGDyljOpMYZupw=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyljOpMYaRHE=", + "_parent": { + "$ref": "AAAAAAGDyljOpMYZupw=" + }, + "model": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyljOpMYbgvE=", + "_parent": { + "$ref": "AAAAAAGDyljOpMYaRHE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 768, + "top": -128, + "width": 64.32080078125, + "height": 13, + "text": "«interface»" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyljOpMYcpZw=", + "_parent": { + "$ref": "AAAAAAGDyljOpMYaRHE=" + }, + "font": "Arial;13;1", + "left": 821, + "top": 47, + "width": 167, + "height": 13, + "text": "IInvoke" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyljOpcYd+Ew=", + "_parent": { + "$ref": "AAAAAAGDyljOpMYaRHE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 768, + "top": -128, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyljOpcYeR2o=", + "_parent": { + "$ref": "AAAAAAGDyljOpMYaRHE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 768, + "top": -128, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 816, + "top": 40, + "width": 177, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyljOpMYbgvE=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyljOpMYcpZw=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyljOpcYd+Ew=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyljOpcYeR2o=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyljOpcYfSz8=", + "_parent": { + "$ref": "AAAAAAGDyljOpMYZupw=" + }, + "model": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 384, + "top": -64, + "width": 10, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyljOpcYgeHU=", + "_parent": { + "$ref": "AAAAAAGDyljOpMYZupw=" + }, + "model": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDylkk9MZGH5c=", + "_parent": { + "$ref": "AAAAAAGDyljOpcYgeHU=" + }, + "model": { + "$ref": "AAAAAAGDylkkT8ZD/mI=" + }, + "font": "Arial;13;0", + "left": 821, + "top": 70, + "width": 167, + "height": 13, + "text": "+ExecuteCommand()", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 816, + "top": 65, + "width": 177, + "height": 23 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyljOpcYhORc=", + "_parent": { + "$ref": "AAAAAAGDyljOpMYZupw=" + }, + "model": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 384, + "top": -64, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyljOpcYijUg=", + "_parent": { + "$ref": "AAAAAAGDyljOpMYZupw=" + }, + "model": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 384, + "top": -64, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 816, + "top": 16, + "width": 177, + "height": 73, + "stereotypeDisplay": "icon", + "nameCompartment": { + "$ref": "AAAAAAGDyljOpMYaRHE=" + }, + "suppressAttributes": true, + "attributeCompartment": { + "$ref": "AAAAAAGDyljOpcYfSz8=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyljOpcYgeHU=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyljOpcYhORc=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyljOpcYijUg=" + } + }, + { + "_type": "UMLNoteView", + "_id": "AAAAAAGDylmIQ8ZKbsM=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "font": "Arial;13;0", + "left": 1056, + "top": 16, + "width": 150, + "height": 50, + "text": "负责命令对象请求执行" + }, + { + "_type": "UMLNoteLinkView", + "_id": "AAAAAAGDylmJEMZNxEU=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDylmIQ8ZKbsM=" + }, + "tail": { + "$ref": "AAAAAAGDyljOpMYZupw=" + }, + "lineStyle": 1, + "points": "993:47;1055:44" + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDylz9Gsa/wNk=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDylz9HMbAO6M=", + "_parent": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "model": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDylz9HcbBSaE=", + "_parent": { + "$ref": "AAAAAAGDylz9HMbAO6M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1024, + "top": -96, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDylz9HcbCzmE=", + "_parent": { + "$ref": "AAAAAAGDylz9HMbAO6M=" + }, + "font": "Arial;13;3", + "left": 1453, + "top": 167, + "width": 52, + "height": 13, + "text": "Comand" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDylz9HcbD7FE=", + "_parent": { + "$ref": "AAAAAAGDylz9HMbAO6M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1024, + "top": -96, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDylz9HcbEiC4=", + "_parent": { + "$ref": "AAAAAAGDylz9HMbAO6M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1024, + "top": -96, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 1448, + "top": 160, + "width": 62, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDylz9HcbBSaE=" + }, + "nameLabel": { + "$ref": "AAAAAAGDylz9HcbCzmE=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDylz9HcbD7FE=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDylz9HcbEiC4=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDylz9HcbFC1M=", + "_parent": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "model": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + }, + "font": "Arial;13;0", + "left": 1448, + "top": 185, + "width": 62, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDylz9HsbG0U0=", + "_parent": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "model": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + }, + "font": "Arial;13;0", + "left": 1448, + "top": 195, + "width": 62, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDylz9HsbHk+I=", + "_parent": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "model": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 512, + "top": -48, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDylz9HsbIVis=", + "_parent": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "model": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 512, + "top": -48, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 1448, + "top": 160, + "width": 62, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDylz9HMbAO6M=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDylz9HcbFC1M=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDylz9HsbG0U0=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDylz9HsbHk+I=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDylz9HsbIVis=" + } + }, + { + "_type": "UMLInterfaceView", + "_id": "AAAAAAGDyobTDMbwtO4=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyobTCMbujUw=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyobTDMbxE5Q=", + "_parent": { + "$ref": "AAAAAAGDyobTDMbwtO4=" + }, + "model": { + "$ref": "AAAAAAGDyobTCMbujUw=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyobTDcbyxHU=", + "_parent": { + "$ref": "AAAAAAGDyobTDMbxE5Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -32, + "top": -128, + "width": 64.32080078125, + "height": 13, + "text": "«interface»" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyobTDcbzd2U=", + "_parent": { + "$ref": "AAAAAAGDyobTDMbxE5Q=" + }, + "font": "Arial;13;1", + "left": 573, + "top": 38, + "width": 218.5625, + "height": 13, + "text": "CommandRecorder" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyobTDcb0Ywo=", + "_parent": { + "$ref": "AAAAAAGDyobTDMbxE5Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -32, + "top": -128, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyobTDcb1hAU=", + "_parent": { + "$ref": "AAAAAAGDyobTDMbxE5Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -32, + "top": -128, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 568, + "top": 31, + "width": 228.5625, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyobTDcbyxHU=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyobTDcbzd2U=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyobTDcb0Ywo=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyobTDcb1hAU=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyobTDcb2CN0=", + "_parent": { + "$ref": "AAAAAAGDyobTDMbwtO4=" + }, + "model": { + "$ref": "AAAAAAGDyobTCMbujUw=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -16, + "top": -64, + "width": 10, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyobTDcb304E=", + "_parent": { + "$ref": "AAAAAAGDyobTDMbwtO4=" + }, + "model": { + "$ref": "AAAAAAGDyobTCMbujUw=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDyocY3scdhec=", + "_parent": { + "$ref": "AAAAAAGDyobTDcb304E=" + }, + "model": { + "$ref": "AAAAAAGDyocYm8caZbo=" + }, + "font": "Arial;13;0", + "left": 573, + "top": 61, + "width": 218.5625, + "height": 13, + "text": "+addCommand(Command command)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDyodVPscoTiE=", + "_parent": { + "$ref": "AAAAAAGDyobTDcb304E=" + }, + "model": { + "$ref": "AAAAAAGDyodU8sclSGc=" + }, + "font": "Arial;13;0", + "left": 573, + "top": 76, + "width": 218.5625, + "height": 13, + "text": "+Undo()", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDyodzRccv6uM=", + "_parent": { + "$ref": "AAAAAAGDyobTDcb304E=" + }, + "model": { + "$ref": "AAAAAAGDyodyzscsGaw=" + }, + "font": "Arial;13;0", + "left": 573, + "top": 91, + "width": 218.5625, + "height": 13, + "text": "+Redo()", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 568, + "top": 56, + "width": 228.5625, + "height": 53 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyobTDsb4fC4=", + "_parent": { + "$ref": "AAAAAAGDyobTDMbwtO4=" + }, + "model": { + "$ref": "AAAAAAGDyobTCMbujUw=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -16, + "top": -64, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyobTDsb5Xnk=", + "_parent": { + "$ref": "AAAAAAGDyobTDMbwtO4=" + }, + "model": { + "$ref": "AAAAAAGDyobTCMbujUw=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -16, + "top": -64, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 568, + "top": 8, + "width": 228.5625, + "height": 102, + "stereotypeDisplay": "icon", + "nameCompartment": { + "$ref": "AAAAAAGDyobTDMbxE5Q=" + }, + "suppressAttributes": true, + "attributeCompartment": { + "$ref": "AAAAAAGDyobTDcb2CN0=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyobTDcb304E=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyobTDsb4fC4=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyobTDsb5Xnk=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyuWQZsdDCPY=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyuWQV8dBE4E=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyuWQZsdEy0s=", + "_parent": { + "$ref": "AAAAAAGDyuWQZsdDCPY=" + }, + "model": { + "$ref": "AAAAAAGDyuWQV8dBE4E=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyuWQZ8dF1rs=", + "_parent": { + "$ref": "AAAAAAGDyuWQZsdEy0s=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 624, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuWQZ8dGuR8=", + "_parent": { + "$ref": "AAAAAAGDyuWQZsdEy0s=" + }, + "font": "Arial;13;1", + "left": 1437, + "top": 295, + "width": 96.7890625, + "height": 13, + "text": "MoveCommand" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuWQZ8dHmF8=", + "_parent": { + "$ref": "AAAAAAGDyuWQZsdEy0s=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 624, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuWQZ8dIuIY=", + "_parent": { + "$ref": "AAAAAAGDyuWQZsdEy0s=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 624, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 1432, + "top": 288, + "width": 106.7890625, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyuWQZ8dF1rs=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyuWQZ8dGuR8=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyuWQZ8dHmF8=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyuWQZ8dIuIY=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyuWQZ8dJoJE=", + "_parent": { + "$ref": "AAAAAAGDyuWQZsdDCPY=" + }, + "model": { + "$ref": "AAAAAAGDyuWQV8dBE4E=" + }, + "font": "Arial;13;0", + "left": 1432, + "top": 313, + "width": 106.7890625, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyuWQZ8dK+/I=", + "_parent": { + "$ref": "AAAAAAGDyuWQZsdDCPY=" + }, + "model": { + "$ref": "AAAAAAGDyuWQV8dBE4E=" + }, + "font": "Arial;13;0", + "left": 1432, + "top": 323, + "width": 106.7890625, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyuWQaMdLoVk=", + "_parent": { + "$ref": "AAAAAAGDyuWQZsdDCPY=" + }, + "model": { + "$ref": "AAAAAAGDyuWQV8dBE4E=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 312, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyuWQaMdMexg=", + "_parent": { + "$ref": "AAAAAAGDyuWQZsdDCPY=" + }, + "model": { + "$ref": "AAAAAAGDyuWQV8dBE4E=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 312, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 1432, + "top": 288, + "width": 106.7890625, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDyuWQZsdEy0s=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyuWQZ8dJoJE=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyuWQZ8dK+/I=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyuWQaMdLoVk=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyuWQaMdMexg=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyuXGRcdu1ow=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyuXGRcdsOvE=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyuXGRcdvF3Q=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdu1ow=" + }, + "model": { + "$ref": "AAAAAAGDyuXGRcdsOvE=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyuXGR8dwqkQ=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdvF3Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 624, + "top": -32, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuXGR8dxkKI=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdvF3Q=" + }, + "font": "Arial;13;1", + "left": 1589, + "top": 295, + "width": 104.7490234375, + "height": 13, + "text": "ResizeCommand" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuXGSMdycQ0=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdvF3Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 624, + "top": -32, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuXGSMdzNzA=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdvF3Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 624, + "top": -32, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 1584, + "top": 288, + "width": 114.7490234375, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyuXGR8dwqkQ=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyuXGR8dxkKI=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyuXGSMdycQ0=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyuXGSMdzNzA=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyuXGSMd0zgM=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdu1ow=" + }, + "model": { + "$ref": "AAAAAAGDyuXGRcdsOvE=" + }, + "font": "Arial;13;0", + "left": 1584, + "top": 313, + "width": 114.7490234375, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyuXGSMd1h/o=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdu1ow=" + }, + "model": { + "$ref": "AAAAAAGDyuXGRcdsOvE=" + }, + "font": "Arial;13;0", + "left": 1584, + "top": 323, + "width": 114.7490234375, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyuXGScd2isI=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdu1ow=" + }, + "model": { + "$ref": "AAAAAAGDyuXGRcdsOvE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 312, + "top": -16, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyuXGScd33AA=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdu1ow=" + }, + "model": { + "$ref": "AAAAAAGDyuXGRcdsOvE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 312, + "top": -16, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 1584, + "top": 288, + "width": 114.7490234375, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDyuXGRcdvF3Q=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyuXGSMd0zgM=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyuXGSMd1h/o=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyuXGScd2isI=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyuXGScd33AA=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyuYMw8eZ8Z8=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyuYMwceXf8M=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyuYM1cea1Rs=", + "_parent": { + "$ref": "AAAAAAGDyuYMw8eZ8Z8=" + }, + "model": { + "$ref": "AAAAAAGDyuYMwceXf8M=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyuYM1cebqPs=", + "_parent": { + "$ref": "AAAAAAGDyuYM1cea1Rs=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 672, + "top": -48, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuYM1secJQc=", + "_parent": { + "$ref": "AAAAAAGDyuYM1cea1Rs=" + }, + "font": "Arial;13;1", + "left": 1765, + "top": 295, + "width": 88.8291015625, + "height": 13, + "text": "AddCommand" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuYM1sedFHg=", + "_parent": { + "$ref": "AAAAAAGDyuYM1cea1Rs=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 672, + "top": -48, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuYM1seeqrE=", + "_parent": { + "$ref": "AAAAAAGDyuYM1cea1Rs=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 672, + "top": -48, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 1760, + "top": 288, + "width": 98.8291015625, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyuYM1cebqPs=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyuYM1secJQc=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyuYM1sedFHg=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyuYM1seeqrE=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyuYM1sefwFo=", + "_parent": { + "$ref": "AAAAAAGDyuYMw8eZ8Z8=" + }, + "model": { + "$ref": "AAAAAAGDyuYMwceXf8M=" + }, + "font": "Arial;13;0", + "left": 1760, + "top": 313, + "width": 98.8291015625, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyuYM1seg+xU=", + "_parent": { + "$ref": "AAAAAAGDyuYMw8eZ8Z8=" + }, + "model": { + "$ref": "AAAAAAGDyuYMwceXf8M=" + }, + "font": "Arial;13;0", + "left": 1760, + "top": 323, + "width": 98.8291015625, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyuYM1sehkbM=", + "_parent": { + "$ref": "AAAAAAGDyuYMw8eZ8Z8=" + }, + "model": { + "$ref": "AAAAAAGDyuYMwceXf8M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 336, + "top": -24, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyuYM1seihzc=", + "_parent": { + "$ref": "AAAAAAGDyuYMw8eZ8Z8=" + }, + "model": { + "$ref": "AAAAAAGDyuYMwceXf8M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 336, + "top": -24, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 1760, + "top": 288, + "width": 98.8291015625, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDyuYM1cea1Rs=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyuYM1sefwFo=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyuYM1seg+xU=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyuYM1sehkbM=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyuYM1seihzc=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyuZ5MsfFZzs=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyuZ5MsfDAgY=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyuZ5M8fGXds=", + "_parent": { + "$ref": "AAAAAAGDyuZ5MsfFZzs=" + }, + "model": { + "$ref": "AAAAAAGDyuZ5MsfDAgY=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyuZ5M8fHdos=", + "_parent": { + "$ref": "AAAAAAGDyuZ5M8fGXds=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 752, + "top": -32, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuZ5M8fIOh4=", + "_parent": { + "$ref": "AAAAAAGDyuZ5M8fGXds=" + }, + "font": "Arial;13;1", + "left": 1917, + "top": 295, + "width": 102.578125, + "height": 13, + "text": "DeleteCommand" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuZ5M8fJwDU=", + "_parent": { + "$ref": "AAAAAAGDyuZ5M8fGXds=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 752, + "top": -32, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyuZ5M8fK31M=", + "_parent": { + "$ref": "AAAAAAGDyuZ5M8fGXds=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 752, + "top": -32, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 1912, + "top": 288, + "width": 112.578125, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyuZ5M8fHdos=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyuZ5M8fIOh4=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyuZ5M8fJwDU=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyuZ5M8fK31M=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyuZ5M8fLlqI=", + "_parent": { + "$ref": "AAAAAAGDyuZ5MsfFZzs=" + }, + "model": { + "$ref": "AAAAAAGDyuZ5MsfDAgY=" + }, + "font": "Arial;13;0", + "left": 1912, + "top": 313, + "width": 112.578125, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyuZ5M8fMMoM=", + "_parent": { + "$ref": "AAAAAAGDyuZ5MsfFZzs=" + }, + "model": { + "$ref": "AAAAAAGDyuZ5MsfDAgY=" + }, + "font": "Arial;13;0", + "left": 1912, + "top": 323, + "width": 112.578125, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyuZ5M8fNSfc=", + "_parent": { + "$ref": "AAAAAAGDyuZ5MsfFZzs=" + }, + "model": { + "$ref": "AAAAAAGDyuZ5MsfDAgY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 376, + "top": -16, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyuZ5NMfOgMQ=", + "_parent": { + "$ref": "AAAAAAGDyuZ5MsfFZzs=" + }, + "model": { + "$ref": "AAAAAAGDyuZ5MsfDAgY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 376, + "top": -16, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 1912, + "top": 288, + "width": 112.578125, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDyuZ5M8fGXds=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyuZ5M8fLlqI=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyuZ5M8fMMoM=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyuZ5M8fNSfc=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyuZ5NMfOgMQ=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyua3Y8fw/qA=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyua3YsfuUVc=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyua3Y8fxIjk=", + "_parent": { + "$ref": "AAAAAAGDyua3Y8fw/qA=" + }, + "model": { + "$ref": "AAAAAAGDyua3YsfuUVc=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyua3ZMfySCE=", + "_parent": { + "$ref": "AAAAAAGDyua3Y8fxIjk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 672, + "top": -16, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyua3ZMfzKIw=", + "_parent": { + "$ref": "AAAAAAGDyua3Y8fxIjk=" + }, + "font": "Arial;13;1", + "left": 2077, + "top": 295, + "width": 172.630859375, + "height": 13, + "text": "PropertyChangedCommand" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyua3Zcf0qR4=", + "_parent": { + "$ref": "AAAAAAGDyua3Y8fxIjk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 672, + "top": -16, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyua3Zsf1fmw=", + "_parent": { + "$ref": "AAAAAAGDyua3Y8fxIjk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 672, + "top": -16, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 2072, + "top": 288, + "width": 182.630859375, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyua3ZMfySCE=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyua3ZMfzKIw=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyua3Zcf0qR4=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyua3Zsf1fmw=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyua3Zsf22Z8=", + "_parent": { + "$ref": "AAAAAAGDyua3Y8fw/qA=" + }, + "model": { + "$ref": "AAAAAAGDyua3YsfuUVc=" + }, + "font": "Arial;13;0", + "left": 2072, + "top": 313, + "width": 182.630859375, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyua3Zsf34dY=", + "_parent": { + "$ref": "AAAAAAGDyua3Y8fw/qA=" + }, + "model": { + "$ref": "AAAAAAGDyua3YsfuUVc=" + }, + "font": "Arial;13;0", + "left": 2072, + "top": 323, + "width": 182.630859375, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyua3Zsf4S0w=", + "_parent": { + "$ref": "AAAAAAGDyua3Y8fw/qA=" + }, + "model": { + "$ref": "AAAAAAGDyua3YsfuUVc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 336, + "top": -8, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyua3Zsf5AKU=", + "_parent": { + "$ref": "AAAAAAGDyua3Y8fw/qA=" + }, + "model": { + "$ref": "AAAAAAGDyua3YsfuUVc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 336, + "top": -8, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 2072, + "top": 288, + "width": 182.630859375, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDyua3Y8fxIjk=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyua3Zsf22Z8=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyua3Zsf34dY=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyua3Zsf4S0w=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyua3Zsf5AKU=" + } + }, + { + "_type": "UMLGeneralizationView", + "_id": "AAAAAAGDyucRWMgbxIc=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyucRWMgZ+5k=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyucRWsgcUv0=", + "_parent": { + "$ref": "AAAAAAGDyucRWMgbxIc=" + }, + "model": { + "$ref": "AAAAAAGDyucRWMgZ+5k=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1466, + "top": 240, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyucRWMgbxIc=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyucRWsgdBPA=", + "_parent": { + "$ref": "AAAAAAGDyucRWMgbxIc=" + }, + "model": { + "$ref": "AAAAAAGDyucRWMgZ+5k=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1451, + "top": 241, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDyucRWMgbxIc=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyucRWsgei/w=", + "_parent": { + "$ref": "AAAAAAGDyucRWMgbxIc=" + }, + "model": { + "$ref": "AAAAAAGDyucRWMgZ+5k=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1495, + "top": 239, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyucRWMgbxIc=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "tail": { + "$ref": "AAAAAAGDyuWQZsdDCPY=" + }, + "lineStyle": 1, + "points": "1483:287;1479:205", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDyucRWsgcUv0=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDyucRWsgdBPA=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyucRWsgei/w=" + } + }, + { + "_type": "UMLGeneralizationView", + "_id": "AAAAAAGDyuc34cgsbGM=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyuc34cgqcEs=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyuc34cgtF6c=", + "_parent": { + "$ref": "AAAAAAGDyuc34cgsbGM=" + }, + "model": { + "$ref": "AAAAAAGDyuc34cgqcEs=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1549, + "top": 251, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyuc34cgsbGM=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyuc34cguPOA=", + "_parent": { + "$ref": "AAAAAAGDyuc34cgsbGM=" + }, + "model": { + "$ref": "AAAAAAGDyuc34cgqcEs=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1540, + "top": 263, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDyuc34cgsbGM=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyuc34cgvD7k=", + "_parent": { + "$ref": "AAAAAAGDyuc34cgsbGM=" + }, + "model": { + "$ref": "AAAAAAGDyuc34cgqcEs=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1568, + "top": 228, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyuc34cgsbGM=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "tail": { + "$ref": "AAAAAAGDyuXGRcdu1ow=" + }, + "lineStyle": 1, + "points": "1611:287;1507:205", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDyuc34cgtF6c=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDyuc34cguPOA=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyuc34cgvD7k=" + } + }, + { + "_type": "UMLGeneralizationView", + "_id": "AAAAAAGDyudSAcg9lMw=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyudSAMg7sNU=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyudSAcg+29k=", + "_parent": { + "$ref": "AAAAAAGDyudSAcg9lMw=" + }, + "model": { + "$ref": "AAAAAAGDyudSAMg7sNU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1628, + "top": 249, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyudSAcg9lMw=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyudSAcg/asw=", + "_parent": { + "$ref": "AAAAAAGDyudSAcg9lMw=" + }, + "model": { + "$ref": "AAAAAAGDyudSAMg7sNU=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1623, + "top": 263, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDyudSAcg9lMw=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyudSAchAi4M=", + "_parent": { + "$ref": "AAAAAAGDyudSAcg9lMw=" + }, + "model": { + "$ref": "AAAAAAGDyudSAMg7sNU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1639, + "top": 222, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyudSAcg9lMw=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "tail": { + "$ref": "AAAAAAGDyuYMw8eZ8Z8=" + }, + "lineStyle": 1, + "points": "1759:291;1510:194", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDyudSAcg+29k=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDyudSAcg/asw=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyudSAchAi4M=" + } + }, + { + "_type": "UMLGeneralizationView", + "_id": "AAAAAAGDyudqgshOJsg=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyudqgshMb3Q=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyudqg8hPwG4=", + "_parent": { + "$ref": "AAAAAAGDyudqgshOJsg=" + }, + "model": { + "$ref": "AAAAAAGDyudqgshMb3Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1706, + "top": 250, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyudqgshOJsg=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyudqg8hQvss=", + "_parent": { + "$ref": "AAAAAAGDyudqgshOJsg=" + }, + "model": { + "$ref": "AAAAAAGDyudqgshMb3Q=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1702, + "top": 265, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDyudqgshOJsg=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyudqhMhRLu0=", + "_parent": { + "$ref": "AAAAAAGDyudqgshOJsg=" + }, + "model": { + "$ref": "AAAAAAGDyudqgshMb3Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1713, + "top": 221, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyudqgshOJsg=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "tail": { + "$ref": "AAAAAAGDyuZ5MsfFZzs=" + }, + "lineStyle": 1, + "points": "1911:295;1510:190", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDyudqg8hPwG4=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDyudqg8hQvss=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyudqhMhRLu0=" + } + }, + { + "_type": "UMLGeneralizationView", + "_id": "AAAAAAGDyud9r8hfYU8=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyud9r8hdrPo=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyud9sMhg3oM=", + "_parent": { + "$ref": "AAAAAAGDyud9r8hfYU8=" + }, + "model": { + "$ref": "AAAAAAGDyud9r8hdrPo=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1787, + "top": 248, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyud9r8hfYU8=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyud9sMhhOQA=", + "_parent": { + "$ref": "AAAAAAGDyud9r8hfYU8=" + }, + "model": { + "$ref": "AAAAAAGDyud9r8hdrPo=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1784, + "top": 263, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDyud9r8hfYU8=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyud9sMhibtY=", + "_parent": { + "$ref": "AAAAAAGDyud9r8hfYU8=" + }, + "model": { + "$ref": "AAAAAAGDyud9r8hdrPo=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1792, + "top": 219, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyud9r8hfYU8=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDylz9Gsa/wNk=" + }, + "tail": { + "$ref": "AAAAAAGDyua3Y8fw/qA=" + }, + "lineStyle": 1, + "points": "2071:293;1510:188", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDyud9sMhg3oM=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDyud9sMhhOQA=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyud9sMhibtY=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyvTYP8hxBNw=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyvTYP8hyhqk=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hxBNw=" + }, + "model": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyvTYP8hznIc=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hyhqk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -224, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyvTYQMh0Gew=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hyhqk=" + }, + "font": "Arial;13;1", + "left": 29, + "top": 319, + "width": 241.6806640625, + "height": 13, + "text": "UserControlCanvers" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyvTYQMh1O2w=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hyhqk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -224, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyvTYQMh2Yxo=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hyhqk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -224, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 24, + "top": 312, + "width": 251.6806640625, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyvTYP8hznIc=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyvTYQMh0Gew=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyvTYQMh1O2w=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyvTYQMh2Yxo=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyvTYQMh3QAY=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hxBNw=" + }, + "model": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "subViews": [ + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyvhz1sieOAk=", + "_parent": { + "$ref": "AAAAAAGDyvTYQMh3QAY=" + }, + "model": { + "$ref": "AAAAAAGDyvhzkMibGn0=" + }, + "font": "Arial;13;0", + "left": 29, + "top": 342, + "width": 241.6806640625, + "height": 13, + "text": "+CurrentShapeEle", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyvnUi8keiXc=", + "_parent": { + "$ref": "AAAAAAGDyvTYQMh3QAY=" + }, + "model": { + "$ref": "AAAAAAGDyvnUNMkba4o=" + }, + "font": "Arial;13;0", + "left": 29, + "top": 357, + "width": 241.6806640625, + "height": 13, + "text": "+Shapes", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyvvzVskl8S0=", + "_parent": { + "$ref": "AAAAAAGDyvTYQMh3QAY=" + }, + "model": { + "$ref": "AAAAAAGDyvvy+8kidvw=" + }, + "font": "Arial;13;0", + "left": 29, + "top": 372, + "width": 241.6806640625, + "height": 13, + "text": "+CommandRecorder: CommandRecorder", + "horizontalAlignment": 0 + }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyy1itMmWu60=", + "_parent": { + "$ref": "AAAAAAGDyvTYQMh3QAY=" + }, + "model": { + "$ref": "AAAAAAGDyy1icMmTqv8=" + }, + "font": "Arial;13;0", + "left": 29, + "top": 387, + "width": 241.6806640625, + "height": 13, + "text": "+objectSelected: ObjectSelect", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 24, + "top": 337, + "width": 251.6806640625, + "height": 68 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyvTYQMh4q6Q=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hxBNw=" + }, + "model": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDzD0XW8vVRww=", + "_parent": { + "$ref": "AAAAAAGDyvTYQMh4q6Q=" + }, + "model": { + "$ref": "AAAAAAGDzD0XEsvSt9w=" + }, + "font": "Arial;13;0", + "left": 29, + "top": 410, + "width": 241.6806640625, + "height": 13, + "text": "-KeyDown()", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDzD1Wisvc5jI=", + "_parent": { + "$ref": "AAAAAAGDyvTYQMh4q6Q=" + }, + "model": { + "$ref": "AAAAAAGDzD1WQsvZ9+Q=" + }, + "font": "Arial;13;0", + "left": 29, + "top": 425, + "width": 241.6806640625, + "height": 13, + "text": "-KeyUp()", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDzD1wpMvjiqg=", + "_parent": { + "$ref": "AAAAAAGDyvTYQMh4q6Q=" + }, + "model": { + "$ref": "AAAAAAGDzD1wVcvgeBo=" + }, + "font": "Arial;13;0", + "left": 29, + "top": 440, + "width": 241.6806640625, + "height": 13, + "text": "-MouseDown()", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDzD2HMMvqFbY=", + "_parent": { + "$ref": "AAAAAAGDyvTYQMh4q6Q=" + }, + "model": { + "$ref": "AAAAAAGDzD2G8cvnxMw=" + }, + "font": "Arial;13;0", + "left": 29, + "top": 455, + "width": 241.6806640625, + "height": 13, + "text": "-MouseUp()", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 24, + "top": 405, + "width": 251.6806640625, + "height": 68 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyvTYQch5V8M=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hxBNw=" + }, + "model": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -112, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyvTYQch60+c=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hxBNw=" + }, + "model": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -112, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 24, + "top": 312, + "width": 251.6806640625, + "height": 161, + "nameCompartment": { + "$ref": "AAAAAAGDyvTYP8hyhqk=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyvTYQMh3QAY=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyvTYQMh4q6Q=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyvTYQch5V8M=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyvTYQch60+c=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyvjf9sikXmg=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyvjf9siiOzI=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyvjf98ilrP8=", + "_parent": { + "$ref": "AAAAAAGDyvjf9sikXmg=" + }, + "model": { + "$ref": "AAAAAAGDyvjf9siiOzI=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyvjf98imD3w=", + "_parent": { + "$ref": "AAAAAAGDyvjf98ilrP8=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 752, + "top": 48, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyvjf98inGew=", + "_parent": { + "$ref": "AAAAAAGDyvjf98ilrP8=" + }, + "font": "Arial;13;1", + "left": 925, + "top": 823, + "width": 65.736328125, + "height": 13, + "text": "ShapeLine" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyvjf98ioa9g=", + "_parent": { + "$ref": "AAAAAAGDyvjf98ilrP8=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 752, + "top": 48, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyvjf98ipB24=", + "_parent": { + "$ref": "AAAAAAGDyvjf98ilrP8=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 752, + "top": 48, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 920, + "top": 816, + "width": 75.736328125, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyvjf98imD3w=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyvjf98inGew=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyvjf98ioa9g=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyvjf98ipB24=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyvjf98iqnU0=", + "_parent": { + "$ref": "AAAAAAGDyvjf9sikXmg=" + }, + "model": { + "$ref": "AAAAAAGDyvjf9siiOzI=" + }, + "font": "Arial;13;0", + "left": 920, + "top": 841, + "width": 75.736328125, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyvjf98irbm0=", + "_parent": { + "$ref": "AAAAAAGDyvjf9sikXmg=" + }, + "model": { + "$ref": "AAAAAAGDyvjf9siiOzI=" + }, + "font": "Arial;13;0", + "left": 920, + "top": 851, + "width": 75.736328125, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyvjf98isZfk=", + "_parent": { + "$ref": "AAAAAAGDyvjf9sikXmg=" + }, + "model": { + "$ref": "AAAAAAGDyvjf9siiOzI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 376, + "top": 24, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyvjf98itYf4=", + "_parent": { + "$ref": "AAAAAAGDyvjf9sikXmg=" + }, + "model": { + "$ref": "AAAAAAGDyvjf9siiOzI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 376, + "top": 24, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 920, + "top": 816, + "width": 75.736328125, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDyvjf98ilrP8=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyvjf98iqnU0=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyvjf98irbm0=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyvjf98isZfk=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyvjf98itYf4=" + } + }, + { + "_type": "UMLGeneralizationView", + "_id": "AAAAAAGDyvkUEcjOi34=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyvkUEcjMVK0=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyvkUEsjPz2c=", + "_parent": { + "$ref": "AAAAAAGDyvkUEcjOi34=" + }, + "model": { + "$ref": "AAAAAAGDyvkUEcjMVK0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 943, + "top": 736, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyvkUEcjOi34=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyvkUEsjQIBE=", + "_parent": { + "$ref": "AAAAAAGDyvkUEcjOi34=" + }, + "model": { + "$ref": "AAAAAAGDyvkUEcjMVK0=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 928, + "top": 736, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDyvkUEcjOi34=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyvkUEsjRzEE=", + "_parent": { + "$ref": "AAAAAAGDyvkUEcjOi34=" + }, + "model": { + "$ref": "AAAAAAGDyvkUEcjMVK0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 972, + "top": 737, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyvkUEcjOi34=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDyh4vNsTwFZ8=" + }, + "tail": { + "$ref": "AAAAAAGDyvjf9sikXmg=" + }, + "lineStyle": 1, + "points": "957:815;960:672", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDyvkUEsjPz2c=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDyvkUEsjQIBE=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyvkUEsjRzEE=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyvlD+cjgdD4=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyvlD+Mjeqnc=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyvlD+cjh2Zk=", + "_parent": { + "$ref": "AAAAAAGDyvlD+cjgdD4=" + }, + "model": { + "$ref": "AAAAAAGDyvlD+Mjeqnc=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyvlD+cji9rg=", + "_parent": { + "$ref": "AAAAAAGDyvlD+cjh2Zk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 704, + "top": -16, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyvlD+sjj3Qg=", + "_parent": { + "$ref": "AAAAAAGDyvlD+cjh2Zk=" + }, + "font": "Arial;13;1", + "left": 1093, + "top": 823, + "width": 78.00634765625, + "height": 13, + "text": "ShapeGroup" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyvlD+sjk2Qs=", + "_parent": { + "$ref": "AAAAAAGDyvlD+cjh2Zk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 704, + "top": -16, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyvlD+sjlvtU=", + "_parent": { + "$ref": "AAAAAAGDyvlD+cjh2Zk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 704, + "top": -16, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 1088, + "top": 816, + "width": 88.00634765625, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyvlD+cji9rg=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyvlD+sjj3Qg=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyvlD+sjk2Qs=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyvlD+sjlvtU=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyvlD+sjmuIg=", + "_parent": { + "$ref": "AAAAAAGDyvlD+cjgdD4=" + }, + "model": { + "$ref": "AAAAAAGDyvlD+Mjeqnc=" + }, + "font": "Arial;13;0", + "left": 1088, + "top": 841, + "width": 88.00634765625, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyvlD+sjnXr8=", + "_parent": { + "$ref": "AAAAAAGDyvlD+cjgdD4=" + }, + "model": { + "$ref": "AAAAAAGDyvlD+Mjeqnc=" + }, + "font": "Arial;13;0", + "left": 1088, + "top": 851, + "width": 88.00634765625, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyvlD+sjo7b0=", + "_parent": { + "$ref": "AAAAAAGDyvlD+cjgdD4=" + }, + "model": { + "$ref": "AAAAAAGDyvlD+Mjeqnc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 352, + "top": -8, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyvlD+sjp8h8=", + "_parent": { + "$ref": "AAAAAAGDyvlD+cjgdD4=" + }, + "model": { + "$ref": "AAAAAAGDyvlD+Mjeqnc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 352, + "top": -8, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 1088, + "top": 816, + "width": 88.00634765625, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDyvlD+cjh2Zk=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyvlD+sjmuIg=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyvlD+sjnXr8=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyvlD+sjo7b0=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyvlD+sjp8h8=" + } + }, + { + "_type": "UMLGeneralizationView", + "_id": "AAAAAAGDyvlvK8kMTjA=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyvlvK8kKMFI=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyvlvK8kN8ss=", + "_parent": { + "$ref": "AAAAAAGDyvlvK8kMTjA=" + }, + "model": { + "$ref": "AAAAAAGDyvlvK8kKMFI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1055, + "top": 745, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyvlvK8kMTjA=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyvlvK8kOtjU=", + "_parent": { + "$ref": "AAAAAAGDyvlvK8kMTjA=" + }, + "model": { + "$ref": "AAAAAAGDyvlvK8kKMFI=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1043, + "top": 753, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDyvlvK8kMTjA=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDyvlvLMkPnu8=", + "_parent": { + "$ref": "AAAAAAGDyvlvK8kMTjA=" + }, + "model": { + "$ref": "AAAAAAGDyvlvK8kKMFI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1080, + "top": 728, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDyvlvK8kMTjA=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDyh4vNsTwFZ8=" + }, + "tail": { + "$ref": "AAAAAAGDyvlD+cjgdD4=" + }, + "lineStyle": 1, + "points": "1116:815;1020:672", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDyvlvK8kN8ss=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDyvlvK8kOtjU=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyvlvLMkPnu8=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDywv4MMku6+o=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDywv4KMksjwE=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDywv4MMkvG6M=", + "_parent": { + "$ref": "AAAAAAGDywv4MMku6+o=" + }, + "model": { + "$ref": "AAAAAAGDywv4KMksjwE=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDywv4MckwIh8=", + "_parent": { + "$ref": "AAAAAAGDywv4MMkvG6M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 192, + "top": -16, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDywv4Mckx4Sg=", + "_parent": { + "$ref": "AAAAAAGDywv4MMkvG6M=" + }, + "font": "Arial;13;1", + "left": 565, + "top": 311, + "width": 124.69970703125, + "height": 13, + "text": "UserControlToolbox" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDywv4MckyIM8=", + "_parent": { + "$ref": "AAAAAAGDywv4MMkvG6M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 192, + "top": -16, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDywv4MckzzCs=", + "_parent": { + "$ref": "AAAAAAGDywv4MMkvG6M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 192, + "top": -16, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 560, + "top": 304, + "width": 134.69970703125, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDywv4MckwIh8=" + }, + "nameLabel": { + "$ref": "AAAAAAGDywv4Mckx4Sg=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDywv4MckyIM8=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDywv4MckzzCs=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDywv4Msk0bRM=", + "_parent": { + "$ref": "AAAAAAGDywv4MMku6+o=" + }, + "model": { + "$ref": "AAAAAAGDywv4KMksjwE=" + }, + "font": "Arial;13;0", + "left": 560, + "top": 329, + "width": 134.69970703125, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDywv4Msk1TRQ=", + "_parent": { + "$ref": "AAAAAAGDywv4MMku6+o=" + }, + "model": { + "$ref": "AAAAAAGDywv4KMksjwE=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDyzJExsmezAs=", + "_parent": { + "$ref": "AAAAAAGDywv4Msk1TRQ=" + }, + "model": { + "$ref": "AAAAAAGDyzJEd8mbO/w=" + }, + "font": "Arial;13;0", + "left": 565, + "top": 344, + "width": 124.69970703125, + "height": 13, + "text": "+objectSelect()", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 560, + "top": 339, + "width": 134.69970703125, + "height": 23 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDywv4Msk2LH8=", + "_parent": { + "$ref": "AAAAAAGDywv4MMku6+o=" + }, + "model": { + "$ref": "AAAAAAGDywv4KMksjwE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 96, + "top": -8, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDywv4Msk3jnE=", + "_parent": { + "$ref": "AAAAAAGDywv4MMku6+o=" + }, + "model": { + "$ref": "AAAAAAGDywv4KMksjwE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 96, + "top": -8, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 560, + "top": 304, + "width": 134.69970703125, + "height": 58, + "nameCompartment": { + "$ref": "AAAAAAGDywv4MMkvG6M=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDywv4Msk0bRM=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDywv4Msk1TRQ=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDywv4Msk2LH8=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDywv4Msk3jnE=" + } + }, + { + "_type": "UMLNoteView", + "_id": "AAAAAAGDywxoUslWwhI=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "font": "Arial;13;0", + "left": 160, + "top": 232, + "width": 111, + "height": 50, + "text": "在这里边绘图的" + }, + { + "_type": "UMLNoteLinkView", + "_id": "AAAAAAGDywxokslZ35A=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDywxoUslWwhI=" + }, + "tail": { + "$ref": "AAAAAAGDyvTYP8hxBNw=" + }, + "lineStyle": 1, + "points": "188:311;202:282" + }, + { + "_type": "UMLNoteView", + "_id": "AAAAAAGDywyPlMleYQc=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "font": "Arial;13;0", + "left": 584, + "top": 200, + "width": 100, + "height": 50, + "text": "工具箱" + }, + { + "_type": "UMLNoteLinkView", + "_id": "AAAAAAGDywyP38lhhgk=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDywyPlMleYQc=" + }, + "tail": { + "$ref": "AAAAAAGDywv4MMku6+o=" + }, + "lineStyle": 1, + "points": "628:303;631:250" + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDyyvXpMlpVAo=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDyyvXo8lnGlQ=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDyyvXpMlqZBk=", + "_parent": { + "$ref": "AAAAAAGDyyvXpMlpVAo=" + }, + "model": { + "$ref": "AAAAAAGDyyvXo8lnGlQ=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDyyvXpMlrHyw=", + "_parent": { + "$ref": "AAAAAAGDyyvXpMlqZBk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -32, + "top": -64, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyyvXpclsm/A=", + "_parent": { + "$ref": "AAAAAAGDyyvXpMlqZBk=" + }, + "font": "Arial;13;1", + "left": 381, + "top": 199, + "width": 114.15625, + "height": 13, + "text": "ObejctSelectEvent" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyyvXpcltTpk=", + "_parent": { + "$ref": "AAAAAAGDyyvXpMlqZBk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -32, + "top": -64, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDyyvXpclu9Ys=", + "_parent": { + "$ref": "AAAAAAGDyyvXpMlqZBk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -32, + "top": -64, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 376, + "top": 192, + "width": 124.15625, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDyyvXpMlrHyw=" + }, + "nameLabel": { + "$ref": "AAAAAAGDyyvXpclsm/A=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDyyvXpcltTpk=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDyyvXpclu9Ys=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDyyvXpclvnSU=", + "_parent": { + "$ref": "AAAAAAGDyyvXpMlpVAo=" + }, + "model": { + "$ref": "AAAAAAGDyyvXo8lnGlQ=" + }, + "subViews": [ + { + "_type": "UMLAttributeView", + "_id": "AAAAAAGDyzO+P8mlNGw=", + "_parent": { + "$ref": "AAAAAAGDyyvXpclvnSU=" + }, + "model": { + "$ref": "AAAAAAGDyzO93MmiD3M=" + }, + "font": "Arial;13;0", + "left": 381, + "top": 222, + "width": 114.15625, + "height": 13, + "text": "+object", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 376, + "top": 217, + "width": 124.15625, + "height": 23 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDyyvXpslwpaw=", + "_parent": { + "$ref": "AAAAAAGDyyvXpMlpVAo=" + }, + "model": { + "$ref": "AAAAAAGDyyvXo8lnGlQ=" + }, + "font": "Arial;13;0", + "left": 376, + "top": 240, + "width": 124.15625, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDyyvXpslxKwE=", + "_parent": { + "$ref": "AAAAAAGDyyvXpMlpVAo=" + }, + "model": { + "$ref": "AAAAAAGDyyvXo8lnGlQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -16, + "top": -32, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDyyvXpslyTtw=", + "_parent": { + "$ref": "AAAAAAGDyyvXpMlpVAo=" + }, + "model": { + "$ref": "AAAAAAGDyyvXo8lnGlQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -16, + "top": -32, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 376, + "top": 192, + "width": 124.15625, + "height": 58, + "nameCompartment": { + "$ref": "AAAAAAGDyyvXpMlqZBk=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDyyvXpclvnSU=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDyyvXpslwpaw=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDyyvXpslxKwE=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDyyvXpslyTtw=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGDzDoLzsrrSMg=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDzDoLz8rslLc=", + "_parent": { + "$ref": "AAAAAAGDzDoLzsrrSMg=" + }, + "model": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzDoLz8rtaa0=", + "_parent": { + "$ref": "AAAAAAGDzDoLz8rslLc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -112, + "top": 112, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDzDoL0MruDRM=", + "_parent": { + "$ref": "AAAAAAGDzDoLz8rslLc=" + }, + "font": "Arial;13;1", + "left": 541, + "top": 775, + "width": 83.09716796875, + "height": 13, + "text": "JsonSerialize" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDzDoL0MrvAtM=", + "_parent": { + "$ref": "AAAAAAGDzDoLz8rslLc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -112, + "top": 112, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDzDoL0MrwZUk=", + "_parent": { + "$ref": "AAAAAAGDzDoLz8rslLc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -112, + "top": 112, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 536, + "top": 768, + "width": 93.09716796875, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDzDoLz8rtaa0=" + }, + "nameLabel": { + "$ref": "AAAAAAGDzDoL0MruDRM=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDzDoL0MrvAtM=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDzDoL0MrwZUk=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDzDoL0MrxUbw=", + "_parent": { + "$ref": "AAAAAAGDzDoLzsrrSMg=" + }, + "model": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "font": "Arial;13;0", + "left": 536, + "top": 793, + "width": 93.09716796875, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDzDoL0cry0/8=", + "_parent": { + "$ref": "AAAAAAGDzDoLzsrrSMg=" + }, + "model": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "font": "Arial;13;0", + "left": 536, + "top": 803, + "width": 93.09716796875, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDzDoL0crzGis=", + "_parent": { + "$ref": "AAAAAAGDzDoLzsrrSMg=" + }, + "model": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -56, + "top": 56, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDzDoL0cr0uFI=", + "_parent": { + "$ref": "AAAAAAGDzDoLzsrrSMg=" + }, + "model": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -56, + "top": 56, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 536, + "top": 768, + "width": 93.09716796875, + "height": 45, + "nameCompartment": { + "$ref": "AAAAAAGDzDoLz8rslLc=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGDzDoL0MrxUbw=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDzDoL0cry0/8=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDzDoL0crzGis=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDzDoL0cr0uFI=" + } + }, + { + "_type": "UMLInterfaceView", + "_id": "AAAAAAGDzDp7EMsqCME=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGDzDp7EMsrX9o=", + "_parent": { + "$ref": "AAAAAAGDzDp7EMsqCME=" + }, + "model": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzDp7Ecssh0c=", + "_parent": { + "$ref": "AAAAAAGDzDp7EMsrX9o=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 352, + "top": -32, + "width": 64.32080078125, + "height": 13, + "text": "«interface»" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDzDp7Ecstmk8=", + "_parent": { + "$ref": "AAAAAAGDzDp7EMsrX9o=" + }, + "font": "Arial;13;1", + "left": 493, + "top": 598, + "width": 192.56884765625, + "height": 13, + "text": "ISerialize" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDzDp7Ecsuq8o=", + "_parent": { + "$ref": "AAAAAAGDzDp7EMsrX9o=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 352, + "top": -32, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGDzDp7Ecsvtz0=", + "_parent": { + "$ref": "AAAAAAGDzDp7EMsrX9o=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 352, + "top": -32, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 488, + "top": 591, + "width": 202.56884765625, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGDzDp7Ecssh0c=" + }, + "nameLabel": { + "$ref": "AAAAAAGDzDp7Ecstmk8=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGDzDp7Ecsuq8o=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDzDp7Ecsvtz0=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGDzDp7EcswsEc=", + "_parent": { + "$ref": "AAAAAAGDzDp7EMsqCME=" + }, + "model": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 176, + "top": -16, + "width": 10, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGDzDp7EcsxxjE=", + "_parent": { + "$ref": "AAAAAAGDzDp7EMsqCME=" + }, + "model": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDzDq7qctWNvA=", + "_parent": { + "$ref": "AAAAAAGDzDp7EcsxxjE=" + }, + "model": { + "$ref": "AAAAAAGDzDq7ZctTTfE=" + }, + "font": "Arial;13;0", + "left": 493, + "top": 621, + "width": 192.56884765625, + "height": 13, + "text": "+serialize(Shapes shapes): string", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGDzDrlAMuCxnE=", + "_parent": { + "$ref": "AAAAAAGDzDp7EcsxxjE=" + }, + "model": { + "$ref": "AAAAAAGDzDrks8t/UU0=" + }, + "font": "Arial;13;0", + "left": 493, + "top": 636, + "width": 192.56884765625, + "height": 13, + "text": "+deserialize(string s): Shapes", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 488, + "top": 616, + "width": 202.56884765625, + "height": 38 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGDzDp7EssyOxg=", + "_parent": { + "$ref": "AAAAAAGDzDp7EMsqCME=" + }, + "model": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 176, + "top": -16, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGDzDp7EsszMTg=", + "_parent": { + "$ref": "AAAAAAGDzDp7EMsqCME=" + }, + "model": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 176, + "top": -16, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 488, + "top": 568, + "width": 202.56884765625, + "height": 87, + "stereotypeDisplay": "icon", + "nameCompartment": { + "$ref": "AAAAAAGDzDp7EMsrX9o=" + }, + "suppressAttributes": true, + "attributeCompartment": { + "$ref": "AAAAAAGDzDp7EcswsEc=" + }, + "operationCompartment": { + "$ref": "AAAAAAGDzDp7EcsxxjE=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGDzDp7EssyOxg=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGDzDp7EsszMTg=" + } + }, + { + "_type": "UMLGeneralizationView", + "_id": "AAAAAAGDzDt/YcvBFNI=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGDzDt/Ycu/hfg=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzDt/YsvC+5w=", + "_parent": { + "$ref": "AAAAAAGDzDt/YcvBFNI=" + }, + "model": { + "$ref": "AAAAAAGDzDt/Ycu/hfg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 570, + "top": 704, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzDt/YcvBFNI=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzDt/YsvDTuk=", + "_parent": { + "$ref": "AAAAAAGDzDt/YcvBFNI=" + }, + "model": { + "$ref": "AAAAAAGDzDt/Ycu/hfg=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 555, + "top": 703, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAGDzDt/YcvBFNI=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzDt/YsvEXFo=", + "_parent": { + "$ref": "AAAAAAGDzDt/YcvBFNI=" + }, + "model": { + "$ref": "AAAAAAGDzDt/Ycu/hfg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 599, + "top": 705, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzDt/YcvBFNI=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzDp7EMsqCME=" + }, + "tail": { + "$ref": "AAAAAAGDzDoLzsrrSMg=" + }, + "lineStyle": 1, + "points": "583:767;587:655", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAGDzDt/YsvC+5w=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAGDzDt/YsvDTuk=" + }, + "propertyLabel": { + "$ref": "AAAAAAGDzDt/YsvEXFo=" + } + } + ] + }, + { + "_type": "UMLInterface", + "_id": "AAAAAAGDxzRFlF6IjtM=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "ShapeEle", + "attributes": [ + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDxzSaYV6z8dg=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "X", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDxzS5mF66fTc=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "Y", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDxzTKx17BWZY=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "Width", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDxzTlWl7IQSs=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "Height", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDxzT8ul7PD0U=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "Angle", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx0Trm186OeE=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "Deviate", + "type": "" + } + ], + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDxzWaNl7haro=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "Draw", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDxzXRql7p1j4=", + "_parent": { + "$ref": "AAAAAAGDxzWaNl7haro=" + }, + "name": "Graphics g", + "type": "" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDxzXdMF7rbnA=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "DrawPath" + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDx2+eOV/Dq8w=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "getSelectShapeEle", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDx2+kMl/KA9Q=", + "_parent": { + "$ref": "AAAAAAGDx2+eOV/Dq8w=" + }, + "name": "PointF pointF", + "type": "" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDx5kaaGAhR6o=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "isContains", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDx5kh82AotnI=", + "_parent": { + "$ref": "AAAAAAGDx5kaaGAhR6o=" + }, + "name": "PointF MousePoint", + "type": "" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDx5la0GAq/xM=", + "_parent": { + "$ref": "AAAAAAGDxzRFlF6IjtM=" + }, + "name": "isContains", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDx5lgFWAxEJw=", + "_parent": { + "$ref": "AAAAAAGDx5la0GAq/xM=" + }, + "name": "RectangleF rect", + "type": "" + } + ] + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDx0NxAF7y4xA=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Transform", + "attributes": [ + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx0QfPl8kKW4=", + "_parent": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "name": "X", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx0QzKl8rVLg=", + "_parent": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "name": "Y", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx0RD3l8yCx4=", + "_parent": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "name": "Zoom", + "type": "" + } + ], + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDx5JoyGAXQzs=", + "_parent": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + }, + "name": "getRealPoint", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDx5KogGAerI0=", + "_parent": { + "$ref": "AAAAAAGDx5JoyGAXQzs=" + }, + "name": "PointF pointf", + "type": "" + } + ] + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDx2ZboF9BNOs=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "PaperSize", + "attributes": [ + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx2dVb19rxpI=", + "_parent": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "name": "Width", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx2drsl9yAcU=", + "_parent": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "name": "Height", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx2eppV95NZw=", + "_parent": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "name": "Rows", + "documentation": "行数", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx2i95V+Bn1E=", + "_parent": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "name": "Cols", + "type": "" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx2k14l+IzF0=", + "_parent": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + }, + "name": "HorizontalRepeatDistance", + "type": "" + } + ] + }, + { + "_type": "UMLInterface", + "_id": "AAAAAAGDx2mSn1+Q3sI=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "IPrinterSelect", + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDx2nQHV+7Aaw=", + "_parent": { + "$ref": "AAAAAAGDx2mSn1+Q3sI=" + }, + "name": "getPrinter" + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDx3KhyF/Ord8=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Shapes", + "ownedElements": [ + { + "_type": "UMLDependency", + "_id": "AAAAAAGDykLTDMW0tc0=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "source": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "target": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + } + }, + { + "_type": "UMLDependency", + "_id": "AAAAAAGDykLgs8XFTXQ=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "source": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "target": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + } + }, + { + "_type": "UMLDependency", + "_id": "AAAAAAGDykLugcXWEQM=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "source": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "target": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + } + }, + { + "_type": "UMLInterfaceRealization", + "_id": "AAAAAAGDyltFN8ZpsLw=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "source": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "target": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + } + }, + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDylt438aCyFw=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "source": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "target": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + } + } + ], + "attributes": [ + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx3K8tl/5O1I=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "name": "lstShape", + "stereotype": "", + "type": "List" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx3L77WAA8tk=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "name": "Transform", + "type": { + "$ref": "AAAAAAGDx0NxAF7y4xA=" + } + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDx4X7WWALEus=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "name": "PaperSize", + "type": { + "$ref": "AAAAAAGDx2ZboF9BNOs=" + } + } + ], + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDykFncMWj2yA=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "name": "getSelectShapes" + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDykHwQ8WrTAg=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "name": "DrawWithBack", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDykIhg8WyYjE=", + "_parent": { + "$ref": "AAAAAAGDykHwQ8WrTAg=" + }, + "name": "Graphics g", + "type": "" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDzDOwl8qhiuY=", + "_parent": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "name": "getNextId" + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyh4vNcTuGjg=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "ShapeEle", + "attributes": [ + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDzDKw6cqUZHM=", + "_parent": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "name": "Id" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyh5n3sUZxIU=", + "_parent": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "name": "X" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyh6ASsUgI5U=", + "_parent": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "name": "Y" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyh6PxcUn+4Q=", + "_parent": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "name": "Width" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyh6iZcUurOo=", + "_parent": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "name": "Height" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyh61rcU1ruM=", + "_parent": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "name": "Angle" + } + ], + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDyh7yIcVFzos=", + "_parent": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "name": "Draw", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDyh83+sVMrps=", + "_parent": { + "$ref": "AAAAAAGDyh7yIcVFzos=" + }, + "name": "Graphics g" + }, + { + "_type": "UMLParameter", + "_id": "AAAAAAGDyh83+sVN9eE=", + "_parent": { + "$ref": "AAAAAAGDyh7yIcVFzos=" + }, + "name": "Transform tran" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDyh/5RcVSgws=", + "_parent": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "name": "isContains", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDyh/+M8VZYcc=", + "_parent": { + "$ref": "AAAAAAGDyh/5RcVSgws=" + }, + "name": "PointF MousePoint", + "type": "" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDyiASjcVbuN8=", + "_parent": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + }, + "name": "isContains", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDyiAYCsVil7c=", + "_parent": { + "$ref": "AAAAAAGDyiASjcVbuN8=" + }, + "name": "RectangleF rect", + "type": "" + } + ] + } + ], + "isAbstract": true + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyk0FJMXo3AQ=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "PrintBarcode", + "ownedElements": [ + { + "_type": "UMLInterfaceRealization", + "_id": "AAAAAAGDyluvg8aTlZA=", + "_parent": { + "$ref": "AAAAAAGDyk0FJMXo3AQ=" + }, + "source": { + "$ref": "AAAAAAGDyk0FJMXo3AQ=" + }, + "target": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + } + } + ] + }, + { + "_type": "UMLInterface", + "_id": "AAAAAAGDyljOo8YXx2A=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "IInvoke", + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDylkkT8ZD/mI=", + "_parent": { + "$ref": "AAAAAAGDyljOo8YXx2A=" + }, + "name": "ExecuteCommand" + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDylz9Gca9qXA=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Comand", + "isAbstract": true + }, + { + "_type": "UMLInterface", + "_id": "AAAAAAGDyobTCMbujUw=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "CommandRecorder", + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDyocYm8caZbo=", + "_parent": { + "$ref": "AAAAAAGDyobTCMbujUw=" + }, + "name": "addCommand", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDyoc2KschKkw=", + "_parent": { + "$ref": "AAAAAAGDyocYm8caZbo=" + }, + "name": "Command command", + "type": "" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDyodU8sclSGc=", + "_parent": { + "$ref": "AAAAAAGDyobTCMbujUw=" + }, + "name": "Undo" + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDyodyzscsGaw=", + "_parent": { + "$ref": "AAAAAAGDyobTCMbujUw=" + }, + "name": "Redo" + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyuWQV8dBE4E=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "MoveCommand", + "ownedElements": [ + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDyucRWMgZ+5k=", + "_parent": { + "$ref": "AAAAAAGDyuWQV8dBE4E=" + }, + "source": { + "$ref": "AAAAAAGDyuWQV8dBE4E=" + }, + "target": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + } + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyuXGRcdsOvE=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "ResizeCommand", + "ownedElements": [ + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDyuc34cgqcEs=", + "_parent": { + "$ref": "AAAAAAGDyuXGRcdsOvE=" + }, + "source": { + "$ref": "AAAAAAGDyuXGRcdsOvE=" + }, + "target": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + } + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyuYMwceXf8M=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "AddCommand", + "ownedElements": [ + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDyudSAMg7sNU=", + "_parent": { + "$ref": "AAAAAAGDyuYMwceXf8M=" + }, + "source": { + "$ref": "AAAAAAGDyuYMwceXf8M=" + }, + "target": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + } + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyuZ5MsfDAgY=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "DeleteCommand", + "ownedElements": [ + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDyudqgshMb3Q=", + "_parent": { + "$ref": "AAAAAAGDyuZ5MsfDAgY=" + }, + "source": { + "$ref": "AAAAAAGDyuZ5MsfDAgY=" + }, + "target": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + } + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyua3YsfuUVc=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "PropertyChangedCommand", + "ownedElements": [ + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDyud9r8hdrPo=", + "_parent": { + "$ref": "AAAAAAGDyua3YsfuUVc=" + }, + "source": { + "$ref": "AAAAAAGDyua3YsfuUVc=" + }, + "target": { + "$ref": "AAAAAAGDylz9Gca9qXA=" + } + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyvTYP8hvyV8=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "UserControlCanvers", + "attributes": [ + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyvhzkMibGn0=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "name": "CurrentShapeEle" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyvnUNMkba4o=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "name": "Shapes" + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyvvy+8kidvw=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "name": "CommandRecorder", + "type": { + "$ref": "AAAAAAGDyobTCMbujUw=" + } + }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyy1icMmTqv8=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "name": "objectSelected", + "type": "ObjectSelect" + } + ], + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDzD0XEsvSt9w=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "name": "KeyDown", + "visibility": "private" + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDzD1WQsvZ9+Q=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "name": "KeyUp", + "visibility": "private" + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDzD1wVcvgeBo=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "name": "MouseDown", + "visibility": "private" + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDzD2G8cvnxMw=", + "_parent": { + "$ref": "AAAAAAGDyvTYP8hvyV8=" + }, + "name": "MouseUp", + "visibility": "private" + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyvjf9siiOzI=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "ShapeLine", + "ownedElements": [ + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDyvkUEcjMVK0=", + "_parent": { + "$ref": "AAAAAAGDyvjf9siiOzI=" + }, + "source": { + "$ref": "AAAAAAGDyvjf9siiOzI=" + }, + "target": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + } + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyvlD+Mjeqnc=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "ShapeGroup", + "ownedElements": [ + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDyvlvK8kKMFI=", + "_parent": { + "$ref": "AAAAAAGDyvlD+Mjeqnc=" + }, + "source": { + "$ref": "AAAAAAGDyvlD+Mjeqnc=" + }, + "target": { + "$ref": "AAAAAAGDyh4vNcTuGjg=" + } + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDywv4KMksjwE=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "UserControlToolbox", + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDyzJEd8mbO/w=", + "_parent": { + "$ref": "AAAAAAGDywv4KMksjwE=" + }, + "name": "objectSelect" + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDyyvXo8lnGlQ=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "ObejctSelectEvent", + "attributes": [ + { + "_type": "UMLAttribute", + "_id": "AAAAAAGDyzO93MmiD3M=", + "_parent": { + "$ref": "AAAAAAGDyyvXo8lnGlQ=" + }, + "name": "object" + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDzDfhGMqoXWE=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "ISerialize", + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDzDiVe8rTYxE=", + "_parent": { + "$ref": "AAAAAAGDzDfhGMqoXWE=" + }, + "name": "serialize", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDzDkFWMra1iA=", + "_parent": { + "$ref": "AAAAAAGDzDiVe8rTYxE=" + }, + "name": "Shapes shapes", + "type": "" + }, + { + "_type": "UMLParameter", + "_id": "AAAAAAGDzDkFWMrbd7A=", + "_parent": { + "$ref": "AAAAAAGDzDiVe8rTYxE=" + }, + "type": "string", + "direction": "return" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDzDkVS8reK3Q=", + "_parent": { + "$ref": "AAAAAAGDzDfhGMqoXWE=" + }, + "name": "deserialize", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDzDm80crlPUE=", + "_parent": { + "$ref": "AAAAAAGDzDkVS8reK3Q=" + }, + "name": "string s", + "type": "" + }, + { + "_type": "UMLParameter", + "_id": "AAAAAAGDzDm80crmb14=", + "_parent": { + "$ref": "AAAAAAGDzDkVS8reK3Q=" + }, + "type": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "direction": "return" + } + ] + } + ], + "isAbstract": true + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGDzDoLzsrpBmA=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "JsonSerialize", + "ownedElements": [ + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDzDo99MsUQqo=", + "_parent": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "source": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "target": { + "$ref": "AAAAAAGDzDfhGMqoXWE=" + } + }, + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDzDr/acuLjwY=", + "_parent": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "source": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "target": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + } + }, + { + "_type": "UMLInterfaceRealization", + "_id": "AAAAAAGDzDtfscumb90=", + "_parent": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "source": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "target": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + } + }, + { + "_type": "UMLGeneralization", + "_id": "AAAAAAGDzDt/Ycu/hfg=", + "_parent": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "source": { + "$ref": "AAAAAAGDzDoLzsrpBmA=" + }, + "target": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + } + } + ] + }, + { + "_type": "UMLInterface", + "_id": "AAAAAAGDzDp7D8soiKk=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "ISerialize", + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAGDzDq7ZctTTfE=", + "_parent": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + }, + "name": "serialize", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDzDrA1MtaOmw=", + "_parent": { + "$ref": "AAAAAAGDzDq7ZctTTfE=" + }, + "name": "Shapes shapes", + "type": "" + }, + { + "_type": "UMLParameter", + "_id": "AAAAAAGDzDrA1MtbtVw=", + "_parent": { + "$ref": "AAAAAAGDzDq7ZctTTfE=" + }, + "type": "string", + "direction": "return" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAGDzDrks8t/UU0=", + "_parent": { + "$ref": "AAAAAAGDzDp7D8soiKk=" + }, + "name": "deserialize", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGDzDrpDcuG6Hk=", + "_parent": { + "$ref": "AAAAAAGDzDrks8t/UU0=" + }, + "name": "string s", + "type": "" + }, + { + "_type": "UMLParameter", + "_id": "AAAAAAGDzDrpDcuHY/I=", + "_parent": { + "$ref": "AAAAAAGDzDrks8t/UU0=" + }, + "type": { + "$ref": "AAAAAAGDx3KhyF/Ord8=" + }, + "direction": "return" + } + ] + } + ] + }, + { + "_type": "FCFlowchart", + "_id": "AAAAAAGDzH7wLMvxvqI=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Flowchart1", + "ownedElements": [ + { + "_type": "FCFlowchartDiagram", + "_id": "AAAAAAGDzH7wLcvyM5o=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "鼠标事件", + "ownedViews": [ + { + "_type": "FCManualOperationView", + "_id": "AAAAAAGDzIFgzswGjIg=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzIFgwswE3G8=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzIFgz8wHXIM=", + "_parent": { + "$ref": "AAAAAAGDzIFgzswGjIg=" + }, + "font": "Arial;13;0", + "left": 274, + "top": 74, + "width": 46, + "height": 13, + "text": "按下鼠标左键", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 248, + "top": 64, + "width": 98, + "height": 33, + "nameLabel": { + "$ref": "AAAAAAGDzIFgz8wHXIM=" + } + }, + { + "_type": "FCDecisionView", + "_id": "AAAAAAGDzIQ9QMwQtVE=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzIQ9P8wOqSI=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzIQ9QMwRN90=", + "_parent": { + "$ref": "AAAAAAGDzIQ9QMwQtVE=" + }, + "font": "Arial;13;0", + "left": 171.5, + "top": 167.5, + "width": 247, + "height": 15, + "text": "判断是否在已经选择框内(外扩指定误差)", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 48, + "top": 160, + "width": 494, + "height": 30, + "nameLabel": { + "$ref": "AAAAAAGDzIQ9QMwRN90=" + } + }, + { + "_type": "FCFlowView", + "_id": "AAAAAAGDzIl9YMw0MCk=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzIl9YMwyP2Q=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzIl9YMw1T6w=", + "_parent": { + "$ref": "AAAAAAGDzIl9YMw0MCk=" + }, + "model": { + "$ref": "AAAAAAGDzIl9YMwyP2Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 312, + "top": 121, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzIl9YMw0MCk=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzIQ9QMwQtVE=" + }, + "tail": { + "$ref": "AAAAAAGDzIFgzswGjIg=" + }, + "lineStyle": 2, + "points": "298:96;298:160", + "nameLabel": { + "$ref": "AAAAAAGDzIl9YMw1T6w=" + } + }, + { + "_type": "FCDecisionView", + "_id": "AAAAAAGDzIqAysxODT0=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzIqAycxMeF8=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzIqAysxPd2M=", + "_parent": { + "$ref": "AAAAAAGDzIqAysxODT0=" + }, + "font": "Arial;13;0", + "left": 225, + "top": 423.5, + "width": 130, + "height": 15, + "text": "判断是否在某个图形内", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 160, + "top": 416, + "width": 260, + "height": 30, + "nameLabel": { + "$ref": "AAAAAAGDzIqAysxPd2M=" + } + }, + { + "_type": "FCFlowView", + "_id": "AAAAAAGDzIsU5cxYbEM=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzIsU5MxWxFw=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzIsU5cxZmM4=", + "_parent": { + "$ref": "AAAAAAGDzIsU5cxYbEM=" + }, + "model": { + "$ref": "AAAAAAGDzIsU5MxWxFw=" + }, + "font": "Arial;13;0", + "left": 310, + "top": 295, + "width": 13, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzIsU5cxYbEM=" + }, + "edgePosition": 1, + "text": "否" + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzIqAysxODT0=" + }, + "tail": { + "$ref": "AAAAAAGDzIQ9QMwQtVE=" + }, + "lineStyle": 2, + "points": "301:189;301:416", + "nameLabel": { + "$ref": "AAAAAAGDzIsU5cxZmM4=" + } + }, + { + "_type": "FCProcessView", + "_id": "AAAAAAGDzJLI18xjxtI=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzJLI1sxhdvU=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzJLI18xksKw=", + "_parent": { + "$ref": "AAAAAAGDzJLI18xjxtI=" + }, + "font": "Arial;13;0", + "left": 546, + "top": 418, + "width": 169, + "height": 13, + "text": "将这个图形设置成被选择模式", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 536, + "top": 408, + "width": 189, + "height": 33, + "nameLabel": { + "$ref": "AAAAAAGDzJLI18xksKw=" + } + }, + { + "_type": "FCFlowView", + "_id": "AAAAAAGDzJMpwMxtN6s=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzJMpwMxrWxI=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzJMpwcxuqKg=", + "_parent": { + "$ref": "AAAAAAGDzJMpwMxtN6s=" + }, + "model": { + "$ref": "AAAAAAGDzJMpwMxrWxI=" + }, + "font": "Arial;13;0", + "left": 471, + "top": 407, + "width": 13, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzJMpwMxtN6s=" + }, + "edgePosition": 1, + "text": "是" + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzJLI18xjxtI=" + }, + "tail": { + "$ref": "AAAAAAGDzIqAysxODT0=" + }, + "lineStyle": 2, + "points": "419:428;536:428", + "nameLabel": { + "$ref": "AAAAAAGDzJMpwcxuqKg=" + } + }, + { + "_type": "FCProcessView", + "_id": "AAAAAAGDzJNrqsx33aY=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzJNrqsx1+uM=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzJNrq8x4XPM=", + "_parent": { + "$ref": "AAAAAAGDzJNrqsx33aY=" + }, + "font": "Arial;13;0", + "left": 250, + "top": 546, + "width": 78, + "height": 13, + "text": "矩形选择模式", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 240, + "top": 536, + "width": 98, + "height": 33, + "nameLabel": { + "$ref": "AAAAAAGDzJNrq8x4XPM=" + } + }, + { + "_type": "FCFlowView", + "_id": "AAAAAAGDzJPH28yDPkQ=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzJPH2syBODY=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzJPH3MyEeUk=", + "_parent": { + "$ref": "AAAAAAGDzJPH28yDPkQ=" + }, + "model": { + "$ref": "AAAAAAGDzJPH2syBODY=" + }, + "font": "Arial;13;0", + "left": 297, + "top": 483, + "width": 13, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzJPH28yDPkQ=" + }, + "edgePosition": 1, + "text": "否" + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzJNrqsx33aY=" + }, + "tail": { + "$ref": "AAAAAAGDzIqAysxODT0=" + }, + "lineStyle": 2, + "points": "289:445;289:536", + "nameLabel": { + "$ref": "AAAAAAGDzJPH3MyEeUk=" + } + }, + { + "_type": "FCDecisionView", + "_id": "AAAAAAGDzMVQIMzYxjI=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMVQH8zWJ4E=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzMVQIMzZyCI=", + "_parent": { + "$ref": "AAAAAAGDzMVQIMzYxjI=" + }, + "font": "Arial;13;0", + "left": 705, + "top": 167.5, + "width": 130, + "height": 15, + "text": "判断是否在四周的点上", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 640, + "top": 160, + "width": 260, + "height": 30, + "nameLabel": { + "$ref": "AAAAAAGDzMVQIMzZyCI=" + } + }, + { + "_type": "FCFlowView", + "_id": "AAAAAAGDzMW9N8zkEx0=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMW9N8ziORg=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzMW9N8zlGcY=", + "_parent": { + "$ref": "AAAAAAGDzMW9N8zkEx0=" + }, + "model": { + "$ref": "AAAAAAGDzMW9N8ziORg=" + }, + "font": "Arial;13;0", + "left": 584, + "top": 153, + "width": 13, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzMW9N8zkEx0=" + }, + "edgePosition": 1, + "text": "是" + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzMVQIMzYxjI=" + }, + "tail": { + "$ref": "AAAAAAGDzIQ9QMwQtVE=" + }, + "lineStyle": 2, + "points": "541:174;640:174", + "nameLabel": { + "$ref": "AAAAAAGDzMW9N8zlGcY=" + } + }, + { + "_type": "FCDecisionView", + "_id": "AAAAAAGDzMY4Yczuylo=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMY4YczsEno=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzMY4YczvZMI=", + "_parent": { + "$ref": "AAAAAAGDzMY4Yczuylo=" + }, + "font": "Arial;13;0", + "left": 705, + "top": 223.5, + "width": 130, + "height": 15, + "text": "判断是否在四周的线上", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 640, + "top": 216, + "width": 260, + "height": 30, + "nameLabel": { + "$ref": "AAAAAAGDzMY4YczvZMI=" + } + }, + { + "_type": "FCFlowView", + "_id": "AAAAAAGDzMaqP8z6P/0=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMaqP8z4x1Y=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzMaqP8z7Hqs=", + "_parent": { + "$ref": "AAAAAAGDzMaqP8z6P/0=" + }, + "model": { + "$ref": "AAAAAAGDzMaqP8z4x1Y=" + }, + "font": "Arial;13;0", + "left": 773, + "top": 195, + "width": 13, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzMaqP8z6P/0=" + }, + "edgePosition": 1, + "text": "否" + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzMY4Yczuylo=" + }, + "tail": { + "$ref": "AAAAAAGDzMVQIMzYxjI=" + }, + "lineStyle": 2, + "points": "765:189;765:216", + "nameLabel": { + "$ref": "AAAAAAGDzMaqP8z7Hqs=" + } + }, + { + "_type": "FCProcessView", + "_id": "AAAAAAGDzMbUW80EzQg=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMbUW80CkNo=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzMbUXM0FX9I=", + "_parent": { + "$ref": "AAAAAAGDzMbUW80EzQg=" + }, + "font": "Arial;13;0", + "left": 738, + "top": 314, + "width": 54.18994140625, + "height": 13, + "text": "移动模式", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 728, + "top": 304, + "width": 74.18994140625, + "height": 33, + "nameLabel": { + "$ref": "AAAAAAGDzMbUXM0FX9I=" + } + }, + { + "_type": "FCFlowView", + "_id": "AAAAAAGDzMb8vM0NHPM=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMb8u80LxrU=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzMb8vM0OrXk=", + "_parent": { + "$ref": "AAAAAAGDzMb8vM0NHPM=" + }, + "model": { + "$ref": "AAAAAAGDzMb8u80LxrU=" + }, + "font": "Arial;13;0", + "left": 776, + "top": 267, + "width": 13, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzMb8vM0NHPM=" + }, + "edgePosition": 1, + "text": "否" + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzMbUW80EzQg=" + }, + "tail": { + "$ref": "AAAAAAGDzMY4Yczuylo=" + }, + "lineStyle": 2, + "points": "768:245;768:304", + "nameLabel": { + "$ref": "AAAAAAGDzMb8vM0OrXk=" + } + }, + { + "_type": "FCProcessView", + "_id": "AAAAAAGDzMej8c0abUo=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMej8M0YAm4=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzMej8c0bTjg=", + "_parent": { + "$ref": "AAAAAAGDzMej8c0abUo=" + }, + "font": "Arial;13;0", + "left": 946, + "top": 170, + "width": 54.18994140625, + "height": 13, + "text": "更改尺寸", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 936, + "top": 160, + "width": 74.18994140625, + "height": 33, + "nameLabel": { + "$ref": "AAAAAAGDzMej8c0bTjg=" + } + }, + { + "_type": "FCProcessView", + "_id": "AAAAAAGDzMfQg80jCqU=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMfQgs0hRTw=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGDzMfQg80kUS8=", + "_parent": { + "$ref": "AAAAAAGDzMfQg80jCqU=" + }, + "font": "Arial;13;0", + "left": 946, + "top": 226, + "width": 54.18994140625, + "height": 13, + "text": "更改尺寸", + "wordWrap": true + } + ], + "font": "Arial;13;0", + "left": 936, + "top": 216, + "width": 74.18994140625, + "height": 33, + "nameLabel": { + "$ref": "AAAAAAGDzMfQg80kUS8=" + } + }, + { + "_type": "FCFlowView", + "_id": "AAAAAAGDzMf3380tPgE=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMf33s0rykE=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzMf3380u19o=", + "_parent": { + "$ref": "AAAAAAGDzMf3380tPgE=" + }, + "model": { + "$ref": "AAAAAAGDzMf33s0rykE=" + }, + "font": "Arial;13;0", + "left": 911, + "top": 155, + "width": 13, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzMf3380tPgE=" + }, + "edgePosition": 1, + "text": "是" + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzMej8c0abUo=" + }, + "tail": { + "$ref": "AAAAAAGDzMVQIMzYxjI=" + }, + "lineStyle": 2, + "points": "899:176;936:176", + "nameLabel": { + "$ref": "AAAAAAGDzMf3380u19o=" + } + }, + { + "_type": "FCFlowView", + "_id": "AAAAAAGDzMgPUs03oCM=", + "_parent": { + "$ref": "AAAAAAGDzH7wLcvyM5o=" + }, + "model": { + "$ref": "AAAAAAGDzMgPUc01Lz0=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAGDzMgPUs04jjE=", + "_parent": { + "$ref": "AAAAAAGDzMgPUs03oCM=" + }, + "model": { + "$ref": "AAAAAAGDzMgPUc01Lz0=" + }, + "font": "Arial;13;0", + "left": 911, + "top": 211, + "width": 13, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAGDzMgPUs03oCM=" + }, + "edgePosition": 1, + "text": "是" + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAGDzMfQg80jCqU=" + }, + "tail": { + "$ref": "AAAAAAGDzMY4Yczuylo=" + }, + "lineStyle": 2, + "points": "899:232;936:232", + "nameLabel": { + "$ref": "AAAAAAGDzMgPUs04jjE=" + } + } + ] + }, + { + "_type": "FCManualOperation", + "_id": "AAAAAAGDzIFgwswE3G8=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "按下鼠标左键", + "ownedElements": [ + { + "_type": "FCFlow", + "_id": "AAAAAAGDzIl9YMwyP2Q=", + "_parent": { + "$ref": "AAAAAAGDzIFgwswE3G8=" + }, + "source": { + "$ref": "AAAAAAGDzIFgwswE3G8=" + }, + "target": { + "$ref": "AAAAAAGDzIQ9P8wOqSI=" + } + } + ] + }, + { + "_type": "FCDecision", + "_id": "AAAAAAGDzIQ9P8wOqSI=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "判断是否在已经选择框内(外扩指定误差)", + "ownedElements": [ + { + "_type": "FCFlow", + "_id": "AAAAAAGDzIsU5MxWxFw=", + "_parent": { + "$ref": "AAAAAAGDzIQ9P8wOqSI=" + }, + "name": "否", + "source": { + "$ref": "AAAAAAGDzIQ9P8wOqSI=" + }, + "target": { + "$ref": "AAAAAAGDzIqAycxMeF8=" + } + }, + { + "_type": "FCFlow", + "_id": "AAAAAAGDzMW9N8ziORg=", + "_parent": { + "$ref": "AAAAAAGDzIQ9P8wOqSI=" + }, + "name": "是", + "source": { + "$ref": "AAAAAAGDzIQ9P8wOqSI=" + }, + "target": { + "$ref": "AAAAAAGDzMVQH8zWJ4E=" + } + } + ] + }, + { + "_type": "FCDecision", + "_id": "AAAAAAGDzIqAycxMeF8=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "判断是否在某个图形内", + "ownedElements": [ + { + "_type": "FCFlow", + "_id": "AAAAAAGDzJMpwMxrWxI=", + "_parent": { + "$ref": "AAAAAAGDzIqAycxMeF8=" + }, + "name": "是", + "source": { + "$ref": "AAAAAAGDzIqAycxMeF8=" + }, + "target": { + "$ref": "AAAAAAGDzJLI1sxhdvU=" + } + }, + { + "_type": "FCFlow", + "_id": "AAAAAAGDzJPH2syBODY=", + "_parent": { + "$ref": "AAAAAAGDzIqAycxMeF8=" + }, + "name": "否", + "source": { + "$ref": "AAAAAAGDzIqAycxMeF8=" + }, + "target": { + "$ref": "AAAAAAGDzJNrqsx1+uM=" + } + } + ] + }, + { + "_type": "FCProcess", + "_id": "AAAAAAGDzJLI1sxhdvU=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "将这个图形设置成被选择模式" + }, + { + "_type": "FCProcess", + "_id": "AAAAAAGDzJNrqsx1+uM=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "矩形选择模式" + }, + { + "_type": "FCDecision", + "_id": "AAAAAAGDzMVQH8zWJ4E=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "判断是否在四周的点上", + "ownedElements": [ + { + "_type": "FCFlow", + "_id": "AAAAAAGDzMaqP8z4x1Y=", + "_parent": { + "$ref": "AAAAAAGDzMVQH8zWJ4E=" + }, + "name": "否", + "source": { + "$ref": "AAAAAAGDzMVQH8zWJ4E=" + }, + "target": { + "$ref": "AAAAAAGDzMY4YczsEno=" + } + }, + { + "_type": "FCFlow", + "_id": "AAAAAAGDzMf33s0rykE=", + "_parent": { + "$ref": "AAAAAAGDzMVQH8zWJ4E=" + }, + "name": "是", + "source": { + "$ref": "AAAAAAGDzMVQH8zWJ4E=" + }, + "target": { + "$ref": "AAAAAAGDzMej8M0YAm4=" + } + } + ] + }, + { + "_type": "FCDecision", + "_id": "AAAAAAGDzMY4YczsEno=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "判断是否在四周的线上", + "ownedElements": [ + { + "_type": "FCFlow", + "_id": "AAAAAAGDzMb8u80LxrU=", + "_parent": { + "$ref": "AAAAAAGDzMY4YczsEno=" + }, + "name": "否", + "source": { + "$ref": "AAAAAAGDzMY4YczsEno=" + }, + "target": { + "$ref": "AAAAAAGDzMbUW80CkNo=" + } + }, + { + "_type": "FCFlow", + "_id": "AAAAAAGDzMgPUc01Lz0=", + "_parent": { + "$ref": "AAAAAAGDzMY4YczsEno=" + }, + "name": "是", + "source": { + "$ref": "AAAAAAGDzMY4YczsEno=" + }, + "target": { + "$ref": "AAAAAAGDzMfQgs0hRTw=" + } + } + ] + }, + { + "_type": "FCProcess", + "_id": "AAAAAAGDzMbUW80CkNo=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "移动模式" + }, + { + "_type": "FCProcess", + "_id": "AAAAAAGDzMej8M0YAm4=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "更改尺寸" + }, + { + "_type": "FCProcess", + "_id": "AAAAAAGDzMfQgs0hRTw=", + "_parent": { + "$ref": "AAAAAAGDzH7wLMvxvqI=" + }, + "name": "更改尺寸" + } + ] + } + ] + } + ] +} \ No newline at end of file