Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "properties.h"
- properties user;
- namespace DeepLinkTeser {
- using namespace System;
- using namespace System::ComponentModel;
- using namespace System::Collections;
- using namespace System::Windows::Forms;
- using namespace System::Data;
- using namespace System::Drawing;
- /// <summary>
- /// Podsumowanie informacji o Main
- /// </summary>
- public ref class Main : public System::Windows::Forms::Form
- {
- public:
- Main(void)
- {
- InitializeComponent();
- //
- //TODO: W tym miejscu dodaj kod konstruktora
- //
- }
- protected:
- /// <summary>
- /// Wyczyœæ wszystkie u¿ywane zasoby.
- /// </summary>
- ~Main()
- {
- if (components)
- {
- delete components;
- }
- }
- private: System::Windows::Forms::Label^ label1;
- private: System::Windows::Forms::TextBox^ textBox1;
- private: System::Windows::Forms::Button^ button1;
- private: System::Windows::Forms::OpenFileDialog^ openFileDialog1;
- protected:
- private:
- /// <summary>
- /// Wymagana zmienna projektanta.
- /// </summary>
- System::ComponentModel::Container^ components;
- #pragma region Windows Form Designer generated code
- /// <summary>
- /// Metoda wymagana do obs³ugi projektanta — nie nale¿y modyfikowaæ
- /// jej zawartoœci w edytorze kodu.
- /// </summary>
- void InitializeComponent(void)
- {
- this->label1 = (gcnew System::Windows::Forms::Label());
- this->textBox1 = (gcnew System::Windows::Forms::TextBox());
- this->button1 = (gcnew System::Windows::Forms::Button());
- this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());
- this->SuspendLayout();
- //
- // label1
- //
- this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
- this->label1->Location = System::Drawing::Point(722, 20);
- this->label1->Name = L"label1";
- this->label1->Size = System::Drawing::Size(145, 23);
- this->label1->TabIndex = 0;
- this->label1->Text = L"ADB Location";
- this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
- this->label1->Click += gcnew System::EventHandler(this, &Main::label1_Click);
- //
- // textBox1
- //
- this->textBox1->Location = System::Drawing::Point(726, 46);
- this->textBox1->Multiline = true;
- this->textBox1->Name = L"textBox1";
- this->textBox1->Size = System::Drawing::Size(141, 20);
- this->textBox1->TabIndex = 1;
- this->textBox1->Text = L"";
- this->textBox1->TextChanged += gcnew System::EventHandler(this, &Main::textBox1_TextChanged);
- //
- // button1
- //
- this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
- this->button1->Location = System::Drawing::Point(726, 73);
- this->button1->Name = L"button1";
- this->button1->Size = System::Drawing::Size(141, 23);
- this->button1->TabIndex = 2;
- this->button1->Text = L"select location";
- this->button1->UseVisualStyleBackColor = true;
- this->button1->Click += gcnew System::EventHandler(this, &Main::button1_Click);
- //
- // openFileDialog1
- //
- this->openFileDialog1->FileName = L"openFileDialog1";
- this->openFileDialog1->FileOk += gcnew System::ComponentModel::CancelEventHandler(this, &Main::openFileDialog1_FileOk_1);
- //
- // Main
- //
- this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
- this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
- this->ClientSize = System::Drawing::Size(893, 527);
- this->Controls->Add(this->button1);
- this->Controls->Add(this->textBox1);
- this->Controls->Add(this->label1);
- this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
- this->MaximizeBox = false;
- this->Name = L"Main";
- this->Text = L"Main";
- this->Load += gcnew System::EventHandler(this, &Main::Main_Load);
- this->ResumeLayout(false);
- this->PerformLayout();
- }
- #pragma endregion
- private: System::Void Main_Load(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void openFileDialog1_FileOk(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) {
- }
- private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
- OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog;
- openFileDialog1->InitialDirectory = user.getdatapath(user);
- openFileDialog1->Filter = "exe files (*.exe)|*.exe|All files (*.*)|*.*";
- openFileDialog1->FilterIndex = 2;
- openFileDialog1->RestoreDirectory = true;
- if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)
- {
- MessageBox::Show(openFileDialog1->FileName, "ADB Location:");
- }
- System::String^ managed = openFileDialog1->FileName;
- std::string unmanaged = msclr::interop::marshal_as<std::string>(managed);
- adb_location = unmanaged;
- textBox1->Text = openFileDialog1->FileName;
- }
- private: System::Void openFileDialog1_FileOk_1(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) {
- }
- private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment