summaryrefslogtreecommitdiff
path: root/grapher/Layouts/OptionLayout.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-07 15:19:39 -0700
committerJacob Palecki <[email protected]>2020-09-07 15:19:39 -0700
commitaff3a066575f4bfa429f67a5104a1fcffc5f326e (patch)
tree975c8cf984e97d818ebf530b68a246f4a4b1aefb /grapher/Layouts/OptionLayout.cs
parentPass args by ref for setting (diff)
downloadrawaccel-aff3a066575f4bfa429f67a5104a1fcffc5f326e.tar.xz
rawaccel-aff3a066575f4bfa429f67a5104a1fcffc5f326e.zip
Refactor type options
Diffstat (limited to 'grapher/Layouts/OptionLayout.cs')
-rw-r--r--grapher/Layouts/OptionLayout.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/grapher/Layouts/OptionLayout.cs b/grapher/Layouts/OptionLayout.cs
new file mode 100644
index 0000000..2f29706
--- /dev/null
+++ b/grapher/Layouts/OptionLayout.cs
@@ -0,0 +1,41 @@
+using grapher.Models.Options;
+
+namespace grapher.Layouts
+{
+ public class OptionLayout
+ {
+ #region Constructors
+
+ public OptionLayout(bool show, string name)
+ {
+ Show = show;
+ Name = name;
+ }
+
+ #endregion Constructors
+
+ #region Properties
+
+ private bool Show { get; }
+
+ private string Name { get; }
+
+ #endregion Properties
+
+ #region Methods
+
+ public void Layout(IOption option)
+ {
+ if (Show)
+ {
+ option.Show(Name);
+ }
+ else
+ {
+ option.Hide();
+ }
+ }
+
+ #endregion Methods
+ }
+}