Ejemplo n.º 1
0
        //For the case that you are selecting a review to edit in the sort page.
        public ReviewPage(LocalDataManager LocalData, ReviewObject Review_To_Edit, Edit_Window Edit_Window)
        {
            InitializeComponent();
            this.LocalData = LocalData;
            Parent_Window  = Edit_Window;

            //Make the right buuttons visible.
            Submit_Button.Visibility = Visibility.Hidden;
            Update_Button.Visibility = Visibility.Visible;

            //Since this is the update constructor we need to store old info.
            oldReview     = new ReviewObject(Review_To_Edit);
            currentReview = Review_To_Edit;

            //Set the field values ot be equual to the review so you are "viewing" the contents of the review.
            TitleBox.Text         = Review_To_Edit.Title;
            AlbumName.Text        = Review_To_Edit.Album;
            YearBox.Text          = Review_To_Edit.Release_Date.ToString();
            Artist_NameBox.Text   = Review_To_Edit.Artist;
            ReviewBox.Text        = Review_To_Edit.Review;
            FileNameLabel.Content = Review_To_Edit.File_Path;
            ScoreBox.Text         = Review_To_Edit.Rating.ToString();

            //Update the Tags list;
            UpdateReviewTags();
        }
 public ElementListWindow(LocalDataManager LocalData, Review_Fields ListField, Object SentFrom)
 {
     SomethingSelected = false;
     this.SentFrom     = SentFrom;
     this.ListField    = ListField;
     this.LocalData    = LocalData;
     InitializeComponent();
     PopulatePage();
 }
Ejemplo n.º 3
0
        public ReviewPage(LocalDataManager LocalData)
        {
            InitializeComponent();
            this.LocalData           = LocalData;
            Submit_Button.Visibility = Visibility.Visible;
            Update_Button.Visibility = Visibility.Hidden;

            oldReview     = new ReviewObject();
            currentReview = new ReviewObject();
        }
Ejemplo n.º 4
0
        public SortPage(LocalDataManager LocalData)
        {
            InitializeComponent();
            this.LocalData     = LocalData;
            this.Local_Reviews = this.LocalData.DBManager.GetAllReviews();

            this.Local_Reviews.Sort((r1, r2) => r1.Title.CompareTo(r2.Title));//default organization is by title.
            Current_Sort = "Title";

            this.TableView.ItemsSource = this.Local_Reviews;
        }
        public TagginWindow(LocalDataManager LocalData, ReviewObject givenReview, ReviewPage Parent_Page)
        {
            InitializeComponent();

            //Keep a list of all tags that are selected to be "submitted" to the review later.
            SelectedTags = new List <TagObject>(givenReview.getTags());

            this.Parent_Page = Parent_Page;
            this.LocalData   = LocalData;

            AdvanceSearchWindow = null;

            CreateTagBoxes(givenReview.getTags());
        }
        public AdvanceSearchWindow(LocalDataManager Data, SortPage sortPage)
        {
            this.Parent_Page = sortPage;
            InitializeComponent();

            LocalData = Data;
            Request   = new SQL_Review_REQUEST();

            IncludedTagRequest = new List <List <TagObject> >();
            ExcludedTagRequest = new List <List <TagObject> >();

            IncludedTagRequest.Add(null);
            ExcludedTagRequest.Add(null);

            SB = new StringBuilder();
        }
Ejemplo n.º 7
0
        public StatPage(LocalDataManager LocalData)
        {
            this.LocalData = LocalData;
            InitializeComponent();

            Instruments   = new List <Table_Entry>();
            Genres        = new List <Table_Entry>();
            Languages     = new List <Table_Entry>();
            Release_Dates = new List <Table_Entry>();
            Artists       = new List <Table_Entry>();
            Albums        = new List <Table_Entry>();

            AlbumView.ItemsSource      = Albums;
            ArtistView.ItemsSource     = Artists;
            YearView.ItemsSource       = Release_Dates;
            GenreView.ItemsSource      = Genres;
            InstrumentView.ItemsSource = Instruments;
            LanguageView.ItemsSource   = Languages;
        }
        public TagginWindow(LocalDataManager LocalData, AdvanceSearchWindow AdvanceSearchWindow, List <TagObject> GivenTags, bool Including)
        {
            InitializeComponent();

            this.Including           = Including;
            this.AdvanceSearchWindow = AdvanceSearchWindow;
            this.LocalData           = LocalData;

            if (GivenTags == null)
            {
                SelectedTags = new List <TagObject>();
            }
            else
            {
                SelectedTags = GivenTags;
            }

            Parent_Page = null;
            CreateTagBoxes(SelectedTags);
        }
Ejemplo n.º 9
0
        public TagPage(LocalDataManager LocalData)
        {
            InitializeComponent();
            this.LocalData                = LocalData;
            this.SelectedTags             = new List <TagBox>();
            this.SelectedTypeToAdd        = TagType.Language;
            this.LanguageSelect.IsChecked = true;

            this.TagBoxes = new List <TagBox>();

            //Add handlers to the buttons.
            foreach (TagObject Tag in this.LocalData.Tags)
            {
                TagBox box = new TagBox(Tag);

                //Add TagWindow Specific handelers
                box.Checked   += new RoutedEventHandler(CheckBox_Check);
                box.Unchecked += new RoutedEventHandler(CheckBox_Uncheck);

                TagBoxes.Add(box);

                //Make the buttons visible
                switch (box.TagData.Type)
                {
                case TagType.Genre:
                    GenreTagBox.Items.Add(box);
                    break;

                case TagType.Instrument:
                    InstrumentTagBox.Items.Add(box);
                    break;

                case TagType.Language:
                    LanguageTagBox.Items.Add(box);
                    break;
                }
            }
        }
Ejemplo n.º 10
0
 public MainWindow()
 {
     InitializeComponent();
     LocalDataManager = new LocalDataManager();
 }
Ejemplo n.º 11
0
 public Edit_Window(LocalDataManager LocalData, ReviewObject SentReview)
 {
     InitializeComponent();
     this.Content = new ReviewPage(LocalData, SentReview, this);
 }