gysdg
This commit is contained in:
@@ -1975,7 +1975,7 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Chat\ChatController\ChatController.csproj">
|
||||
<ProjectReference Include="..\..\Chat\ChatController\ChatController.csproj">
|
||||
<Project>{8a83c4dc-a0b1-4a51-ae1d-366d7a05b298}</Project>
|
||||
<Name>ChatController</Name>
|
||||
</ProjectReference>
|
||||
|
||||
1341
BeWo/BeWoApp.xaml
1341
BeWo/BeWoApp.xaml
File diff suppressed because it is too large
Load Diff
@@ -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();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user