| | |
| | | "WorkspaceRootPath": "C:\\Workspace\\PdmSwPlugin2\\", |
| | | "Documents": [ |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6E609A8C-583B-4607-A510-FA84218C4A31}|PdmSwPlugin.Main\\PdmSwPlugin.Main.csproj|c:\\workspace\\pdmswplugin2\\pdmswplugin.main\\constant\\pluginconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6E609A8C-583B-4607-A510-FA84218C4A31}|PdmSwPlugin.Main\\PdmSwPlugin.Main.csproj|solutionrelative:pdmswplugin.main\\constant\\pluginconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{BE239D32-7253-4D19-8793-159E98545B55}|PdmSwPlugin.DrawApprove\\PdmSwPlugin.DrawApprove.csproj|c:\\workspace\\pdmswplugin2\\pdmswplugin.drawapprove\\xamlwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{BE239D32-7253-4D19-8793-159E98545B55}|PdmSwPlugin.DrawApprove\\PdmSwPlugin.DrawApprove.csproj|solutionrelative:pdmswplugin.drawapprove\\xamlwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{1033FBD8-8700-4CD0-808A-BB97DB057A6B}|PdmSwPlugin.PDM\\PdmSwPlugin.PDM.csproj|c:\\workspace\\pdmswplugin2\\pdmswplugin.pdm\\pdmcontrol.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{1033FBD8-8700-4CD0-808A-BB97DB057A6B}|PdmSwPlugin.PDM\\PdmSwPlugin.PDM.csproj|solutionrelative:pdmswplugin.pdm\\pdmcontrol.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{44BCE7B9-F984-426B-9997-FC1FB1A49CC0}|CustomRictBox\\PdmSwPlugin.UI.csproj|c:\\workspace\\pdmswplugin2\\customrictbox\\customrichbox.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{44BCE7B9-F984-426B-9997-FC1FB1A49CC0}|CustomRictBox\\PdmSwPlugin.UI.csproj|solutionrelative:customrictbox\\customrichbox.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{BE239D32-7253-4D19-8793-159E98545B55}|PdmSwPlugin.DrawApprove\\PdmSwPlugin.DrawApprove.csproj|c:\\workspace\\pdmswplugin2\\pdmswplugin.drawapprove\\drawapprove.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{BE239D32-7253-4D19-8793-159E98545B55}|PdmSwPlugin.DrawApprove\\PdmSwPlugin.DrawApprove.csproj|solutionrelative:pdmswplugin.drawapprove\\drawapprove.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{E17EF6B6-EE83-45AA-B0C0-E3A097089E97}|PdmSwPlugin.Common\\PdmSwPlugin.Common.csproj|c:\\workspace\\pdmswplugin2\\pdmswplugin.common\\util\\dmsldfileextentionchecker.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{E17EF6B6-EE83-45AA-B0C0-E3A097089E97}|PdmSwPlugin.Common\\PdmSwPlugin.Common.csproj|solutionrelative:pdmswplugin.common\\util\\dmsldfileextentionchecker.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7ACEDAA9-2DE8-4485-837A-E7D58812A6DC}|PdmSw\\PdmSw.csproj|c:\\workspace\\pdmswplugin2\\pdmsw\\settings\\pluginsetting.xml||{FA3CD31E-987B-443A-9B81-186104E8DAC1}", |
| | | "RelativeMoniker": "D:0:0:{7ACEDAA9-2DE8-4485-837A-E7D58812A6DC}|PdmSw\\PdmSw.csproj|solutionrelative:pdmsw\\settings\\pluginsetting.xml||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" |
| | | "AbsoluteMoniker": "D:0:0:{BE239D32-7253-4D19-8793-159E98545B55}|PdmSwPlugin.DrawApprove\\PdmSwPlugin.DrawApprove.csproj|c:\\workspace\\pdmswplugin2\\pdmswplugin.drawapprove\\xamlwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", |
| | | "RelativeMoniker": "D:0:0:{BE239D32-7253-4D19-8793-159E98545B55}|PdmSwPlugin.DrawApprove\\PdmSwPlugin.DrawApprove.csproj|solutionrelative:pdmswplugin.drawapprove\\xamlwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" |
| | | } |
| | | ], |
| | | "DocumentGroupContainers": [ |
| | |
| | | "DocumentGroups": [ |
| | | { |
| | | "DockedWidth": 200, |
| | | "SelectedChildIndex": 0, |
| | | "SelectedChildIndex": 1, |
| | | "Children": [ |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 0, |
| | | "Title": "PluginConst.cs", |
| | | "DocumentMoniker": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.Main\\Constant\\PluginConst.cs", |
| | | "RelativeDocumentMoniker": "PdmSwPlugin.Main\\Constant\\PluginConst.cs", |
| | | "ToolTip": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.Main\\Constant\\PluginConst.cs", |
| | | "RelativeToolTip": "PdmSwPlugin.Main\\Constant\\PluginConst.cs", |
| | | "ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAAAAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2024-08-27T02:20:56.948Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 3, |
| | | "Title": "DMSldFileExtentionChecker.cs", |
| | | "DocumentMoniker": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.Common\\Util\\DMSldFileExtentionChecker.cs", |
| | | "RelativeDocumentMoniker": "PdmSwPlugin.Common\\Util\\DMSldFileExtentionChecker.cs", |
| | | "ToolTip": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.Common\\Util\\DMSldFileExtentionChecker.cs", |
| | | "RelativeToolTip": "PdmSwPlugin.Common\\Util\\DMSldFileExtentionChecker.cs", |
| | | "ViewState": "AQIAAAsAAAAAAAAAAAAYwBMAAAA2AAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2024-08-27T01:56:05.638Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 4, |
| | | "Title": "PluginSetting.xml", |
| | | "DocumentMoniker": "C:\\Workspace\\PdmSwPlugin2\\PdmSw\\Settings\\PluginSetting.xml", |
| | | "RelativeDocumentMoniker": "PdmSw\\Settings\\PluginSetting.xml", |
| | | "ToolTip": "C:\\Workspace\\PdmSwPlugin2\\PdmSw\\Settings\\PluginSetting.xml", |
| | | "RelativeToolTip": "PdmSw\\Settings\\PluginSetting.xml", |
| | | "ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAAmAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003576|", |
| | | "WhenOpened": "2024-08-27T01:51:40.382Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 1, |
| | | "Title": "PdmControl.xaml.cs", |
| | | "DocumentMoniker": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.PDM\\PdmControl.xaml.cs", |
| | | "RelativeDocumentMoniker": "PdmSwPlugin.PDM\\PdmControl.xaml.cs", |
| | | "ToolTip": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.PDM\\PdmControl.xaml.cs", |
| | | "RelativeToolTip": "PdmSwPlugin.PDM\\PdmControl.xaml.cs", |
| | | "ViewState": "AQIAAJQCAAAAAAAAAAAYwJ0CAAA1AAAA", |
| | | "Title": "CustomRichBox.xaml.cs", |
| | | "DocumentMoniker": "C:\\Workspace\\PdmSwPlugin2\\CustomRictBox\\CustomRichBox.xaml.cs", |
| | | "RelativeDocumentMoniker": "CustomRictBox\\CustomRichBox.xaml.cs", |
| | | "ToolTip": "C:\\Workspace\\PdmSwPlugin2\\CustomRictBox\\CustomRichBox.xaml.cs", |
| | | "RelativeToolTip": "CustomRictBox\\CustomRichBox.xaml.cs", |
| | | "ViewState": "AQIAAKYBAAAAAAAAAAAYwLQBAAAlAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2024-08-27T01:28:33.744Z", |
| | | "WhenOpened": "2024-08-29T13:03:42.863Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 0, |
| | | "Title": "XamlWindow.xaml.cs", |
| | | "DocumentMoniker": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\XamlWindow.xaml.cs", |
| | | "RelativeDocumentMoniker": "PdmSwPlugin.DrawApprove\\XamlWindow.xaml.cs", |
| | | "ToolTip": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\XamlWindow.xaml.cs", |
| | | "RelativeToolTip": "PdmSwPlugin.DrawApprove\\XamlWindow.xaml.cs", |
| | | "ViewState": "AQIAAFYAAAAAAAAAAAAlwGMAAAAcAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2024-08-29T12:51:21.766Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "Title": "DrawApprove.xaml.cs", |
| | | "DocumentMoniker": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\DrawApprove.xaml.cs", |
| | | "RelativeDocumentMoniker": "PdmSwPlugin.DrawApprove\\DrawApprove.xaml.cs", |
| | | "ToolTip": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\DrawApprove.xaml.cs", |
| | | "RelativeToolTip": "PdmSwPlugin.DrawApprove\\DrawApprove.xaml.cs", |
| | | "ViewState": "AQIAAM8AAAAAAAAAAAAgwLcAAAAAAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2024-08-26T06:10:46.307Z", |
| | | "Title": "XamlWindow.xaml", |
| | | "DocumentMoniker": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\XamlWindow.xaml", |
| | | "RelativeDocumentMoniker": "PdmSwPlugin.DrawApprove\\XamlWindow.xaml", |
| | | "ToolTip": "C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\XamlWindow.xaml", |
| | | "RelativeToolTip": "PdmSwPlugin.DrawApprove\\XamlWindow.xaml", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", |
| | | "WhenOpened": "2024-08-29T12:51:16.825Z", |
| | | "EditorCaption": "" |
| | | } |
| | | ] |
| | |
| | | using Microsoft.Win32; |
| | | using System; |
| | | using System.ComponentModel; |
| | | using System.Diagnostics; |
| | | using System.IO; |
| | | using System.Reflection; |
| | | using System.Runtime.InteropServices.ComTypes; |
| | | using System.Text; |
| | | using System.Windows; |
| | | using System.Windows.Controls; |
| | | using System.Windows.Documents; |
| | |
| | | using System.Windows.Markup; |
| | | using System.Windows.Media; |
| | | using System.Windows.Media.Imaging; |
| | | using System.Windows.Media.Media3D; |
| | | |
| | | namespace PdmSwPlugin.UI |
| | | { |
| | |
| | | { |
| | | width = picMaxWidth; |
| | | } |
| | | TextPointer pointer = richTextBox.CaretPosition; |
| | | /// 行内插入图片 |
| | | var insertImg = new Image() { Source = img, Stretch = Stretch.Uniform, Width = width }; |
| | | var imgContainer = new InlineUIContainer(insertImg); |
| | | TextPointer pointer = richTextBox.CaretPosition; |
| | | pointer.Paragraph.Inlines.Add(imgContainer); |
| | | |
| | | //string base64 = ImageToBase64(img); |
| | | //string imgXaml = $"<Image Source=\"data:image/jpg;base64,{base64}\" />"; |
| | | //var imgContainer = new InlineUIContainer(imgXaml); |
| | | //pointer.Paragraph.Inlines.Add(imgXaml); |
| | | |
| | | /// 下面注释的这段是直接插入新段落的写法 |
| | | //var imgContainer = new BlockUIContainer(insertImg); |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public void ToBase64Image2() |
| | | { |
| | | richTextBox.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity)); |
| | | richTextBox.Arrange(new Rect(new Size(richTextBox.ActualWidth, richTextBox.ActualHeight))); |
| | | |
| | | // Create a DrawingVisual and use a VisualBrush to render the RichTextBox |
| | | DrawingVisual visual = new DrawingVisual(); |
| | | using (DrawingContext context = visual.RenderOpen()) |
| | | { |
| | | VisualBrush brush = new VisualBrush(richTextBox); |
| | | context.DrawRectangle(brush, null, new Rect(new Size(richTextBox.ActualWidth, richTextBox.ActualHeight))); |
| | | } |
| | | |
| | | // Render the DrawingVisual to a RenderTargetBitmap |
| | | RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap( |
| | | (int)richTextBox.ActualWidth, |
| | | (int)richTextBox.ActualHeight, |
| | | 96d, 96d, PixelFormats.Pbgra32); |
| | | |
| | | renderTargetBitmap.Render(visual); |
| | | |
| | | // Create a BitmapEncoder to encode the RenderTargetBitmap |
| | | PngBitmapEncoder pngEncoder = new PngBitmapEncoder(); |
| | | pngEncoder.Frames.Add(BitmapFrame.Create(renderTargetBitmap)); |
| | | using (FileStream stream = new FileStream("C:\\Workspace\\test.png", FileMode.OpenOrCreate)) |
| | | { |
| | | // Save the encoded PNG image to a memory stream |
| | | pngEncoder.Save(stream); |
| | | |
| | | stream.Flush(); |
| | | stream.Close(); |
| | | } |
| | | |
| | | /* using (MemoryStream memoryStream = new MemoryStream()) |
| | | { |
| | | // Save the encoded PNG image to a memory stream |
| | | pngEncoder.Save(memoryStream); |
| | | // Convert the memory stream to a byte array |
| | | byte[] imageBytes = memoryStream.ToArray(); |
| | | // Convert the byte array to a Base64 string |
| | | return Convert.ToBase64String(imageBytes); |
| | | }*/ |
| | | } |
| | | |
| | | public string ToBase64Image() |
| | | { |
| | | //string sss = XamlWriter.Save(richTextBox.Document); |
| | | //Debug.Print(sss); |
| | | // Force a measure and arrange of the RichTextBox to ensure all content is rendered |
| | | //richTextBox.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity)); |
| | | //richTextBox.Arrange(new Rect(new Size(richTextBox.ActualWidth, richTextBox.ActualHeight))); |
| | | |
| | | |
| | | //// Render the DrawingVisual to a RenderTargetBitmap |
| | | //RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap( |
| | | // (int)richTextBox.ActualWidth, |
| | | // (int)richTextBox.ActualHeight, |
| | | // 96d, 96d, PixelFormats.Pbgra32); |
| | | |
| | | //FlowDocumentReader reader = new FlowDocumentReader |
| | | //{ |
| | | // Document = richTextBox.Document |
| | | //}; |
| | | |
| | | //renderTargetBitmap.Render(reader); |
| | | |
| | | //// Create a BitmapEncoder to encode the RenderTargetBitmap |
| | | //PngBitmapEncoder pngEncoder = new PngBitmapEncoder(); |
| | | //pngEncoder.Frames.Add(BitmapFrame.Create(renderTargetBitmap)); |
| | | |
| | | //using (FileStream stream = new FileStream("C:\\Workspace\\test.png",FileMode.OpenOrCreate)) |
| | | //{ |
| | | // // Save the encoded PNG image to a memory stream |
| | | // pngEncoder.Save(stream); |
| | | |
| | | // stream.Flush(); |
| | | // stream.Close(); |
| | | //} |
| | | |
| | | //string sss = XamlWriter.Save(richTextBox.Document); |
| | | //Debug.Print(sss); |
| | | // Backup original size |
| | | var originalWidth = richTextBox.ExtentWidth; |
| | | var originalHeight = richTextBox.ExtentHeight; |
| | | |
| | | //richTextBox.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity)); |
| | | richTextBox.Arrange(new Rect(new Size(originalWidth, originalHeight))); |
| | | |
| | | int dpi = 300; |
| | | |
| | | // Create a RenderTargetBitmap with the new size |
| | | RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap( |
| | | (int)(originalWidth * dpi / 96), |
| | | (int)(originalHeight * dpi / 96), |
| | | 300d, 300d, PixelFormats.Default); |
| | | |
| | | // Render the control to the RenderTargetBitmap |
| | | renderTargetBitmap.Render(richTextBox); |
| | | |
| | | // Create an encoder (PNG in this case) |
| | | PngBitmapEncoder pngEncoder = new PngBitmapEncoder(); |
| | | pngEncoder.Frames.Add(BitmapFrame.Create(renderTargetBitmap)); |
| | | |
| | | |
| | | FileStream pngfs = new FileStream("C:\\1.png", FileMode.OpenOrCreate); |
| | | |
| | | BitmapEncoder be = new PngBitmapEncoder(); |
| | | be.Frames.Add(BitmapFrame.Create(renderTargetBitmap)); |
| | | |
| | | using (MemoryStream ms = new MemoryStream()) |
| | | { |
| | | be.Save(ms); |
| | | byte[] imageBytes = ms.ToArray(); |
| | | return Convert.ToBase64String(imageBytes); // 将字节数组转换为Base64字符串 |
| | | } |
| | | |
| | | //be.Save(pngfs); |
| | | //pngfs.Close(); |
| | | } |
| | | } |
| | | } |
| | |
| | | <ErrorReport>prompt</ErrorReport> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="HtmlToXamlConverter"> |
| | | <HintPath>..\PdmSwPlugin.Util\lib\HtmlToXamlConverter.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.Xml" /> |
| | |
| | | </FontFamily> |
| | | |
| | | <Style x:Key="LinkButton" TargetType="{x:Type Button}" > |
| | | <Style.Resources> |
| | | <SolidColorBrush x:Key="TextColor">Blue</SolidColorBrush> |
| | | </Style.Resources> |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate TargetType="{x:Type ButtonBase}"> |
| | | <ContentPresenter x:Name="buttonContent" TextBlock.FontSize="{TemplateBinding FontSize}" |
| | | TextBlock.FontFamily="{StaticResource iconfont}" |
| | | TextBlock.Foreground="Blue" |
| | | TextBlock.Foreground="{StaticResource TextColor}" |
| | | Margin="0,0,5,0" |
| | | VerticalAlignment="Center" |
| | | HorizontalAlignment="Center" |
| | |
| | | {"RootPath":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove","ProjectFileName":"PdmSwPlugin.DrawApprove.csproj","Configuration":"Debug|x64","FrameworkPath":"","Sources":[{"SourceFile":"RejectWindow.xaml.cs"},{"SourceFile":"ResolveWindow.xaml.cs"},{"SourceFile":"WebWindow.xaml.cs"},{"SourceFile":"XamlWindow.xaml.cs"},{"SourceFile":"DrawApprove.xaml.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\x64\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\DrawApprove.g.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\RejectWindow.g.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\ResolveWindow.g.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\WebWindow.g.cs"}],"References":[{"Reference":"C:\\Workspace\\PdmSwPlugin2\\lib\\log4net.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.Common\\bin\\x64\\Debug\\PdmSwPlugin.Common.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":true,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\PresentationCore.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\PresentationFramework.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS\\api\\redist\\SolidWorks.Interop.sldworks.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS\\api\\redist\\SolidWorks.Interop.swconst.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Configuration.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xaml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\bin\\x64\\Debug\\WebKitBrowser.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\WindowsBase.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\bin\\x64\\Debug\\PdmSwPlugin.DrawApprove.dll","OutputItemRelativePath":"PdmSwPlugin.DrawApprove.dll"},{"OutputItemFullPath":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\bin\\x64\\Debug\\PdmSwPlugin.DrawApprove.pdb","OutputItemRelativePath":"PdmSwPlugin.DrawApprove.pdb"}],"CopyToOutputEntries":[]} |
| | | {"RootPath":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove","ProjectFileName":"PdmSwPlugin.DrawApprove.csproj","Configuration":"Debug|x64","FrameworkPath":"","Sources":[{"SourceFile":"DrawAuditHisControl.xaml.cs"},{"SourceFile":"RejectWindow.xaml.cs"},{"SourceFile":"ResolveWindow.xaml.cs"},{"SourceFile":"WebWindow.xaml.cs"},{"SourceFile":"XamlWindow.xaml.cs"},{"SourceFile":"DrawApprove.xaml.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\x64\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\DrawAuditHisControl.g.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\DrawApprove.g.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\RejectWindow.g.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\ResolveWindow.g.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\WebWindow.g.cs"},{"SourceFile":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\obj\\x64\\Debug\\XamlWindow.g.cs"}],"References":[{"Reference":"C:\\Workspace\\PdmSwPlugin2\\lib\\log4net.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.Common\\bin\\x64\\Debug\\PdmSwPlugin.Common.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":true,"ProjectPath":""},{"Reference":"C:\\Workspace\\PdmSwPlugin2\\CustomRictBox\\bin\\x64\\Debug\\PdmSwPlugin.UI.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":true,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\PresentationCore.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\PresentationFramework.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS\\api\\redist\\SolidWorks.Interop.sldworks.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS\\api\\redist\\SolidWorks.Interop.swconst.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Configuration.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xaml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\bin\\x64\\Debug\\WebKitBrowser.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\WindowsBase.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\bin\\x64\\Debug\\PdmSwPlugin.DrawApprove.dll","OutputItemRelativePath":"PdmSwPlugin.DrawApprove.dll"},{"OutputItemFullPath":"C:\\Workspace\\PdmSwPlugin2\\PdmSwPlugin.DrawApprove\\bin\\x64\\Debug\\PdmSwPlugin.DrawApprove.pdb","OutputItemRelativePath":"PdmSwPlugin.DrawApprove.pdb"}],"CopyToOutputEntries":[]} |
| | |
| | | </Style.Triggers> |
| | | </Style> |
| | | |
| | | <Style x:Key="GLink" TargetType="{x:Type Button}" > |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate TargetType="{x:Type ButtonBase}"> |
| | | <ContentPresenter x:Name="buttonContent" TextBlock.FontSize="{TemplateBinding FontSize}" |
| | | TextBlock.FontFamily="{StaticResource iconfont}" |
| | | TextBlock.Foreground="Green" |
| | | Margin="0,0,5,0" |
| | | VerticalAlignment="Center" |
| | | HorizontalAlignment="Center" |
| | | Content="{TemplateBinding Content}"/> |
| | | <ControlTemplate.Triggers> |
| | | <Trigger Property="IsMouseOver" Value="True"> |
| | | <Setter TargetName="buttonContent" Property="TextBlock.Foreground" Value="Purple"/> |
| | | </Trigger> |
| | | </ControlTemplate.Triggers> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | |
| | | <Style x:Key="RLink" TargetType="{x:Type Button}" > |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate TargetType="{x:Type ButtonBase}"> |
| | | <ContentPresenter x:Name="buttonContent" TextBlock.FontSize="{TemplateBinding FontSize}" |
| | | TextBlock.FontFamily="{StaticResource iconfont}" |
| | | TextBlock.Foreground="Red" |
| | | Margin="0,0,5,0" |
| | | VerticalAlignment="Center" |
| | | HorizontalAlignment="Center" |
| | | Content="{TemplateBinding Content}"/> |
| | | <ControlTemplate.Triggers> |
| | | <Trigger Property="IsMouseOver" Value="True"> |
| | | <Setter TargetName="buttonContent" Property="TextBlock.Foreground" Value="Purple"/> |
| | | </Trigger> |
| | | </ControlTemplate.Triggers> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | |
| | | <treeData:TreeItemDataConverter x:Key="TreeItemDataConverter"/> |
| | | |
| | | <ResourceDictionary.MergedDictionaries> |
| | |
| | | AutoGenerateColumns="False" |
| | | CanUserAddRows="False" |
| | | CanUserSortColumns="False" |
| | | FontSize="18" |
| | | CanUserDeleteRows="False"> |
| | | <treeData:TreeDataGrid.CellStyle> |
| | | <Style TargetType="DataGridCell" > |
| | | <Setter Property="TextBox.Margin" Value="0"/> |
| | | </Style> |
| | | </treeData:TreeDataGrid.CellStyle> |
| | | |
| | | <treeData:TreeDataGrid.Columns> |
| | | <DataGridTemplateColumn Width="25"> |
| | | <DataGridTemplateColumn.Header> |
| | |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | |
| | | <DataGridTextColumn Header="申请人" Width="80" IsReadOnly="True" Binding="{Binding Data.requestUser}"/> |
| | | <DataGridTextColumn Header="流水单号" Width="80" IsReadOnly="True" Binding="{Binding Data.orderCode}"/> |
| | | <DataGridTextColumn Header="前一审核人" Width="80" IsReadOnly="True" Binding="{Binding Data.auditUser}"/> |
| | | <DataGridTextColumn Header="提交时间" Width="130" IsReadOnly="True" Binding="{Binding Data.updateTime}"/> |
| | | <DataGridTextColumn Header="申请人" Width="100" IsReadOnly="True" Binding="{Binding Data.requestUser}"/> |
| | | <DataGridTextColumn Header="流水单号" Width="120" IsReadOnly="True" Binding="{Binding Data.orderCode}"/> |
| | | <DataGridTextColumn Header="前一审核人" Width="100" IsReadOnly="True" Binding="{Binding Data.auditUser}"/> |
| | | <DataGridTextColumn Header="提交时间" Width="180" IsReadOnly="True" Binding="{Binding Data.updateTime}"/> |
| | | |
| | | <DataGridTemplateColumn Header="状态" Width="60" IsReadOnly="True"> |
| | | <DataGridTemplateColumn Header="状态" Width="80" IsReadOnly="True"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBlock Style="{StaticResource statusSlot}" DataContext="{Binding Data}" |
| | |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | |
| | | <DataGridTemplateColumn Header="操作" Width="200" IsReadOnly="True"> |
| | | <DataGridTemplateColumn Header="操作" Width="280" IsReadOnly="True"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <Button Style="{StaticResource LinkButton}" DataContext="{Binding Data}" Click="OpenDrw_Click">打开工程图</Button> |
| | | <Button Style="{StaticResource LinkButton}" DataContext="{Binding Data}" Click="OpenDoc_Click">打开图纸</Button> |
| | | <Button Style="{StaticResource LinkButton}" DataContext="{Binding Data}" Click="Resolve_Click">通过</Button> |
| | | <Button Style="{StaticResource LinkButton}" DataContext="{Binding Data}" Margin="0" Click="Reject_Click">不通过</Button> |
| | | <Button Style="{StaticResource GLink}" DataContext="{Binding Data}" Click="Resolve_Click">通过</Button> |
| | | <Button Style="{StaticResource RLink}" DataContext="{Binding Data}" Margin="0" Click="Reject_Click">不通过</Button> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | |
| | | <ColumnDefinition/> |
| | | <ColumnDefinition/> |
| | | </Grid.ColumnDefinitions> |
| | | <ctl:CustomRichBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="richBox"/> |
| | | <ctl:CustomRichBox HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="richBox"/> |
| | | <Button Grid.Row="1" Grid.Column="0" Click="Ok_Click">确定</Button> |
| | | <Button Grid.Row="1" Grid.Column="1" Click="Cancel_Click">取消</Button> |
| | | </Grid> |
| | |
| | | using SolidWorks.Interop.sldworks; |
| | | using System; |
| | | using System.ComponentModel; |
| | | using System.Diagnostics; |
| | | using System.Net.Http; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Threading.Tasks; |
| | |
| | | |
| | | private void Cancel_Click(object sender, RoutedEventArgs e) |
| | | { |
| | | string ss = richBox.ToBase64Image(); |
| | | Debug.Print(ss); |
| | | DialogResult = false; |
| | | } |
| | | |