summaryrefslogtreecommitdiff
path: root/grapher/Layouts/OptionLayout.cs
blob: 2f297063ec40378b4f49f99839a3d6a9c2859887 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
    }
}