Posted 12 years ago
·
Author
This was a tool I wrote a long time ago before Imvu introduced the in client shop and create mode. Its purpose was to take a pid and open it in peer review mode for you to look at and see if you like it before you buy or wishlist it.
I just found the source code on my drive again so I thought I would post it. This was my first attempt at making something in c# so it's pretty ugly lol.
Click here to download the full source code.
I just found the source code on my drive again so I thought I would post it. This was my first attempt at making something in c# so it's pretty ugly lol.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace ImvuMafiasProductPreviewer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
// Paste From Clipboard Menu Item
private void pasteFromClipboardToolStripMenuItem_Click(object sender, EventArgs e)
{
//Check For Characters In The Input Box
if (PIDBox.Text.Length >= 1) //If Characters Found
{
PIDBox.Clear(); //Clear The Input Box
PIDBox.Text = Clipboard.GetText(); //Paste Charatcers From Clipboard
}
else //If No Characters Found
{
PIDBox.Text = Clipboard.GetText(); //Paste Charatcers From Clipboard
}
}
//End Paste From Clipboard Menu Item
//Clear Menu Item
private void clearInputToolStripMenuItem_Click(object sender, EventArgs e)
{
PIDBox.Clear();
}
//End Clear Menu Item
//Close Menu Item
private void closeToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close(); //Exit Program
}
//End Menu Item
//Open Imvu Catalog Menu Item
private void openImvuCatalogToolStripMenuItem_Click(object sender, EventArgs e)
{
Process.Start("http://www.imvu.com/shop/");
}
//End Open Imvu Catalog Menu Item
//Visit The Imvu Mafias Menu Item
private void visitTheImvuMafiasToolStripMenuItem_Click(object sender, EventArgs e)
{
Process.Start("https://www.imvumafias.org/community/index.php");
}
//End Visit The Imvu Mafias Menu Item
//Toggle Focus Menu Item
private void toggleFocusToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (this.TopMost == true) //If The Form Is Already On Top
{
this.TopMost = false; //Set The Forms Focus Always On Top Focus Off
FocusLabel.Text = "Focus Off"; //Change The Focus Label Text To Off
FocusLabel.ForeColor = Color.Firebrick; //Change The Focus Label Font Color To A Darker Red
}
else //If The Form Is Not On Top
{
this.TopMost = true; //Set The Forms Focus Always On Top Focus On
FocusLabel.Text = "Focus On"; //Change The Focus Label Text To On
FocusLabel.ForeColor = Color.Green; //Change The Focus Label Font Color To Green
}
}
//End Toggle Focus Menu Item
// Preview PID Button
private void PreviewButton_Click(object sender, EventArgs e)
{
//Declare Variables
bool IsNumber = true;
string IDString = PIDBox.Text;
if (PIDBox.Text.Length < 2) //If Input Is Too Short
{
PIDBox.Text = "Enter A Product Id Number"; //Prompt User To Input PID
}
else //If Input Length Is Correct
{
for (int i = 0; i < PIDBox.Text.Length; i++)
{
// Goes Through Each Character & Checks If It Is A Number
if ((IDString[i] < '0') || (IDString[i] > '9')) IsNumber = false;
}
if (IsNumber) //If All Characters Are Numbers
{
Process.Start("imvu:PeerReview?mcg=0&pid=" + IDString); //Run The PID
}
else //If Input Contains A Number
{
PIDBox.Text = "Enter A Product Id Number"; //Prompt User To Input A PID
}
}
}
//Beginning No Letters Allowed In InputBox
private void PIDBox_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar < '0' || e.KeyChar > '9') && (e.KeyChar != '\b'))
{
e.Handled = true;
}
else
{
e.Handled = false;
}
}
//End No Letters Allowed In InputBox
//Check Input Box For Text
private void PIDBox_Click(object sender, EventArgs e)
{
if (PIDBox.Text == "Enter A Product Id Number")
{
PIDBox.Clear();
}
}
//End Check Input Box For Text
//Beginning DropDownMenu Item Highlight Forecolor Change
private void pasteFromClipboardToolStripMenuItem_MouseEnter(object sender, EventArgs e)
{
pasteFromClipboardToolStripMenuItem.ForeColor = Color.Blue;
}
private void pasteFromClipboardToolStripMenuItem_MouseLeave(object sender, EventArgs e)
{
pasteFromClipboardToolStripMenuItem.ForeColor = Color.DarkGray;
}
private void clearInputToolStripMenuItem_MouseEnter(object sender, EventArgs e)
{
clearInputToolStripMenuItem.ForeColor = Color.Blue;
}
private void clearInputToolStripMenuItem_MouseLeave(object sender, EventArgs e)
{
clearInputToolStripMenuItem.ForeColor = Color.DarkGray;
}
private void openImvuCatalogToolStripMenuItem_MouseEnter(object sender, EventArgs e)
{
openImvuCatalogToolStripMenuItem.ForeColor = Color.Blue;
}
private void openImvuCatalogToolStripMenuItem_MouseLeave(object sender, EventArgs e)
{
openImvuCatalogToolStripMenuItem.ForeColor = Color.DarkGray;
}
private void toggleFocusToolStripMenuItem1_MouseEnter(object sender, EventArgs e)
{
toggleFocusToolStripMenuItem1.ForeColor = Color.Blue;
}
private void toggleFocusToolStripMenuItem1_MouseLeave(object sender, EventArgs e)
{
toggleFocusToolStripMenuItem1.ForeColor = Color.DarkGray;
}
private void visitTheImvuMafiasToolStripMenuItem_MouseEnter(object sender, EventArgs e)
{
visitTheImvuMafiasToolStripMenuItem.ForeColor = Color.Blue;
}
private void visitTheImvuMafiasToolStripMenuItem_MouseLeave(object sender, EventArgs e)
{
visitTheImvuMafiasToolStripMenuItem.ForeColor = Color.DarkGray;
}
private void toggleFocusToolStripMenuItem_MouseEnter(object sender, EventArgs e)
{
toggleFocusToolStripMenuItem1.ForeColor = Color.Blue;
}
private void toggleFocusToolStripMenuItem_MouseLeave(object sender, EventArgs e)
{
toggleFocusToolStripMenuItem1.ForeColor = Color.DarkGray;
}
//Beginning ToolStripMenu Items Forcolor Change
private void fileToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
fileToolStripMenuItem.ForeColor = Color.Black;
}
private void fileToolStripMenuItem_DropDownClosed(object sender, EventArgs e)
{
fileToolStripMenuItem.ForeColor = Color.White;
}
private void toolsToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
toolsToolStripMenuItem.ForeColor = Color.Black;
}
private void toolsToolStripMenuItem_DropDownClosed(object sender, EventArgs e)
{
toolsToolStripMenuItem.ForeColor = Color.White;
}
private void optionsToolStripMenuItem1_DropDownOpened(object sender, EventArgs e)
{
optionsToolStripMenuItem1.ForeColor = Color.Black;
}
private void optionsToolStripMenuItem1_DropDownClosed(object sender, EventArgs e)
{
optionsToolStripMenuItem1.ForeColor = Color.White;
}
private void helpToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
helpToolStripMenuItem.ForeColor = Color.Black;
}
private void helpToolStripMenuItem_DropDownClosed(object sender, EventArgs e)
{
helpToolStripMenuItem.ForeColor = Color.White;
}
//End ToolStripMenu Items Forcolor Change
}
}
Click here to download the full source code.