-
Notifications
You must be signed in to change notification settings - Fork 2
/
frmFF7IDFJointsBonesSelection.cs
79 lines (64 loc) · 2.08 KB
/
frmFF7IDFJointsBonesSelection.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace KimeraCS
{
public partial class FrmFF7IDFJointsBonesSelection : Form
{
readonly ToolTip toolTip1 = new ToolTip();
public FrmFF7IDFJointsBonesSelection(List<string> strListJoints)
{
InitializeComponent();
// That's right. Let's put tooltips to two buttons
DefineToolTips();
// Let's populate the checked list
foreach (string strJoint in strListJoints)
{
chklbJointsBones.Items.Add(strJoint);
chklbJointsBones.SetItemChecked(chklbJointsBones.Items.Count - 1, true);
}
}
public void DefineToolTips()
{
// Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 1000;
toolTip1.InitialDelay = 500;
toolTip1.ReshowDelay = 250;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = true;
toolTip1.SetToolTip(btnSelectAll, "Select all joints/bones");
toolTip1.SetToolTip(btnUnselectAll, "Unselect all joints/bones");
}
private void BtnCancel_Click(object sender, EventArgs e)
{
chklbJointsBones.Items.Clear();
Close();
}
public void SetListItemsState(bool bState)
{
int i;
for (i = 0; i < chklbJointsBones.Items.Count; i++)
{
chklbJointsBones.SetItemChecked(i, bState);
}
}
private void BtnSelectAll_Click(object sender, EventArgs e)
{
SetListItemsState(true);
}
private void BtnUnselectAll_Click(object sender, EventArgs e)
{
SetListItemsState(false);
}
private void BtnOk_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}