Added logic to remember the status of the TreeView

Added specific file location for ErrorLog
Added logic to refresh ContentParts when Items added or deleted (Error 68)
This commit is contained in:
Rich
2010-11-17 17:30:08 +00:00
parent 74082c3038
commit c5f5e692c8
5 changed files with 39 additions and 4 deletions

View File

@@ -9,7 +9,8 @@
</configSections>
<log4net>
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
<param name="File" value="Proms2010ErrorLog.txt" />
<!--<param name="File" value="${USERPROFILE}/My Documents/Proms2010ErrorLog.txt" />-->
<param name="File" value="${APPDATA}/Volian/Proms2010/ErrorLog.txt" />
<param name="AppendToFile" value="true" />
<layout type="log4net.Layout.PatternLayout">
<!--<param name="Header" value="[Header]\r\n" />-->
@@ -62,7 +63,7 @@
</logger>
</log4net>
<appSettings>
<add key ="OperatingMode" value ="Debug"/>
<add key="OperatingMode" value="Debug" />
<add key="CslaAuthentication" value="Windows" />
<!--
<add key="CslaDataPortalProxy"
@@ -114,6 +115,9 @@
<setting name="AutoPopUpAnnotations" serializeAs="String">
<value>True</value>
</setting>
<setting name="TreeviewExpanded" serializeAs="String">
<value>False</value>
</setting>
</VEPROMS.Properties.Settings>
<UISampleNetBar1.Properties.Settings>
<setting name="ShowDefaultFolderProp" serializeAs="String">

View File

@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:2.0.50727.4206
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -195,5 +195,17 @@ namespace VEPROMS.Properties {
this["AutoPopUpAnnotations"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool TreeviewExpanded {
get {
return ((bool)(this["TreeviewExpanded"]));
}
set {
this["TreeviewExpanded"] = value;
}
}
}
}

View File

@@ -47,5 +47,8 @@
<Setting Name="AutoPopUpAnnotations" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="TreeviewExpanded" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -226,9 +226,15 @@ namespace VEPROMS
if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location;
if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size;
if (Settings.Default["WindowState"] != null) this.WindowState = Settings.Default.WindowState;
epProcedures.Expanded = Settings.Default.TreeviewExpanded;
_MyMRIList = MostRecentItemList.GetMRILst((System.Collections.Specialized.StringCollection)(Properties.Settings.Default["MRIList"]));
_MyMRIList.AfterRemove += new ItemInfoEvent(_MyMRIList_AfterRemove);
SetupMRU();
if (epProcedures.Expanded && _MyMRIList.Count > 0)
{
tv.AdjustTree(_MyMRIList[0].MyItemInfo.MyProcedure);
tv.SelectedNode.Expand();
}
displaySearch1.SetupAnnotationSearch(ctrlAnnotationDetails, tc);
ctrlAnnotationDetails.SetupAnnotations(displaySearch1);
SetupButtons();
@@ -287,6 +293,7 @@ namespace VEPROMS
private void SaveMRU()
{
Properties.Settings.Default.MRIList = _MyMRIList.ToSettings();
Properties.Settings.Default.TreeviewExpanded = epProcedures.Expanded;
Properties.Settings.Default.Save();
}
#endregion