13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.130 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.1313:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.13

.

.

Friday, February 18, 2011

C++ Windows Form Application Initialization - Exercise To Build a Class Template (see bottom)

#pragma once

namespace HelpMeGod {

#include "ObjCell.h"
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>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}

protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::TextBox^  txtOutput;
protected:
private: System::Windows::Forms::Button^  txtBox1;
private: System::Windows::Forms::TextBox^  txtOutput1;
private: System::Windows::Forms::TextBox^  txtOutput2;

private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->txtOutput = (gcnew System::Windows::Forms::TextBox());
this->txtBox1 = (gcnew System::Windows::Forms::Button());
this->txtOutput1 = (gcnew System::Windows::Forms::TextBox());
this->txtOutput2 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// txtOutput
//
this->txtOutput->Location = System::Drawing::Point(33, 76);
this->txtOutput->Name = L"txtOutput";
this->txtOutput->Size = System::Drawing::Size(97, 20);
this->txtOutput->TabIndex = 0;
//
// txtBox1
//
this->txtBox1->Location = System::Drawing::Point(33, 31);
this->txtBox1->Name = L"txtBox1";
this->txtBox1->Size = System::Drawing::Size(97, 23);
this->txtBox1->TabIndex = 1;
this->txtBox1->Text = L"Show Output";
this->txtBox1->UseVisualStyleBackColor = true;
this->txtBox1->Click += gcnew System::EventHandler(this, &Form1::txtBox1_Click);
//
// txtOutput1
//
this->txtOutput1->Location = System::Drawing::Point(33, 125);
this->txtOutput1->Name = L"txtOutput1";
this->txtOutput1->Size = System::Drawing::Size(97, 20);
this->txtOutput1->TabIndex = 2;
//
// txtOutput2
//
this->txtOutput2->Location = System::Drawing::Point(33, 177);
this->txtOutput2->Name = L"txtOutput2";
this->txtOutput2->Size = System::Drawing::Size(97, 20);
this->txtOutput2->TabIndex = 3;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(284, 262);
this->Controls->Add(this->txtOutput2);
this->Controls->Add(this->txtOutput1);
this->Controls->Add(this->txtBox1);
this->Controls->Add(this->txtOutput);
this->Name = L"Form1";
this->Text = L"Form1";
this->ResumeLayout(false);
this->PerformLayout();

}
#pragma endregion
private: System::Void txtBox1_Click(System::Object^  sender, System::EventArgs^  e) {

HelpMeGod::ObjCell<>ethanInt(5);
txtOutput->Text = Convert::ToString(ethanInt.read());

HelpMeGod::ObjCell<double>ethanDouble(5.75);
txtOutput1->Text = Convert::ToString(ethanDouble.read());

HelpMeGod::ObjCell<bool>ethanBool(true);
txtOutput2->Text = Convert::ToString(ethanBool.read());
}
};
}