Esempio n. 1
0
        public MediaListSort()
        {
            MediaSort currentSort = AppMain.Settings.SortMedia;

            var option = new SingleOptionRadio();

            option.Bounds = new Rectangle(5, 5, 195, 25);
            AddViewControl(option);
            option.TextString = "Track";
            option.Checked    = currentSort == MediaSort.Track;
            option.StartRender();
            option.InputLeave += () => SetFormat(MediaSort.Track);

            option        = new SingleOptionRadio();
            option.Bounds = new Rectangle(5, 40, 195, 25);
            AddViewControl(option);
            option.TextString = "FileName";
            option.StartRender();
            option.Checked     = currentSort == MediaSort.FileName;
            option.InputLeave += () => SetFormat(MediaSort.FileName);

            option        = new SingleOptionRadio();
            option.Bounds = new Rectangle(5, 75, 195, 25);
            AddViewControl(option);
            option.TextString  = "Title";
            option.Checked     = currentSort == MediaSort.Title;
            option.InputLeave += () => SetFormat(MediaSort.Title);
            option.StartRender();
        }
Esempio n. 2
0
        // NOTE: Need to store in "ItemName" in MediaGroupItem table as separate key/values
        public MediaListDisplayFormat()
        {
            string existingTemplate = AppMain.Settings.DisplayFormat.FormatTemplate;
            var    option           = new SingleOptionRadio();

            option.Bounds = new Rectangle(5, 5, 245, 25);
            AddViewControl(option);
            option.TextString  = "Track - Artist - Title";
            option.Checked     = existingTemplate == TRACK_ARTIST_TITLE;
            option.InputLeave += () => { SetFormat(TRACK_ARTIST_TITLE); };

            option.StartRender();

            option        = new SingleOptionRadio();
            option.Bounds = new Rectangle(5, 40, 245, 25);
            AddViewControl(option);
            option.TextString  = "Artist - Title";
            option.Checked     = existingTemplate == ARTIST_TITLE;
            option.InputLeave += () => { SetFormat(ARTIST_TITLE); };
            option.StartRender();

            option        = new SingleOptionRadio();
            option.Bounds = new Rectangle(5, 75, 245, 25);

            AddViewControl(option);
            option.TextString  = "Track - Title";
            option.Checked     = existingTemplate == TRACK_TITLE;
            option.InputLeave += () => { SetFormat(TRACK_TITLE); };
            option.StartRender();

            option        = new SingleOptionRadio();
            option.Bounds = new Rectangle(260, 5, 245, 25);
            AddViewControl(option);
            option.Checked    = existingTemplate == TITLE;
            option.TextString = "Title";
            option.StartRender();
            option.InputLeave += () => { SetFormat(TITLE); };

            option        = new SingleOptionRadio();
            option.Bounds = new Rectangle(260, 40, 245, 25);
            AddViewControl(option);
            option.TextString  = "FileName";
            option.Checked     = existingTemplate == FILENAME;
            option.InputLeave += () => { SetFormat(FILENAME); };
            option.StartRender();


            var chkoption = new CheckBox();

            option.Bounds = new Rectangle(5, 110, 245, 25);
            AddViewControl(chkoption);
            chkoption.Checked     = AppMain.Settings.DisplayFormat.ReplacePercentTwenty;
            chkoption.TextString  = "Replaced %20 With Space";
            chkoption.InputLeave += () => { var thisOption = chkoption; TogglePercentTwentyReplace(thisOption.Checked); };
            chkoption.StartRender();

            chkoption     = new CheckBox();
            option.Bounds = new Rectangle(5, 145, 245, 25);
            AddViewControl(chkoption);
            chkoption.Checked     = AppMain.Settings.DisplayFormat.ReplaceUnderscores;
            chkoption.TextString  = "Replaced Underscores With Space";
            chkoption.InputLeave += () => { var thisOption = chkoption; ToggleUnderscoreReplace(thisOption.Checked); };
            chkoption.StartRender();
        }