Rich e42c3cea5c Save WindowState - Maximize, Minimize, Normal by user.
Load all at once code to support print.
Open Command from the Start (PROMS2010) Menu.
Enter key on treeview executes Open.
The Treeview was retaining focus after opening procedures or accessory documents. This was fixed.
Tab Bar initialized to the full width.
Items were not always being displayed after the tree was clicked.
The RO and Transition Info tabs are made invisible for accessory documents.
The Tags, RO and Transition tabs are made invisible when no doucment is selected.
Enter the DSO Framer window when it is created.
Enter the Accessory page editor or step editor when a tab is selected.
Remember the last selection in a step editor page when you return.
Activate one of the remaining tabs when a tab is closed.
Embed the pushpin images.
2008-05-21 21:00:07 +00:00

140 lines
3.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using Csla;
using Csla.Data;
namespace VEPROMS.CSLA.Library
{
public partial class ContentPart
{
public override string ToString()
{
return string.Format("{0} {1}", MyItem.MyContent.Number, MyItem.MyContent.Text);
}
}
public partial class ItemPart
{
public override string ToString()
{
return string.Format("{0} {1}", _MyContent.Number, MyContent.Text);
}
}
public partial class Part
{
public override string ToString()
{
return string.Format("{0} {1}", MyItem.MyContent.Number, MyItem.MyContent.Text);
}
}
public partial class PartInfoList
{
internal PartInfoList(SafeDataReader dr, ItemInfo itemInfo)
{
AddPartInfo(dr,itemInfo);
}
internal void AddPartInfo(SafeDataReader dr, ItemInfo itemInfo)
{
IsReadOnly = false;
this.Add(new PartInfo(dr, itemInfo));
IsReadOnly = true;
}
}
public partial class PartInfo : IVEDrillDownReadOnly
{
internal PartInfo(SafeDataReader dr, ItemInfo itemInfo)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] PartInfo.Constructor", GetHashCode());
try
{
ReadData(dr, itemInfo);
}
catch (Exception ex)
{
if (_MyLog.IsErrorEnabled) _MyLog.Error("PartInfo.Constructor", ex);
throw new DbCslaException("PartInfo.Constructor", ex);
}
}
private void ReadData(SafeDataReader dr, ItemInfo itemInfo)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] PartInfo.ReadData", GetHashCode());
try
{
_ContentID = dr.GetInt32("pContentID");
_FromType = dr.GetInt32("FromType");
_ItemID = dr.GetInt32("ItemID");
_DTS = dr.GetDateTime("pDTS");
_UserID = dr.GetString("pUserID");
_MyItem = itemInfo;
_MyItems = new ItemInfoList(itemInfo);
}
catch (Exception ex)
{
if (_MyLog.IsErrorEnabled) _MyLog.Error("PartInfo.ReadData", ex);
_ErrorMessage = ex.Message;
throw new DbCslaException("PartInfo.ReadData", ex);
}
}
public E_FromType PartType
{ get { return (E_FromType)_FromType; } }
public E_FromTypes PartTypes
{ get { return (E_FromTypes)_FromType; } }
public override string ToString()
{
return string.Format("{0}", PartTypes);
}
//public string ToString(string str, System.IFormatProvider ifp)
//{
// return ToString();
//}
#region IVEDrillDownReadOnly
public ItemInfoList _MyItems;
public ItemInfoList MyItems
{ get { return (_MyItems != null ? _MyItems : _MyItems = ItemInfoList.GetList(_ItemID, _FromType)); } }
public System.Collections.IList GetChildren()
{
return (_MyItems != null ? _MyItems : _MyItems = ItemInfoList.GetList(_ItemID, _FromType));
}
//public bool ChildrenAreLoaded
//{
// get { return _MyItems == null; }
//}
public bool HasChildren
{
get { return this.MyContent.ContentPartCount > 0; }
}
public IVEDrillDownReadOnly ActiveParent
{
get
{
ContentInfo parentContent = MyContent;
if (parentContent == null || parentContent.ContentItemCount == 0) return null;
return parentContent.ContentItems[0];
}
}
public FormatInfo ActiveFormat
{
get { return ActiveParent.ActiveFormat; }
}
public FormatInfo LocalFormat
{
get { return null; }
}
public DynamicTypeDescriptor MyConfig
{
get { return null; }
}
//public bool HasStandardSteps()
//{ return false; }
#endregion
}
public enum E_FromType : int
{
Procedure = 1, Section = 2, Caution = 3, Note = 4, RNO = 5, Step = 6, Table = 7
}
public enum E_FromTypes : int
{
Procedures = 1, Sections = 2, Cautions = 3, Notes = 4, RNOs = 5, Steps = 6, Tables = 7
}
}