|
| 1 | +#pragma once |
| 2 | + |
| 3 | +namespace XRay |
| 4 | +{ |
| 5 | +namespace ECore |
| 6 | +{ |
| 7 | +ref class NumericVector; |
| 8 | +} |
| 9 | +} |
| 10 | + |
| 11 | +template <class T> |
| 12 | +struct _vector3; |
| 13 | +using Fvector = _vector3<float>; |
| 14 | + |
| 15 | +namespace XRay |
| 16 | +{ |
| 17 | +namespace ECore |
| 18 | +{ |
| 19 | +using namespace System; |
| 20 | +using namespace System::ComponentModel; |
| 21 | +using namespace System::Collections; |
| 22 | +using namespace System::Windows::Forms; |
| 23 | +using namespace System::Data; |
| 24 | +using namespace System::Drawing; |
| 25 | + |
| 26 | +public ref class NumericVector : public System::Windows::Forms::Form |
| 27 | +{ |
| 28 | +public: |
| 29 | + NumericVector() |
| 30 | + { |
| 31 | + InitializeComponent(); |
| 32 | + } |
| 33 | + |
| 34 | + bool Run(pcstr title, Fvector* data, int decimal, Fvector* reset_value, Fvector* min, Fvector* max, int* X, int* Y); |
| 35 | + |
| 36 | +protected: |
| 37 | + ~NumericVector() |
| 38 | + { |
| 39 | + if (components) |
| 40 | + { |
| 41 | + delete components; |
| 42 | + } |
| 43 | + } |
| 44 | + |
| 45 | +private: Fvector* Value; |
| 46 | +private: Fvector* ResetValue; |
| 47 | +private: System::Windows::Forms::Button^ buttonOk; |
| 48 | +private: System::Windows::Forms::Button^ buttonCancel; |
| 49 | +private: System::Windows::Forms::Button^ buttonReset; |
| 50 | +private: XRay::SdkControls::NumericSpinner^ numX; |
| 51 | +private: XRay::SdkControls::NumericSpinner^ numY; |
| 52 | +private: XRay::SdkControls::NumericSpinner^ numZ; |
| 53 | +private: System::Windows::Forms::Label^ labelX; |
| 54 | +private: System::Windows::Forms::Label^ labelY; |
| 55 | +private: System::Windows::Forms::Label^ labelZ; |
| 56 | +private: System::Windows::Forms::Button^ button1; |
| 57 | +private: System::Windows::Forms::Button^ button2; |
| 58 | +private: System::Windows::Forms::CheckBox^ checkImmediate; |
| 59 | + |
| 60 | +private: System::Windows::Forms::Button^ buttonApply; |
| 61 | +private: System::Windows::Forms::Button^ buttonImmediate; |
| 62 | + |
| 63 | +private: |
| 64 | + System::ComponentModel::Container^ components; |
| 65 | + |
| 66 | +#pragma region Windows Form Designer generated code |
| 67 | + void InitializeComponent(void) |
| 68 | + { |
| 69 | + this->buttonOk = (gcnew System::Windows::Forms::Button()); |
| 70 | + this->buttonCancel = (gcnew System::Windows::Forms::Button()); |
| 71 | + this->buttonReset = (gcnew System::Windows::Forms::Button()); |
| 72 | + this->numX = (gcnew XRay::SdkControls::NumericSpinner()); |
| 73 | + this->numY = (gcnew XRay::SdkControls::NumericSpinner()); |
| 74 | + this->numZ = (gcnew XRay::SdkControls::NumericSpinner()); |
| 75 | + this->labelX = (gcnew System::Windows::Forms::Label()); |
| 76 | + this->labelY = (gcnew System::Windows::Forms::Label()); |
| 77 | + this->labelZ = (gcnew System::Windows::Forms::Label()); |
| 78 | + this->buttonApply = (gcnew System::Windows::Forms::Button()); |
| 79 | + this->buttonImmediate = (gcnew System::Windows::Forms::Button()); |
| 80 | + this->checkImmediate = (gcnew System::Windows::Forms::CheckBox()); |
| 81 | + this->SuspendLayout(); |
| 82 | + this->buttonOk->Location = System::Drawing::Point(136, 21); |
| 83 | + this->buttonOk->Name = L"buttonOk"; |
| 84 | + this->buttonOk->Size = System::Drawing::Size(50, 22); |
| 85 | + this->buttonOk->TabIndex = 0; |
| 86 | + this->buttonOk->Text = L"Ok"; |
| 87 | + this->buttonOk->UseVisualStyleBackColor = true; |
| 88 | + this->buttonOk->Click += gcnew System::EventHandler(this, &NumericVector::buttonOk_Click); |
| 89 | + this->buttonCancel->Location = System::Drawing::Point(136, 42); |
| 90 | + this->buttonCancel->Name = L"buttonCancel"; |
| 91 | + this->buttonCancel->Size = System::Drawing::Size(50, 22); |
| 92 | + this->buttonCancel->TabIndex = 1; |
| 93 | + this->buttonCancel->Text = L"Cancel"; |
| 94 | + this->buttonCancel->UseVisualStyleBackColor = true; |
| 95 | + this->buttonCancel->Click += gcnew System::EventHandler(this, &NumericVector::buttonCancel_Click); |
| 96 | + this->buttonReset->Location = System::Drawing::Point(136, 63); |
| 97 | + this->buttonReset->Name = L"buttonReset"; |
| 98 | + this->buttonReset->Size = System::Drawing::Size(50, 22); |
| 99 | + this->buttonReset->TabIndex = 2; |
| 100 | + this->buttonReset->Text = L"Reset"; |
| 101 | + this->buttonReset->UseVisualStyleBackColor = true; |
| 102 | + this->numX->DecimalPlaces = 3; |
| 103 | + this->numX->Hexadecimal = false; |
| 104 | + this->numX->Location = System::Drawing::Point(22, 1); |
| 105 | + this->numX->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 100, 0, 0, 0 }); |
| 106 | + this->numX->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 0, 0, 0, 0 }); |
| 107 | + this->numX->MinimumSize = System::Drawing::Size(70, 22); |
| 108 | + this->numX->Name = L"numX"; |
| 109 | + this->numX->Precision = System::Decimal(gcnew cli::array< System::Int32 >(4) { 0, 0, 0, 0 }); |
| 110 | + this->numX->Size = System::Drawing::Size(115, 22); |
| 111 | + this->numX->TabIndex = 3; |
| 112 | + this->numX->TextAlign = System::Windows::Forms::HorizontalAlignment::Left; |
| 113 | + this->numX->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) { 0, 0, 0, 0 }); |
| 114 | + this->numY->DecimalPlaces = 3; |
| 115 | + this->numY->Hexadecimal = false; |
| 116 | + this->numY->Location = System::Drawing::Point(22, 22); |
| 117 | + this->numY->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 100, 0, 0, 0 }); |
| 118 | + this->numY->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 0, 0, 0, 0 }); |
| 119 | + this->numY->MinimumSize = System::Drawing::Size(70, 22); |
| 120 | + this->numY->Name = L"numY"; |
| 121 | + this->numY->Precision = System::Decimal(gcnew cli::array< System::Int32 >(4) { 0, 0, 0, 0 }); |
| 122 | + this->numY->Size = System::Drawing::Size(115, 22); |
| 123 | + this->numY->TabIndex = 4; |
| 124 | + this->numY->TextAlign = System::Windows::Forms::HorizontalAlignment::Left; |
| 125 | + this->numY->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) { 0, 0, 0, 0 }); |
| 126 | + this->numZ->DecimalPlaces = 3; |
| 127 | + this->numZ->Hexadecimal = false; |
| 128 | + this->numZ->Location = System::Drawing::Point(22, 43); |
| 129 | + this->numZ->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 100, 0, 0, 0 }); |
| 130 | + this->numZ->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 0, 0, 0, 0 }); |
| 131 | + this->numZ->MinimumSize = System::Drawing::Size(70, 22); |
| 132 | + this->numZ->Name = L"numZ"; |
| 133 | + this->numZ->Precision = System::Decimal(gcnew cli::array< System::Int32 >(4) { 0, 0, 0, 0 }); |
| 134 | + this->numZ->Size = System::Drawing::Size(115, 22); |
| 135 | + this->numZ->TabIndex = 5; |
| 136 | + this->numZ->TextAlign = System::Windows::Forms::HorizontalAlignment::Left; |
| 137 | + this->numZ->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) { 0, 0, 0, 0 }); |
| 138 | + this->labelX->AutoSize = true; |
| 139 | + this->labelX->Location = System::Drawing::Point(4, 4); |
| 140 | + this->labelX->Name = L"labelX"; |
| 141 | + this->labelX->Size = System::Drawing::Size(14, 13); |
| 142 | + this->labelX->TabIndex = 6; |
| 143 | + this->labelX->Text = L"X"; |
| 144 | + this->labelY->AutoSize = true; |
| 145 | + this->labelY->Location = System::Drawing::Point(4, 25); |
| 146 | + this->labelY->Name = L"labelY"; |
| 147 | + this->labelY->Size = System::Drawing::Size(14, 13); |
| 148 | + this->labelY->TabIndex = 7; |
| 149 | + this->labelY->Text = L"Y"; |
| 150 | + this->labelZ->AutoSize = true; |
| 151 | + this->labelZ->Location = System::Drawing::Point(4, 46); |
| 152 | + this->labelZ->Name = L"labelZ"; |
| 153 | + this->labelZ->Size = System::Drawing::Size(14, 13); |
| 154 | + this->labelZ->TabIndex = 8; |
| 155 | + this->labelZ->Text = L"Z"; |
| 156 | + this->buttonApply->Location = System::Drawing::Point(136, 0); |
| 157 | + this->buttonApply->Name = L"buttonApply"; |
| 158 | + this->buttonApply->Size = System::Drawing::Size(50, 22); |
| 159 | + this->buttonApply->TabIndex = 9; |
| 160 | + this->buttonApply->Text = L"Apply"; |
| 161 | + this->buttonApply->UseVisualStyleBackColor = true; |
| 162 | + this->buttonImmediate->Location = System::Drawing::Point(21, 63); |
| 163 | + this->buttonImmediate->Name = L"buttonImmediate"; |
| 164 | + this->buttonImmediate->Size = System::Drawing::Size(116, 22); |
| 165 | + this->buttonImmediate->TabIndex = 10; |
| 166 | + this->buttonImmediate->Text = L"Immediate"; |
| 167 | + this->buttonImmediate->UseVisualStyleBackColor = true; |
| 168 | + this->buttonImmediate->Click += gcnew System::EventHandler(this, &NumericVector::buttonImmediate_Click); |
| 169 | + this->checkImmediate->AutoSize = true; |
| 170 | + this->checkImmediate->Location = System::Drawing::Point(5, 67); |
| 171 | + this->checkImmediate->Name = L"checkImmediate"; |
| 172 | + this->checkImmediate->Size = System::Drawing::Size(15, 14); |
| 173 | + this->checkImmediate->TabIndex = 11; |
| 174 | + this->checkImmediate->UseVisualStyleBackColor = true; |
| 175 | + this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); |
| 176 | + this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; |
| 177 | + this->ClientSize = System::Drawing::Size(186, 85); |
| 178 | + this->Controls->Add(this->checkImmediate); |
| 179 | + this->Controls->Add(this->buttonImmediate); |
| 180 | + this->Controls->Add(this->buttonApply); |
| 181 | + this->Controls->Add(this->labelZ); |
| 182 | + this->Controls->Add(this->labelY); |
| 183 | + this->Controls->Add(this->labelX); |
| 184 | + this->Controls->Add(this->numZ); |
| 185 | + this->Controls->Add(this->numY); |
| 186 | + this->Controls->Add(this->numX); |
| 187 | + this->Controls->Add(this->buttonReset); |
| 188 | + this->Controls->Add(this->buttonCancel); |
| 189 | + this->Controls->Add(this->buttonOk); |
| 190 | + this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedToolWindow; |
| 191 | + this->Name = L"NumericVector"; |
| 192 | + this->ShowInTaskbar = false; |
| 193 | + this->Text = L"NumericVector"; |
| 194 | + this->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &NumericVector::NumericVector_KeyPress); |
| 195 | + this->ResumeLayout(false); |
| 196 | + this->PerformLayout(); |
| 197 | + |
| 198 | + } |
| 199 | +#pragma endregion |
| 200 | +private: System::Void buttonApply_Click(System::Object^ sender, System::EventArgs^ e); |
| 201 | +private: System::Void buttonOk_Click(System::Object^ sender, System::EventArgs^ e); |
| 202 | +private: System::Void buttonCancel_Click(System::Object^ sender, System::EventArgs^ e); |
| 203 | +private: System::Void buttonReset_Click(System::Object^ sender, System::EventArgs^ e); |
| 204 | +private: System::Void buttonImmediate_Click(System::Object^ sender, System::EventArgs^ e); |
| 205 | +private: System::Void NumericVector_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e); |
| 206 | + |
| 207 | +private: System::Void OnValueChanged(System::Object^ sender, System::EventArgs^ e); |
| 208 | +}; |
| 209 | +} // namespace ECore |
| 210 | +} // namespace XRay |
0 commit comments