From eaa42f22987dac808cb06f5b1a483fba518c829f Mon Sep 17 00:00:00 2001 From: Lyndon Date: Tue, 17 Oct 2017 11:11:42 +0200 Subject: [PATCH] gysdg --- BeWo/BeWo.csproj | 2 +- BeWo/BeWoApp.xaml | 1341 ++++++++++++++++++----------------- BeWo/Office/WordListener.cs | 48 +- 3 files changed, 697 insertions(+), 694 deletions(-) diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 2f3ca6f41..e4818c8dc 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -1975,7 +1975,7 @@ - + {8a83c4dc-a0b1-4a51-ae1d-366d7a05b298} ChatController diff --git a/BeWo/BeWoApp.xaml b/BeWo/BeWoApp.xaml index f3f683b2f..3359276a9 100644 --- a/BeWo/BeWoApp.xaml +++ b/BeWo/BeWoApp.xaml @@ -9,22 +9,22 @@ StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" ShutdownMode="OnExplicitShutdown"> - - - - - - - + + + + + + + - - - - - + + + + + - + @@ -57,45 +57,45 @@ - - - + + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/BeWo/Office/WordListener.cs b/BeWo/Office/WordListener.cs index 42b088545..89f69976e 100644 --- a/BeWo/Office/WordListener.cs +++ b/BeWo/Office/WordListener.cs @@ -1,37 +1,37 @@ using BS.Shared; -using Microsoft.Office.Interop.Word; +//using Microsoft.Office.Interop.Word; using System.IO; -using Application = Microsoft.Office.Interop.Word.Application; +//using Application = Microsoft.Office.Interop.Word.Application; namespace BeWo.Office { internal class WordListener { - private Application wordApp; - private Document wordDoc; - private ViewDestination viewDestination; + //private Application wordApp; + //private Document wordDoc; + //private ViewDestination viewDestination; - public WordListener(Application wordApp, Document wordDoc, ViewDestination destination) - { - this.wordApp = wordApp; - this.wordDoc = wordDoc; - viewDestination = destination; - } + //public WordListener(Application wordApp, Document wordDoc, ViewDestination destination) + //{ + // this.wordApp = wordApp; + // this.wordDoc = wordDoc; + // viewDestination = destination; + //} - void wordApp_DocumentBeforeSave(Document doc, ref bool saveAsUI, ref bool cancel) - { - if (this.viewDestination == ViewDestination.Edit && Path.Combine(doc.Path, doc.Name).ToLower() == Path.Combine(this.wordDoc.Path, this.wordDoc.Name).ToLower()) - { - doc.MailMerge.MainDocumentType = WdMailMergeMainDocType.wdNotAMergeDocument; - } - } + //void wordApp_DocumentBeforeSave(Document doc, ref bool saveAsUI, ref bool cancel) + //{ + // if (this.viewDestination == ViewDestination.Edit && Path.Combine(doc.Path, doc.Name).ToLower() == Path.Combine(this.wordDoc.Path, this.wordDoc.Name).ToLower()) + // { + // doc.MailMerge.MainDocumentType = WdMailMergeMainDocType.wdNotAMergeDocument; + // } + //} - private void Dispose() - { - wordApp = null; - wordDoc = null; + //private void Dispose() + //{ + // wordApp = null; + // wordDoc = null; - OfficeManager.DeleteTempFiles(); - } + // OfficeManager.DeleteTempFiles(); + //} } }