public StartupEducation(string ID, BitmapSource image)
 {
     UserAccount          = new Profile_Management.UserCredentials(ID);
     UserAccount.Identity = ID;
     UserAccount.Photo    = image;
     UserAccount.GetCredentials();
     if (File.Exists(Datapath + @"\PawloCore\" + UserAccount.Identity + @"_user_data" + @"\EducationData\education.sqlite"))
     {
         MainWindow MyWindow = new MainWindow(UserAccount);
         MyWindow.Show();
         this.Close();
     }
     else
     {
         InitializeComponent();
     }
 }
Exemple #2
0
        //CONSTRUCTOR
        public MainWindow(Profile_Management.UserCredentials UA)
        {
            UserAccount = UA;
            Thread Thr = new Thread(StartSplashScreen);

            Thr.SetApartmentState(ApartmentState.STA);
            Thr.Start();
            Thr.Join();
            InitializeComponent();
            FN_LNlbl.Content  = UA.FirstName + " " + UA.LastName;
            image_prof.Source = UA.Photo;

            Dash          = new Main_Pages.Dashboard(UA);
            frame.Content = Dash;

            Menu = new UI_Elements.MenuUC(this);
            UserMenuStack.Children.Add(Menu);

            Classes  = new Main_Pages.Classes(UA);
            Exams    = new Main_Pages.Exams(UA);
            Calendar = new Main_Pages.Calendar_Page(UA);
            Courses  = new Main_Pages.Courses(UA);
        }