00001 #pragma once
00002
00003 using namespace System;
00004 using namespace System::ComponentModel;
00005 using namespace System::Collections;
00006 using namespace System::Windows::Forms;
00007 using namespace System::Data;
00008 using namespace System::Drawing;
00009 using namespace AxDNSTools;
00010
00011
00012 namespace SuperYano {
00013
00015 public ref class Choice : public System::Windows::Forms::Form
00016 {
00017 public:
00018 Choice(String^ text, String^ btn1Text, String^ btn2Text)
00019 {
00020 InitializeComponent();
00021 this->textBox1->Text = text;
00022 this->button1->Text = btn1Text;
00023 this->button2->Text = btn2Text;
00024 }
00025 Choice(void)
00026 {
00027 InitializeComponent();
00028 }
00029
00030
00031 protected:
00035 ~Choice()
00036 {
00037 if (components)
00038 {
00039 delete components;
00040 }
00041 }
00042 private: System::Windows::Forms::Panel^ panel1;
00043 protected:
00044 private: System::Windows::Forms::Button^ button2;
00045 private: System::Windows::Forms::Button^ button1;
00046 private: System::Windows::Forms::TextBox^ textBox1;
00047
00048 private: AxDNSTools::AxDgnMicBtn^ micbtn;
00049
00050
00051 private:
00055 System::ComponentModel::Container ^components;
00056
00057 #pragma region Windows Form Designer generated code
00062 void InitializeComponent()
00063 {
00064 System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Choice::typeid));
00065 this->panel1 = (gcnew System::Windows::Forms::Panel());
00066 this->micbtn = (gcnew AxDNSTools::AxDgnMicBtn());
00067 this->button2 = (gcnew System::Windows::Forms::Button());
00068 this->button1 = (gcnew System::Windows::Forms::Button());
00069 this->textBox1 = (gcnew System::Windows::Forms::TextBox());
00070 this->panel1->SuspendLayout();
00071 (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->micbtn))->BeginInit();
00072 this->SuspendLayout();
00073
00074
00075
00076 this->panel1->Controls->Add(this->micbtn);
00077 this->panel1->Controls->Add(this->button2);
00078 this->panel1->Controls->Add(this->button1);
00079 this->panel1->Controls->Add(this->textBox1);
00080 this->panel1->Location = System::Drawing::Point(12, 12);
00081 this->panel1->Name = L"panel1";
00082 this->panel1->Size = System::Drawing::Size(268, 238);
00083 this->panel1->TabIndex = 0;
00084
00085
00086
00087 this->micbtn->Enabled = true;
00088 this->micbtn->Location = System::Drawing::Point(3, 197);
00089 this->micbtn->Name = L"micbtn";
00090 this->micbtn->OcxState = (cli::safe_cast<System::Windows::Forms::AxHost::State^ >(resources->GetObject(L"micbtn.OcxState")));
00091 this->micbtn->Size = System::Drawing::Size(262, 32);
00092 this->micbtn->TabIndex = 3;
00093
00094
00095
00096 this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;
00097 this->button2->Location = System::Drawing::Point(137, 168);
00098 this->button2->Name = L"button2";
00099 this->button2->Size = System::Drawing::Size(128, 23);
00100 this->button2->TabIndex = 1;
00101 this->button2->Text = L"button2";
00102 this->button2->UseVisualStyleBackColor = true;
00103
00104
00105
00106 this->button1->DialogResult = System::Windows::Forms::DialogResult::Yes;
00107 this->button1->Location = System::Drawing::Point(3, 168);
00108 this->button1->Name = L"button1";
00109 this->button1->Size = System::Drawing::Size(128, 23);
00110 this->button1->TabIndex = 0;
00111 this->button1->Text = L"button1";
00112 this->button1->UseVisualStyleBackColor = true;
00113 this->button1->Click += gcnew System::EventHandler(this, &Choice::button1_Click);
00114
00115
00116
00117 this->textBox1->Location = System::Drawing::Point(3, 3);
00118 this->textBox1->Multiline = true;
00119 this->textBox1->Name = L"textBox1";
00120 this->textBox1->ReadOnly = true;
00121 this->textBox1->Size = System::Drawing::Size(262, 150);
00122 this->textBox1->TabIndex = 2;
00123 this->textBox1->TabStop = false;
00124
00125
00126
00127 this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
00128 this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
00129 this->ClientSize = System::Drawing::Size(292, 260);
00130 this->Controls->Add(this->panel1);
00131 this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedDialog;
00132 this->Name = L"Choice";
00133 this->ShowIcon = false;
00134 this->ShowInTaskbar = false;
00135 this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
00136 this->Text = L"Frage";
00137 this->TopMost = true;
00138 this->Shown += gcnew System::EventHandler(this, &Choice::Choice_Shown);
00139 this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &Choice::Choice_FormClosing);
00140 this->panel1->ResumeLayout(false);
00141 this->panel1->PerformLayout();
00142 (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->micbtn))->EndInit();
00143 this->ResumeLayout(false);
00144
00145 }
00146 #pragma endregion
00147 private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
00148 {
00149
00150
00151 }
00152
00153 private: System::Void Choice_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e)
00154 {
00155 micbtn->MicState = DNSTools::DgnMicStateConstants::dgnmicOff;
00156 micbtn->MicState = DNSTools::DgnMicStateConstants::dgnmicDisabled;
00157
00158
00159 }
00160 private: System::Void Choice_Shown(System::Object^ sender, System::EventArgs^ e)
00161 {
00162 try
00163 {
00164 micbtn->Register(DNSTools::DgnRegisterConstants::dgnregGlobalCM);
00165 micbtn->MicState = DNSTools::DgnMicStateConstants::dgnmicOn;
00166
00167
00168 }
00169 catch(Exception^)
00170 {
00171 }
00172
00173 }
00174 };
00175 }