summaryrefslogtreecommitdiff
path: root/grapher/Models/Options/ApplyOptions.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-02 01:39:36 -0700
committerJacob Palecki <[email protected]>2020-09-02 01:39:36 -0700
commit66131ff0e469aed0a44ad0fa7179b9cddfb66df5 (patch)
tree6997d7f06f327edb5874f1a8bf1bc16de98b21a0 /grapher/Models/Options/ApplyOptions.cs
parentMove optionsets to applyoptions (diff)
downloadrawaccel-66131ff0e469aed0a44ad0fa7179b9cddfb66df5.tar.xz
rawaccel-66131ff0e469aed0a44ad0fa7179b9cddfb66df5.zip
The menus mostly work
Diffstat (limited to 'grapher/Models/Options/ApplyOptions.cs')
-rw-r--r--grapher/Models/Options/ApplyOptions.cs39
1 files changed, 27 insertions, 12 deletions
diff --git a/grapher/Models/Options/ApplyOptions.cs b/grapher/Models/Options/ApplyOptions.cs
index 0241fdf..bfbc1ef 100644
--- a/grapher/Models/Options/ApplyOptions.cs
+++ b/grapher/Models/Options/ApplyOptions.cs
@@ -34,10 +34,9 @@ namespace grapher.Models.Options
OptionSetY = optionSetY;
ByComponentVectorXYLock.CheckedChanged += new System.EventHandler(OnByComponentXYLockChecked);
- ByComponentVectorXYLock.Checked = false;
ByComponentVectorXYLock.Checked = true;
- IsWhole = false;
+ EnableWholeApplication();
}
#endregion Constructors
@@ -124,44 +123,60 @@ namespace grapher.Models.Options
public void OnByComponentCheckedChange(object sender, EventArgs e)
{
- if (ByComponentVectorMenuItem.Checked)
- {
- EnableByComponentApplication();
- }
+ EnableByComponentApplication();
+ }
+
+ public void ShowWholeSet()
+ {
+ OptionSetX.SetRegularMode();
+ OptionSetY.Hide();
}
- public void ShowWholeOptionSet()
+ public void ShowByComponentAsOneSet()
{
OptionSetX.SetTitleMode("X = Y");
OptionSetY.Hide();
}
- public void ShowByComponentSets()
+ public void ShowByComponentAsTwoSets()
{
OptionSetX.SetTitleMode("X");
OptionSetY.SetTitleMode("Y");
OptionSetY.Show();
}
- private void OnByComponentXYLockChecked(object sender, EventArgs e)
- {
+ public void ShowByComponentSet()
+ {
if (ByComponentVectorXYLock.Checked)
{
- ShowWholeOptionSet();
+ ShowByComponentAsOneSet();
}
else
{
- ShowByComponentSets();
+ ShowByComponentAsTwoSets();
+ }
+ }
+
+ private void OnByComponentXYLockChecked(object sender, EventArgs e)
+ {
+ if (!IsWhole)
+ {
+ ShowByComponentSet();
}
}
public void EnableWholeApplication()
{
IsWhole = true;
+ ByComponentVectorXYLock.Hide();
+ ShowWholeSet();
}
+
public void EnableByComponentApplication()
{
IsWhole = false;
+ ByComponentVectorXYLock.Show();
+ ShowByComponentSet();
}
#endregion Methods