-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathSkillControl.cs
42 lines (36 loc) · 932 Bytes
/
SkillControl.cs
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
using System.Collections.Generic;
using System.Linq;
using Eto.Drawing;
using Eto.Forms;
using GW2Scratch.EVTCAnalytics.Events;
using GW2Scratch.EVTCAnalytics.Model.Agents;
using GW2Scratch.EVTCAnalytics.Model.Skills;
namespace GW2Scratch.EVTCInspector
{
public class SkillControl : Panel
{
public Skill Skill
{
get => skill;
set
{
skill = value;
nameLabel.Text = skill == null ? "No skill selected." : $"Name: {skill.Name}";
jsonControl.Object = skill;
}
}
private Skill skill;
private readonly JsonSerializationControl jsonControl;
private readonly Label nameLabel = new Label();
public SkillControl()
{
var dataLayout = new DynamicLayout();
Content = dataLayout;
jsonControl = new JsonSerializationControl {Height = 200};
dataLayout.BeginVertical(new Padding(5));
dataLayout.AddRow(nameLabel);
dataLayout.AddRow(jsonControl);
dataLayout.EndVertical();
}
}
}