Subversion Repositories spk

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
88 cycrow 1
#pragma once
2
 
3
using namespace System;
4
using namespace System::ComponentModel;
5
using namespace System::Collections;
6
using namespace System::Windows::Forms;
7
using namespace System::Data;
8
using namespace System::Drawing;
9
 
10
 
11
namespace PluginManager {
12
 
13
	/// <summary>
14
	/// Summary for EditPrice
15
	///
16
	/// WARNING: If you change the name of this class, you will need to change the
17
	///          'Resource File Name' property for the managed resource compiler tool
18
	///          associated with all .resx files this class depends on.  Otherwise,
19
	///          the designers will not be able to interact properly with localized
20
	///          resources associated with this form.
21
	/// </summary>
22
	public ref class EditPrice : public System::Windows::Forms::Form
23
	{
24
	public:
25
		EditPrice(int price) : _iPrice(price)
26
		{
27
			InitializeComponent();
28
 
29
			this->numericUpDown1->Value = price;
30
		}
31
 
32
		int price()
33
		{
34
			return _iPrice;
35
		}
36
 
37
	protected:
38
		int _iPrice;
39
 
40
		/// <summary>
41
		/// Clean up any resources being used.
42
		/// </summary>
43
		~EditPrice()
44
		{
45
			if (components)
46
			{
47
				delete components;
48
			}
49
		}
50
	private: System::Windows::Forms::Label^  label1;
51
	protected: 
52
	private: System::Windows::Forms::Label^  label2;
53
	private: System::Windows::Forms::NumericUpDown^  numericUpDown1;
54
	private: System::Windows::Forms::NumericUpDown^  numericUpDown2;
55
	private: System::Windows::Forms::Panel^  panel1;
56
	private: System::Windows::Forms::Button^  button2;
57
	private: System::Windows::Forms::Button^  button1;
58
 
59
	private:
60
		/// <summary>
61
		/// Required designer variable.
62
		/// </summary>
63
		System::ComponentModel::Container ^components;
64
 
65
#pragma region Windows Form Designer generated code
66
		/// <summary>
67
		/// Required method for Designer support - do not modify
68
		/// the contents of this method with the code editor.
69
		/// </summary>
70
		void InitializeComponent(void)
71
		{
72
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(EditPrice::typeid));
73
			this->label1 = (gcnew System::Windows::Forms::Label());
74
			this->label2 = (gcnew System::Windows::Forms::Label());
75
			this->numericUpDown1 = (gcnew System::Windows::Forms::NumericUpDown());
76
			this->numericUpDown2 = (gcnew System::Windows::Forms::NumericUpDown());
77
			this->panel1 = (gcnew System::Windows::Forms::Panel());
78
			this->button2 = (gcnew System::Windows::Forms::Button());
79
			this->button1 = (gcnew System::Windows::Forms::Button());
80
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->BeginInit();
81
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown2))->BeginInit();
82
			this->panel1->SuspendLayout();
83
			this->SuspendLayout();
84
			// 
85
			// label1
86
			// 
87
			this->label1->AutoSize = true;
88
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
89
				static_cast<System::Byte>(0)));
90
			this->label1->Location = System::Drawing::Point(12, 19);
91
			this->label1->Name = L"label1";
92
			this->label1->Size = System::Drawing::Size(58, 20);
93
			this->label1->TabIndex = 0;
94
			this->label1->Text = L"Relval";
95
			this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
96
			// 
97
			// label2
98
			// 
99
			this->label2->AutoSize = true;
100
			this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
101
				static_cast<System::Byte>(0)));
102
			this->label2->Location = System::Drawing::Point(12, 60);
103
			this->label2->Name = L"label2";
104
			this->label2->Size = System::Drawing::Size(49, 20);
105
			this->label2->TabIndex = 1;
106
			this->label2->Text = L"Price";
107
			this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
108
			// 
109
			// numericUpDown1
110
			// 
111
			this->numericUpDown1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left) 
112
				| System::Windows::Forms::AnchorStyles::Right));
113
			this->numericUpDown1->Location = System::Drawing::Point(113, 19);
114
			this->numericUpDown1->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {80000000, 0, 0, 0});
115
			this->numericUpDown1->Name = L"numericUpDown1";
116
			this->numericUpDown1->Size = System::Drawing::Size(161, 20);
117
			this->numericUpDown1->TabIndex = 2;
118
			this->numericUpDown1->ValueChanged += gcnew System::EventHandler(this, &EditPrice::numericUpDown1_ValueChanged);
119
			// 
120
			// numericUpDown2
121
			// 
122
			this->numericUpDown2->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left) 
123
				| System::Windows::Forms::AnchorStyles::Right));
124
			this->numericUpDown2->Location = System::Drawing::Point(114, 60);
125
			this->numericUpDown2->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {-1894967296, 0, 0, 0});
126
			this->numericUpDown2->Name = L"numericUpDown2";
127
			this->numericUpDown2->ReadOnly = true;
128
			this->numericUpDown2->Size = System::Drawing::Size(160, 20);
129
			this->numericUpDown2->TabIndex = 3;
130
			// 
131
			// panel1
132
			// 
133
			this->panel1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom) 
134
				| System::Windows::Forms::AnchorStyles::Left) 
135
				| System::Windows::Forms::AnchorStyles::Right));
136
			this->panel1->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
137
			this->panel1->Controls->Add(this->button2);
138
			this->panel1->Controls->Add(this->button1);
139
			this->panel1->Location = System::Drawing::Point(-2, 95);
140
			this->panel1->Name = L"panel1";
141
			this->panel1->Size = System::Drawing::Size(291, 56);
142
			this->panel1->TabIndex = 4;
143
			// 
144
			// button2
145
			// 
146
			this->button2->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));
147
			this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;
148
			this->button2->Location = System::Drawing::Point(16, 9);
149
			this->button2->Name = L"button2";
150
			this->button2->Size = System::Drawing::Size(75, 37);
151
			this->button2->TabIndex = 1;
152
			this->button2->Text = L"Cancel";
153
			this->button2->UseVisualStyleBackColor = true;
154
			// 
155
			// button1
156
			// 
157
			this->button1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Right));
158
			this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
159
			this->button1->Location = System::Drawing::Point(200, 9);
160
			this->button1->Name = L"button1";
161
			this->button1->Size = System::Drawing::Size(75, 37);
162
			this->button1->TabIndex = 0;
163
			this->button1->Text = L"OK";
164
			this->button1->UseVisualStyleBackColor = true;
165
			// 
166
			// EditPrice
167
			// 
168
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
169
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
170
			this->AutoSizeMode = System::Windows::Forms::AutoSizeMode::GrowAndShrink;
171
			this->ClientSize = System::Drawing::Size(286, 151);
172
			this->Controls->Add(this->panel1);
173
			this->Controls->Add(this->numericUpDown2);
174
			this->Controls->Add(this->numericUpDown1);
175
			this->Controls->Add(this->label2);
176
			this->Controls->Add(this->label1);
177
			this->Icon = (cli::safe_cast<System::Drawing::Icon^  >(resources->GetObject(L"$this.Icon")));
178
			this->MaximumSize = System::Drawing::Size(400, 190);
179
			this->MinimumSize = System::Drawing::Size(250, 190);
180
			this->Name = L"EditPrice";
181
			this->Text = L"Enter Price";
182
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->EndInit();
183
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown2))->EndInit();
184
			this->panel1->ResumeLayout(false);
185
			this->ResumeLayout(false);
186
			this->PerformLayout();
187
 
188
		}
189
#pragma endregion
190
	private: System::Void numericUpDown1_ValueChanged(System::Object^  sender, System::EventArgs^  e) {
191
				 _iPrice = Convert::ToInt32(this->numericUpDown1->Value);
192
				int price = static_cast<int>(_iPrice * 28 * 1.00268550164);
193
				this->numericUpDown2->Value = price;
194
			 }
195
};
196
}