This commit is contained in:
parent
f05c7d0937
commit
5f7f94d1c9
@ -3,6 +3,7 @@
|
||||
<configSections>
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="VEPROMS.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<section name="UISampleNetBar1.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
@ -90,6 +91,17 @@
|
||||
providerName="System.Data.SqlClient" />-->
|
||||
</connectionStrings>
|
||||
<userSettings>
|
||||
<VEPROMS.Properties.Settings>
|
||||
<setting name="ShowDefaultFolderProp" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="PropPageStyle" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="SystemColor" serializeAs="String">
|
||||
<value>2</value>
|
||||
</setting>
|
||||
</VEPROMS.Properties.Settings>
|
||||
<UISampleNetBar1.Properties.Settings>
|
||||
<setting name="ShowDefaultFolderProp" serializeAs="String">
|
||||
<value>False</value>
|
||||
|
@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("VE-PROMS")]
|
||||
[assembly: AssemblyDescription("Sample User Interface for VE-PROMS .NET")]
|
||||
[assembly: AssemblyDescription("User Interface for VE-PROMS .NET")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Volian Enterprises, Inc.")]
|
||||
[assembly: AssemblyProduct("VE-PROMS .NET Beta Release")]
|
||||
|
@ -104,6 +104,7 @@ namespace VEPROMS.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("2")]
|
||||
public int SystemColor {
|
||||
get {
|
||||
return ((int)(this["SystemColor"]));
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UISampleNetBar1.Properties" GeneratedClassName="Settings">
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="VEPROMS.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="Location" Type="System.Drawing.Point" Scope="User">
|
||||
@ -24,7 +24,7 @@
|
||||
<Value Profile="(Default)">1</Value>
|
||||
</Setting>
|
||||
<Setting Name="SystemColor" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
<Value Profile="(Default)">2</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
@ -125,7 +125,6 @@ namespace VEPROMS
|
||||
// string st = string.Format("{0} - ({1})", info.FormatDescription, info.FilenameExtension);
|
||||
// //string st = string.Format("{0}", info.FormatDescription);
|
||||
// comboBoxEx1.Items.Add(st);
|
||||
//// comboBoxEx1.Items.Add(info.FormatDescription);
|
||||
// }
|
||||
|
||||
imageCodecInfoBindingSource.DataSource = ImageCodecInfo.GetImageDecoders();
|
||||
@ -140,7 +139,7 @@ namespace VEPROMS
|
||||
// Get the User's property page style "PropPageStyle" (this is a system wide user setting)
|
||||
// 1 - Button Dialog (default)
|
||||
// 2 - Tab Dialog
|
||||
if ((int)Settings.Default["PropPageStyle"] == 2)
|
||||
if ((int)Settings.Default["PropPageStyle"] == (int)PropPgStyle.Tab)
|
||||
{
|
||||
tcFolder.TabsVisible = true;
|
||||
panButtons.Visible = false;
|
||||
|
@ -118,10 +118,10 @@ namespace VEPROMS
|
||||
// This setting tells us if we should display the default values on this property page
|
||||
ppCbShwDefSettings.Checked = (Settings.Default["ShowDefaultProcedureProp"] != null) ? Settings.Default.ShowDefaultProcedureProp : false;
|
||||
|
||||
// Get the User's property page style "PropPageStyle"
|
||||
// Get the User's property page style "PropPageStyle" (this is a system wide user setting)
|
||||
// 1 - Button Dialog (default)
|
||||
// 2 - Tab Dialog
|
||||
if ((int)Settings.Default["PropPageStyle"] == 2) // tabbed interface
|
||||
if ((int)Settings.Default["PropPageStyle"] == (int)PropPgStyle.Tab)
|
||||
{
|
||||
tcProcProp.TabsVisible = true;
|
||||
panProcBtns.Visible = false;
|
||||
|
@ -77,10 +77,10 @@ namespace VEPROMS
|
||||
// Get setting telling us whether to display the default values on this property page
|
||||
ppCbShwDefSettings.Checked = (Settings.Default["ShowDefaultSectionProp"] != null) ? Settings.Default.ShowDefaultSectionProp : false;
|
||||
|
||||
// Get the User's property page style "PropPageStyle"
|
||||
// Get the User's property page style "PropPageStyle" (this is a system wide user setting)
|
||||
// 1 - Button Dialog (default)
|
||||
// 2 - Tab Dialog
|
||||
if ((int)Settings.Default["PropPageStyle"] == 2) // tabbed interface
|
||||
if ((int)Settings.Default["PropPageStyle"] == (int)PropPgStyle.Tab)
|
||||
{
|
||||
tcSectionProp.TabsVisible = true;
|
||||
panSectBtns.Visible = false;
|
||||
|
@ -51,6 +51,8 @@ namespace VEPROMS
|
||||
this.tiIntrFaceStngs = new DevComponents.DotNetBar.TabItem(this.components);
|
||||
this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel();
|
||||
this.tiStUpMsg = new DevComponents.DotNetBar.TabItem(this.components);
|
||||
this.btnReset = new DevComponents.DotNetBar.ButtonX();
|
||||
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||
this.groupPanel1.SuspendLayout();
|
||||
this.panButtons.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).BeginInit();
|
||||
@ -352,6 +354,23 @@ namespace VEPROMS
|
||||
this.tiStUpMsg.Name = "tiStUpMsg";
|
||||
this.tiStUpMsg.Text = "Startup Message";
|
||||
//
|
||||
// btnReset
|
||||
//
|
||||
this.btnReset.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnReset.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnReset.Location = new System.Drawing.Point(259, 605);
|
||||
this.btnReset.Name = "btnReset";
|
||||
this.btnReset.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.btnReset.Size = new System.Drawing.Size(105, 23);
|
||||
this.superTooltip1.SetSuperTooltip(this.btnReset, new DevComponents.DotNetBar.SuperTooltipInfo("Default Settings", "", "This will reset saved user settings back to the VE-PROMS system default.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(140, 95)));
|
||||
this.btnReset.TabIndex = 3;
|
||||
this.btnReset.Text = "Default Settings";
|
||||
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
|
||||
//
|
||||
// superTooltip1
|
||||
//
|
||||
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
|
||||
//
|
||||
// frmSysOptions
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
@ -359,6 +378,7 @@ namespace VEPROMS
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(932, 640);
|
||||
this.Controls.Add(this.btnReset);
|
||||
this.Controls.Add(this.tcSysOpts);
|
||||
this.Controls.Add(this.panButtons);
|
||||
this.Controls.Add(this.btnOK);
|
||||
@ -399,6 +419,8 @@ namespace VEPROMS
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX cbPropGrid;
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX cbTabbedIntrFace;
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX cbButtonIntrFace;
|
||||
private DevComponents.DotNetBar.ButtonX btnReset;
|
||||
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
||||
|
||||
|
||||
|
||||
|
@ -6,15 +6,31 @@ using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using DevComponents;
|
||||
using DevComponents.DotNetBar.Rendering;
|
||||
using DevComponents.DotNetBar;
|
||||
using VEPROMS.Properties;
|
||||
using DescriptiveEnum;
|
||||
|
||||
namespace VEPROMS
|
||||
{
|
||||
public partial class frmSysOptions : DevComponents.DotNetBar.Office2007Form
|
||||
{
|
||||
bool _initializing;
|
||||
public frmSysOptions()
|
||||
{
|
||||
_initializing = true;
|
||||
InitializeComponent();
|
||||
CurrentSettings();
|
||||
|
||||
btnGeneral.PerformClick();
|
||||
_initializing = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check the proper buttons with respect to the current settings
|
||||
/// </summary>
|
||||
private void CurrentSettings()
|
||||
{
|
||||
switch (Settings.Default.PropPageStyle)
|
||||
{
|
||||
case 1: cbButtonIntrFace.Checked = true;
|
||||
@ -24,24 +40,46 @@ namespace VEPROMS
|
||||
case 3: cbPropGrid.Checked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
btnGeneral.PerformClick();
|
||||
switch (Settings.Default.SystemColor)
|
||||
{
|
||||
case (int)eOffice2007ColorScheme.Black:
|
||||
cbRibonBlack.Checked = true;
|
||||
break;
|
||||
case (int)eOffice2007ColorScheme.Blue:
|
||||
cbRibonBlue.Checked = true;
|
||||
break;
|
||||
case (int)eOffice2007ColorScheme.Silver:
|
||||
cbRibonSilver.Checked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void cbRibonBlue_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DevComponents.DotNetBar.RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Blue);
|
||||
if (!_initializing)
|
||||
{
|
||||
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.Blue);
|
||||
Settings.Default.SystemColor = (int)eOffice2007ColorScheme.Blue;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbRibonSilver_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DevComponents.DotNetBar.RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Silver);
|
||||
if (!_initializing)
|
||||
{
|
||||
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.Silver);
|
||||
Settings.Default.SystemColor = (int)eOffice2007ColorScheme.Silver;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbRibonBlack_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DevComponents.DotNetBar.RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Black);
|
||||
if (!_initializing)
|
||||
{
|
||||
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.Black);
|
||||
Settings.Default.SystemColor = (int)eOffice2007ColorScheme.Black;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
@ -89,6 +127,14 @@ namespace VEPROMS
|
||||
btnIntrFaceStngs.Checked = false;
|
||||
}
|
||||
|
||||
private void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.Reset();// .Reload();
|
||||
CurrentSettings();
|
||||
// show the resetted color scheme
|
||||
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable((eOffice2007ColorScheme)Settings.Default.SystemColor);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
@ -10,14 +10,19 @@ using System.Windows.Forms;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using Csla;
|
||||
using DevComponents;
|
||||
using DevComponents.DotNetBar;
|
||||
using DevComponents.DotNetBar.Rendering;
|
||||
using Csla.Validation;
|
||||
using VEPROMS.Properties;
|
||||
using Volian.Controls.Library;
|
||||
using DescriptiveEnum;
|
||||
|
||||
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
|
||||
|
||||
namespace VEPROMS
|
||||
{
|
||||
enum PropPgStyle { Button = 1, Tab = 2, Grid = 3 };
|
||||
|
||||
public partial class frmVEPROMS : DevComponents.DotNetBar.Office2007RibbonForm
|
||||
{
|
||||
#region Log4Net
|
||||
@ -43,9 +48,7 @@ namespace VEPROMS
|
||||
InitializeComponent();
|
||||
|
||||
// set the color of the ribbon
|
||||
// - get the color selected by user if available
|
||||
// TO DO: set and read from Settings.settings
|
||||
//DevComponents.DotNetBar.RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable((Settings.Default["SystemColor"] != null) ? Settings.Default.SystemColor : (int)DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Black);
|
||||
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable((eOffice2007ColorScheme)Settings.Default.SystemColor);
|
||||
|
||||
VETreeNode tn = VETreeNode.GetFolder(1);
|
||||
tv.Nodes.Add(tn);
|
||||
@ -305,7 +308,7 @@ namespace VEPROMS
|
||||
// 2 - Tab dialog interface
|
||||
// 3 - Property Grid interface
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
if ((int)Settings.Default["PropPageStyle"] == 3)
|
||||
if ((int)Settings.Default["PropPageStyle"] == (int)PropPgStyle.Grid)
|
||||
DoPropertyGrid(); // Will display a Property Grid interface
|
||||
else
|
||||
DoPropertyPages(); // Will display either a Button or a Tab dialog
|
||||
@ -386,7 +389,7 @@ namespace VEPROMS
|
||||
/// </summary>
|
||||
private void DoPropertyPages()
|
||||
{
|
||||
// Display a property page. (this does either a tabbed or button interface)
|
||||
// Display a property page. (the ppStyle selects either a tabbed or button interface)
|
||||
VETreeNode tn = (VETreeNode)(tv.SelectedNode);
|
||||
switch (tn.VEObject.GetType().Name)
|
||||
{
|
||||
@ -766,10 +769,7 @@ namespace VEPROMS
|
||||
|
||||
private void OpenItem(ItemInfo item)
|
||||
{
|
||||
DisplayPanel vlnCSLAPanel1;
|
||||
ItemInfo tmp = item;
|
||||
while (tmp.MyContent.Type >= 10000) tmp = (ItemInfo)tmp.ActiveParent;
|
||||
vlnCSLAPanel1 = AddProcedureTab(tmp);
|
||||
DisplayPanel vlnCSLAPanel1 = AddProcedureTab(item.MyProcedure);
|
||||
vlnCSLAPanel1.ItemSelect(item);
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,6 @@ namespace VEPROMS
|
||||
//{
|
||||
// string st = string.Format("{0} - ({1})", info.FormatDescription, info.FilenameExtension);
|
||||
// comboBoxEx1.Items.Add(st);
|
||||
// // comboBoxEx1.Items.Add(info.FormatDescription);
|
||||
//}
|
||||
|
||||
docVersionConfigBindingSource.DataSource = _DocVersionConfig;
|
||||
@ -153,10 +152,10 @@ namespace VEPROMS
|
||||
// Get setting telling us whether to display the default values on this property page
|
||||
ppCbShwDefSettings.Checked = (Settings.Default["ShowDefaultVersionProp"] != null) ? Settings.Default.ShowDefaultVersionProp : false;
|
||||
|
||||
// Get the User's property page style "PropPageStyle"
|
||||
// Get the User's property page style "PropPageStyle" (this is a system wide user setting)
|
||||
// 1 - Button Dialog (default)
|
||||
// 2 - Tab Dialog
|
||||
if ((int)Settings.Default["PropPageStyle"] == 2) // tabbed interface
|
||||
if ((int)Settings.Default["PropPageStyle"] == (int)PropPgStyle.Tab)
|
||||
{
|
||||
tcVersions.TabsVisible = true;
|
||||
panVerBtns.Visible = false;
|
||||
|
@ -26,7 +26,16 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get { return this.MyContent.ContentPartCount > 0; }
|
||||
}
|
||||
private IVEDrillDown _ActiveParent=null;
|
||||
public Item MyProcedure
|
||||
{
|
||||
get
|
||||
{
|
||||
// Walk up active parents until the parent is not an item
|
||||
Item tmp = this;
|
||||
while (tmp.ActiveParent.GetType().Name != "DocVersion") tmp = (Item)tmp.ActiveParent;
|
||||
return tmp;
|
||||
}
|
||||
} private IVEDrillDown _ActiveParent = null;
|
||||
public IVEDrillDown ActiveParent
|
||||
{
|
||||
get
|
||||
@ -420,6 +429,16 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get { return this.MyContent.ContentPartCount > 0; }
|
||||
}
|
||||
public ItemInfo MyProcedure
|
||||
{
|
||||
get
|
||||
{
|
||||
// Walk up active parents until the parent is not an item
|
||||
ItemInfo tmp = this;
|
||||
while (tmp.ActiveParent.GetType().Name != "DocVersionInfo") tmp = (ItemInfo)tmp.ActiveParent;
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
private IVEDrillDownReadOnly _ActiveParent = null;
|
||||
public IVEDrillDownReadOnly ActiveParent
|
||||
{
|
||||
|
@ -69,6 +69,7 @@
|
||||
<Compile Include="Extension\ItemExt.cs" />
|
||||
<Compile Include="Extension\PartExt.cs" />
|
||||
<Compile Include="Extension\PropertyDescriptors.cs" />
|
||||
<Compile Include="Extension\ROFSTExt.cs" />
|
||||
<Compile Include="Extension\TransitionExt.cs" />
|
||||
<Compile Include="Format\DocStyles.cs" />
|
||||
<Compile Include="Format\ENums.cs" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user