-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from simon-winter/feature/templates
Feature/templates
- Loading branch information
Showing
16 changed files
with
813 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace UnityDotsAuthoringGenerator.Classes { | ||
|
||
internal class Checkbox { | ||
public string Name { get; set; } | ||
|
||
public bool Checked | ||
{ | ||
get { | ||
if (SettingsManager.Instance.TryGet(Name) != "True") { | ||
return false; | ||
} | ||
return true; | ||
} | ||
set { | ||
SettingsManager.Instance.Set(Name, value.ToString()); | ||
} | ||
} | ||
|
||
public Checkbox(string name, bool defaultChecked) | ||
{ | ||
Name = name; | ||
var isChecked = SettingsManager.Instance.TryGet(name); | ||
|
||
if (isChecked == "") { | ||
SettingsManager.Instance.Set(Name, defaultChecked.ToString()); | ||
SettingsManager.Instance.SaveSettings(); | ||
} else { | ||
Checked = bool.Parse(isChecked); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.