/*private void SetTabPageTitle(VD2Data inDataDoc) * { * if (inDataDoc != null) * { * string savestring = ""; * if (inDataDoc.Unsaved) * { * savestring = "*"; * } * * string rwstring = ""; * string sourcestring = ""; * * if (inDataDoc.Source != null) * { * sourcestring = inDataDoc.Source.ShortName; * if (inDataDoc.Source.WriteAccess) * { * rwstring = "[RW]"; * } * else * { * rwstring = "[R]"; * } * } * string filename = System.IO.Path.GetFileNameWithoutExtension(inDataDoc.FilePath); * SetTabPageTitle("(" + sourcestring + rwstring + ") " + savestring + filename + " "); * } * }*/ void SetTabPageIcon(string inKey) { if (Parent is TabPage) { TabPage parentpage = (TabPage)Parent; parentpage.ImageKey = inKey; if (parentpage.Parent is DocumentTabControl) { DocumentTabControl grandparenttabcontrol = (DocumentTabControl)parentpage.Parent; grandparenttabcontrol.Repos(); } } }
private void SetTabPageTitle(string inTitle) { if (Parent is TabPage) { TabPage parentpage = (TabPage)Parent; parentpage.Text = inTitle; if (parentpage.Parent is DocumentTabControl) { DocumentTabControl grandparenttabcontrol = (DocumentTabControl)parentpage.Parent; grandparenttabcontrol.Repos(); } } }