-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathNumericUpDownHR.h
44 lines (39 loc) · 1.91 KB
/
NumericUpDownHR.h
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
#pragma once
#include "Common.h"
namespace MHGUASS
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
public ref class NumericUpDownHR : public NumericUpDown
{
public:
NumericUpDownHR() {}
virtual void UpdateEditText() override
{
ChangingText = true;
if( !StringTable::text )
Text = Value.ToString();
else if( (int)Value < 9 )
Text = FormatString1( HRNum, Value.ToString() );
else if( Value < Maximum )
Text = FormatString1( HRG, ( Value - 8 ).ToString() );
else
Text = StaticString( HRAll );
}
};
public ref class NumericUpDownVE : public NumericUpDown
{
public:
NumericUpDownVE() {}
virtual void UpdateEditText() override
{
ChangingText = true;
if( !StringTable::text )
Text = Value.ToString();
else
Text = FormatString1( VEStar, Value.ToString() );
}
};
}