AboutSim.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. This software is subject to the license described in the License.txt file
  3. included with this software distribution. You may not use this file except in compliance
  4. with this license.
  5. Copyright (c) Dynastream Innovations Inc. 2012
  6. All rights reserved.
  7. */
  8. #pragma once
  9. #include "stdafx.h"
  10. using namespace System;
  11. using namespace System::ComponentModel;
  12. using namespace System::Collections;
  13. using namespace System::Windows::Forms;
  14. using namespace System::Data;
  15. using namespace System::Drawing;
  16. namespace ANTPlusSim {
  17. /// <summary>
  18. /// Summary for AboutSim
  19. ///
  20. /// WARNING: If you change the name of this class, you will need to change the
  21. /// 'Resource File Name' property for the managed resource compiler tool
  22. /// associated with all .resx files this class depends on. Otherwise,
  23. /// the designers will not be able to interact properly with localized
  24. /// resources associated with this form.
  25. /// </summary>
  26. public ref class AboutSim : public System::Windows::Forms::Form
  27. {
  28. public:
  29. AboutSim(System::String^ strTitle_, System::String^ strLibrary_)
  30. {
  31. InitializeComponent();
  32. if(System::String::IsNullOrEmpty(strTitle_))
  33. this->label_Version->Text = "";
  34. else
  35. this->label_Version->Text = strTitle_;
  36. if(System::String::IsNullOrEmpty(strLibrary_))
  37. this->label_Library->Text = "";
  38. else
  39. this->label_Library->Text = System::String::Concat("ANT Library Ver. ", strLibrary_);
  40. this->textBox1->SelectionStart = this->textBox1->Text->Length;
  41. this->textBox1->SelectionLength = 0;
  42. }
  43. protected:
  44. /// <summary>
  45. /// Clean up any resources being used.
  46. /// </summary>
  47. ~AboutSim()
  48. {
  49. if (components)
  50. {
  51. delete components;
  52. }
  53. }
  54. private: System::Windows::Forms::Label^ label_Version;
  55. private: System::Windows::Forms::TextBox^ textBox1;
  56. private: System::Windows::Forms::Button^ button_OK;
  57. private: System::Windows::Forms::Label^ label_Library;
  58. protected:
  59. private:
  60. /// <summary>
  61. /// Required designer variable.
  62. /// </summary>
  63. System::ComponentModel::Container ^components;
  64. #pragma region Windows Form Designer generated code
  65. /// <summary>
  66. /// Required method for Designer support - do not modify
  67. /// the contents of this method with the code editor.
  68. /// </summary>
  69. void InitializeComponent(void)
  70. {
  71. System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(AboutSim::typeid));
  72. this->label_Version = (gcnew System::Windows::Forms::Label());
  73. this->textBox1 = (gcnew System::Windows::Forms::TextBox());
  74. this->button_OK = (gcnew System::Windows::Forms::Button());
  75. this->label_Library = (gcnew System::Windows::Forms::Label());
  76. this->SuspendLayout();
  77. //
  78. // label_Version
  79. //
  80. this->label_Version->AutoSize = true;
  81. this->label_Version->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
  82. static_cast<System::Byte>(0)));
  83. this->label_Version->Location = System::Drawing::Point(43, 9);
  84. this->label_Version->Name = L"label_Version";
  85. this->label_Version->Size = System::Drawing::Size(143, 24);
  86. this->label_Version->TabIndex = 0;
  87. this->label_Version->Text = L"ANT+ Simulator";
  88. //
  89. // textBox1
  90. //
  91. this->textBox1->BackColor = System::Drawing::SystemColors::Control;
  92. this->textBox1->Location = System::Drawing::Point(33, 53);
  93. this->textBox1->Multiline = true;
  94. this->textBox1->Name = L"textBox1";
  95. this->textBox1->ReadOnly = true;
  96. this->textBox1->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
  97. this->textBox1->Size = System::Drawing::Size(299, 183);
  98. this->textBox1->TabIndex = 1;
  99. this->textBox1->Text = resources->GetString(L"textBox1.Text");
  100. //
  101. // button_OK
  102. //
  103. this->button_OK->Location = System::Drawing::Point(140, 245);
  104. this->button_OK->Name = L"button_OK";
  105. this->button_OK->Size = System::Drawing::Size(76, 28);
  106. this->button_OK->TabIndex = 2;
  107. this->button_OK->Text = L"OK";
  108. this->button_OK->UseVisualStyleBackColor = true;
  109. this->button_OK->Click += gcnew System::EventHandler(this, &AboutSim::button_OK_Click);
  110. //
  111. // label_Library
  112. //
  113. this->label_Library->AutoSize = true;
  114. this->label_Library->Location = System::Drawing::Point(105, 33);
  115. this->label_Library->Name = L"label_Library";
  116. this->label_Library->Size = System::Drawing::Size(63, 13);
  117. this->label_Library->TabIndex = 3;
  118. this->label_Library->Text = L"ANT Library";
  119. //
  120. // AboutSim
  121. //
  122. this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  123. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  124. this->ClientSize = System::Drawing::Size(361, 285);
  125. this->Controls->Add(this->label_Library);
  126. this->Controls->Add(this->button_OK);
  127. this->Controls->Add(this->textBox1);
  128. this->Controls->Add(this->label_Version);
  129. this->Name = L"AboutSim";
  130. this->Text = L"About";
  131. this->ResumeLayout(false);
  132. this->PerformLayout();
  133. }
  134. #pragma endregion
  135. private: System::Void button_OK_Click(System::Object^ sender, System::EventArgs^ e) {
  136. Close();
  137. }
  138. };
  139. }