Compare commits
	
		
			8 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 37f5336806 | |||
| ebdc98dfa7 | |||
| f3c8c860f5 | |||
| f7b27142c4 | |||
| 4fc37c54c5 | |||
| 849e1e57dd | |||
| c768ca5eba | |||
| c9516d90e9 | 
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1099,7 +1099,9 @@ namespace VEPROMS
 | 
				
			|||||||
					(int)changeBarData.FixedChangeColumn :
 | 
										(int)changeBarData.FixedChangeColumn :
 | 
				
			||||||
					System.Convert.ToInt32(changeBarData.DefaultCBLoc.Split(" ,".ToCharArray())[System.Convert.ToInt32(cbd.MyChangeBarLoc)]);
 | 
										System.Convert.ToInt32(changeBarData.DefaultCBLoc.Split(" ,".ToCharArray())[System.Convert.ToInt32(cbd.MyChangeBarLoc)]);
 | 
				
			||||||
				//cbd.MyChangeBarColumn = (int)changeBarData.FixedChangeColumn;
 | 
									//cbd.MyChangeBarColumn = (int)changeBarData.FixedChangeColumn;
 | 
				
			||||||
				if (cbd.MyChangeBarText == PrintChangeBarText.UserDef)
 | 
									if (cbd.MyChangeBarText == PrintChangeBarText.UserDef && !string.IsNullOrEmpty(ppTxbxChangeBarUserMsgOne.Text))
 | 
				
			||||||
 | 
										cbd.MyChangeBarMessage = ppTxbxChangeBarUserMsgOne.Text + @"\n" + ppTxbxChangeBarUserMsgTwo.Text;
 | 
				
			||||||
 | 
									else if (cbd.MyChangeBarText == PrintChangeBarText.UserDef)
 | 
				
			||||||
					cbd.MyChangeBarMessage = _DocVersionConfig.Print_UserCBMess1 + @"\n" + _DocVersionConfig.Print_UserCBMess2;
 | 
										cbd.MyChangeBarMessage = _DocVersionConfig.Print_UserCBMess1 + @"\n" + _DocVersionConfig.Print_UserCBMess2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -554,10 +554,23 @@ namespace VEPROMS
 | 
				
			|||||||
			tv.CreateContinuousActionSummary += new vlnTreeViewEvent(tv_CreateContinuousActionSummary);
 | 
								tv.CreateContinuousActionSummary += new vlnTreeViewEvent(tv_CreateContinuousActionSummary);
 | 
				
			||||||
			tv.SelectDateToStartChangeBars += tv_SelectDateToStartChangeBars;
 | 
								tv.SelectDateToStartChangeBars += tv_SelectDateToStartChangeBars;
 | 
				
			||||||
			tv.CreateTimeCriticalActionSummary += new vlnTreeViewEvent(tv_CreateTimeCriticalActionSummary);
 | 
								tv.CreateTimeCriticalActionSummary += new vlnTreeViewEvent(tv_CreateTimeCriticalActionSummary);
 | 
				
			||||||
 | 
								tv.RefreshFormats += new vlnTreeViewStatusEvent(RefreshFormats);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			displayBookMarks.ResetBookMarksInPROMSWindows += displayBookMarks_ResetBookMarksInPROMSWindows;
 | 
								displayBookMarks.ResetBookMarksInPROMSWindows += displayBookMarks_ResetBookMarksInPROMSWindows;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							//C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
							void RefreshFormats(object sender, vlnTreeStatusEventArgs args)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								Format.ClearFormatCache();
 | 
				
			||||||
 | 
								FormatInfo.ClearFormatInfoCache();
 | 
				
			||||||
 | 
								FormatInfo.Reset();
 | 
				
			||||||
 | 
								FormatInfoList.Reset();
 | 
				
			||||||
 | 
								Format.Reset();
 | 
				
			||||||
 | 
								FormatList.Reset();
 | 
				
			||||||
 | 
								displaySearch1.SetupContextMenu();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Part of Separate Windows upgrade C2015-022
 | 
							// Part of Separate Windows upgrade C2015-022
 | 
				
			||||||
		// Extend Changes to BookMark information to all of the child windows
 | 
							// Extend Changes to BookMark information to all of the child windows
 | 
				
			||||||
		void displayBookMarks_ResetBookMarksInPROMSWindows(object sender, EventArgs args)
 | 
							void displayBookMarks_ResetBookMarksInPROMSWindows(object sender, EventArgs args)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -765,6 +765,19 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
				foreach (DocVersionInfo dvi in _CacheByPrimaryKey[key])
 | 
									foreach (DocVersionInfo dvi in _CacheByPrimaryKey[key])
 | 
				
			||||||
					dvi.ResetProcedures();
 | 
										dvi.ResetProcedures();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							//C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
							public static void ResetAllProcedures()
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								foreach (string key in _CacheByPrimaryKey.Keys)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                foreach (DocVersionInfo dvi in _CacheByPrimaryKey[key])
 | 
				
			||||||
 | 
										dvi.ResetProcedures();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								foreach (DocVersionInfo dvi in _CacheList)
 | 
				
			||||||
 | 
										dvi.ResetProcedures();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		#region IVEReadOnlyItem
 | 
							#region IVEReadOnlyItem
 | 
				
			||||||
		public System.Collections.IList GetChildren()
 | 
							public System.Collections.IList GetChildren()
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -275,6 +275,14 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							//C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
							public static void Reset()
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								_LookupFormats?.Clear();
 | 
				
			||||||
 | 
								_LookupFormats = null;
 | 
				
			||||||
 | 
								_ = LookupFormats;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		private static Format AddFormatToDB(Format parent, string format, bool issub, DateTime Dts, string Userid, string fmtPath, string genmacPath)
 | 
							private static Format AddFormatToDB(Format parent, string format, bool issub, DateTime Dts, string Userid, string fmtPath, string genmacPath)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			string fmtdata = null;
 | 
								string fmtdata = null;
 | 
				
			||||||
@@ -509,6 +517,11 @@ public partial class FormatInfo : IFormatOrFormatInfo
 | 
				
			|||||||
				return _PROMSBaseFormat; 
 | 
									return _PROMSBaseFormat; 
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					        public static void Reset()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            _PROMSBaseFormat = null;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static FormatInfo Get(string name)
 | 
					        public static FormatInfo Get(string name)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			try
 | 
								try
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -97,6 +97,12 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
				if (formatInfo != null && formatInfo.ToString() == formatName) return formatInfo.Get();
 | 
									if (formatInfo != null && formatInfo.ToString() == formatName) return formatInfo.Get();
 | 
				
			||||||
			return null;
 | 
								return null;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							//C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
							public static void Reset()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
								_MyFormatInfoList?.Clear();
 | 
				
			||||||
 | 
								_MyFormatInfoList = null;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	public class DocStyleListConverter : System.ComponentModel.StringConverter
 | 
						public class DocStyleListConverter : System.ComponentModel.StringConverter
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -502,6 +502,15 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
            _FolderInfoExtension.Refresh(this);
 | 
					            _FolderInfoExtension.Refresh(this);
 | 
				
			||||||
            OnChange();// raise an event
 | 
					            OnChange();// raise an event
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
					        public static void ClearFolderInfoCache()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            _CacheByPrimaryKey.Clear();
 | 
				
			||||||
 | 
					            while (_CacheList.Count > 0)
 | 
				
			||||||
 | 
					            { _CacheList[0].Dispose(); }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static FolderInfo Get(int folderID)
 | 
					        public static FolderInfo Get(int folderID)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            //if (!CanGetObject())
 | 
					            //if (!CanGetObject())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -143,6 +143,14 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
            if (_CacheByParentID_Name.ContainsKey(key)) return _CacheByParentID_Name[key][0];
 | 
					            if (_CacheByParentID_Name.ContainsKey(key)) return _CacheByParentID_Name[key][0];
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
					        public static void ClearFormatCache()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            _CacheByPrimaryKey.Clear();
 | 
				
			||||||
 | 
					            while (_CacheList.Count > 0)
 | 
				
			||||||
 | 
					            { _CacheList[0].Dispose(); }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
        #region Business Methods
 | 
					        #region Business Methods
 | 
				
			||||||
        private string _ErrorMessage = string.Empty;
 | 
					        private string _ErrorMessage = string.Empty;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,6 +71,13 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
            if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
 | 
					            if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        //C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
					        public static void ClearFormatInfoCache()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            _CacheByPrimaryKey.Clear();
 | 
				
			||||||
 | 
					            while (_CacheList.Count > 0)
 | 
				
			||||||
 | 
					            { _CacheList[0].Dispose(); }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
        #region Business Methods
 | 
					        #region Business Methods
 | 
				
			||||||
        private string _ErrorMessage = string.Empty;
 | 
					        private string _ErrorMessage = string.Empty;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1269,6 +1269,11 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
					if (ok)
 | 
										if (ok)
 | 
				
			||||||
						if (pia == null && tn.VEObject as StepInfo == null) cm.MenuItems.Add("Properties...", new EventHandler(mi_Click));
 | 
											if (pia == null && tn.VEObject as StepInfo == null) cm.MenuItems.Add("Properties...", new EventHandler(mi_Click));
 | 
				
			||||||
					#endregion
 | 
										#endregion
 | 
				
			||||||
 | 
										#region Refresh_Tree
 | 
				
			||||||
 | 
										//C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
										if (tn == (VETreeNode)Nodes[0])
 | 
				
			||||||
 | 
											cm.MenuItems.Add("Refresh Tree", new EventHandler(mi_Click));
 | 
				
			||||||
 | 
										#endregion
 | 
				
			||||||
					//_MyLog.WarnFormat("Context Menu 7 - {0}", GC.GetTotalMemory(true));
 | 
										//_MyLog.WarnFormat("Context Menu 7 - {0}", GC.GetTotalMemory(true));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					if (fi != null && fi.HasWorkingDraft)
 | 
										if (fi != null && fi.HasWorkingDraft)
 | 
				
			||||||
@@ -2352,6 +2357,10 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
				case "Print All Approved Procedures": //C2025-017 print all approved procedures
 | 
									case "Print All Approved Procedures": //C2025-017 print all approved procedures
 | 
				
			||||||
					OnPrintAllApprovedProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
 | 
										OnPrintAllApprovedProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
 | 
									//C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
									case "Refresh Tree":
 | 
				
			||||||
 | 
										RefreshTree();
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
				default:
 | 
									default:
 | 
				
			||||||
					if (mi.Text.StartsWith("Showing Change Bars Starting"))
 | 
										if (mi.Text.StartsWith("Showing Change Bars Starting"))
 | 
				
			||||||
						OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
 | 
											OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
 | 
				
			||||||
@@ -3926,6 +3935,13 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
			if (Processing != null)
 | 
								if (Processing != null)
 | 
				
			||||||
				Processing(this, new vlnTreeStatusEventArgs(status, message));
 | 
									Processing(this, new vlnTreeStatusEventArgs(status, message));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							//C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
							public event vlnTreeViewStatusEvent RefreshFormats;
 | 
				
			||||||
 | 
							private void OnRefreshFormats(bool status, string message)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								if (RefreshFormats != null)
 | 
				
			||||||
 | 
									RefreshFormats(this, new vlnTreeStatusEventArgs(status, message));
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		#endregion
 | 
							#endregion
 | 
				
			||||||
		#region SetLastValuesAndSaveIfChangedStuff
 | 
							#region SetLastValuesAndSaveIfChangedStuff
 | 
				
			||||||
		private void SetLastValues(VETreeNode node)
 | 
							private void SetLastValues(VETreeNode node)
 | 
				
			||||||
@@ -4648,6 +4664,36 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
				if (myFolder.FolderID == ((FolderInfo)obj2).FolderID) return true;
 | 
									if (myFolder.FolderID == ((FolderInfo)obj2).FolderID) return true;
 | 
				
			||||||
			return false;
 | 
								return false;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							//C2021-035 Add Refresh Tree Option at highest level
 | 
				
			||||||
 | 
							public void RefreshTree()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
								//reload the base node
 | 
				
			||||||
 | 
								VETreeNode tbase = (VETreeNode) Nodes[0];
 | 
				
			||||||
 | 
								tbase.ChildrenLoaded = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								//Refresh the formats
 | 
				
			||||||
 | 
								OnRefreshFormats(true, "Refreshing Formats");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								//reset the procedure lists so db is re-queried in case they changed
 | 
				
			||||||
 | 
								//also clear other caches in case added steps / sections / etc...
 | 
				
			||||||
 | 
								PartInfo.ClearPartInfoCache();
 | 
				
			||||||
 | 
								ItemInfo.ClearItemInfoCache();
 | 
				
			||||||
 | 
								DocVersionInfo.ResetAllProcedures();
 | 
				
			||||||
 | 
								FolderInfo.ClearFolderInfoCache();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								//Refresh the base VEPROMS object
 | 
				
			||||||
 | 
								var fldr = tbase.VEObject as FolderInfo;
 | 
				
			||||||
 | 
								if (fldr != null)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									Invoke((Action)(() => { tbase.VEObject = FolderInfo.Get(fldr.FolderID); }));
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								//refresh the tree
 | 
				
			||||||
 | 
								Invoke((Action)(() => { tbase.RefreshNode(); }));
 | 
				
			||||||
 | 
								this.Invoke((Action)(() => { this.Update(); }));
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	#region DragHelper
 | 
						#region DragHelper
 | 
				
			||||||
	public class DragHelper
 | 
						public class DragHelper
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user