private void Form1_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'inventaireDataSet1.v_Sales' table. You can move, or remove it, as needed. this.v_SalesTableAdapter.Fill(this.inventaireDataSet1.v_Sales); // TODO: This line of code loads data into the 'inventaireDataSet.Commande' table. You can move, or remove it, as needed. this.commandeTableAdapter.Fill(this.inventaireDataSet.Commande); //________________________________________________ /** The Connection **/ //________________________________________________ if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); //------------------------------------------------ //--> Calling Functoins <-- // WaveHand.Hide(); //Animating text txt = Welcoming.Text; len = Text.Length; Welcoming.Text = ""; //Display Users function call displayusers(); //DisplayUnites function call DisplayUnites(); //Unity combobox Unitycombobox(); //ProductList datagridview ProductsList(); //filling the product combo in product panel ProdCombo(); //filling Dealer Combobox FournisseurCombo(); //Fournisseurs DataGridView FournisseurGridView(); //filling the product combo in ventes panel ProductCombo(); //---------------------------------------------------------- dt.Clear(); dt.Columns.Add("Produit"); dt.Columns.Add("Prix"); dt.Columns.Add("Quantité"); dt.Columns.Add("Total"); //---------------------------------------------------------- //==> TOP 5 Products /* SqlCommand cmd = con.CreateCommand(); * cmd.CommandType = CommandType.Text; * cmd.CommandText = "select top(5) product, SUM(Total) from Commande GROUP BY product order by SUM(Total) desc"; * cmd.ExecuteNonQuery(); * DataTable dt9 = new DataTable(); * SqlDataAdapter da9 = new SqlDataAdapter(cmd); * da9.Fill(dt9); * dataGridView5.DataSource = dt9;*/ }
/*Timer Tick 1*/ private void timer1_Tick(object sender, EventArgs e) { counter++; utilisateurname.Hide(); utilisateurfname.Hide(); if (counter >= 11) { timer1.Stop(); WaveHand.Show(); utilisateurname.Show(); utilisateurfname.Show(); } else { Welcoming.Text = txt.Substring(0, counter); //utilisateurname.Show(); } }
void WaveWorld(ref WaveHand waveHand){ if (waveHand.hand.Position.Y > waveHand.elbow.Position.Y && waveHand.waveWatch.Elapsed.Seconds < 1){ if (waveHand.hand.Position.X > waveHand.elbow.Position.X){ if (!waveHand.waveRight){ waveHand.waveWatch.Reset(); waveHand.waveWatch.Start(); waveHand.waveRight = true; waveHand.waveLeft = false; waveHand.waveCount++; } } else{ if (!waveHand.waveLeft){ waveHand.waveWatch.Reset(); waveHand.waveWatch.Start(); waveHand.waveRight = false; waveHand.waveLeft = true; waveHand.waveCount++; } } if (waveHand.waveCount > 4) { Countdown.Text = "Hello World!!"; WaveHand.isWaving = true; } } else{ waveHand.waveRight = false; waveHand.waveLeft = false; waveHand.waveCount = 0; if(!WaveHand.isWaving) Countdown.Text = "Wave!!"; waveHand.waveWatch.Reset(); WaveHand.isWaving = false; } }
public MainWindow() { InitializeComponent(); countdownIsStored = false; actualState = GameState.Initialize; countdown = new Stopwatch(); //Hello World gesture waveRightHand = new WaveHand(); waveRightHand.waveRight = false; waveRightHand.waveLeft = false; waveRightHand.waveCount = 0; waveRightHand.waveWatch = new Stopwatch(); waveLeftHand = new WaveHand(); waveLeftHand.waveRight = false; waveLeftHand.waveLeft = false; waveLeftHand.waveCount = 0; waveLeftHand.waveWatch = new Stopwatch(); WaveHand.isWaving = false; randomGenerator = new Random(); structRectangleArray = new structRectangle[3]; bodyRect = new Rect(new Size(40, 40)); intersectionSize = new Size(0,0); intersectionRect = new Rect(0,0,0,0); structRectangleArray[0] = new structRectangle(Colors.Pink); structRectangleArray[0].handState = HandState.Closed; structRectangleArray[0].position = "3:4"; structRectangleArray[1] = new structRectangle(Colors.Blue); structRectangleArray[1].handState = HandState.Lasso; structRectangleArray[1].position = "5:4"; structRectangleArray[2] = new structRectangle(Colors.Green); structRectangleArray[2].handState = HandState.Open; structRectangleArray[0].position = "7:4"; jointArray = new Joint[3]; positionList = new List<string>(); score = 0; lowRandom = 11; }
public MainWindow() { InitializeComponent(); countdownIsStored = false; actualState = GameState.Initialize; countdown = new Stopwatch(); //Hello World gesture waveRightHand = new WaveHand(); waveRightHand.waveRight = false; waveRightHand.waveLeft = false; waveRightHand.waveCount = 0; waveRightHand.waveWatch = new Stopwatch(); waveLeftHand = new WaveHand(); waveLeftHand.waveRight = false; waveLeftHand.waveLeft = false; waveLeftHand.waveCount = 0; waveLeftHand.waveWatch = new Stopwatch(); WaveHand.isWaving = false; randomGenerator = new Random(); structRectangleArray = new structRectangle[3]; bodyRect = new Rect(new Size(40, 40)); intersectionSize = new Size(0,0); intersectionRect = new Rect(0,0,0,0); Image image = new Image(); BitmapImage bp = new BitmapImage(); image.Width = 200; image.Height = 200; structRectangleArray[0] = new structRectangle(Colors.Pink); structRectangleArray[0].handState = HandState.Closed; structRectangleArray[0].position = "2:3"; structRectangleArray[0].icon = image; bp.UriSource = new Uri(@"D:\STUDIUM\Auslandssemester\NPI\NPI_Übung\NPI---Kinect-2.0\Designstuff\fist.png"); structRectangleArray[0].icon.Source = bp; structRectangleArray[1] = new structRectangle(Colors.Blue); structRectangleArray[1].handState = HandState.Lasso; structRectangleArray[1].position = "4:3"; structRectangleArray[1].icon = image; bp.UriSource = new Uri(@"D:\STUDIUM\Auslandssemester\NPI\NPI_Übung\NPI---Kinect-2.0\Designstuff\lasso.png"); structRectangleArray[1].icon.Source = bp; structRectangleArray[2] = new structRectangle(Colors.Green); structRectangleArray[2].handState = HandState.Open; structRectangleArray[2].position = "7:3"; structRectangleArray[2].icon = image; bp.UriSource = new Uri(@"D:\STUDIUM\Auslandssemester\NPI\NPI_Übung\NPI---Kinect-2.0\Designstuff\open.png"); structRectangleArray[2].icon.Source = bp; jointArray = new Joint[3]; positionList = new List<string>(); score = 0; lowRandom = 11; //Clau start /* PictureBox pic = new PictureBox { Name = "pictureBox", Size = new Size(50, 50), Location = new Point(14, 17), ImageLocation = @"D:\STUDIUM\Auslandssemester\NPI\NPI_Übung\NPI---Kinect-2.0\Designstuff\fist.png" }; */ //Clau end }