forked from Haydend/ConsoleDraw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsWindow.cs
More file actions
55 lines (41 loc) · 1.85 KB
/
Copy pathSettingsWindow.cs
File metadata and controls
55 lines (41 loc) · 1.85 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using ConsoleDraw.Inputs;
using ConsoleDraw.Windows.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestApp.Windows
{
public class SettingsWindow : PopupWindow
{
public SettingsWindow(Window parentWindow)
: base("Settings", 6, 10, 80, 20, parentWindow)
{
BackgroundColour = ConsoleColor.White;
var appTitleLabel = new Label("App Title", 8, 12, "appTitleLabel", this);
var appTitleTxtBox = new TextBox(8, 25, Console.Title, "appTitleTxtBox", this, 10);
var saveOnExitLabel = new Label("Save On Exit", 10, 12, "saveOnExitLabel", this);
var saveOneExitChkBox = new CheckBox(10, 25, "saveOnExitCheckBox", this);
var byAllLabel = new Label("For All", 12, 12, "forAll", this);
var byAllRadioBtn = new RadioButton(12, 25, "byAllRadioBtn", "Users", this) { Checked = true };
var justYouLabel = new Label("Just You", 14, 12, "justYou", this);
var justYouRadioBtn = new RadioButton(14, 25, "justYouRadioBtn", "Users", this);
var applyBtn = new Button(24, 12, "Apply", "exitBtn", this) { Action = delegate() { ExitWindow(); } };
var exitBtn = new Button(24, 20, "Exit", "exitBtn", this) { Action = delegate() { ExitWindow(); } };
Inputs.Add(appTitleLabel);
Inputs.Add(appTitleTxtBox);
Inputs.Add(saveOnExitLabel);
Inputs.Add(saveOneExitChkBox);
Inputs.Add(byAllLabel);
Inputs.Add(byAllRadioBtn);
Inputs.Add(justYouLabel);
Inputs.Add(justYouRadioBtn);
Inputs.Add(applyBtn);
Inputs.Add(exitBtn);
CurrentlySelected = exitBtn;
Draw();
MainLoop();
}
}
}