Update the Progress Bar as the RO values are refreshed in Word
This commit is contained in:
@@ -347,7 +347,7 @@ namespace Volian.Controls.Library
|
||||
DialogResult ans = MessageBox.Show("Save as Library Document for all usages?", "Document Save", MessageBoxButtons.YesNo);
|
||||
if (ans == DialogResult.No) cvtLibDoc = true;
|
||||
}
|
||||
MyDSOFile.SaveFile(doc.Length,doc.Ascii,MyDisplayTabItem.MyItemInfo, cvtLibDoc);
|
||||
MyDSOFile.SaveFile(doc.Length, doc.Ascii, MyDisplayTabItem.MyItemInfo, cvtLibDoc, StatusChanged);
|
||||
if (cvtLibDoc)
|
||||
{
|
||||
MyDisplayTabItem.Text = MyDisplayTabItem.MyItemInfo.TabTitle;
|
||||
@@ -355,6 +355,11 @@ namespace Volian.Controls.Library
|
||||
MyDisplayTabItem.SetPrivateTooltip(MyDisplayTabItem.MyItemInfo.TabToolTip);
|
||||
}
|
||||
}
|
||||
public void StatusChanged(VolianStatusType type, int count, string text)
|
||||
{
|
||||
DisplayTabControl tc = Parent.Parent.Parent as DisplayTabControl;
|
||||
tc.ONStatusChanged(this, new DisplayTabControlStatusEventArgs(type, count, text));
|
||||
}
|
||||
/// <summary>
|
||||
/// Before a document closes check to see if it's contents should be saved.
|
||||
/// </summary>
|
||||
|
@@ -12,8 +12,47 @@ using DevComponents.DotNetBar;
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
public delegate void DisplayTabControlEvent(object sender,EventArgs args);
|
||||
public delegate void DisplayTabControlStatusEvent(object sender, DisplayTabControlStatusEventArgs args);
|
||||
public partial class DisplayTabControlStatusEventArgs : EventArgs
|
||||
{
|
||||
private VolianStatusType _Type;
|
||||
public VolianStatusType Type
|
||||
{
|
||||
get { return _Type; }
|
||||
set { _Type = value; }
|
||||
}
|
||||
private int _Count;
|
||||
public int Count
|
||||
{
|
||||
get { return _Count; }
|
||||
set { _Count = value; }
|
||||
}
|
||||
private string _Text;
|
||||
public string Text
|
||||
{
|
||||
get { return _Text; }
|
||||
set { _Text = value; }
|
||||
}
|
||||
public DisplayTabControlStatusEventArgs()
|
||||
{
|
||||
_Type = VolianStatusType.Initialize;
|
||||
_Count = 0;
|
||||
_Text = "Default";
|
||||
}
|
||||
public DisplayTabControlStatusEventArgs(VolianStatusType type, int count, string text)
|
||||
{
|
||||
_Type = type;
|
||||
_Count = count;
|
||||
_Text = text;
|
||||
}
|
||||
}
|
||||
public partial class DisplayTabControl : UserControl
|
||||
{
|
||||
public event DisplayTabControlStatusEvent StatusChanged;
|
||||
public void ONStatusChanged(object Sender, DisplayTabControlStatusEventArgs args)
|
||||
{
|
||||
if (StatusChanged != null) StatusChanged(Sender, args);
|
||||
}
|
||||
public event DisplayTabControlEvent ToggleRibbonExpanded;
|
||||
public void OnToggleRibbonExpanded(object sender, EventArgs args)
|
||||
{
|
||||
|
Reference in New Issue
Block a user