Added a IsBeingDeleted flag to the event arguments for closing a Word Document
Added a IsBeingDeleted argument to the CloseWordItem method Added a IsBeingDeleted Property to the DSOTabPanel so that it does not ask if it should save changes if the section is being deleted.
This commit is contained in:
@@ -27,6 +27,12 @@ namespace Volian.Controls.Library
|
||||
public delegate void WordSectionDeletedEvent(object sender, WordSectionEventArgs args);
|
||||
public partial class vlnTreeSectionInfoEventArgs
|
||||
{
|
||||
private bool _IsDeleting = false;
|
||||
public bool IsDeleting
|
||||
{
|
||||
get { return _IsDeleting; }
|
||||
set { _IsDeleting = value; }
|
||||
}
|
||||
private SectionInfo _MySectionInfo;
|
||||
public SectionInfo MySectionInfo
|
||||
{
|
||||
@@ -37,6 +43,11 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
_MySectionInfo = mySectionInfo;
|
||||
}
|
||||
public vlnTreeSectionInfoEventArgs(SectionInfo mySectionInfo,bool isDeleting)
|
||||
{
|
||||
_MySectionInfo = mySectionInfo;
|
||||
_IsDeleting = isDeleting;
|
||||
}
|
||||
}
|
||||
public partial class vlnTreeEventArgs
|
||||
{
|
||||
@@ -1064,7 +1075,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
else if (_LastSectionInfo != null)
|
||||
{
|
||||
OnSectionShouldClose(this, new vlnTreeSectionInfoEventArgs(_LastSectionInfo));
|
||||
OnSectionShouldClose(this, new vlnTreeSectionInfoEventArgs(_LastSectionInfo,true));
|
||||
// always return false because an event gets fired to delete tree nodes.
|
||||
if (!DeleteItemInfoAndChildren(_LastSectionInfo))
|
||||
{
|
||||
|
Reference in New Issue
Block a user