public void On_Click(object sender, RoutedEventArgs e)
        {
            //if (Username.Text.ToString() != "" && Password.Password.ToString() != "")
            //{
            //Console.WriteLine(Username.Text.ToString());
            //    Custom_Functions.Login_Check login = new Custom_Functions.Login_Check();
            //     Tuple<bool, string> result = login.Check_Login(Username.Text.ToString(), Password.Password.ToString());
            Recipe_Creation win = new Recipe_Creation();//result.Item2);// result.Item2);

            //     if (result.Item1 == true)
            //     {
            this.Close();
            win.Show();
            //     }
            //     else
            //         MessageBox.Show("Wrong Username or Password");
            // }
            // else
            // {
            //Console.WriteLine(Username.ToString());
            //Console.WriteLine(Password.ToString());
            //     MessageBox.Show("Please check Username or Password is Empty");
            // }
        }
Beispiel #2
0
 //public static bool check = true;
 public void Validation_TopSize(object sender, SelectionChangedEventArgs e, string TopSize, Recipe_Creation recipe_Creation)
 {
     MessageBox.Show("Tried To change Text");
     if (TopSize == "50")
     {
         MessageBox.Show("Topsize is 50");
         // Place code where I get Image names in variable and place a code so that I can disable or enable Image By disable I mean the image gets grey and not allowed to be used.
         //               Recipe_Creation recipe_Creation = new Recipe_Creation();
         Toolbox temp     = (Toolbox)(recipe_Creation.Flow_Chart.Content);
         Grid    tempgrid = (Grid)(temp.Items[0]);
         Image   image    = new Image();
         //Image image = (Image)(tempgrid.GetValue);
         //BitmapImage bitmap = (BitmapImage)(recipe_Creation.Flow_Chart.Content);
         int row    = 0;
         int column = 0;
         foreach (UIElement child in tempgrid.Children)
         {
             if (Grid.GetRow(child) == row && Grid.GetColumn(child) == column)
             {
                 if (child.GetType() == image.GetType())
                 {
                     image = (Image)(child);
                     //child.;
                 }
             }
         }
         MessageBox.Show(image.Source.ToString());
         //image.AllowDrop = false;
         //tempgrid.AllowDrop = true;
         //check = false;
         //tempgrid.Visibility = Visibility.Hidden;
     }
 }