Added ability for user to enter the path to Visio, Also fixed the Cancel button so that it restores the previous settings

This commit is contained in:
2017-03-20 20:30:19 +00:00
parent b8f330718e
commit ca9e0b2c1c
2 changed files with 143 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ namespace VEPROMS
_initializing = true;
InitializeComponent();
CurrentSettings();
SaveStartingSettings();
cbPropGrid.Visible = VlnSettings.DebugMode;
btnGeneral.PerformClick();
groupPanel9.Visible = false;// Don't allow Separate Windows
@@ -62,6 +63,7 @@ namespace VEPROMS
cbPastePlainText.Checked = Settings.Default.PastePlainText;
cbEnhancedDocumentSync.Checked = Settings.Default.SyncEnhancedDocuments;
cbSeparateWindows.Checked = Settings.Default.SeparateWindows;
txbxVisioPath.Text = Settings.Default.VisioPath;
}
private void cbEnhancedDocumentSync_CheckedChanged(object sender, System.EventArgs e)
{
@@ -128,6 +130,48 @@ namespace VEPROMS
this.Close();
}
private int ss_propPageStyle;
private int ss_SystemColor;
private Color ss_TransRangeColor;
private bool ss_PopUPAnnotations;
private bool ss_StepTypeToolTip;
private bool ss_SaveTreeviewExpanded;
private bool ss_PasteNoReturns;
private bool ss_PastePlainText;
private bool ss_SyncEnhancedDocuments;
private bool ss_SeparateWindows;
private string ss_VisioPath;
private void SaveStartingSettings()
{
ss_propPageStyle = Settings.Default.PropPageStyle;
ss_SystemColor = Settings.Default.SystemColor;
ss_TransRangeColor = Settings.Default.TransitionRangeColor;
ss_PopUPAnnotations = Settings.Default.AutoPopUpAnnotations;
ss_StepTypeToolTip = Settings.Default.StepTypeToolTip;
ss_SaveTreeviewExpanded = Settings.Default.SaveTreeviewExpanded;
ss_PasteNoReturns = Settings.Default.PasteNoReturns;
ss_PastePlainText = Settings.Default.PastePlainText;
ss_SyncEnhancedDocuments = Settings.Default.SyncEnhancedDocuments;
ss_SeparateWindows = Settings.Default.SeparateWindows;
ss_VisioPath = Settings.Default.VisioPath;
}
private void RestoreStartingSettings() // used with the cancel button
{
Settings.Default.PropPageStyle = ss_propPageStyle;
Settings.Default.SystemColor = ss_SystemColor;
Settings.Default.TransitionRangeColor = ss_TransRangeColor;
Settings.Default.AutoPopUpAnnotations = ss_PopUPAnnotations;
Settings.Default.StepTypeToolTip = ss_StepTypeToolTip;
Settings.Default.SaveTreeviewExpanded = ss_SaveTreeviewExpanded;
Settings.Default.PasteNoReturns = ss_PasteNoReturns;
Settings.Default.PastePlainText = ss_PastePlainText;
Settings.Default.SyncEnhancedDocuments = ss_SyncEnhancedDocuments;
Settings.Default.SeparateWindows = ss_SeparateWindows;
Settings.Default.VisioPath = ss_VisioPath;
}
private void btnIntrFaceStngs_Click(object sender, EventArgs e)
{
@@ -197,5 +241,19 @@ namespace VEPROMS
{
Settings.Default.SeparateWindows = cbSeparateWindows.Checked;
}
private void txbxVisioPath_Leave(object sender, EventArgs e)
{
Settings.Default.VisioPath = txbxVisioPath.Text;
}
private void btnCancel_Click(object sender, EventArgs e)
{
RestoreStartingSettings();
}
private void txbxVisioPath_Leave_1(object sender, EventArgs e)
{
Settings.Default.VisioPath = txbxVisioPath.Text;
}
}
}