Exemple #1
0
        //loads current user info
        private void Load_Page(object sender, RoutedEventArgs e)
        {
            InstallerAssistant assistant = new InstallerAssistant();

            try
            {
                dasboard_name.Text    = admin.Name;
                DescriptionPanel.Text = admin.Description;
                string      managerPicName = admin.ImageAddress;
                BitmapImage bitmap         = new BitmapImage();
                bitmap.BeginInit();
                bitmap.UriSource = new Uri(managerPicName);
                bitmap.EndInit();
                adminPic.ImageSource = bitmap;


                string      PicName       = assistant.AppPath + @"Amazing.JPG";
                BitmapImage bitmapProfile = new BitmapImage();
                bitmapProfile.BeginInit();
                bitmapProfile.UriSource = new Uri(PicName);
                bitmapProfile.EndInit();
                backgroundImage.Source = bitmapProfile;
            }
            catch (Exception ex)
            {
                ErrorLogger.LogError(ex);
                MessageBox.Show(ex.Message);
            }
        }
Exemple #2
0
        public static void LogError(Exception excp)
        {
            InstallerAssistant assistant = new InstallerAssistant();
            string             path      = assistant.AppPath + "Log.txt";

            string[] error = { DateTime.Now.ToString(), excp.Message, excp.StackTrace };
            File.AppendAllLines(path, error);
        }
Exemple #3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            InstallerAssistant assistant = new InstallerAssistant();
            string             PicName   = assistant.AppPath + @"loginwpf.PNG";
            BitmapImage        bitmap    = new BitmapImage();

            bitmap.BeginInit();
            bitmap.UriSource = new Uri(PicName);
            bitmap.EndInit();
            backgroundImage.ImageSource = bitmap;
        }