Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.IO;
- using MySql.Data.MySqlClient;
- namespace WindowsFormsApplication6
- {
- public partial class Mainmenu : Form
- {
- private MySqlConnection conn;
- private string server;
- private string database;
- private string uid;
- private string password;
- //Make lists that can contain cards
- public static List<string> maincards = new List<string>();
- public static List<string> sidecards = new List<string>();
- //Make a list that contain the user's decks
- List<string> userdecks = new List<string>();
- //Selected deck section
- string decksection = "maincards";
- //Get the signed in user's username
- string signedinuser = WindowsFormsApplication6.Login.currentuser;
- //Save userdirectory
- string userdir = Environment.CurrentDirectory + @"\" + WindowsFormsApplication6.Login.currentuser;
- //Connection
- string connString;
- public Mainmenu()
- {
- server = "localhost";
- database = "mtgworkshop";
- uid = "root";
- password = "";
- connString = $"SERVER={server};DATABASE={database};UID={uid};PASSWORD={password}";
- conn = new MySqlConnection(connString);
- InitializeComponent();
- title.Text = "Welcome " + signedinuser;
- //We make a folder for the user if the folder does not exist
- if (!Directory.Exists(Environment.CurrentDirectory + "\\" + WindowsFormsApplication6.Login.currentuser)) Directory.CreateDirectory(Environment.CurrentDirectory + "\\" + WindowsFormsApplication6.Login.currentuser);
- comboCat.SelectedIndex = 0;
- //Checks if Asset folders exists and will otherwise create the folders
- if (!Directory.Exists(Environment.CurrentDirectory + "\\Resources")) Directory.CreateDirectory(Environment.CurrentDirectory + "\\Resources");
- if (!Directory.Exists(Environment.CurrentDirectory + "\\Resources\\Assets")) Directory.CreateDirectory(Environment.CurrentDirectory + "\\Resources\\Assets");
- if (!Directory.Exists(Environment.CurrentDirectory + "\\Resources\\Assets\\Images")) Directory.CreateDirectory(Environment.CurrentDirectory + "\\Resources\\Assets\\Images");
- if (!adminpermission(signedinuser))
- {
- officeBtn.Hide();
- }
- string query = $"SELECT cardName FROM cards";
- conn = new MySqlConnection(connString);
- conn.Open();
- MySqlCommand cmd = new MySqlCommand(query, conn);
- MySqlDataReader reader = cmd.ExecuteReader();
- while (reader.Read())
- {
- searchBar.Items.Add(reader[0]);
- }
- //Load all available decks into the userdecks list
- userdecks.AddRange(Directory.GetFiles(userdir));
- //Remove the filepath and fileextension from each deck
- for (int i = 0; i < userdecks.Count; i++)
- {
- string ideckname = userdecks.ElementAt(i);
- int namestartsat = ideckname.LastIndexOf(@"\") + 1;
- string fixeddeckname = ideckname.Substring(namestartsat, ideckname.Length - namestartsat - 4);
- userdecks[i] = fixeddeckname;
- }
- //Display available decks in the deckbox
- deckList.Items.Clear();
- for (int i = 0; i < userdecks.Count; i++)
- {
- string item = userdecks.ElementAt(i);
- deckList.Items.Add(item);
- }
- }
- public static decimal cardTotal = 0; //Assigns the card total default value
- //Here we make our own custom search function for lists
- public static int myListSearch(List<string> mylist, string myparam)
- {
- for (int i = 0; i < mylist.Count ; i++ )
- {
- if (myparam == mylist.ElementAt(i))
- {
- return i;
- }
- }
- return 0;
- }
- private void craftbtn_Click(object sender, EventArgs e)
- {
- craftPanel.BringToFront(); //Sends crafting panel to front
- craftPanel.Visible = true; //Makes crafting panel visible
- //Display deck cards in listbox
- listBox1.Items.Clear();
- for (int i = 0; i < maincards.Count; i++)
- {
- string item = maincards.ElementAt(i + 1) + maincards.ElementAt(i);
- listBox1.Items.Add(item);
- i = i + 1; //Skip next element
- }
- }
- private void mainMenuBtn_Click(object sender, EventArgs e)
- {
- //Ask if user if they are sure, that they want to leave without saving
- DialogResult dialogResult = MessageBox.Show("Are you sure you want to go back without saving?", "Your changes may be lost", MessageBoxButtons.YesNo);
- if (dialogResult == DialogResult.Yes)
- {
- showMain.BackColor = System.Drawing.Color.SeaGreen;
- showMain.ForeColor = System.Drawing.Color.White;
- showSide.BackColor = System.Drawing.Color.White;
- showSide.ForeColor = System.Drawing.Color.Black;
- maincards.RemoveRange(0, maincards.Count);
- listBox1.Items.Clear();
- count.Text = "000";
- textBox1.Text = "Enter deckname";
- searchBar.Text = "";
- craftPanel.SendToBack(); //Sends crafting panel to back
- craftPanel.Visible = false; //Makes crafting panel invisible
- }
- else if (dialogResult == DialogResult.No)
- {
- return;
- }
- }
- private void comboCat_SelectedIndexChanged(object sender, EventArgs e)
- {
- switch (comboCat.Text)
- {
- case "Mainboard":
- decksection = "maincards";
- break;
- case "Sideboard":
- decksection = "sidecards";
- break;
- default:
- decksection = "maincards";
- break;
- }
- }
- private void addBtn_Click(object sender, EventArgs e)
- {
- //Update the total card amount
- cardTotal = Convert.ToDecimal(count.Text);
- decimal newCardTotal = cardTotal + cardCount.Value;
- string countLabel = Convert.ToString(newCardTotal);
- cardTotal = newCardTotal;
- count.Text = countLabel;
- if (decksection == "maincards")
- {
- //Update the card list
- //If the card is already in the deck, update the amount
- if (maincards.Contains(searchBar.Text))
- {
- //Find where the card is located in the list
- int cardlocation = myListSearch(maincards, searchBar.Text);
- string cardstring = maincards[cardlocation];
- string cardamount = maincards[cardlocation + 1]; //The amount is always located after the card in the list
- int endpos = cardamount.IndexOf("x"); //find x in the card amount
- string slicedcardamount = cardamount.Substring(0, endpos); //Extract the number of the card amount without x
- //Update the card amount
- int newcardamountint = Convert.ToInt32(slicedcardamount) + Convert.ToInt32(cardCount.Value);
- string newcardamountstring = Convert.ToString(newcardamountint) + "x ";
- maincards[cardlocation + 1] = newcardamountstring;
- }
- else //Add the card to the end of the list
- {
- maincards.Add(searchBar.Text);
- maincards.Add(cardCount.Value + "x ");
- }
- showMain.BackColor = System.Drawing.Color.SeaGreen;
- showMain.ForeColor = System.Drawing.Color.White;
- showSide.BackColor = System.Drawing.Color.White;
- showSide.ForeColor = System.Drawing.Color.Black;
- //Display deck in listbox
- listBox1.Items.Clear();
- for (int i = 0; i < maincards.Count; i++)
- {
- string item = maincards.ElementAt(i + 1) + maincards.ElementAt(i);
- listBox1.Items.Add(item);
- i = i + 1; //Skip next element
- }
- }
- else //It is sidecards
- {
- //Update the card list
- //If the card is already in the deck, update the amount
- if (sidecards.Contains(searchBar.Text))
- {
- //Find where the card is located in the list
- int cardlocation = myListSearch(sidecards, searchBar.Text);
- string cardstring = sidecards[cardlocation];
- string cardamount = sidecards[cardlocation + 1]; //The amount is always located after the card in the list
- int endpos = cardamount.IndexOf("x"); //find x in the card amount
- string slicedcardamount = cardamount.Substring(0, endpos); //Extract the number of the card amount without x
- //Update the card amount
- int newcardamountint = Convert.ToInt32(slicedcardamount) + Convert.ToInt32(cardCount.Value);
- string newcardamountstring = Convert.ToString(newcardamountint) + "x ";
- sidecards[cardlocation + 1] = newcardamountstring;
- }
- else //Add the card to the end of the list
- {
- sidecards.Add(searchBar.Text);
- sidecards.Add(cardCount.Value + "x ");
- }
- showMain.BackColor = System.Drawing.Color.White;
- showMain.ForeColor = System.Drawing.Color.Black;
- showSide.BackColor = System.Drawing.Color.SeaGreen;
- showSide.ForeColor = System.Drawing.Color.White;
- //Display deck in listbox
- listBox1.Items.Clear();
- for (int i = 0; i < sidecards.Count; i++)
- {
- string item = sidecards.ElementAt(i + 1) + sidecards.ElementAt(i);
- listBox1.Items.Add(item);
- i = i + 1; //Skip next element
- }
- }
- }
- private void removeBtn_Click(object sender, EventArgs e)
- {
- //If the count total is already 0, do nothing
- if(Convert.ToDecimal(count.Text) == 0)
- {
- return;
- }
- //Update the total card amount
- cardTotal = Convert.ToDecimal(count.Text);
- decimal newCardTotal = cardTotal - cardCount.Value;
- string countLabel = Convert.ToString(newCardTotal);
- cardTotal = newCardTotal;
- count.Text = countLabel;
- if (decksection == "maincards")
- {
- //Update the card list
- if (maincards.Contains(searchBar.Text))
- {
- //Find where the card is located in the list
- int cardlocation = myListSearch(maincards, searchBar.Text);
- string cardstring = maincards[cardlocation];
- string cardamount = maincards[cardlocation + 1]; //The amount is always located after the card in the list
- int endpos = cardamount.IndexOf("x"); //find x in the card amount
- string slicedcardamount = cardamount.Substring(0, endpos); //Extract the number of the card amount without x
- //Update the card amount
- int newcardamountint = Convert.ToInt32(slicedcardamount) - Convert.ToInt32(cardCount.Value);
- string newcardamountstring = Convert.ToString(newcardamountint) + "x ";
- maincards[cardlocation + 1] = newcardamountstring;
- //If the card amount is less than 1, remove the entire card from the list
- if (newcardamountint < 1)
- {
- maincards.RemoveRange(cardlocation, 2);
- }
- showMain.BackColor = System.Drawing.Color.SeaGreen;
- showMain.ForeColor = System.Drawing.Color.White;
- showSide.BackColor = System.Drawing.Color.White;
- showSide.ForeColor = System.Drawing.Color.Black;
- //Display deck in listbox
- listBox1.Items.Clear();
- for (int i = 0; i < maincards.Count; i++)
- {
- string item = maincards.ElementAt(i + 1) + maincards.ElementAt(i);
- listBox1.Items.Add(item);
- i = i + 1; //Skip next element
- }
- } //If the card does not exist in the list, nothing happens
- }
- else //It is sidecards
- {
- //Update the card list
- if (sidecards.Contains(searchBar.Text))
- {
- //Find where the card is located in the list
- int cardlocation = myListSearch(sidecards, searchBar.Text);
- string cardstring = sidecards[cardlocation];
- string cardamount = sidecards[cardlocation + 1]; //The amount is always located after the card in the list
- int endpos = cardamount.IndexOf("x"); //find x in the card amount
- string slicedcardamount = cardamount.Substring(0, endpos); //Extract the number of the card amount without x
- //Update the card amount
- int newcardamountint = Convert.ToInt32(slicedcardamount) - Convert.ToInt32(cardCount.Value);
- string newcardamountstring = Convert.ToString(newcardamountint) + "x ";
- sidecards[cardlocation + 1] = newcardamountstring;
- //If the card amount is less than 1, remove the entire card from the list
- if (newcardamountint < 1)
- {
- sidecards.RemoveRange(cardlocation, 2);
- }
- showMain.BackColor = System.Drawing.Color.White;
- showMain.ForeColor = System.Drawing.Color.Black;
- showSide.BackColor = System.Drawing.Color.SeaGreen;
- showSide.ForeColor = System.Drawing.Color.White;
- //Display deck in listbox
- listBox1.Items.Clear();
- for (int i = 0; i < sidecards.Count; i++)
- {
- string item = sidecards.ElementAt(i + 1) + sidecards.ElementAt(i);
- listBox1.Items.Add(item);
- i = i + 1; //Skip next element
- }
- } //If the card does not exist in the list, nothing happens
- }
- }
- private void officeBtn_Click(object sender, EventArgs e)
- {
- RegOffice f3 = new RegOffice();
- f3.ShowDialog();
- }
- private void probTable_Click(object sender, EventArgs e)
- {
- MessageBox.Show("This feature is not implemented yet.");
- //Probalility f2 = new Probalility();
- //f2.ShowDialog();
- }
- private void logOutBtn_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- }
- private void cardAdvisor_Click(object sender, EventArgs e)
- {
- if(selectedname != "" && selectedname != null)
- {
- cAdvisor f5 = new cAdvisor();
- f5.ShowDialog();
- }
- else
- {
- MessageBox.Show("Please select a card that I can advice you on");
- }
- }
- private void button1_Click(object sender, EventArgs e) //Show Visual button
- {
- if (Convert.ToInt16(count.Text) != 0)
- {
- visual f7 = new visual();
- f7.ShowDialog();
- }
- else
- {
- MessageBox.Show("I can not show you an empty deck..");
- }
- }
- private void priceAdvisor_Click(object sender, EventArgs e)
- {
- MessageBox.Show("This feature is not implemented yet.");
- //pAdvisor f6 = new pAdvisor();
- //f6.ShowDialog();
- }
- public bool adminpermission(string userstring)
- {
- string query = $"SELECT * FROM users WHERE username = '{userstring}' AND userlevel = '1';";
- try
- {
- if (OpenConnection())
- {
- MySqlCommand cmd = new MySqlCommand(query, conn);
- MySqlDataReader reader = cmd.ExecuteReader();
- if (reader.Read())
- {
- reader.Close();
- conn.Close();
- return true;
- }
- else
- {
- reader.Close();
- conn.Close();
- return false;
- }
- }
- else
- {
- conn.Close();
- return false;
- }
- }
- catch (Exception ex)
- {
- conn.Close();
- return false;
- }
- }
- private bool OpenConnection()
- {
- try
- {
- if (conn.State != ConnectionState.Open) conn.Open();
- return true;
- }
- catch (MySqlException ex)
- {
- switch (ex.Number)
- {
- case 0:
- MessageBox.Show("Connection to server failed!");
- break;
- case 1045:
- MessageBox.Show("Username and password doesnt match!");
- break;
- }
- return false;
- }
- }
- public static string selectedname;
- private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- try
- {
- //This updates the searchbar to the selected card
- string selected = listBox1.SelectedItem.ToString();
- int indexname = selected.IndexOf("x") + 2;
- selectedname = selected.Substring(indexname);
- searchBar.Text = selectedname;
- }
- catch
- {
- return;
- }
- }
- private void showMain_Click(object sender, EventArgs e)
- {
- showMain.BackColor = System.Drawing.Color.SeaGreen;
- showMain.ForeColor = System.Drawing.Color.White;
- showSide.BackColor = System.Drawing.Color.White;
- showSide.ForeColor = System.Drawing.Color.Black;
- //Display deck in listbox
- listBox1.Items.Clear();
- for (int i = 0; i < maincards.Count; i++)
- {
- string item = maincards.ElementAt(i + 1) + maincards.ElementAt(i);
- listBox1.Items.Add(item);
- i = i + 1; //Skip next element
- }
- }
- private void showSide_Click(object sender, EventArgs e)
- {
- showMain.BackColor = System.Drawing.Color.White;
- showMain.ForeColor = System.Drawing.Color.Black;
- showSide.BackColor = System.Drawing.Color.SeaGreen;
- showSide.ForeColor = System.Drawing.Color.White;
- //Display deck in listbox
- listBox1.Items.Clear();
- for (int i = 0; i < sidecards.Count; i++)
- {
- string item = sidecards.ElementAt(i + 1) + sidecards.ElementAt(i);
- listBox1.Items.Add(item);
- i = i + 1; //Skip next element
- }
- }
- private void saveBtn_Click(object sender, EventArgs e)
- {
- string mydeckname = textBox1.Text;
- //Check if the deckname contains any illegal characters and if it is long enough
- if (mydeckname.IndexOfAny(Path.GetInvalidFileNameChars()) != -1 || mydeckname.Length < 3)
- {
- if(mydeckname.IndexOfAny(Path.GetInvalidFileNameChars()) != -1)
- {
- MessageBox.Show("Deckname invalid.");
- }
- if(mydeckname.Length < 3)
- {
- MessageBox.Show("Deckname must be at least 3 characters long");
- }
- return;
- }
- //Make a .txt document in the user's folder, with filename as the written deckname
- //and export the list into the document's content
- //Make a new list to contain the save data
- List<string> saveData = new List<string>();
- //Add the Mainboard list to the save data
- saveData.Add("@Mainboard");
- for (int i = 0; i < maincards.Count; i++)
- {
- saveData.Add(maincards[i + 1] + maincards[i]);
- i = i + 1;
- }
- //Add the Sideboard list to the save data
- saveData.Add("@Sideboard");
- for (int i = 0; i < sidecards.Count; i++)
- {
- saveData.Add(sidecards[i + 1] + sidecards[i]);
- i = i + 1;
- }
- //Write .txt file and save to the user's directory
- System.IO.File.WriteAllLines(userdir + @"\" + mydeckname + ".txt" , saveData);
- //Go back to main menu
- showMain.BackColor = System.Drawing.Color.SeaGreen;
- showMain.ForeColor = System.Drawing.Color.White;
- showSide.BackColor = System.Drawing.Color.White;
- showSide.ForeColor = System.Drawing.Color.Black;
- listBox1.Items.Clear();
- count.Text = "000";
- maincards.RemoveRange(0, maincards.Count);
- textBox1.Text = "Enter deckname";
- searchBar.Text = "";
- craftPanel.SendToBack(); //Sends crafting panel to back
- craftPanel.Visible = false; //Makes crafting panel invisible
- //Load all available decks into the userdecks list
- userdecks.RemoveRange(0, userdecks.Count);
- userdecks.AddRange(Directory.GetFiles(userdir));
- //Remove the filepath and fileextension from each deck
- for (int i = 0; i < userdecks.Count; i++)
- {
- string ideckname = userdecks.ElementAt(i);
- int namestartsat = ideckname.LastIndexOf(@"\") + 1;
- string fixeddeckname = ideckname.Substring(namestartsat, ideckname.Length - namestartsat - 4);
- userdecks[i] = fixeddeckname;
- }
- //Display available decks in the deckbox
- deckList.Items.Clear();
- for (int i = 0; i < userdecks.Count; i++)
- {
- string item = userdecks.ElementAt(i);
- deckList.Items.Add(item);
- }
- }
- string selecteddeck = "";
- private void loadBtn_Click(object sender, EventArgs e)
- {
- if(selecteddeck == "")
- {
- MessageBox.Show("No deck selected");
- return;
- }
- //Loads the content of the selected deck from its file into a list
- string[] loadarray = System.IO.File.ReadAllLines(userdir + @"\" + selecteddeck + ".txt");
- string loadingto = "main";
- int loadedcards = 0;
- try
- {
- foreach (string s in loadarray)
- {
- switch (s)
- {
- case "@Mainboard":
- loadingto = "main";
- break;
- case "@Sideboard":
- loadingto = "side";
- break;
- default:
- if(loadingto == "main")
- {
- maincards.Add(s.Substring(s.IndexOf("x") + 2));
- maincards.Add(s.Substring(0, s.IndexOf("x") + 1) + " ");
- loadedcards = loadedcards + Convert.ToInt32(s.Substring(0, s.IndexOf("x")));
- }
- if(loadingto == "side")
- {
- sidecards.Add(s.Substring(s.IndexOf("x") + 2));
- sidecards.Add(s.Substring(0, s.IndexOf("x") + 1) + " ");
- loadedcards = loadedcards + Convert.ToInt32(s.Substring(0, s.IndexOf("x")));
- }
- break;
- }
- }
- } catch
- {
- MessageBox.Show("An error occured while loading the deck");
- return;
- }
- craftPanel.BringToFront(); //Sends crafting panel to front
- craftPanel.Visible = true; //Makes crafting panel visible
- count.Text = Convert.ToString(loadedcards);
- textBox1.Text = selecteddeck;
- //Display deck cards in listbox
- for (int i = 0; i < maincards.Count; i++)
- {
- string item = maincards.ElementAt(i + 1) + maincards.ElementAt(i);
- listBox1.Items.Add(item);
- i = i + 1; //Skip next element
- }
- }
- private void deckList_SelectedIndexChanged(object sender, EventArgs e)
- {
- try
- {
- selecteddeck = deckList.SelectedItem.ToString();
- }
- catch
- {
- return;
- }
- }
- //The code below contains the suggested card
- public static string suggested = null;
- private void searchBar_SelectedIndexChanged(object sender, EventArgs e)
- {
- string cardname = searchBar.Text;
- string query = $"SELECT cardImage FROM cards WHERE cardName = '{cardname}';";
- conn = new MySqlConnection(connString);
- conn.Open();
- MySqlCommand cmd = new MySqlCommand(query, conn);
- MySqlDataReader reader = cmd.ExecuteReader();
- reader.Read();
- try
- {
- pictureBox.Load(Environment.CurrentDirectory + "\\Resources\\Assets\\Images\\" + reader.GetString(0));
- }
- catch
- {
- pictureBox.Image = pictureBox.ErrorImage;
- }
- }
- private void deckList_DoubleClick(object sender, MouseEventArgs e)
- {
- //If the user doubleclicks a deck, load the deck
- try
- {
- loadBtn.PerformClick();
- }
- catch
- {
- return;
- }
- }
- private void listBox1_DoubleClick(object sender, MouseEventArgs e)
- {
- //if the user doubleclicks a card, add more of that card
- try
- {
- addBtn.PerformClick();
- }
- catch
- {
- return;
- }
- }
- private void deletebtn_Click(object sender, EventArgs e)
- {
- if (selecteddeck == "")
- {
- MessageBox.Show("No deck selected");
- return;
- }
- //Confirm that the user want to delete the selected deck
- try
- {
- DialogResult dialogResult = MessageBox.Show("Are you sure you want to delete: " + selecteddeck + "?", "You are about to delete a deck", MessageBoxButtons.YesNo);
- if (dialogResult == DialogResult.Yes)
- {
- //Delete the deck
- try
- {
- File.Delete(userdir + @"\" + selecteddeck + ".txt");
- }
- catch
- {
- MessageBox.Show("Deletion failed.");
- }
- //Load all available decks into the userdecks list
- userdecks.RemoveRange(0, userdecks.Count);
- userdecks.AddRange(Directory.GetFiles(userdir));
- //Remove the filepath and fileextension from each deck
- for (int i = 0; i < userdecks.Count; i++)
- {
- string ideckname = userdecks.ElementAt(i);
- int namestartsat = ideckname.LastIndexOf(@"\") + 1;
- string fixeddeckname = ideckname.Substring(namestartsat, ideckname.Length - namestartsat - 4);
- userdecks[i] = fixeddeckname;
- }
- //Display available decks in the deckbox
- deckList.Items.Clear();
- for (int i = 0; i < userdecks.Count; i++)
- {
- string item = userdecks.ElementAt(i);
- deckList.Items.Add(item);
- }
- }
- else if (dialogResult == DialogResult.No)
- {
- return;
- }
- }
- catch
- {
- return;
- }
- }
- private void activated(object sender, EventArgs e)
- {
- //this adds a suggested card
- if (suggested != null)
- {
- searchBar.Text = suggested;
- addBtn.PerformClick();
- suggested = null;
- }
- }
- public Form RefToLogin { get; set; }
- private void Form_Closing(object sender, FormClosingEventArgs e)
- {
- this.RefToLogin.Show();
- }
- //Just a flag
- int focuson = 0;
- private void Searchbar_FocusEnter(object sender, EventArgs e)
- {
- picturenotthere.Load(Environment.CurrentDirectory + "\\Resources\\Assets\\Images\\littlefix2.jpg");
- focuson = 1;
- }
- private void Searchbar_FocusLeave(object sender, EventArgs e)
- {
- picturenotthere.Load(Environment.CurrentDirectory + "\\Resources\\Assets\\Images\\littlefix.jpg");
- focuson = 0;
- }
- private void Searchbar_MouseEnter(object sender, EventArgs e)
- {
- if (focuson == 0)
- picturenotthere.Load(Environment.CurrentDirectory + "\\Resources\\Assets\\Images\\littlefix3.jpg");
- }
- private void Searchbar_MouseLeave(object sender, EventArgs e)
- {
- if (focuson == 0)
- picturenotthere.Load(Environment.CurrentDirectory + "\\Resources\\Assets\\Images\\littlefix.jpg");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement