Example #1
0
 public PageState(IModelItemOwner owner)
     : base()
 {
     this.m_transitionState = PageTransitionState.NavigatingToForward;
     this.eTPageState       = new EditableText(this);
     this.eTPageState.Value = "NavigatingToForward";
 }
Example #2
0
 public ThumbnailCommand(IModelItemOwner owner, string stDescription, EventHandler ehInvoked, Image defaultImage, Image focusImage, Image dormantImage)
     : base(owner, stDescription, ehInvoked)
 {
     this.DefaultImage = defaultImage;
     this.DormantImage = dormantImage;
     this.FocusImage   = focusImage;
 }
 public ThumbnailCommand(IModelItemOwner owner, string stDescription, EventHandler ehInvoked, Image defaultImage, Image focusImage, Image dormantImage)
     : base(owner, stDescription, ehInvoked)
 {
     this.DefaultImage = defaultImage;
     this.DormantImage = dormantImage;
     this.FocusImage = focusImage;
 }
 private MetadataNotifications(IModelItemOwner owner)
     : base(owner)
 {
     this._timerOnEndUpdates            = new Timer();
     this._timerOnEndUpdates.Interval   = 15000;
     this._timerOnEndUpdates.AutoRepeat = false;
     this._timerOnEndUpdates.Tick      += new EventHandler(this.OnEndUpdatesTick);
 }
 public RecordModeOption(
     IModelItemOwner owner,
     string description,
     int value,
     Choice rateChoice)
     : base(owner, description, value)
 {
     this._rateChoice = rateChoice;
 }
Example #6
0
 public WirelessNetworkTypeCommand(
     IModelItemOwner owner,
     string description,
     EventHandler handler,
     WlanAuthCipherPair pair)
     : base(owner, description, handler)
 {
     this._networkType = pair;
 }
Example #7
0
        public DeviceChoice(IModelItemOwner owner)
            : base(owner)
        {
            UIDeviceList instance = SingletonModelItem <UIDeviceList> .Instance;

            instance.DeviceAddedEvent             += new DeviceListEventHandler(this.ListChanged);
            instance.DeviceRemovedEvent           += new DeviceListEventHandler(this.ListChanged);
            SyncControls.Instance.PropertyChanged += new PropertyChangedEventHandler(this.OnSyncPropertyChanged);
            this.BuildOptions();
        }
 public EpisodesPivot(IModelItemOwner owner, string stDescription, string stNoContentText, List<OMLEngine.TitleFilter> filters, int parentId)
     : base(owner, stDescription, stNoContentText, null)
 {
     this.parentId = parentId;
     this.SupportsItemContext = true;
     this.SupportsJIL = true;
     this.ContentTemplate = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
     this.SetupContextMenu();
     this.m_filters = filters;
     this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
     ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);
 }
Example #9
0
 public EpisodesPivot(IModelItemOwner owner, string stDescription, string stNoContentText, List <OMLEngine.TitleFilter> filters, int parentId)
     : base(owner, stDescription, stNoContentText, null)
 {
     this.parentId            = parentId;
     this.SupportsItemContext = true;
     this.SupportsJIL         = true;
     this.ContentTemplate     = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
     this.SetupContextMenu();
     this.m_filters     = filters;
     this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
     ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);
 }
Example #10
0
 public PrivacySettingChoice(
     IModelItemOwner owner,
     string detailedDescription,
     string description,
     IList choices,
     PrivacySettingId settingId,
     PrivacyInfoSettings infoSettings)
     : base(owner, description, choices)
 {
     this.m_detailedDescription = detailedDescription;
     this.m_settingId           = settingId;
     this.m_infoSettings        = infoSettings;
 }
Example #11
0
        public BrowsePivot(IModelItemOwner owner, string stDescription, string stNoContentText, IList listContent)
            : base(owner, stDescription)
        {
            this.m_stNoContentText   = stNoContentText;
            this.m_listContent       = listContent;
            this.m_stContentTemplate = StandardGalleryTemplate;
            this.m_stDetailTemplate  = StandardDetailTemplate;
            CustomSelectionPolicy policy = new CustomSelectionPolicy();

            policy.SelectOnGainFocus         = true;
            policy.ClearSelectionOnLostFocus = true;
            this.m_policyContent             = policy;
        }
Example #12
0
 private SyncControls(IModelItemOwner owner)
     : base(owner)
 {
     this._deviceList = SingletonModelItem <UIDeviceList> .Instance;
     this._deviceList.DeviceAddedEvent        += new DeviceListEventHandler(this.OnDeviceAdded);
     this._deviceList.DeviceRemovedEvent      += new DeviceListEventHandler(this.OnDeviceRemoved);
     this._deviceList.DeviceConnectedEvent    += new DeviceListEventHandler(this.OnDeviceConnected);
     this._deviceList.DeviceDisconnectedEvent += new DeviceListEventHandler(this.OnDeviceDisconnected);
     this._currentDevice                       = UIDeviceList.NullDevice;
     SignIn.Instance.PropertyChanged          += new PropertyChangedEventHandler(this.SignInPropertyChanged);
     AccountCreationWizard.CreationCompleted  += new EventHandler(this.AccountCreationFinished);
     DeviceManagement.DeviceConnectionHandled += new DeviceConnectionHandledEventHandler(this.OnDeviceConnectionHandled);
     this.UpdateWirelessSyncBannerDisplay();
 }
Example #13
0
 public PrivacySettingChoice(
     IModelItemOwner owner,
     string detailedDescription,
     string description,
     IList choices,
     PrivacySettingId settingId,
     PrivacyInfoSettings infoSettings,
     string linkDescription,
     string linkUrl)
     : this(owner, detailedDescription, description, choices, settingId, infoSettings)
 {
     this.LinkDescription = linkDescription;
     this.LinkUrl         = linkUrl;
 }
        public FavoritesPivot(IModelItemOwner owner, string stDescription, string stNoContentText)
            : base(owner, stDescription, stNoContentText, null)
        {
            //this.ContentLabel = "OML";
            this.SupportsJIL = true;
            this.ContentTemplate = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
            this.ContentItemTemplate = "ListViewItem";
            this.DetailTemplate = Library.Code.V3.BrowsePivot.ExtendedDetailTemplate;

            this.SetupContextMenu();

            //this.m_filterType = filterType;
            this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
            ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);
        }
Example #15
0
        public FavoritesPivot(IModelItemOwner owner, string stDescription, string stNoContentText)
            : base(owner, stDescription, stNoContentText, null)
        {
            //this.ContentLabel = "OML";
            this.SupportsJIL         = true;
            this.ContentTemplate     = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
            this.ContentItemTemplate = "ListViewItem";
            this.DetailTemplate      = Library.Code.V3.BrowsePivot.ExtendedDetailTemplate;

            this.SetupContextMenu();


            //this.m_filterType = filterType;
            this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
            ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);
        }
Example #16
0
 public FamilySettingChoice(
     IModelItemOwner owner,
     string title,
     string description,
     string blockText,
     string settingId,
     bool showBlockUnrated,
     IList choices)
     : base(owner, description, choices)
 {
     this._title            = title;
     this._settingId        = settingId;
     this._showBlockUnrated = showBlockUnrated;
     this._blockUnrated     = new BooleanChoice(owner, blockText);
     this._choices          = choices;
     this.Clear();
 }
Example #17
0
        public YearPivot(IModelItemOwner owner, string stDescription, string stNoContentText, List<OMLEngine.TitleFilter> filters)
            : base(owner, stDescription, stNoContentText, null)
        {
            this.SupportsItemContext = true;
            this.SetupContextMenu();
            this.SupportsJIL = false;
            this.ContentTemplate = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
            this.ContentItemTemplate = "GalleryGroup";
            this.SubContentItemTemplate = "twoRowPoster";//needs to pull from the total count to decide...
            this.DetailTemplate = Library.Code.V3.BrowsePivot.StandardDetailTemplate;

            this.SupportedContentItemTemplates.Add("View Large", "oneRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View Small", "twoRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View List", "ListViewItemGrouped");

            this.m_filters = filters;
            this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
        }
Example #18
0
        public YearPivot(IModelItemOwner owner, string stDescription, string stNoContentText, List <OMLEngine.TitleFilter> filters)
            : base(owner, stDescription, stNoContentText, null)
        {
            this.SupportsItemContext = true;
            this.SetupContextMenu();
            this.SupportsJIL            = false;
            this.ContentTemplate        = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
            this.ContentItemTemplate    = "GalleryGroup";
            this.SubContentItemTemplate = "twoRowPoster";//needs to pull from the total count to decide...
            this.DetailTemplate         = Library.Code.V3.BrowsePivot.StandardDetailTemplate;

            this.SupportedContentItemTemplates.Add("View Large", "oneRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View Small", "twoRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View List", "ListViewItemGrouped");

            this.m_filters     = filters;
            this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
        }
        /// <summary>
        /// Create a gallery item to represent a file.
        /// This method may return null if it decides to not include this file.
        /// </summary>
        private ThumbnailCommand CreateFileGalleryItem(IModelItemOwner owner, FileInfo info)
        {
            // Only list WMA and MP3 file types
            string extension = FilterExtension(info.Extension);

            if ((extension != "wma") && (extension != "mp3"))
            {
                return(null);
            }

            // Create the command
            ThumbnailCommand item = new ThumbnailCommand(owner);

            item.Description  = info.Name;
            item.Metadata     = extension;
            item.Image        = fileImage;
            item.Data["Path"] = info.FullName;

            // Hook up the invoked handler
            item.Invoked += delegate(object sender, EventArgs args)
            {
                ThumbnailCommand invokedFile = (ThumbnailCommand)sender;
                string           path        = (string)invokedFile.Data["Path"];

                //
                // When invoked play the audio file
                //

                if (Application.Current.MediaCenterEnvironment != null)
                {
                    // Play
                    Application.Current.MediaCenterEnvironment.PlayMedia(MediaType.Audio, path, true);

                    // Display a notification that will time out.
                    Application.Current.MessageBox(Z.Resources.Music_PlayDialog_Text, invokedFile.Description, 4, false);
                }
                else
                {
                    Debug.WriteLine("Play " + path);
                }
            };

            return(item);
        }
Example #20
0
        public GenrePivot(IModelItemOwner owner, string stDescription, string stNoContentText, List<OMLEngine.TitleFilter> filters, OMLEngine.TitleFilterType filterType)
            : base(owner, stDescription, stNoContentText, null)
        {
            this.SetupContextMenu();
            //this.ContentLabel = "OML";
            this.SupportsJIL = true;
            this.ContentTemplate = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
            this.ContentItemTemplate = "twoRowGalleryItemGenre";
            this.DetailTemplate = Library.Code.V3.BrowsePivot.ExtendedDetailTemplate;

            this.SupportedContentItemTemplates.Add("View Large", "twoRowGalleryItemGenre");
            //this.SupportedContentItemTemplates.Add("View Small", "twoRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View List", "ListViewItem");

            this.m_filters = filters;
            this.m_filterType = filterType;
            this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
            ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);
        }
Example #21
0
        public UIGasGauge(IModelItemOwner owner, GasGauge gauge)
            : base(owner)
        {
            this._gauge = gauge;
            if (this._gauge != null)
            {
                this._gauge.CategorySpaceUsedUpdatedEvent += new CategorySpaceUsedUpdatedHandler(this.OnCategorySpaceUpdated);
                this._gauge.ReservedSpaceUpdatedEvent     += new ReservedSpaceUpdatedHandler(this.OnReservedSpaceUpdated);
            }
            UIDevice uiDevice = owner as UIDevice;

            if (uiDevice == null && owner is SyncGroupList syncGroupList)
            {
                uiDevice = syncGroupList.Device;
            }
            if (uiDevice == null)
            {
                return;
            }
            int advertisedCapacity = uiDevice.AdvertisedCapacity;

            while (advertisedCapacity > 8)
            {
                if (advertisedCapacity % 10 == 0)
                {
                    advertisedCapacity /= 10;
                }
                else if (advertisedCapacity % 5 == 0)
                {
                    advertisedCapacity /= 5;
                }
                else if (advertisedCapacity % 3 == 0)
                {
                    advertisedCapacity /= 3;
                }
                else
                {
                    advertisedCapacity /= 2;
                }
            }
            this._dividerCount = advertisedCapacity;
        }
Example #22
0
        public FilterPivot(IModelItemOwner owner, string stDescription, string stNoContentText, List <OMLEngine.TitleFilter> filters, OMLEngine.TitleFilterType filterType)
            : base(owner, stDescription, stNoContentText, null)
        {
            //this.ContentLabel = "OML";
            this.SupportsJIL         = true;
            this.ContentTemplate     = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
            this.ContentItemTemplate = "ListViewItem";
            this.DetailTemplate      = Library.Code.V3.BrowsePivot.ExtendedDetailTemplate;

            this.SupportedContentItemTemplates.Add("View Large", "oneRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View Small", "twoRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View List", "ListViewItemGrouped");

            this.SetupContextMenu();

            this.m_filters     = filters;
            this.m_filterType  = filterType;
            this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
            ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);
        }
        /// <summary>
        /// Create gallery items for all the subdirectories and music files found in the given directory.
        /// </summary>
        private void PopulateGallery(IModelItemOwner owner, IList list, DirectoryInfo directory)
        {
            //
            // Subdirectories
            //

            DirectoryInfo[] subdirectories = directory.GetDirectories();

            if (subdirectories != null)
            {
                foreach (DirectoryInfo subdirectory in subdirectories)
                {
                    ThumbnailCommand item = CreateDirectoryGalleryItem(owner, subdirectory);
                    if (item != null)
                    {
                        list.Add(item);
                    }
                }
            }


            //
            // Files
            //

            FileInfo[] files = directory.GetFiles();

            if (files != null)
            {
                foreach (FileInfo file in files)
                {
                    ThumbnailCommand item = CreateFileGalleryItem(owner, file);
                    if (item != null)
                    {
                        list.Add(item);
                    }
                }
            }
        }
Example #24
0
        public TitlesPivot(IModelItemOwner owner, string stDescription, string stNoContentText, List<OMLEngine.TitleFilter> filters, int? parentId)
            : base(owner, stDescription, stNoContentText, null)
        {
            this.parentId = parentId;
            this.SupportsItemContext = true;
            this.SupportsJIL = true;
            this.ContentTemplate = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
            this.SupportedContentItemTemplates.Add("View Large", "oneRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View Small", "twoRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View List", "ListViewItem");

            this.SetupContextMenu();
            this.m_filters = filters;
            this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
            ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);

            OMLApplication.Current.TitleDeleted += new DeleteTitleEventHandler(Current_TitleDeleted);
            if (this.m_filters.IndexOf(new OMLEngine.TitleFilter(OMLEngine.TitleFilterType.Unwatched, false.ToString())) > -1)
            {
                OMLApplication.Current.TitleWatched += new UnwatchedTitleEventHandler(Current_TitleWatched);
            }
        }
Example #25
0
        public TitlesPivot(IModelItemOwner owner, string stDescription, string stNoContentText, List <OMLEngine.TitleFilter> filters, int?parentId)
            : base(owner, stDescription, stNoContentText, null)
        {
            this.parentId            = parentId;
            this.SupportsItemContext = true;
            this.SupportsJIL         = true;
            this.ContentTemplate     = "resx://Library/Library.Resources/V3_Controls_BrowseGallery#Gallery";
            this.SupportedContentItemTemplates.Add("View Large", "oneRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View Small", "twoRowGalleryItemPoster");
            this.SupportedContentItemTemplates.Add("View List", "ListViewItem");

            this.SetupContextMenu();
            this.m_filters     = filters;
            this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
            ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);

            OMLApplication.Current.TitleDeleted += new DeleteTitleEventHandler(Current_TitleDeleted);
            if (this.m_filters.IndexOf(new OMLEngine.TitleFilter(OMLEngine.TitleFilterType.Unwatched, false.ToString())) > -1)
            {
                OMLApplication.Current.TitleWatched += new UnwatchedTitleEventHandler(Current_TitleWatched);
            }
        }
        /// <summary>
        /// Create a gallery item to represent a directory.
        /// </summary>
        private ThumbnailCommand CreateDirectoryGalleryItem(IModelItemOwner owner, DirectoryInfo info)
        {
            // Create the command
            ThumbnailCommand item = new ThumbnailCommand(owner);

            item.Description  = info.Name;
            item.Image        = directoryImage;
            item.Data["Path"] = info.FullName;

            // Hook up the invoked handler
            item.Invoked += delegate(object sender, EventArgs args)
            {
                ThumbnailCommand invokedDirectory = (ThumbnailCommand)sender;
                string           path             = (string)invokedDirectory.Data["Path"];

                // When invoked navigate to a new gallery page for this directory
                GalleryPage newPage = CreateGalleryPage(path);
                Application.Current.GoToGallery(newPage);
            };

            return(item);
        }
Example #27
0
 public ContextMenu(IModelItemOwner owner)
     : base()
 {
     localItems = new List <ICommand>();
 }
Example #28
0
 public GalleryItem(IModelItemOwner owner)
     : base(owner)
 {
 }
 public ThumbnailCommand(IModelItemOwner owner, EventHandler ehInvoked)
     : this(owner, null, ehInvoked)
 {
 }
 public ThumbnailCommand(IModelItemOwner owner)
     : this(owner, null, null)
 {
 }
 public CustomSelectionPolicy(IModelItemOwner owner)
     : base()
 {
 }
Example #32
0
 public BrowseModel(IModelItemOwner owner)
     : base()
 {
 }
Example #33
0
 public SettingsFrame(IModelItemOwner owner)
     : base(owner)
 {
 }
 public ThumbnailCommand(IModelItemOwner owner, string stDescription, EventHandler ehInvoked)
     : base(owner, stDescription, ehInvoked)
 {
 }
Example #35
0
 public BrowsePivot(IModelItemOwner owner, string stDescription, string stNoContentText, IList listContent)
     : base(owner, stDescription)
 {
     this.m_stNoContentText = stNoContentText;
     this.m_listContent = listContent;
     this.m_stContentTemplate = StandardGalleryTemplate;
     this.m_stDetailTemplate = StandardDetailTemplate;
     CustomSelectionPolicy policy = new CustomSelectionPolicy();
     policy.SelectOnGainFocus = true;
     policy.ClearSelectionOnLostFocus = true;
     this.m_policyContent = policy;
 }
Example #36
0
 // Methods
 public BaseBrowsePivot(IModelItemOwner owner)
     : base(owner)
 {
 }
 public RichLayoutCommand(IModelItemOwner owner, string description, bool hasRichLayout)
     : base(owner, description, null)
     => this._hasRichLayout = hasRichLayout;
Example #38
0
 public BaseBrowsePivot(IModelItemOwner owner, string stDescription)
     : base(owner, stDescription)
 {
 }
Example #39
0
 public ContextMenu(IModelItemOwner owner, IList LocalItems)
     : base()
 {
     localItems = LocalItems;
 }
Example #40
0
 public PageState(IModelItemOwner owner)
     : base()
 {
     this.m_transitionState = PageTransitionState.NavigatingToForward;
     this.eTPageState = new EditableText(this);
     this.eTPageState.Value = "NavigatingToForward";
 }
Example #41
0
 /// <summary>
 /// Create a SearchResult that has a lifetime owner.
 /// </summary>
 public SearchResult(IModelItemOwner owner)
     : base(owner)
 {
 }
Example #42
0
 public TitlesPivot(IModelItemOwner owner, string stDescription, string stNoContentText)
     : base(owner, stDescription, stNoContentText, null)
 {
     this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
     ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);
 }
Example #43
0
 public GalleryItem(IModelItemOwner owner)
     : base(owner)
 {
 }
Example #44
0
 public PageStack(IModelItemOwner owner)
     : base(owner)
     => this._pageStack = new ArrayList();
Example #45
0
 public ContextMenu(IModelItemOwner owner)
     : base()
 {
     localItems = new List<ICommand>();
 }
Example #46
0
 public FilterPivot(IModelItemOwner owner, string stDescription, string stNoContentText)
     : base(owner, stDescription, stNoContentText, null)
 {
     this.m_listContent = new VirtualList(new ItemCountHandler(this.InitializeListCount));
     ((VirtualList)this.m_listContent).RequestItemHandler = new RequestItemHandler(this.GetItem);
 }
Example #47
0
 /// <summary>
 /// Create a ThumbnailCommand that has an lifetime owner.
 /// </summary>
 public ThumbnailCommand(IModelItemOwner owner)
     : base(owner)
 {
 }
Example #48
0
 public BrowsePivot(IModelItemOwner owner, string stDescription, string stNoContentText)
     : this(owner, stDescription, stNoContentText, new ArrayList())
 {
 }
Example #49
0
 public ListPanel(IModelItemOwner owner)
     : base(owner)
 {
 }
Example #50
0
 public YearPivot(IModelItemOwner owner, string stDescription, string stNoContentText, IList listContent)
     : base(owner, stDescription, stNoContentText, listContent)
 {
     this.SupportsItemContext = true;
     this.SetupContextMenu();
 }
Example #51
0
 public ContextMenu(IModelItemOwner owner, IList LocalItems)
     : base()
 {
     localItems = LocalItems;
 }