public ApplicationOptions(IHelper aHelper)
        {
            iLastBoxSelected = new OptionString("lastboxselected", "Last Box Selected", "Store last device selected by the user", "");
            aHelper.AddOption(iLastBoxSelected);

            iViewDetails = new OptionBool("viewdetails", "View Details", "Show device list in detail rather than by Icons", false);
            aHelper.AddOption(iViewDetails);
        }
Beispiel #2
0
        public LocalPlaylists(IHelper aHelper, bool aAddOptionPage)
        {
            iLock = new object();

            iOptionSaveDirectory = new OptionFolderPath("playlistpath", "Local playlist path", "Path where local playlists are saved", Path.Combine(aHelper.DataPath.FullName, "Playlists"));

            if (aAddOptionPage)
            {
                // create the options page
                OptionPage optionPage = new OptionPage("Local Playlists");
                optionPage.Add(iOptionSaveDirectory);
                aHelper.AddOptionPage(optionPage);
            }
            else
            {
                aHelper.AddOption(iOptionSaveDirectory);
            }

            // listen for changes to the save directory option
            iOptionSaveDirectory.EventValueChanged += SaveDirectoryChanged;

            // initialise as being in its error state
            iPlaylists = null;
            iWrapped   = new LocalPlaylistsRootError(kRootId);
            iWrapped.EventContentUpdated += ContentUpdated;
            iWrapped.EventContentAdded   += ContentAdded;
            iWrapped.EventContentRemoved += ContentRemoved;

            Refresh();
        }
Beispiel #3
0
        public UiOptions(IHelper aHelper)
        {
            iWindowWidth     = new OptionDouble("windowwidth", "WindowWidth", "", 1024);
            iWindowHeight    = new OptionDouble("windowheight", "WindowHeight", "", 600);
            iWindowLocationX = new OptionDouble("windowx", "WindowLocationX", "", -1);
            iWindowLocationY = new OptionDouble("windowy", "WindowLocationY", "", -1);

            iBrowserSplitterLocationLeft  = new OptionInt("browsersplitterleft", "BrowserSplitterLocationLeft", "", 652);
            iBrowserSplitterLocationRight = new OptionInt("browsersplitterright", "BrowserSplitterLocationRight", "", 404);
            iFullscreen    = new OptionBool("fullscreen", "Fullscreen", "", false);
            iMiniMode      = new OptionBool("minimode", "MiniMode", "", false);
            iContainerView = new OptionUint("containerview", "ContainerView", "", 0);
            iContainerViewSizeThumbsView = new OptionDouble("containerviewsizethumbs", "ContainerViewSizeThumbs", "", 150);
            iContainerViewSizeListView   = new OptionDouble("containerviewsizelist", "ContainerViewSizeList", "", 100);

            iOptionDialogSettings = new OptionDialogSettings();

            aHelper.AddOption(iWindowWidth);
            aHelper.AddOption(iWindowHeight);
            aHelper.AddOption(iWindowLocationX);
            aHelper.AddOption(iWindowLocationY);
            aHelper.AddOption(iBrowserSplitterLocationLeft);
            aHelper.AddOption(iBrowserSplitterLocationRight);
            aHelper.AddOption(iFullscreen);
            aHelper.AddOption(iMiniMode);
            aHelper.AddOption(iContainerView);
            aHelper.AddOption(iContainerViewSizeThumbsView);
            aHelper.AddOption(iContainerViewSizeListView);
            aHelper.AddOption(iOptionDialogSettings);
        }
Beispiel #4
0
        public ApplicationOptions(IHelper aHelper)
        {
            iLeftSplitterLocation = new OptionInt("leftsplitter", "Left Splitter Location", "Graphical location in pixels of left splitter", 300);
            aHelper.AddOption(iLeftSplitterLocation);

            iRightSplitterLocation = new OptionInt("rightsplitter", "Right Splitter Location", "Graphical location in pixels of right splitter", 300);
            aHelper.AddOption(iRightSplitterLocation);

            iWindowWidth = new OptionInt("width", "Window Width", "Width of application window in pixels", 900);
            aHelper.AddOption(iWindowWidth);

            iWindowHeight = new OptionInt("height", "Window Height", "Height of application window in pixels", 600);
            aHelper.AddOption(iWindowHeight);

            iWindowMaximised = new OptionBool("maximised", "Window Maximised", "Flag to determine if the application window is maximised", false);
            aHelper.AddOption(iWindowMaximised);

            iWindowMinimised = new OptionBool("minimised", "Window Minimised", "Flag to determine if the application window is minimised", false);
            aHelper.AddOption(iWindowMinimised);

            iPrintPagesPerSheetIndex = new OptionInt("printpagespersheet", "Print Pages Per Sheet Index", "Index value of pages per sheet selection for printing a catalog (last selected by user)", 0);
            aHelper.AddOption(iPrintPagesPerSheetIndex);

            iPrintPageLayout = new OptionEnum("printpagelayout", "Print Page Layout", "Page layout selection for printing a catalog (last selected by user)");
            iPrintPageLayout.AddDefault(kPotraitTrackDetails);
            iPrintPageLayout.Add(kLandscapeTrackDetails);
            iPrintPageLayout.Add(kPotrait);
            iPrintPageLayout.Add(kLandscape);
            aHelper.AddOption(iPrintPageLayout);

            iPrintOrderBooklet = new OptionBool("printorderbooklet", "Print Order Booklet", "Booklet order selection for printing a catalog (last selected by user)", false);
            aHelper.AddOption(iPrintOrderBooklet);

            iPrintDocumentType = new OptionEnum("printdoctype", "Print Document Type", "Document type selection for printing a catalog (last selected by user)");
            iPrintDocumentType.AddDefault(kPdf);
            iPrintDocumentType.Add(kRtf);
            aHelper.AddOption(iPrintDocumentType);

            iPrintSections = new OptionListString("printsections", "Print Sections", "User selected sections to print when creating a catalog", new List <string>()
            {
                kToc
            });
            aHelper.AddOption(iPrintSections);
        }
Beispiel #5
0
        public UiOptions(IHelper aHelper)
        {
            iWindowWidth       = new OptionInt("windowwidth", "WindowWidth", "", 1024);
            iWindowHeight      = new OptionInt("windowheight", "WindowHeight", "", 600);
            iWindowLocationX   = new OptionInt("windowx", "WindowLocationX", "", -1);
            iWindowLocationY   = new OptionInt("windowy", "WindowLocationY", "", -1);
            iSplitterLocation  = new OptionInt("splitterx", "SplitterLocation", "", 502);
            iFullscreen        = new OptionBool("fullscreen", "Fullscreen", "", false);
            iMiniMode          = new OptionBool("minimode", "MiniMode", "", false);
            iMiniModeWidth     = new OptionInt("minimodewidth", "MiniModeWidth", "", Screen.PrimaryScreen.WorkingArea.Width / 2);
            iMiniModeLocationX = new OptionInt("minimodex", "MiniModeLocationX", "", Screen.PrimaryScreen.WorkingArea.Width / 2);
            iMiniModeLocationY = new OptionInt("minimodey", "MiniModeLocationY", "", Screen.PrimaryScreen.WorkingArea.Height - 100);
            iAlbumView         = new OptionUint("albumview", "AlbumView", "", 0);
            iContainerView     = new OptionUint("containerview", "ContainerView", "", 0);
            iContainerViewSize = new OptionUint("containerviewsize", "ContainerViewSize", "", 0);

            aHelper.AddOption(iWindowWidth);
            aHelper.AddOption(iWindowHeight);
            aHelper.AddOption(iWindowLocationX);
            aHelper.AddOption(iWindowLocationY);
            aHelper.AddOption(iSplitterLocation);
            aHelper.AddOption(iFullscreen);
            aHelper.AddOption(iMiniMode);
            aHelper.AddOption(iMiniModeWidth);
            aHelper.AddOption(iMiniModeLocationX);
            aHelper.AddOption(iMiniModeLocationY);
            aHelper.AddOption(iAlbumView);
            aHelper.AddOption(iContainerView);
            aHelper.AddOption(iContainerViewSize);
        }