Example #1
0
 public GraduateIceCreamVM(GraduationUC graduationUC)
 {
     GraduateICModel            = new GraduateICModel();
     GraduateICModel.IceCream   = graduationUC.SelectedIceCream;
     this.GraduationUC          = graduationUC;
     this.MyCommand             = new SpecialCommand();
     this.ImageCommand          = new SpecialCommand();
     MyCommand.callComplete    += MyCommand_UpdateIceCream;
     ImageCommand.callComplete += OpenFileCommand;
 }
Example #2
0
        private void MyCommand_UpdateIceCream(string parameter)
        {
            GraduateICModel.IceCream.marks.Add((Int32)(GraduationUC.Grades.Value));

            if (Image != null)
            {
                GraduateICModel.IceCream.images.Add(Image.ToString());
            }
            GraduateICModel.IceCream.marks[0] = (Int32)GraduateICModel.IceCream.marks.Skip(1).Take(GraduateICModel.IceCream.marks.Count - 1).Average();
            System.Windows.MessageBox.Show("Thanks for your appreciation !! See you soon !!", "Thanks", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            homeUC = new HomeUC();
            ((MainWindow)System.Windows.Application.Current.MainWindow).inner_grid.Children.Clear();
            ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Clear();
            ((MainWindow)System.Windows.Application.Current.MainWindow).profile_grid.Children.Clear();
            ((MainWindow)System.Windows.Application.Current.MainWindow).inner_grid.Children.Add(homeUC);


            GraduateICModel.IceCream.UpdateData();
            GraduateICModel.UpdateIceCream(GraduationUC.SelectedIceCream, GraduateICModel.IceCream);
        }
Example #3
0
 public GraduateIceCreamVM(ProfileBarIceCreamUC profileBarIceCreamUC)
 {
     GraduateICModel           = new GraduateICModel();
     GraduateICModel.IceCream  = profileBarIceCreamUC.iceCream;
     this.ProfileBarIceCreamUC = profileBarIceCreamUC;
 }