7 Replies - 808 Views - Last Post: 25 January 2010 - 01:22 PM

#1 gibson_junk  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 89
  • Joined: 24-July 09

Help with multiple private:'s and better code

Posted 20 January 2010 - 02:32 PM

I have some code here and i need to make the value of request->CookieContainer = ckie; available in another functions. Heres the code. Also is there a better way to do the HttpWebRequest instead of putting all this code over and over each time i need to use it?

private: System::Void blogin_Click(System::Object^  sender, System::EventArgs^  e) {
				 String^ user = gcnew String(username->Text);
				 String^ pass = gcnew String(password->Text);
				 CookieContainer^ ckie = gcnew CookieContainer();
				 try
			{
				Uri^ url = gcnew Uri("http://beta.rapidpremium.net/login.php");
				String^ data = "username=" + user + "&password=" + pass + "&login=";
				HttpWebRequest^ request = dynamic_cast<HttpWebRequest^>(WebRequest::Create(url));
				request->Method = "POST";
				request->CookieContainer = ckie;
				request->Referer = "http://beta.rapidpremium.net/usercp.php";
				request->ContentLength = data->Length;
				request->ContentType = "application/x-www-form-urlencoded";
				request->AllowAutoRedirect = true;
				StreamWriter^ writer = gcnew StreamWriter(request->GetRequestStream());
				writer->Write(data);
				writer->Close();
				HttpWebResponse^ response = dynamic_cast<HttpWebResponse^>(request->GetResponse());
				StreamReader^ reader = gcnew StreamReader(response->GetResponseStream());
				String^ tmp = reader->ReadToEnd();
				response->Close();

			}
			catch (Exception^ ex)
			{
				MessageBox::Show(ex->ToString(),"Connection Error");
			}
				Uri^ url = gcnew Uri("http://beta.rapidpremium.net/usercp.php?action=showmylimits");
				HttpWebRequest^ request = dynamic_cast<HttpWebRequest^>(WebRequest::Create(url));
				request->Method = "POST";
				request->CookieContainer = ckie;
				request->Referer = "http://beta.rapidpremium.net/usercp.php?action=showmylimits";
				HttpWebResponse^ response = dynamic_cast<HttpWebResponse^>(request->GetResponse());
				StreamReader^ reader = gcnew StreamReader(response->GetResponseStream());
				String^ tmp = reader->ReadToEnd();
				response->Close();
				UNLimits->Text = user + " Limits";

				String^ info = String::Empty;
				int Get_I = 0;

				//RapidShare Limits
				Get_I = tmp->IndexOf("You can");

				Get_I = tmp->IndexOf("You can",Get_I);
				tmp = tmp->Substring(Get_I + 0);
				info = tmp->Substring(0,tmp->IndexOf("<br />"));
				RSLimits->Text = info;
				//Megaupload Limits
				Get_I = tmp->IndexOf("<br />You");

				Get_I = tmp->IndexOf("<br />",Get_I);
				tmp = tmp->Substring(Get_I + 6);
				info = tmp->Substring(0,tmp->IndexOf("<br />"));
				MULimits->Text = info;
				//MegaPorn Limits
				Get_I = tmp->IndexOf("<br />You");

				Get_I = tmp->IndexOf("<br />",Get_I);
				tmp = tmp->Substring(Get_I + 6);
				info = tmp->Substring(0,tmp->IndexOf("<br />"));
				MPLimits->Text = info;
				//Megavideo Limits
				Get_I = tmp->IndexOf("<br />You");

				Get_I = tmp->IndexOf("<br />",Get_I);
				tmp = tmp->Substring(Get_I + 6);
				info = tmp->Substring(0,tmp->IndexOf("<br />"));
				MVLimits->Text = info;
				//MegaShares Limits
				Get_I = tmp->IndexOf("<br />You");

				Get_I = tmp->IndexOf("<br />",Get_I);
				tmp = tmp->Substring(Get_I + 6);
				info = tmp->Substring(0,tmp->IndexOf("<br />"));
				MSLimits->Text = info;
				//Netload Limits
				Get_I = tmp->IndexOf("<br />You");

				Get_I = tmp->IndexOf("<br />",Get_I);
				tmp = tmp->Substring(Get_I + 6);
				info = tmp->Substring(0,tmp->IndexOf("<br />"));
				NLLimits->Text = info;
				//HotFile Limits
				Get_I = tmp->IndexOf("<br />You");

				Get_I = tmp->IndexOf("<br />",Get_I);
				tmp = tmp->Substring(Get_I + 6);
				info = tmp->Substring(0,tmp->IndexOf("<br />"));
				HFLimits->Text = info;
				//Easy-Share Limits
				Get_I = tmp->IndexOf("<br />You");

				Get_I = tmp->IndexOf("<br />",Get_I);
				tmp = tmp->Substring(Get_I + 6);
				info = tmp->Substring(0,tmp->IndexOf("<br />"));
				ESLimits->Text = info;
				//Uploading Limits
				Get_I = tmp->IndexOf("<br />You");

				Get_I = tmp->IndexOf("<br />",Get_I);
				tmp = tmp->Substring(Get_I + 6);
				info = tmp->Substring(0,tmp->IndexOf("<br />"));
				UPLimits->Text = info;

			}



and i need to get the value of the request->CookieContainer = ckie;

to this code

private: System::Void bgen_Click(System::Object^  sender, System::EventArgs^  e) {
			 	 String^ links = gcnew String(linksbox->Text);
				 try
			{
				Uri^ url = gcnew Uri("http://beta.rapidpremium.net/usercp.php?action=downloader");
				String^ data = links + "&download=Download";
				HttpWebRequest^ request = dynamic_cast<HttpWebRequest^>(WebRequest::Create(url));
				request->Method = "POST";
				request->CookieContainer = ckie;
				request->Referer = "http://beta.rapidpremium.net/usercp.php?action=downloader";
				request->ContentLength = data->Length;
				request->ContentType = "application/x-www-form-urlencoded";
				request->AllowAutoRedirect = true;
				StreamWriter^ writer = gcnew StreamWriter(request->GetRequestStream());
				writer->Write(data);
				writer->Close();
				HttpWebResponse^ response = dynamic_cast<HttpWebResponse^>(request->GetResponse());
				StreamReader^ reader = gcnew StreamReader(response->GetResponseStream());
				String^ tmp = reader->ReadToEnd();
				response->Close();
				linksbox->AppendText(tmp);

			}
			catch (Exception^ ex)
			{
				MessageBox::Show(ex->ToString(),"Connection Error");
			}
		 }


Is This A Good Question/Topic? 0
  • +

Replies To: Help with multiple private:'s and better code

#2 gibson_junk  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 89
  • Joined: 24-July 09

Re: Help with multiple private:'s and better code

Posted 20 January 2010 - 03:51 PM

Anyone can help me?
Was This Post Helpful? 0
  • +
  • -

#3 Splatocaster  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 51
  • View blog
  • Posts: 182
  • Joined: 22-December 09

Re: Help with multiple private:'s and better code

Posted 20 January 2010 - 09:03 PM

Of course you don't have to put this code every where you want it to be called. Does the code have to be private? Can you possibly make it public, or use friends? Could you put this in the global scope? Could you use a #define?

To move variables around different functions, you can use global variables:
int wooo_im_global;

void set_it() {
		woo_im_global = 4;
}

void read_it() {
		cout << woo_im_global;
}



If the two functions are in separate files and you want to use global variables, declare the variable in one file and declare it again in the other file, this time with "extern" (without the qoutes) in front.

// File 1.cpp
int more_than_one_file_can_see_me;

// File 2.cpp
extern int more_than_one_file_can_see_me;



The more complicated (but more portable) way to do it is with pointers. Have the first function put the variable in memory, and send the second program a pointer to it (the address (&)) as a parameter.


I would read
http://www.cplusplus...rial/functions/
http://www.cplusplus...ial/functions2/
http://www.cplusplus...orial/pointers/
Was This Post Helpful? 0
  • +
  • -

#4 Splatocaster  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 51
  • View blog
  • Posts: 182
  • Joined: 22-December 09

Re: Help with multiple private:'s and better code

Posted 23 January 2010 - 11:57 AM

Right now, you are using handles (^). Try using pointers instead (*).

When using pointers instead of handles, you use new instead of gcnew. I have no clue what library you are using, and I have no clue what you are trying to do, and why you need handles as opposed to pointers. It looks like you are trying to parse rapidshare or megaupload, but i cannot tell what any of the classes that are here.

Here's all I can figure out... put CookieContainer^ ckie in the global scope, than ckie = gcnew CookieContainer(); in the function. Than it will be available to any function in that file.

Since you did not post the entire class, I cannot show you how the declaration of ckie should look.
Was This Post Helpful? 0
  • +
  • -

#5 gibson_junk  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 89
  • Joined: 24-July 09

Re: Help with multiple private:'s and better code

Posted 23 January 2010 - 12:50 PM

View PostSplatocaster, on 23 Jan, 2010 - 10:57 AM, said:

Right now, you are using handles (^). Try using pointers instead (*).

When using pointers instead of handles, you use new instead of gcnew. I have no clue what library you are using, and I have no clue what you are trying to do, and why you need handles as opposed to pointers. It looks like you are trying to parse rapidshare or megaupload, but i cannot tell what any of the classes that are here.

Here's all I can figure out... put CookieContainer^ ckie in the global scope, than ckie = gcnew CookieContainer(); in the function. Than it will be available to any function in that file.

Since you did not post the entire class, I cannot show you how the declaration of ckie should look.

Ok i want to try and make it so each time i go to use HTTPWebRequest i dont have to relogin to the website.

form1.h
[code]#pragma once

#include <string>

#include "Windows.h"
#include "Commands.h"

namespace RPDownloader {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Runtime::InteropServices;
using namespace System::Net;
using namespace System::IO;
using namespace System::Text;

/// <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::MenuStrip^ menuStrip1;
protected:
private: System::Windows::Forms::ToolStripMenuItem^ fileToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ exitToolStripMenuItem;


private: System::Windows::Forms::ToolStripMenuItem^ aboutToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ versionToolStripMenuItem;
private: System::Windows::Forms::ToolStripSeparator^ toolStripSeparator1;
private: System::Windows::Forms::ToolStripMenuItem^ creatorToolStripMenuItem;
private: System::Windows::Forms::TabControl^ tabControl1;
private: System::Windows::Forms::TabPage^ tabPage3;
private: System::Windows::Forms::TabPage^ tabPage1;
private: System::Windows::Forms::Button^ bregen;
private: System::Windows::Forms::Button^ bclear;
private: System::Windows::Forms::Button^ bgen;
private: System::Windows::Forms::RichTextBox^ linksbox;
private: System::Windows::Forms::TabPage^ tabPage2;

private: System::Windows::Forms::TabPage^ tabPage4;
private: System::Windows::Forms::Button^ bcancel;
private: System::Windows::Forms::Button^ blogin;
private: System::Windows::Forms::TextBox^ password;
private: System::Windows::Forms::TextBox^ username;

private: System::Windows::Forms::Label^ RSinfo;

private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ MUinfo;
private: System::Windows::Forms::Label^ MSinfo;
private: System::Windows::Forms::Label^ UPinfo;
private: System::Windows::Forms::Label^ ESinfo;
private: System::Windows::Forms::Label^ HFinfo;
private: System::Windows::Forms::Label^ NLinfo;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::FlowLayoutPanel^ ShowDownloads;
private: System::Windows::Forms::Label^ UNLimits;
private: System::Windows::Forms::Label^ RSLimits;
private: System::Windows::Forms::Label^ ESLimits;
private: System::Windows::Forms::Label^ UPLimits;
private: System::Windows::Forms::Label^ HFLimits;
private: System::Windows::Forms::Label^ NLLimits;
private: System::Windows::Forms::Label^ MSLimits;
private: System::Windows::Forms::Label^ MVLimits;
private: System::Windows::Forms::Label^ MPLimits;
private: System::Windows::Forms::Label^ MULimits;




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->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->exitToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->aboutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->versionToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->toolStripSeparator1 = (gcnew System::Windows::Forms::ToolStripSeparator());
this->creatorToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->tabControl1 = (gcnew System::Windows::Forms::TabControl());
this->tabPage4 = (gcnew System::Windows::Forms::TabPage());
this->UPinfo = (gcnew System::Windows::Forms::Label());
this->ESinfo = (gcnew System::Windows::Forms::Label());
this->HFinfo = (gcnew System::Windows::Forms::Label());
this->NLinfo = (gcnew System::Windows::Forms::Label());
this->MSinfo = (gcnew System::Windows::Forms::Label());
this->MUinfo = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->RSinfo = (gcnew System::Windows::Forms::Label());
this->bcancel = (gcnew System::Windows::Forms::Button());
this->blogin = (gcnew System::Windows::Forms::Button());
this->password = (gcnew System::Windows::Forms::TextBox());
this->username = (gcnew System::Windows::Forms::TextBox());
this->tabPage3 = (gcnew System::Windows::Forms::TabPage());
this->ESLimits = (gcnew System::Windows::Forms::Label());
this->UPLimits = (gcnew System::Windows::Forms::Label());
this->HFLimits = (gcnew System::Windows::Forms::Label());
this->NLLimits = (gcnew System::Windows::Forms::Label());
this->MSLimits = (gcnew System::Windows::Forms::Label());
this->MVLimits = (gcnew System::Windows::Forms::Label());
this->MPLimits = (gcnew System::Windows::Forms::Label());
this->MULimits = (gcnew System::Windows::Forms::Label());
this->RSLimits = (gcnew System::Windows::Forms::Label());
this->UNLimits = (gcnew System::Windows::Forms::Label());
this->tabPage1 = (gcnew System::Windows::Forms::TabPage());
this->bregen = (gcnew System::Windows::Forms::Button());
this->bclear = (gcnew System::Windows::Forms::Button());
this->bgen = (gcnew System::Windows::Forms::Button());
this->linksbox = (gcnew System::Windows::Forms::RichTextBox());
this->tabPage2 = (gcnew System::Windows::Forms::TabPage());
this->button1 = (gcnew System::Windows::Forms::Button());
this->ShowDownloads = (gcnew System::Windows::Forms::FlowLayoutPanel());
this->menuStrip1->SuspendLayout();
this->tabControl1->SuspendLayout();
this->tabPage4->SuspendLayout();
this->tabPage3->SuspendLayout();
this->tabPage1->SuspendLayout();
this->tabPage2->SuspendLayout();
this->SuspendLayout();
//
// menuStrip1
//
this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->fileToolStripMenuItem,
this->aboutToolStripMenuItem});
this->menuStrip1->Location = System::Drawing::Point(0, 0);
this->menuStrip1->Name = L"menuStrip1";
this->menuStrip1->Size = System::Drawing::Size(524, 24);
this->menuStrip1->TabIndex = 0;
this->menuStrip1->Text = L"menuStrip1";
//
// fileToolStripMenuItem
//
this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->exitToolStripMenuItem});
this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem";
this->fileToolStripMenuItem->Size = System::Drawing::Size(37, 20);
this->fileToolStripMenuItem->Text = L"File";
//
// exitToolStripMenuItem
//
this->exitToolStripMenuItem->Name = L"exitToolStripMenuItem";
this->exitToolStripMenuItem->Size = System::Drawing::Size(92, 22);
this->exitToolStripMenuItem->Text = L"Exit";
this->exitToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::exitToolStripMenuItem_Click);
//
// aboutToolStripMenuItem
//
this->aboutToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(3) {this->versionToolStripMenuItem,
this->toolStripSeparator1, this->creatorToolStripMenuItem});
this->aboutToolStripMenuItem->Name = L"aboutToolStripMenuItem";
this->aboutToolStripMenuItem->Size = System::Drawing::Size(52, 20);
this->aboutToolStripMenuItem->Text = L"About";
//
// versionToolStripMenuItem
//
this->versionToolStripMenuItem->Name = L"versionToolStripMenuItem";
this->versionToolStripMenuItem->Size = System::Drawing::Size(113, 22);
this->versionToolStripMenuItem->Text = L"Version";
this->versionToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::versionToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this->toolStripSeparator1->Name = L"toolStripSeparator1";
this->toolStripSeparator1->Size = System::Drawing::Size(110, 6);
//
// creatorToolStripMenuItem
//
this->creatorToolStripMenuItem->Name = L"creatorToolStripMenuItem";
this->creatorToolStripMenuItem->Size = System::Drawing::Size(113, 22);
this->creatorToolStripMenuItem->Text = L"Creator";
this->creatorToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::creatorToolStripMenuItem_Click);
//
// tabControl1
//
this->tabControl1->Controls->Add(this->tabPage4);
this->tabControl1->Controls->Add(this->tabPage3);
this->tabControl1->Controls->Add(this->tabPage1);
this->tabControl1->Controls->Add(this->tabPage2);
this->tabControl1->Location = System::Drawing::Point(-2, 24);
this->tabControl1->Name = L"tabControl1";
this->tabControl1->SelectedIndex = 0;
this->tabControl1->Size = System::Drawing::Size(525, 230);
this->tabControl1->TabIndex = 5;
//
// tabPage4
//
this->tabPage4->Controls->Add(this->UPinfo);
this->tabPage4->Controls->Add(this->ESinfo);
this->tabPage4->Controls->Add(this->HFinfo);
this->tabPage4->Controls->Add(this->NLinfo);
this->tabPage4->Controls->Add(this->MSinfo);
this->tabPage4->Controls->Add(this->MUinfo);
this->tabPage4->Controls->Add(this->label2);
this->tabPage4->Controls->Add(this->RSinfo);
this->tabPage4->Controls->Add(this->bcancel);
this->tabPage4->Controls->Add(this->blogin);
this->tabPage4->Controls->Add(this->password);
this->tabPage4->Controls->Add(this->username);
this->tabPage4->Location = System::Drawing::Point(4, 22);
this->tabPage4->Name = L"tabPage4";
this->tabPage4->Size = System::Drawing::Size(517, 204);
this->tabPage4->TabIndex = 3;
this->tabPage4->Text = L"Account";
this->tabPage4->UseVisualStyleBackColor = true;
//
// UPinfo
//
this->UPinfo->AutoSize = true;
this->UPinfo->Location = System::Drawing::Point(247, 126);
this->UPinfo->Name = L"UPinfo";
this->UPinfo->Size = System::Drawing::Size(0, 13);
this->UPinfo->TabIndex = 12;
//
// ESinfo
//
this->ESinfo->AutoSize = true;
this->ESinfo->Location = System::Drawing::Point(245, 111);
this->ESinfo->Name = L"ESinfo";
this->ESinfo->Size = System::Drawing::Size(0, 13);
this->ESinfo->TabIndex = 11;
//
// HFinfo
//
this->HFinfo->AutoSize = true;
this->HFinfo->Location = System::Drawing::Point(254, 96);
this->HFinfo->Name = L"HFinfo";
this->HFinfo->Size = System::Drawing::Size(0, 13);
this->HFinfo->TabIndex = 10;
//
// NLinfo
//
this->NLinfo->AutoSize = true;
this->NLinfo->Location = System::Drawing::Point(252, 81);
this->NLinfo->Name = L"NLinfo";
this->NLinfo->Size = System::Drawing::Size(0, 13);
this->NLinfo->TabIndex = 9;
//
// MSinfo
//
this->MSinfo->AutoSize = true;
this->MSinfo->Location = System::Drawing::Point(243, 66);
this->MSinfo->Name = L"MSinfo";
this->MSinfo->Size = System::Drawing::Size(0, 13);
this->MSinfo->TabIndex = 8;
//
// MUinfo
//
this->MUinfo->AutoSize = true;
this->MUinfo->Location = System::Drawing::Point(242, 51);
this->MUinfo->Name = L"MUinfo";
this->MUinfo->Size = System::Drawing::Size(0, 13);
this->MUinfo->TabIndex = 7;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 15.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label2->ForeColor = System::Drawing::Color::Red;
this->label2->Location = System::Drawing::Point(262, 4);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(132, 25);
this->label2->TabIndex = 6;
this->label2->Text = L"Private Info";
//
// RSinfo
//
this->RSinfo->AutoSize = true;
this->RSinfo->Location = System::Drawing::Point(157, 36);
this->RSinfo->Name = L"RSinfo";
this->RSinfo->Size = System::Drawing::Size(341, 13);
this->RSinfo->TabIndex = 5;
this->RSinfo->Text = L"The Account Information cannot be retrieved from RapidPremium\'s Site";
//
// bcancel
//
this->bcancel->Location = System::Drawing::Point(77, 62);
this->bcancel->Name = L"bcancel";
this->bcancel->Size = System::Drawing::Size(62, 20);
this->bcancel->TabIndex = 3;
this->bcancel->Text = L"Cancel";
this->bcancel->UseVisualStyleBackColor = true;
this->bcancel->Click += gcnew System::EventHandler(this, &Form1::bcancel_Click);
//
// blogin
//
this->blogin->Location = System::Drawing::Point(9, 62);
this->blogin->Name = L"blogin";
this->blogin->Size = System::Drawing::Size(62, 20);
this->blogin->TabIndex = 2;
this->blogin->Text = L"Login";
this->blogin->UseVisualStyleBackColor = true;
this->blogin->Click += gcnew System::EventHandler(this, &Form1::blogin_Click);
//
// password
//
this->password->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(128)),
static_cast<System::Int32>(static_cast<System::Byte>(128)));
this->password->Location = System::Drawing::Point(9, 36);
this->password->Name = L"password";
this->password->PasswordChar = '*';
this->password->Size = System::Drawing::Size(130, 20);
this->password->TabIndex = 1;
this->password->Text = L"Password";
//
// username
//
this->username->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(128)), static_cast<System::Int32>(static_cast<System::Byte>(255)),
static_cast<System::Int32>(static_cast<System::Byte>(128)));
this->username->Location = System::Drawing::Point(9, 10);
this->username->Name = L"username";
this->username->Size = System::Drawing::Size(130, 20);
this->username->TabIndex = 0;
this->username->Text = L"Username";
//
// tabPage3
//
this->tabPage3->Controls->Add(this->ESLimits);
this->tabPage3->Controls->Add(this->UPLimits);
this->tabPage3->Controls->Add(this->HFLimits);
this->tabPage3->Controls->Add(this->NLLimits);
this->tabPage3->Controls->Add(this->MSLimits);
this->tabPage3->Controls->Add(this->MVLimits);
this->tabPage3->Controls->Add(this->MPLimits);
this->tabPage3->Controls->Add(this->MULimits);
this->tabPage3->Controls->Add(this->RSLimits);
this->tabPage3->Controls->Add(this->UNLimits);
this->tabPage3->Location = System::Drawing::Point(4, 22);
this->tabPage3->Name = L"tabPage3";
this->tabPage3->Size = System::Drawing::Size(517, 204);
this->tabPage3->TabIndex = 2;
this->tabPage3->Text = L"My Limits";
this->tabPage3->UseVisualStyleBackColor = true;
//
// ESLimits
//
this->ESLimits->AutoSize = true;
this->ESLimits->Location = System::Drawing::Point(36, 138);
this->ESLimits->Name = L"ESLimits";
this->ESLimits->Size = System::Drawing::Size(7, 13);
this->ESLimits->TabIndex = 9;
this->ESLimits->Text = L"\r\n";
//
// UPLimits
//
this->UPLimits->AutoSize = true;
this->UPLimits->Location = System::Drawing::Point(36, 151);
this->UPLimits->Name = L"UPLimits";
this->UPLimits->Size = System::Drawing::Size(7, 13);
this->UPLimits->TabIndex = 8;
this->UPLimits->Text = L"\r\n";
//
// HFLimits
//
this->HFLimits->AutoSize = true;
this->HFLimits->Location = System::Drawing::Point(36, 125);
this->HFLimits->Name = L"HFLimits";
this->HFLimits->Size = System::Drawing::Size(7, 13);
this->HFLimits->TabIndex = 7;
this->HFLimits->Text = L"\r\n";
//
// NLLimits
//
this->NLLimits->AutoSize = true;
this->NLLimits->Location = System::Drawing::Point(36, 112);
this->NLLimits->Name = L"NLLimits";
this->NLLimits->Size = System::Drawing::Size(0, 13);
this->NLLimits->TabIndex = 6;
//
// MSLimits
//
this->MSLimits->AutoSize = true;
this->MSLimits->Location = System::Drawing::Point(36, 99);
this->MSLimits->Name = L"MSLimits";
this->MSLimits->Size = System::Drawing::Size(0, 13);
this->MSLimits->TabIndex = 5;
//
// MVLimits
//
this->MVLimits->AutoSize = true;
this->MVLimits->Location = System::Drawing::Point(36, 86);
this->MVLimits->Name = L"MVLimits";
this->MVLimits->Size = System::Drawing::Size(0, 13);
this->MVLimits->TabIndex = 4;
//
// MPLimits
//
this->MPLimits->AutoSize = true;
this->MPLimits->Location = System::Drawing::Point(36, 73);
this->MPLimits->Name = L"MPLimits";
this->MPLimits->Size = System::Drawing::Size(0, 13);
this->MPLimits->TabIndex = 3;
//
// MULimits
//
this->MULimits->AutoSize = true;
this->MULimits->Location = System::Drawing::Point(36, 60);
this->MULimits->Name = L"MULimits";
this->MULimits->Size = System::Drawing::Size(0, 13);
this->MULimits->TabIndex = 2;
//
// RSLimits
//
this->RSLimits->AutoSize = true;
this->RSLimits->Location = System::Drawing::Point(36, 47);
this->RSLimits->Name = L"RSLimits";
this->RSLimits->Size = System::Drawing::Size(211, 13);
this->RSLimits->TabIndex = 1;
this->RSLimits->Text = L"You Limit Information could not be retrieved";
//
// UNLimits
//
this->UNLimits->AutoSize = true;
this->UNLimits->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 15.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->UNLimits->ForeColor = System::Drawing::Color::Blue;
this->UNLimits->Location = System::Drawing::Point(34, 12);
this->UNLimits->Name = L"UNLimits";
this->UNLimits->Size = System::Drawing::Size(125, 25);
this->UNLimits->TabIndex = 0;
this->UNLimits->Text = L"Link Limits";
//
// tabPage1
//
this->tabPage1->Controls->Add(this->bregen);
this->tabPage1->Controls->Add(this->bclear);
this->tabPage1->Controls->Add(this->bgen);
this->tabPage1->Controls->Add(this->linksbox);
this->tabPage1->Location = System::Drawing::Point(4, 22);
this->tabPage1->Name = L"tabPage1";
this->tabPage1->Padding = System::Windows::Forms::Padding(3);
this->tabPage1->Size = System::Drawing::Size(517, 204);
this->tabPage1->TabIndex = 0;
this->tabPage1->Text = L"Generation";
this->tabPage1->UseVisualStyleBackColor = true;
//
// bregen
//
this->bregen->Location = System::Drawing::Point(96, 176);
this->bregen->Name = L"bregen";
this->bregen->Size = System::Drawing::Size(90, 22);
this->bregen->TabIndex = 8;
this->bregen->Text = L"Regenerate";
this->bregen->UseVisualStyleBackColor = true;
//
// bclear
//
this->bclear->Location = System::Drawing::Point(192, 176);
this->bclear->Name = L"bclear";
this->bclear->Size = System::Drawing::Size(90, 22);
this->bclear->TabIndex = 7;
this->bclear->Text = L"Clear";
this->bclear->UseVisualStyleBackColor = true;
this->bclear->Click += gcnew System::EventHandler(this, &Form1::bclear_Click_1);
//
// bgen
//
this->bgen->Location = System::Drawing::Point(0, 176);
this->bgen->Name = L"bgen";
this->bgen->Size = System::Drawing::Size(90, 22);
this->bgen->TabIndex = 6;
this->bgen->Text = L"Generate";
this->bgen->UseVisualStyleBackColor = true;
this->bgen->Click += gcnew System::EventHandler(this, &Form1::bgen_Click);
//
// linksbox
//
this->linksbox->Location = System::Drawing::Point(1, 0);
this->linksbox->Name = L"linksbox";
this->linksbox->Size = System::Drawing::Size(491, 170);
this->linksbox->TabIndex = 5;
this->linksbox->Text = L"Paste Links Here";
//
// tabPage2
//
this->tabPage2->Controls->Add(this->button1);
this->tabPage2->Controls->Add(this->ShowDownloads);
this->tabPage2->Location = System::Drawing::Point(4, 22);
this->tabPage2->Name = L"tabPage2";
this->tabPage2->Padding = System::Windows::Forms::Padding(3);
this->tabPage2->Size = System::Drawing::Size(517, 204);
this->tabPage2->TabIndex = 1;
this->tabPage2->Text = L"Show Downloads";
this->tabPage2->UseVisualStyleBackColor = true;
//
&nbs
Was This Post Helpful? 0
  • +
  • -

#6 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1072
  • View blog
  • Posts: 4,532
  • Joined: 09-June 09

Re: Help with multiple private:'s and better code

Posted 23 January 2010 - 01:19 PM

@splatocaster, I think he is in managed C++, which i am not a fan of lol
Was This Post Helpful? 0
  • +
  • -

#7 Splatocaster  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 51
  • View blog
  • Posts: 182
  • Joined: 22-December 09

Re: Help with multiple private:'s and better code

Posted 25 January 2010 - 01:16 PM

@sexy - how come you show up on every post i make haha.

and i agree, althogh im not too familiar with the GC heap i try to avoid it, so this is not the topic for me
Was This Post Helpful? 0
  • +
  • -

#8 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1072
  • View blog
  • Posts: 4,532
  • Joined: 09-June 09

Re: Help with multiple private:'s and better code

Posted 25 January 2010 - 01:22 PM

be cause i like you :) lol jk
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1