public BackgroundManagerModel()
 {
   _selectedItemProperty = new WProperty(typeof (ListItem), null);
   _selectedItemProperty.Attach(SetBackgroundImage);
   _backgroundImageProperty = new WProperty(typeof (string), string.Empty);
   SetBackgroundImage();
 }
 public ManagePlaylistsModel()
 {
   _isHomeServerConnectedProperty = new WProperty(typeof(bool), false);
   _isPlaylistsSelectedProperty = new WProperty(typeof(bool), false);
   _playlistNameProperty = new WProperty(typeof(string), string.Empty);
   _playlistNameProperty.Attach(OnPlaylistNameChanged);
   _isPlaylistNameValidProperty = new WProperty(typeof(bool), false);
 }
 public FanArtBackgroundModel()
 {
     _selectedItemProperty = new SProperty(typeof (ListItem), null);
       _selectedItemProperty.Attach(SetFanArtType);
       _fanArtMediaTypeProperty = new SProperty(typeof(FanArtConstants.FanArtMediaType), FanArtConstants.FanArtMediaType.Undefined);
       _fanArtNameProperty = new SProperty(typeof(string), string.Empty);
       SetFanArtType();
 }
 public FanArtBackgroundModel()
 {
   _selectedItemProperty = new WProperty(typeof(ListItem), null);
   _selectedItemProperty.Attach(SetFanArtType);
   _fanArtMediaTypeProperty = new WProperty(typeof(FanArtConstants.FanArtMediaType), FanArtConstants.FanArtMediaType.Undefined);
   _fanArtNameProperty = new WProperty(typeof(string), string.Empty);
   _itemDescriptionProperty = new WProperty(typeof(string), string.Empty);
   _mediaItemProperty = new WProperty(typeof(MediaItem), null);
   _imageSourceProperty = new WProperty(typeof(ImageSource), null);
   SetFanArtType();
   SetImageSource();
 }
 public FanArtBackgroundModel()
 {
   _selectedItemProperty = new WProperty(typeof(ListItem), null);
   _selectedItemProperty.Attach(SetFanArtType);
   _fanArtMediaTypeProperty = new WProperty(typeof(string), FanArtMediaTypes.Undefined);
   _fanArtNameProperty = new WProperty(typeof(string), string.Empty);
   _simpleTitleProperty = new WProperty(typeof(string), string.Empty);
   _itemDescriptionProperty = new WProperty(typeof(string), string.Empty);
   _mediaItemProperty = new WProperty(typeof(MediaItem), null);
   _imageSourceProperty = new WProperty(typeof(ImageSource), null);
   Update();
   SetImageSource();
   SubscribeToMessages();
 }
Exemple #6
0
 protected SharesProxy(ShareEditMode? editMode)
 {
   _editMode = editMode;
   _allBaseResourceProvidersList = new ItemsList();
   _isResourceProviderSelectedProperty = new WProperty(typeof(bool), false);
   _baseResourceProviderProperty = new WProperty(typeof(ResourceProviderMetadata), null);
   _nativeSystemProperty = new WProperty(typeof(string), string.Empty);
   _choosenResourcePathStrProperty = new WProperty(typeof(string), string.Empty);
   _choosenResourcePathStrProperty.Attach(OnChoosenResourcePathStrChanged);
   _choosenResourcePathProperty = new WProperty(typeof(ResourcePath), null);
   _choosenResourcePathProperty.Attach(OnChoosenResourcePathChanged);
   _isChoosenPathValidProperty = new WProperty(typeof(bool), false);
   _choosenResourcePathDisplayNameProperty = new WProperty(typeof(string), string.Empty);
   _resourceProviderPathsTree = new ItemsList();
   _shareNameProperty = new WProperty(typeof(string), string.Empty);
   _shareNameProperty.Attach(OnShareNameChanged);
   _isShareNameValidProperty = new WProperty(typeof(bool), true);
   _invalidShareHintProperty = new WProperty(typeof(string), null);
   _allMediaCategoriesTree = new ItemsList();
   _mediaCategories = new HashSet<string>();
 }
    public PlaylistImportModel()
    {
      _importFileProperty = new WProperty(typeof(string), null);
      _playlistNameProperty = new WProperty(typeof(string), null);
      _errorHintProperty = new WProperty(typeof(string), null);
      _isDataValidProperty = new WProperty(typeof(bool), false);

      _importFileProperty.Attach(OnDataPropertyChanged);
      _playlistNameProperty.Attach(OnDataPropertyChanged);

      CreateShareLocations();

      _queue = new AsynchronousMessageQueue(this, new string[]
        {
            ServerConnectionMessaging.CHANNEL,
        });
      _queue.MessageReceived += OnMessageReceived;
      _queue.Start();

      LoadSettings();

      CheckDataValid();
    }
 protected void AttachToSourcePathProperty(AbstractProperty sourcePathProperty)
 {
   if (sourcePathProperty != null)
   {
     _attachedPropertiesList.Add(sourcePathProperty);
     sourcePathProperty.Attach(OnSourcePathChanged);
   }
 }
 public ImageAspectWrapper()
 {
   _aspectWidthProperty = new SProperty(typeof(int?));
   _aspectHeightProperty = new SProperty(typeof(int?));
   _equipmentMakeProperty = new SProperty(typeof(string));
   _equipmentModelProperty = new SProperty(typeof(string));
   _exposureBiasProperty = new SProperty(typeof(string));
   _exposureTimeProperty = new SProperty(typeof(string));
   _flashModeProperty = new SProperty(typeof(string));
   _fNumberProperty = new SProperty(typeof(string));
   _iSOSpeedRatingProperty = new SProperty(typeof(string));
   _orientationProperty = new SProperty(typeof(int?));
   _meteringModeProperty = new SProperty(typeof(string));
   _latitudeProperty = new SProperty(typeof(double?));
   _longitudeProperty = new SProperty(typeof(double?));
   _cityProperty = new SProperty(typeof(string));
   _stateProperty = new SProperty(typeof(string));
   _countryProperty = new SProperty(typeof(string));
   _mediaItemProperty = new SProperty(typeof(MediaItem));
   _mediaItemProperty.Attach(MediaItemChanged);
 }
 protected override void InitModel()
 {
   if (!_isInitialized)
   {
     _scheduleSeriesModeProperty = new WProperty(typeof(bool), false);
     _scheduleSeriesModeProperty.Attach(ToggleSeriesMode);
     _channelNameProperty = new WProperty(typeof(string), string.Empty);
     _scheduleNameProperty = new WProperty(typeof(string), string.Empty);
     _scheduleTypeProperty = new WProperty(typeof(string), string.Empty);
     _startTimeProperty = new WProperty(typeof(DateTime), DateTime.MinValue);
     _endTimeProperty = new WProperty(typeof(DateTime), DateTime.MinValue);
     _currentProgramProperty = new WProperty(typeof(ProgramProperties), new ProgramProperties());
   }
   base.InitModel();
 }
 public MultipleEntryListController()
 {
   _valueProperty = new WProperty(typeof(string), string.Empty);
   _valueProperty.Attach(OnValueChanged);
   _isEntrySelectedProperty = new WProperty(typeof(bool), false);
 }
 public MovieAspectWrapper()
 {
   _movieNameProperty = new SProperty(typeof(string));
   _origNameProperty = new SProperty(typeof(string));
   _iMDBIDProperty = new SProperty(typeof(string));
   _tMDBIDProperty = new SProperty(typeof(int?));
   _oFDBIDProperty = new SProperty(typeof(int?));
   _collectionNameProperty = new SProperty(typeof(string));
   _collectionIDProperty = new SProperty(typeof(int?));
   _runtimeProperty = new SProperty(typeof(int?));
   _certificationProperty = new SProperty(typeof(string));
   _taglineProperty = new SProperty(typeof(string));
   _popularityProperty = new SProperty(typeof(float?));
   _budgetProperty = new SProperty(typeof(long?));
   _revenueProperty = new SProperty(typeof(long?));
   _scoreProperty = new SProperty(typeof(float?));
   _mediaItemProperty = new SProperty(typeof(MediaItem));
   _mediaItemProperty.Attach(MediaItemChanged);
 }
 /// <summary>
 /// Attaches a change handler to the specified <paramref name="sourcePathProperty"/>,
 /// which is located in the resolving path to the source value. We will attach
 /// a change handler to every property, whose change will potentially affect
 /// the object evaluated as binding source.
 /// </summary>
 protected void AttachToSourcePathProperty(AbstractProperty sourcePathProperty)
 {
   if (sourcePathProperty != null)
   {
     _attachedPropertiesCollection.Add(sourcePathProperty);
     sourcePathProperty.Attach(OnDataContextChanged);
   }
 }
 public AudioAspectWrapper()
 {
   _artistsProperty = new SProperty(typeof(IEnumerable<string>));
   _albumProperty = new SProperty(typeof(string));
   _genresProperty = new SProperty(typeof(IEnumerable<string>));
   _durationProperty = new SProperty(typeof(long?));
   _trackProperty = new SProperty(typeof(int?));
   _numTracksProperty = new SProperty(typeof(int?));
   _albumArtistsProperty = new SProperty(typeof(IEnumerable<string>));
   _composersProperty = new SProperty(typeof(IEnumerable<string>));
   _encodingProperty = new SProperty(typeof(string));
   _bitRateProperty = new SProperty(typeof(int?));
   _discIdProperty = new SProperty(typeof(int?));
   _numDiscsProperty = new SProperty(typeof(int?));
   _mediaItemProperty = new SProperty(typeof(MediaItem));
   _mediaItemProperty.Attach(MediaItemChanged);
 }
 public VideoAspectWrapper()
 {
   _genresProperty = new SProperty(typeof(IEnumerable<string>));
   _durationProperty = new SProperty(typeof(long?));
   _audioStreamCountProperty = new SProperty(typeof(int?));
   _audioEncodingProperty = new SProperty(typeof(string));
   _audioBitRateProperty = new SProperty(typeof(long?));
   _audioLanguagesProperty = new SProperty(typeof(IEnumerable<string>));
   _videoEncodingProperty = new SProperty(typeof(string));
   _videoBitRateProperty = new SProperty(typeof(long?));
   _aspectWidthProperty = new SProperty(typeof(int?));
   _aspectHeightProperty = new SProperty(typeof(int?));
   _aspectRatioProperty = new SProperty(typeof(float?));
   _fPSProperty = new SProperty(typeof(int?));
   _actorsProperty = new SProperty(typeof(IEnumerable<string>));
   _directorsProperty = new SProperty(typeof(IEnumerable<string>));
   _writersProperty = new SProperty(typeof(IEnumerable<string>));
   _isDVDProperty = new SProperty(typeof(bool?));
   _storyPlotProperty = new SProperty(typeof(string));
   _mediaItemProperty = new SProperty(typeof(MediaItem));
   _mediaItemProperty.Attach(MediaItemChanged);
 }
 public SeriesAspectWrapper()
 {
   _seriesNameProperty = new SProperty(typeof(string));
   _seasonProperty = new SProperty(typeof(int?));
   _episodeProperty = new SProperty(typeof(IEnumerable<int>));
   _episodeNameProperty = new SProperty(typeof(string));
   _mediaItemProperty = new SProperty(typeof(MediaItem));
   _mediaItemProperty.Attach(MediaItemChanged);
 }
 public MediaAspectWrapper()
 {
   _titleProperty = new SProperty(typeof(string));
   _mimeTypeProperty = new SProperty(typeof(string));
   _sizeProperty = new SProperty(typeof(long?));
   _recordingTimeProperty = new SProperty(typeof(DateTime?));
   _ratingProperty = new SProperty(typeof(int?));
   _commentProperty = new SProperty(typeof(string));
   _playCountProperty = new SProperty(typeof(int?));
   _lastPlayedProperty = new SProperty(typeof(DateTime?));
   _mediaItemProperty = new SProperty(typeof(MediaItem));
   _mediaItemProperty.Attach(MediaItemChanged);
 }
 public RecordingAspectWrapper()
 {
   _channelProperty = new SProperty(typeof(string));
   _startTimeProperty = new SProperty(typeof(DateTime?));
   _endTimeProperty = new SProperty(typeof(DateTime?));
   _mediaItemProperty = new SProperty(typeof(MediaItem));
   _mediaItemProperty.Attach(MediaItemChanged);
 }
Exemple #19
0
 protected void RegisterChildCanvasPosition(AbstractProperty childCanvasPositionProperty)
 {
   childCanvasPositionProperty.Attach(OnChildCanvasPositionChanged);
 }
 public SeriesAspectWrapper()
 {
   _iMDBIDProperty = new SProperty(typeof(string));
   _tVDBIDProperty = new SProperty(typeof(int?));
   _seriesNameProperty = new SProperty(typeof(string));
   _seasonProperty = new SProperty(typeof(int?));
   _seriesSeasonNameProperty = new SProperty(typeof(string));
   _episodeProperty = new SProperty(typeof(IEnumerable<int>));
   _dvdEpisodeProperty = new SProperty(typeof(IEnumerable<double>));
   _episodeNameProperty = new SProperty(typeof(string));
   _firstAiredProperty = new SProperty(typeof(DateTime?));
   _totalRatingProperty = new SProperty(typeof(double?));
   _ratingCountProperty = new SProperty(typeof(int?));
   _mediaItemProperty = new SProperty(typeof(MediaItem));
   _mediaItemProperty.Attach(MediaItemChanged);
 }
 protected void TrackItemVisibleEnabledProperty(AbstractProperty property)
 {
   property.Attach(OnVisibleEnabledChanged);
   _trackedVisibleEnabledProperties.Add(property);
 }
    protected void InitializeSearch(ViewSpecification baseViewSpecification)
    {
      _baseViewSpecification = baseViewSpecification as MediaLibraryQueryViewSpecification;
      if (_baseViewSpecification == null)
        return;
      if (_simpleSearchTextProperty == null)
      {
        _simpleSearchTextProperty = new WProperty(typeof(string), string.Empty);
        _simpleSearchTextProperty.Attach(OnSimpleSearchTextChanged);
      }
      SimpleSearchText = string.Empty;

      // Initialize data manually which would have been initialized by AbstractItemsScreenData.UpdateMediaItems else
      IsItemsValid = true;
      IsItemsEmpty = false;
      TooManyItems = false;
      NumItemsStr = "-";
      NumItems = 0;
      lock (_syncObj)
        _view = null;
      _items = new ItemsList();
    }
 protected override void InitModel()
 {
   if (!_isInitialized)
   {
     _channelNameProperty = new WProperty(typeof(string), string.Empty);
     _programSearchTextProperty = new WProperty(typeof(string), string.Empty);
     _programSearchTextProperty.Attach(ProgramSearchTextChanged);
   }
   base.InitModel();
 }