diff --git a/PROMS/Volian.Controls.Library/DSOTabPanel.cs b/PROMS/Volian.Controls.Library/DSOTabPanel.cs index d69d1af3..a6dc3d1f 100644 --- a/PROMS/Volian.Controls.Library/DSOTabPanel.cs +++ b/PROMS/Volian.Controls.Library/DSOTabPanel.cs @@ -122,14 +122,14 @@ namespace Volian.Controls.Library { SaveDSO(); } - void _MyEdWord_BeforeDocumentOpened(object sender, EventArgs e)// B2017-133 Edraw + void DisableWordCommands()// B2017-133 Edraw { _MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisableClose, true); _MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisableNew, true); _MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisablePrint, true); _MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisablePrintPreview, true); _MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisablePrintQuick, true); - _MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisableSave, false); + _MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisableSave, true); _MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisableSaveAs, true); _MyEdWord.DisableStandardCommand(EDWordLib.CommandType.cmdTypeSave, true); _MyEdWord.DisableStandardCommand(EDWordLib.CommandType.cmdTypeClose, true); @@ -137,6 +137,21 @@ namespace Volian.Controls.Library _MyEdWord.DisableSaveHotKey(true); _MyEdWord.DisablePrintHotKey(true); } + void _MyEdWord_BeforeDocumentOpened(object sender, EventArgs e)// B2017-133 Edraw + { + //_MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisableClose, true); + //_MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisableNew, true); + //_MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisablePrint, true); + //_MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisablePrintPreview, true); + //_MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisablePrintQuick, true); + //_MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisableSave, true); + //_MyEdWord.DisableFileCommand(EDWordLib.WdUIType.wdUIDisableSaveAs, true); + //_MyEdWord.DisableStandardCommand(EDWordLib.CommandType.cmdTypeSave, true); + //_MyEdWord.DisableStandardCommand(EDWordLib.CommandType.cmdTypeClose, true); + //_MyEdWord.DisableStandardCommand(EDWordLib.CommandType.cmdTypePrint, true); + //_MyEdWord.DisableSaveHotKey(true); + //_MyEdWord.DisablePrintHotKey(true); + } void _MyEdWord_BeforeDocumentClosed(object sender, EventArgs e)// B2017-133 Edraw { Console.WriteLine("B2017-133 Edraw Before Document Closed"); @@ -195,6 +210,7 @@ namespace Volian.Controls.Library { this._MyEdWord.LicenseName = "Volian7573291802";// B2017-133 Edraw this._MyEdWord.LicenseCode = "EDW8-5527-1201-AB8A";// B2017-133 Edraw + DisableWordCommands(); this._MyEdWord.Open(MyDSOFile.MyFile.FullName); } catch (Exception ex)