private void panel2_Click(object sender, EventArgs e) { Form_ItemCreator form2 = new Form_ItemCreator(this); form2.Show(); Hide(); }
private void panel2_Click(object sender, EventArgs e) { Form_ItemCreator form2 = new Form_ItemCreator(); form2.Show(); Hide(); form2.timer1.Enabled = true; }
private void label2_Click(object sender, EventArgs e) { Close(); Form_ItemCreator form2 = new Form_ItemCreator(form_MM); form2.Show(); //form2.timer1.Enabled = true; }
private void panel2_Click(object sender, EventArgs e) { Form_ItemCreator form2 = new Form_ItemCreator(this); form2.Show(); Hide(); // this shouldn't be here - move it to Form_ItemCreator_Load //form2.timer1.Enabled = true; }
private void Form_SocketOptions_FormClosed(object sender, FormClosedEventArgs e) { Form_ItemCreator frm = new Form_ItemCreator(); frm.GetSocketBonusData(listBox1.SelectedIndex, Convert.ToInt32(textBox1.Text), listBox2.SelectedIndex, Convert.ToInt32(textBox2.Text), listBox3.SelectedIndex, Convert.ToInt32(textBox3.Text), Convert.ToInt32(textBox4.Text)); Definers.output_itemsocketcolor1 = listBox1.SelectedIndex; Definers.output_itemsocketcolor2 = listBox2.SelectedIndex; Definers.output_itemsocketcolor3 = listBox3.SelectedIndex; }
private void button_mysql_connect_Click(object sender, EventArgs e) { Properties.Settings.Default.Save(); try { string myConnection = "datasource=" + textbox_mysql_hostname.Text + ";port=" + textbox_mysql_port.Text + ";username="******";password="******"Connected!"; form_itemCreator.label_mysql_status2.ForeColor = Color.LawnGreen; label_mysql_status.Text = "Connected!"; label_mysql_status.ForeColor = Color.LawnGreen; textbox_mysql_username.Visible = true; textbox_mysql_pass.Visible = true; tabControl1.Visible = false; timer1.Enabled = true; myConn.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BackToMainMenu_Load(object sender, EventArgs e) { try { string myConnection = "datasource=" + mainmenu.textbox_mysql_hostname.Text + ";port=" + mainmenu.textbox_mysql_port.Text + ";username="******";password="******"Connected!"; form_itemCreator.label_mysql_status2.ForeColor = Color.LawnGreen; label_mysql_status.Text = "Connected!"; label_mysql_status.ForeColor = Color.LawnGreen; mainmenu.textbox_mysql_username.Visible = true; mainmenu.textbox_mysql_pass.Visible = true; //mainmenu.tabControl1.Visible = false; timer1.Enabled = true; myConn.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button_execute_query_Click(object sender, EventArgs e) { Form_ItemCreator frm = new Form_ItemCreator(); if (frm.textBox1.Text == "") { MessageBox.Show("Entry column should not be empty", "Error"); return; } //Clipboard.SetText(Form_ItemCreator.stringSQLShare); Form_MainMenu mainmenu = new Form_MainMenu(); MySqlConnection connection = new MySqlConnection("datasource=" + mainmenu.textbox_mysql_hostname.Text + ";port=" + mainmenu.textbox_mysql_port.Text + ";username="******";password="******"Data Not Inserted"); //label2.ForeColor = Color.Red; //label2.Text = "Eroare!"; //MessageBox.Show("Unable to connect to any of the specified MySQL hosts."); } } catch (Exception ex) { MessageBox.Show(ex.Message); } connection.Close(); }
public static void LoadIndexes() { Form_ItemCreator frm = new Form_ItemCreator(); Definers.output_itemEntry = Convert.ToInt32(frm.textBox1.Text); Definers.output_itemName = frm.textBox2.Text; Definers.output_itemlevel = Convert.ToInt32(frm.textBox10.Text); Definers.output_itemarmor = Convert.ToInt32(frm.textBox29.Text); Definers.output_itemstatvalue1 = Convert.ToInt32(frm.textBox16.Text); Definers.output_itemstatvalue2 = Convert.ToInt32(frm.textBox17.Text); Definers.output_itemstatvalue3 = Convert.ToInt32(frm.textBox18.Text); Definers.output_itemstatvalue4 = Convert.ToInt32(frm.textBox19.Text); Definers.output_itemstatvalue5 = Convert.ToInt32(frm.textBox20.Text); Definers.output_itemstatvalue6 = Convert.ToInt32(frm.textBox21.Text); Definers.output_itemstatvalue7 = Convert.ToInt32(frm.textBox22.Text); Definers.output_itemstatvalue8 = Convert.ToInt32(frm.textBox23.Text); Definers.output_itemstatvalue9 = Convert.ToInt32(frm.textBox24.Text); Definers.output_itemstatvalue10 = Convert.ToInt32(frm.textBox25.Text); Definers.output_itemdurability = Convert.ToInt32(frm.textBox31.Text); }
private void button_execute_query_Click(object sender, EventArgs e) { Form_ItemCreator frm = new Form_ItemCreator(); if (frm.NUD_item_Entry.Text == "") { MessageBox.Show("Entry column should not be empty", "Error"); return; } //Clipboard.SetText(Form_ItemCreator.stringSQLShare); Form_MainMenu mainmenu = new Form_MainMenu(); MySqlConnection connection = new MySqlConnection( "datasource=" + form_MM.GetHost() + ";" + "port=" + form_MM.GetPort() + ";" + "username="******";" + "password="******";" ); string insertQuery = Form_ItemCreator.stringSQLShare; connection.Open(); MySqlCommand command = new MySqlCommand(insertQuery, connection); // Test try { //frm.label_query_executed_successfully.Visible = true; if (command.ExecuteNonQuery() == 1) { // this.Close(); //frm.label83.ForeColor = Color.GreenYellow; label_query_executed_successfully.Visible = true; } } catch (Exception ex) { MessageBox.Show(ex.Message); } connection.Close(); }
private void Form_ItemPreview_Load(object sender, EventArgs e) { Form_ItemCreator form2 = new Form_ItemCreator(); string this_title = "ITEM["; this_title += Definers.output_itemEntry; this_title += "]: "; this_title += Definers.output_itemName; this.Text = this_title; label1.ForeColor = GetQualityColor(Definers.output_itemQuality); label1.Text = "[" + Definers.output_itemName + "]"; label2.Text = "Item Level " + Definers.output_itemlevel; label3.Text = "\"" + Definers.output_itemDescription + "\""; label4.Text = GetItemBindingString(Definers.output_itembinding); label5.Text = GetInvetoryTypeString(Definers.output_iteminvetorytype); label6.Text = GetItemMaterialString(Definers.output_itemmaterial); if (Definers.output_itemarmor > 0) { label7.Text = Definers.output_itemarmor.ToString(); } else { label7.Hide(); panel2.Location = new Point(panel2.Location.X, panel2.Location.Y - 14); } // load stats int p1_stats_count = 0; int p2_stats_count = 0; int p3_stats_count = 0; Label lb_value1 = new Label(); // stat value 1 lb_value1.AutoSize = true; Label lb_value2 = new Label(); // stat value 2 lb_value2.AutoSize = true; Label lb_value3 = new Label(); // stat value 3 lb_value3.AutoSize = true; Label lb_value4 = new Label(); // stat value 4 lb_value4.AutoSize = true; Label lb_value5 = new Label(); // stat value 5 lb_value5.AutoSize = true; Label lb_value6 = new Label(); // stat value 6 lb_value6.AutoSize = true; Label lb_value7 = new Label(); // stat value 7 lb_value7.AutoSize = true; Label lb_value8 = new Label(); // stat value 8 lb_value8.AutoSize = true; Label lb_value9 = new Label(); // stat value 9 lb_value9.AutoSize = true; Label lb_value10 = new Label(); // stat value 10 lb_value10.AutoSize = true; // stats value 1 if (Definers.output_itemstatvalue1 > 0) { if (Definers.output_itemtype1 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value1); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value1); } lb_value1.Text = "+" + Definers.output_itemstatvalue1.ToString() + " " + GetItemTypeString(Definers.output_itemtype1); lb_value1.ForeColor = Definers.output_itemtype1 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } // stats value 2 if (Definers.output_itemstatvalue2 > 0) { if (Definers.output_itemtype2 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value2); lb_value2.Location = new Point(lb_value2.Location.X, lb_value2.Location.Y + ((p2_stats_count - 1) * 20)); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value2); lb_value2.Location = new Point(lb_value2.Location.X, lb_value2.Location.Y + ((p1_stats_count - 1) * 20)); } lb_value2.Text = "+" + Definers.output_itemstatvalue2.ToString() + " " + GetItemTypeString(Definers.output_itemtype2); lb_value2.ForeColor = Definers.output_itemtype2 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } // stats value 3 if (Definers.output_itemstatvalue3 > 0) { if (Definers.output_itemtype3 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value3); lb_value3.Location = new Point(lb_value3.Location.X, lb_value3.Location.Y + ((p2_stats_count - 1) * 20)); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value3); lb_value3.Location = new Point(lb_value3.Location.X, lb_value3.Location.Y + ((p1_stats_count - 1) * 20)); } lb_value3.Text = "+" + Definers.output_itemstatvalue3.ToString() + " " + GetItemTypeString(Definers.output_itemtype3); lb_value3.ForeColor = Definers.output_itemtype3 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } // stats value 4 if (Definers.output_itemstatvalue4 > 0) { if (Definers.output_itemtype4 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value4); lb_value4.Location = new Point(lb_value4.Location.X, lb_value4.Location.Y + ((p2_stats_count - 1) * 20)); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value4); lb_value4.Location = new Point(lb_value4.Location.X, lb_value4.Location.Y + ((p1_stats_count - 1) * 20)); } lb_value4.Text = "+" + Definers.output_itemstatvalue4.ToString() + " " + GetItemTypeString(Definers.output_itemtype4); lb_value4.ForeColor = Definers.output_itemtype4 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } // stats value 5 if (Definers.output_itemstatvalue5 > 0) { if (Definers.output_itemtype5 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value5); lb_value5.Location = new Point(lb_value5.Location.X, lb_value5.Location.Y + ((p2_stats_count - 1) * 20)); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value5); lb_value5.Location = new Point(lb_value5.Location.X, lb_value5.Location.Y + ((p1_stats_count - 1) * 20)); } lb_value5.Text = "+" + Definers.output_itemstatvalue5.ToString() + " " + GetItemTypeString(Definers.output_itemtype5); lb_value5.ForeColor = Definers.output_itemtype5 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } // stats value 6 if (Definers.output_itemstatvalue6 > 0) { if (Definers.output_itemtype6 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value6); lb_value6.Location = new Point(lb_value6.Location.X, lb_value6.Location.Y + ((p2_stats_count - 1) * 20)); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value6); lb_value6.Location = new Point(lb_value6.Location.X, lb_value6.Location.Y + ((p1_stats_count - 1) * 20)); } lb_value6.Text = "+" + Definers.output_itemstatvalue6.ToString() + " " + GetItemTypeString(Definers.output_itemtype6); lb_value6.ForeColor = Definers.output_itemtype6 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } // stats value 7 if (Definers.output_itemstatvalue7 > 0) { if (Definers.output_itemtype7 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value7); lb_value7.Location = new Point(lb_value7.Location.X, lb_value7.Location.Y + ((p2_stats_count - 1) * 20)); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value7); lb_value7.Location = new Point(lb_value7.Location.X, lb_value7.Location.Y + ((p1_stats_count - 1) * 20)); } lb_value7.Text = "+" + Definers.output_itemstatvalue7.ToString() + " " + GetItemTypeString(Definers.output_itemtype7); lb_value7.ForeColor = Definers.output_itemtype7 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } // stats value 8 if (Definers.output_itemstatvalue8 > 0) { if (Definers.output_itemtype8 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value8); lb_value8.Location = new Point(lb_value8.Location.X, lb_value8.Location.Y + ((p2_stats_count - 1) * 20)); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value8); lb_value8.Location = new Point(lb_value8.Location.X, lb_value8.Location.Y + ((p1_stats_count - 1) * 20)); } lb_value8.Text = "+" + Definers.output_itemstatvalue8.ToString() + " " + GetItemTypeString(Definers.output_itemtype8); lb_value8.ForeColor = Definers.output_itemtype8 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } // stats value 9 if (Definers.output_itemstatvalue9 > 0) { if (Definers.output_itemtype9 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value9); lb_value9.Location = new Point(lb_value9.Location.X, lb_value9.Location.Y + ((p2_stats_count - 1) * 20)); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value9); lb_value9.Location = new Point(lb_value9.Location.X, lb_value9.Location.Y + ((p1_stats_count - 1) * 20)); } lb_value9.Text = "+" + Definers.output_itemstatvalue9.ToString() + " " + GetItemTypeString(Definers.output_itemtype9); lb_value9.ForeColor = Definers.output_itemtype9 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } // stats value 10 if (Definers.output_itemstatvalue10 > 0) { if (Definers.output_itemtype10 > 6) // green stats { p2_stats_count += 1; panel3.Controls.Add(lb_value10); lb_value10.Location = new Point(lb_value10.Location.X, lb_value10.Location.Y + ((p2_stats_count - 1) * 20)); } else { p1_stats_count += 1; panel2.Controls.Add(lb_value10); lb_value10.Location = new Point(lb_value10.Location.X, lb_value10.Location.Y + ((p1_stats_count - 1) * 20)); } lb_value10.Text = "+" + Definers.output_itemstatvalue10.ToString() + " " + GetItemTypeString(Definers.output_itemtype10); lb_value10.ForeColor = Definers.output_itemtype10 > 6 ? Color.FromArgb(30, 255, 0) : Color.White; } if (p1_stats_count > 0) { if (p1_stats_count > 1) { panel2.Height += (p1_stats_count - 1) * 20; } } else { panel2.Hide(); } if (p2_stats_count > 0) { if (p2_stats_count > 1) { panel3.Height += (p2_stats_count - 1) * 20; } } else { panel3.Hide(); } // end of load stats if (panel2.Visible) { panel3.Location = new Point(panel2.Location.X, panel2.Location.Y + panel2.Height); } else { panel3.Location = new Point(panel2.Location.X, panel2.Location.Y); } // socket display PictureBox pic_socket1 = new PictureBox(); // socket color picture 1 pic_socket1.Size = new Size(14, 14); PictureBox pic_socket2 = new PictureBox(); // socket color picture 2 pic_socket2.Size = new Size(14, 14); PictureBox pic_socket3 = new PictureBox(); // socket color picture 3 pic_socket3.Size = new Size(14, 14); Label lb_socketColor1 = new Label(); // socket color label 1 lb_socketColor1.AutoSize = true; lb_socketColor1.ForeColor = Color.FromArgb(157, 157, 157); Label lb_socketColor2 = new Label();// socket color label 2 lb_socketColor2.AutoSize = true; lb_socketColor2.ForeColor = Color.FromArgb(157, 157, 157); Label lb_socketColor3 = new Label();// socket color label 3 lb_socketColor3.AutoSize = true; lb_socketColor3.ForeColor = Color.FromArgb(157, 157, 157); if (Definers.output_itemsocketcolor1 > 0) { p3_stats_count += 1; pic_socket1.Image = SocketColorImage(Definers.output_itemsocketcolor1); lb_socketColor1.Location = new Point(lb_socketColor1.Location.X + 15, lb_socketColor1.Location.Y); lb_socketColor1.Text = SocketColorString(Definers.output_itemsocketcolor1); panel4.Controls.Add(lb_socketColor1); panel4.Controls.Add(pic_socket1); } if (Definers.output_itemsocketcolor2 > 0) { p3_stats_count += 1; pic_socket2.Image = SocketColorImage(Definers.output_itemsocketcolor2); pic_socket2.Location = new Point(pic_socket2.Location.X, pic_socket2.Location.Y + ((p3_stats_count - 1) * 21)); lb_socketColor2.Location = new Point(lb_socketColor2.Location.X + 15, lb_socketColor2.Location.Y + ((p3_stats_count - 1) * 21)); lb_socketColor2.Text = SocketColorString(Definers.output_itemsocketcolor2); panel4.Controls.Add(lb_socketColor2); panel4.Controls.Add(pic_socket2); } if (Definers.output_itemsocketcolor3 > 0) { p3_stats_count += 1; pic_socket3.Image = SocketColorImage(Definers.output_itemsocketcolor3); pic_socket3.Location = new Point(pic_socket3.Location.X, pic_socket3.Location.Y + ((p3_stats_count - 1) * 21)); lb_socketColor3.Location = new Point(lb_socketColor3.Location.X + 15, lb_socketColor3.Location.Y + ((p3_stats_count - 1) * 21)); lb_socketColor3.Text = SocketColorString(Definers.output_itemsocketcolor3); panel4.Controls.Add(lb_socketColor3); panel4.Controls.Add(pic_socket3); } if (p3_stats_count > 0) { if (p3_stats_count > 1) { panel4.Height += (p3_stats_count - 1) * 21; } } else { panel4.Hide(); } // end of socket display if (panel3.Visible) { panel4.Location = new Point(panel3.Location.X, panel3.Location.Y + panel3.Height); } else { panel4.Location = new Point(panel3.Location.X, panel3.Location.Y); } // item durability if (Definers.output_itemdurability > 0) { label8.Text = "Durability " + Definers.output_itemdurability.ToString() + "/" + Definers.output_itemdurability.ToString(); } else { label8.Hide(); } if (panel4.Visible) { label8.Location = new Point(panel4.Location.X, panel4.Location.Y + panel4.Height); } else { label8.Location = new Point(panel4.Location.X, panel4.Location.Y); } }