コード例 #1
0
        public void loadNotification(string name, string state)
        {
            ActivityLogContent activityLog = new ActivityLogContent();

            activityLog.AddActivity(new Activity(name, state));
            ListViewMenu.Items.Clear();
            ActivityLogContent load       = new ActivityLogContent();
            List <Activity>    activities = load.RetriveData();

            for (int i = activities.Count - 1; i > -1; i--)
            {
                addNotification(activities[i]);
            }
        }
コード例 #2
0
        private void Location_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            backHistory = new Stack <Histrory>();
            int index = Location.SelectedIndex;

            MoveCursorMenu(index);

            switch (index)
            {
            case 0:
                sortStack.Visibility       = Visibility.Hidden;
                Option.Visibility          = Visibility.Hidden;
                sortCombBox.SelectedIndex  = -1;
                sortCombBox.Text           = "Sort By.....";
                ActivityDisplay.Visibility = Visibility.Hidden;
                pnlItems.Visibility        = Visibility.Hidden;
                GridPrincipal.Visibility   = Visibility.Visible;
                back_btn.Visibility        = Visibility.Hidden;
                GridPrincipal.Children.Clear();
                GridPrincipal.Children.Add(new Home());
                break;

            case 1:

                sortStack.Visibility       = Visibility.Visible;
                Option.Visibility          = Visibility.Visible;
                sortCombBox.SelectedIndex  = -1;
                sortCombBox.Text           = "Sort By.....";
                ActivityDisplay.Visibility = Visibility.Hidden;
                GridPrincipal.Visibility   = Visibility.Hidden;
                pnlItems.Visibility        = Visibility.Visible;
                back_btn.Visibility        = Visibility.Visible;
                back_btn.Foreground        = new SolidColorBrush(Colors.Gray);;
                View_MyDesktop(sender, e);
                break;

            case 2:
                sortStack.Visibility       = Visibility.Visible;
                Option.Visibility          = Visibility.Visible;
                sortCombBox.SelectedIndex  = -1;
                sortCombBox.Text           = "Sort By.....";
                ActivityDisplay.Visibility = Visibility.Hidden;
                GridPrincipal.Visibility   = Visibility.Hidden;
                pnlItems.Visibility        = Visibility.Visible;
                back_btn.Visibility        = Visibility.Visible;
                back_btn.Foreground        = new SolidColorBrush(Colors.Gray);;
                View_MyDownloads(sender, e);
                pnlItems.Items.Refresh();
                break;

            case 3:
                sortStack.Visibility       = Visibility.Visible;
                Option.Visibility          = Visibility.Visible;
                sortCombBox.SelectedIndex  = -1;
                sortCombBox.Text           = "Sort By.....";
                ActivityDisplay.Visibility = Visibility.Hidden;
                GridPrincipal.Visibility   = Visibility.Hidden;
                pnlItems.Visibility        = Visibility.Visible;
                back_btn.Visibility        = Visibility.Visible;
                back_btn.Foreground        = new SolidColorBrush(Colors.Gray);;
                View_MyDocuments(sender, e);
                pnlItems.Items.Refresh();
                break;

            case 4:
                sortStack.Visibility       = Visibility.Visible;
                Option.Visibility          = Visibility.Visible;
                sortCombBox.SelectedIndex  = -1;
                sortCombBox.Text           = "Sort By.....";
                ActivityDisplay.Visibility = Visibility.Hidden;
                GridPrincipal.Visibility   = Visibility.Hidden;
                pnlItems.Visibility        = Visibility.Visible;
                back_btn.Visibility        = Visibility.Visible;
                back_btn.Foreground        = new SolidColorBrush(Colors.Gray);;
                View_MyPictures(sender, e);
                pnlItems.Items.Refresh();
                break;

            case 5:
                sortStack.Visibility       = Visibility.Visible;
                Option.Visibility          = Visibility.Visible;
                sortCombBox.SelectedIndex  = -1;
                sortCombBox.Text           = "Sort By.....";
                ActivityDisplay.Visibility = Visibility.Hidden;
                GridPrincipal.Visibility   = Visibility.Hidden;
                pnlItems.Visibility        = Visibility.Visible;
                back_btn.Visibility        = Visibility.Visible;
                back_btn.Foreground        = new SolidColorBrush(Colors.Gray);;
                View_MyMusics(sender, e);
                pnlItems.Items.Refresh();
                break;

            case 6:
                sortStack.Visibility       = Visibility.Visible;
                Option.Visibility          = Visibility.Visible;
                sortCombBox.SelectedIndex  = -1;
                sortCombBox.Text           = "Sort By.....";
                ActivityDisplay.Visibility = Visibility.Hidden;
                GridPrincipal.Visibility   = Visibility.Hidden;
                pnlItems.Visibility        = Visibility.Visible;
                back_btn.Visibility        = Visibility.Visible;
                back_btn.Foreground        = new SolidColorBrush(Colors.Gray);
                View_MyVideos(sender, e);
                pnlItems.Items.Refresh();
                break;

            case 7:
                back_btn.Visibility        = Visibility.Hidden;
                back_btn.IsEnabled         = false;
                sortStack.Visibility       = Visibility.Hidden;
                Option.Visibility          = Visibility.Hidden;
                sortCombBox.SelectedIndex  = -1;
                sortCombBox.Text           = "Sort By.....";
                pnlItems.Visibility        = Visibility.Hidden;
                GridPrincipal.Visibility   = Visibility.Hidden;
                ActivityDisplay.Visibility = Visibility.Visible;
                ListViewMenu.Items.Clear();
                ActivityLogContent load       = new ActivityLogContent();
                List <Activity>    activities = load.RetriveData();
                for (int i = activities.Count - 1; i > -1; i--)
                {
                    addNotification(activities[i]);
                }
                break;

            default:
                break;
            }

            GetData();
        }