All pastes #458459 Raw Edit

ks

public cpp v1 · immutable
#458459 ·published 2007-04-25 22:07 UTC
rendered paste body
#pragma oncenamespace enomaly_infonet {	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	///	/// WARNING: If you change the name of this class, you will need to change the	///          'Resource File Name' property for the managed resource compiler tool	///          associated with all .resx files this class depends on.  Otherwise,	///          the designers will not be able to interact properly with localized	///          resources associated with this form.	/// </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::LinkLabel^  mysql;	private: System::Windows::Forms::LinkLabel^  website;	private: System::Windows::Forms::LinkLabel^  typo3;	private: System::Windows::Forms::LinkLabel^  apache;	private: System::Windows::Forms::LinkLabel^  updates;	private: System::Windows::Forms::LinkLabel^  enomaly;	protected: 	protected: 	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)		{			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));			this->mysql = (gcnew System::Windows::Forms::LinkLabel());			this->website = (gcnew System::Windows::Forms::LinkLabel());			this->typo3 = (gcnew System::Windows::Forms::LinkLabel());			this->apache = (gcnew System::Windows::Forms::LinkLabel());			this->updates = (gcnew System::Windows::Forms::LinkLabel());			this->enomaly = (gcnew System::Windows::Forms::LinkLabel());			this->SuspendLayout();			// 			// mysql			// 			this->mysql->ActiveLinkColor = System::Drawing::Color::Transparent;			this->mysql->AutoEllipsis = true;			this->mysql->BackColor = System::Drawing::Color::Transparent;			this->mysql->Cursor = System::Windows::Forms::Cursors::Hand;			this->mysql->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"mysql.Image")));			this->mysql->LinkArea = System::Windows::Forms::LinkArea(0, 50);			this->mysql->LinkColor = System::Drawing::Color::Transparent;			this->mysql->Location = System::Drawing::Point(26, 100);			this->mysql->Name = L"mysql";			this->mysql->Size = System::Drawing::Size(74, 107);			this->mysql->TabIndex = 0;			this->mysql->TabStop = true;			this->mysql->Text = L"mysql";			this->mysql->UseCompatibleTextRendering = true;			this->mysql->VisitedLinkColor = System::Drawing::Color::Transparent;			this->mysql->LinkClicked += gcnew System::Windows::Forms::LinkLabelLinkClickedEventHandler(this, &Form1::linkLabel1_LinkClicked);			// 			// website			// 			this->website->ActiveLinkColor = System::Drawing::Color::Transparent;			this->website->BackColor = System::Drawing::Color::Transparent;			this->website->Cursor = System::Windows::Forms::Cursors::Hand;			this->website->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"website.Image")));			this->website->LinkColor = System::Drawing::Color::Transparent;			this->website->Location = System::Drawing::Point(120, 104);			this->website->Name = L"website";			this->website->Size = System::Drawing::Size(83, 103);			this->website->TabIndex = 1;			this->website->VisitedLinkColor = System::Drawing::Color::Transparent;			this->website->LinkClicked += gcnew System::Windows::Forms::LinkLabelLinkClickedEventHandler(this, &Form1::linkLabel1_LinkClicked_1);			// 			// typo3			// 			this->typo3->BackColor = System::Drawing::Color::Transparent;			this->typo3->Cursor = System::Windows::Forms::Cursors::Hand;			this->typo3->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"typo3.Image")));			this->typo3->LinkColor = System::Drawing::Color::Transparent;			this->typo3->Location = System::Drawing::Point(211, 103);			this->typo3->Name = L"typo3";			this->typo3->Size = System::Drawing::Size(98, 104);			this->typo3->TabIndex = 2;			this->typo3->VisitedLinkColor = System::Drawing::Color::Transparent;			this->typo3->LinkClicked += gcnew System::Windows::Forms::LinkLabelLinkClickedEventHandler(this, &Form1::linkLabel2_LinkClicked);			// 			// apache			// 			this->apache->BackColor = System::Drawing::Color::Transparent;			this->apache->Cursor = System::Windows::Forms::Cursors::Hand;			this->apache->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"apache.Image")));			this->apache->LinkColor = System::Drawing::Color::Transparent;			this->apache->Location = System::Drawing::Point(21, 214);			this->apache->Name = L"apache";			this->apache->Size = System::Drawing::Size(89, 88);			this->apache->TabIndex = 3;			this->apache->VisitedLinkColor = System::Drawing::Color::Transparent;			this->apache->LinkClicked += gcnew System::Windows::Forms::LinkLabelLinkClickedEventHandler(this, &Form1::linkLabel3_LinkClicked);			// 			// updates			// 			this->updates->BackColor = System::Drawing::Color::Transparent;			this->updates->Cursor = System::Windows::Forms::Cursors::Hand;			this->updates->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"updates.Image")));			this->updates->LinkColor = System::Drawing::Color::Transparent;			this->updates->Location = System::Drawing::Point(118, 214);			this->updates->Name = L"updates";			this->updates->Size = System::Drawing::Size(83, 92);			this->updates->TabIndex = 4;			this->updates->VisitedLinkColor = System::Drawing::Color::Transparent;			this->updates->LinkClicked += gcnew System::Windows::Forms::LinkLabelLinkClickedEventHandler(this, &Form1::linkLabel4_LinkClicked);			// 			// enomaly			// 			this->enomaly->BackColor = System::Drawing::Color::Transparent;			this->enomaly->Cursor = System::Windows::Forms::Cursors::Hand;			this->enomaly->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"enomaly.Image")));			this->enomaly->LinkColor = System::Drawing::Color::Transparent;			this->enomaly->Location = System::Drawing::Point(215, 214);			this->enomaly->Name = L"enomaly";			this->enomaly->Size = System::Drawing::Size(97, 92);			this->enomaly->TabIndex = 5;			this->enomaly->VisitedLinkColor = System::Drawing::Color::Transparent;			this->enomaly->LinkClicked += gcnew System::Windows::Forms::LinkLabelLinkClickedEventHandler(this, &Form1::linkLabel5_LinkClicked);			// 			// Form1			// 			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;			this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"$this.BackgroundImage")));			this->BackgroundImageLayout = System::Windows::Forms::ImageLayout::Stretch;			this->ClientSize = System::Drawing::Size(334, 315);			this->Controls->Add(this->enomaly);			this->Controls->Add(this->updates);			this->Controls->Add(this->apache);			this->Controls->Add(this->typo3);			this->Controls->Add(this->website);			this->Controls->Add(this->mysql);			this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;			this->Name = L"Form1";			this->Text = L"Enomaly App Control";			this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);						this->ResumeLayout(false);		}#pragma endregionprivate: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {		 		 }private: System::Void linkLabel1_LinkClicked(System::Object^  sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^  e) {			//aa			 // Show another form.			  //Form ^ f2 = gcnew Form();			  //f2->Show();			  //linkLabel1->LinkVisited = true;			 try      {         VisitLink();      }      catch (Exception ^ ex)      {         MessageBox::Show("Unable to open link that was clicked.");      }			 }private: System::Void linkLabel1_LinkClicked_1(System::Object^  sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^  e) {		MessageBox::Show("I'm linkLabel1.");	 		 }private: System::Void linkLabel2_LinkClicked(System::Object^  sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^  e) {		 MessageBox::Show("I'm linkLabel2.");			 }private: System::Void linkLabel3_LinkClicked(System::Object^  sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^  e) {		 MessageBox::Show("I'm linkLabel3.");			 }private: System::Void linkLabel4_LinkClicked(System::Object^  sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^  e) {		 MessageBox::Show("I'm linkLabel4.");			 }private: System::Void linkLabel5_LinkClicked(System::Object^  sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^  e) {		 MessageBox::Show("I'm linkLabel5.");			 }private:   void VisitLink()   {      // Change the color of the link text by setting LinkVisited       // to true.      //linkLabel1->LinkVisited = true;      // Call the Process.Start method to open the default browser       // with a URL:      System::Diagnostics::Process::Start("http://www.microsoft.com");   }};}