Exemple #1
0
        /// <summary>
        /// Initializes a new instance of SettingsControl, which is used to dynamically build all configuration options.
        /// </summary>
        public SettingsControl()
        {
            InitializeComponent();

            // localise buttons
            IResourceString save = LocalizationHelper.CreateLabelProperty("[configuration.settings.button.save]");

            _btnSave.Tag     = save;
            _btnSave.Text    = save.Evaluate();
            _btnSave.Enabled = false;

            IResourceString apply = LocalizationHelper.CreateLabelProperty("[configuration.settings.button.apply]");

            _btnApply.Tag     = apply;
            _btnApply.Text    = apply.Evaluate();
            _btnApply.Enabled = false;

            _treeSections.ImageList                  = new ImageList();
            _treeSections.ImageList.ColorDepth       = ColorDepth.Depth32Bit;
            _treeSections.ImageList.TransparentColor = Color.Transparent;
            _treeSections.ImageList.ImageSize        = new Size(22, 22);

            LoadSections();

            ServiceScope.Get <ILocalisation>().LanguageChange += LanguageChange;
            CheckRightToLeft();
        }
 public PushTransientStateNavigationTransition(Guid actionId, string name, string displayLabel, IEnumerable<Guid> sourceStateIds,
     WorkflowState transientTargetState, IResourceString displayTitle, IResourceString helpText) :
     base(actionId, name, sourceStateIds, displayTitle, helpText)
 {
   _displayLabel = displayLabel;
   _transientState = transientTargetState;
 }
 protected WorkflowAction(Guid actionId, string name, IEnumerable <Guid> sourceStateIds, IResourceString displayTitle)
 {
     _actionId       = actionId;
     _name           = name;
     _sourceStateIds = sourceStateIds == null ? null : new List <Guid>(sourceStateIds);
     _displayTitle   = displayTitle;
 }
 protected WorkflowAction(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle)
 {
   _actionId = actionId;
   _name = name;
   _sourceStateIds = sourceStateIds == null ? null : new List<Guid>(sourceStateIds);
   _displayTitle = displayTitle;
 }
Exemple #5
0
        protected void Update()
        {
            IServerConnectionManager scm = ServiceRegistration.Get <IServerConnectionManager>();

            _titleRes = LocalizationHelper.CreateResourceString(string.IsNullOrEmpty(scm.HomeServerSystemId) ? Consts.RES_SEARCH_FOR_SERVERS : Consts.RES_DETACH_FROM_SERVER);
            FireStateChanged();
        }
        protected void Update()
        {
            IPlayerContextManager playerContextManager = ServiceRegistration.Get <IPlayerContextManager>();
            IWorkflowManager      workflowManager      = ServiceRegistration.Get <IWorkflowManager>();
            IPlayerContext        pcPrimary            = playerContextManager.PrimaryPlayerContext;
            IPlayer      primaryPlayer = pcPrimary == null ? null : pcPrimary.CurrentPlayer;
            IImagePlayer pp            = primaryPlayer as IImagePlayer;
            IVideoPlayer vp            = primaryPlayer as IVideoPlayer;
            IAudioPlayer ap            = primaryPlayer as IAudioPlayer;
            bool         visible       = (pp != null || vp != null || ap != null) &&
                                         !workflowManager.IsStateContainedInNavigationStack(pcPrimary.FullscreenContentWorkflowStateId);
            IResourceString displayTitleRes;

            if (ap != null)
            {
                displayTitleRes = LocalizationHelper.CreateResourceString(Consts.RES_AUDIO_VISUALIZATION);
            }
            else if (vp != null)
            {
                displayTitleRes = LocalizationHelper.CreateStaticString(
                    LocalizationHelper.CreateResourceString(Consts.RES_FULLSCREEN_VIDEO).Evaluate(vp.Name));
            }
            else
            {
                displayTitleRes = LocalizationHelper.CreateResourceString(Consts.RES_FULLSCREEN_IMAGE);
            }
            lock (_syncObj)
            {
                _isVisible            = visible;
                _displayTitleResource = displayTitleRes;
            }
            FireStateChanged();
        }
 public WorkflowContributorAction(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle,
     Guid contributorModelId) : base(actionId, name, sourceStateIds, displayTitle)
 {
   _modelItemStateTracker = new DefaultItemStateTracker("WorkflowContributorAction: Usage of workflow action contributor model")
     {
         Stopped = registration => Unbind()
     };
   _contributorModelId = contributorModelId;
 }
        protected string Add(Type strategyType)
        {
            string          localizationResource = string.Format(Consts.RES_CONCURRENT_PLAYER_OPEN_STRATEGY_TEMPLATE, strategyType.FullName);
            IResourceString res = LocalizationHelper.CreateResourceString(localizationResource);

            _items.Add(res);
            _piPOpenStrategyTypes.Add(res, strategyType);
            return(strategyType.FullName);
        }
        /// <summary>
        /// Gets a name for a player context.
        /// </summary>
        /// <param name="playerContext">Player context to return the name for.</param>
        /// <param name="slotNo">Number of the player slot of the given <paramref name="playerContext"/>.</param>
        /// <returns>Human readable name for the given <paramref name="playerContext"/>.</returns>
        protected static string GetNameForPlayerContext(IPlayerContext playerContext, int slotNo)
        {
            IPlayer player = playerContext.CurrentPlayer;

            if (player == null)
            {
                IResourceString playerOfType = LocalizationHelper.CreateResourceString(Consts.RES_PLAYER_OF_TYPE);                         // "{0} player"
                IResourceString slotNoRes    = LocalizationHelper.CreateResourceString(Consts.RES_SLOT_NO);                                // "Slot #{0}"
                return(playerOfType.Evaluate(playerContext.AVType.ToString()) + " (" + slotNoRes.Evaluate((slotNo + 1).ToString()) + ")"); // "Video player (Slot #1)"
            }
            return(player.Name + ": " + player.MediaItemTitle);
        }
 protected override void Update()
 {
   base.Update();
   IWorkflowManager workflowManager = ServiceRegistration.Get<IWorkflowManager>();
   _displayTitle = LocalizationHelper.CreateResourceString(workflowManager.IsStateContainedInNavigationStack(Consts.WF_STATE_ID_LOCAL_MEDIA_NAVIGATION_ROOT) ?
       Consts.RES_SWITCH_TO_BROWSE_ML_VIEW : Consts.RES_SWITCH_TO_LOCAL_MEDIA_VIEW);
   _isInBrowseState = workflowManager.IsAnyStateContainedInNavigationStack(new Guid[]
     {
         Consts.WF_STATE_ID_LOCAL_MEDIA_NAVIGATION_ROOT,
         Consts.WF_STATE_ID_BROWSE_MEDIA_NAVIGATION_ROOT,
     }) && MediaNavigationModel.GetNavigationData(workflowManager.CurrentNavigationContext, false) != null;
 }
        public override void Save()
        {
            base.Save();
            PlayerContextManagerSettings settings = SettingsManager.Load <PlayerContextManagerSettings>();
            int             selected     = Selected;
            IResourceString selectedItem = selected == -1 ? null : _items[selected];

            if (selectedItem != null)
            {
                settings.OpenPlayerStrategyTypeName = _piPOpenStrategyTypes[selectedItem].FullName;
                SettingsManager.Save(settings);
            }
        }
        protected override void Update()
        {
            base.Update();
            IWorkflowManager workflowManager = ServiceRegistration.Get <IWorkflowManager>();

            _displayTitle = LocalizationHelper.CreateResourceString(workflowManager.IsStateContainedInNavigationStack(Consts.WF_STATE_ID_LOCAL_MEDIA_NAVIGATION_ROOT) ?
                                                                    Consts.RES_SWITCH_TO_BROWSE_ML_VIEW : Consts.RES_SWITCH_TO_LOCAL_MEDIA_VIEW);
            _isInBrowseState = workflowManager.IsAnyStateContainedInNavigationStack(new Guid[]
            {
                Consts.WF_STATE_ID_LOCAL_MEDIA_NAVIGATION_ROOT,
                Consts.WF_STATE_ID_BROWSE_MEDIA_NAVIGATION_ROOT,
            }) && MediaNavigationModel.GetNavigationData(workflowManager.CurrentNavigationContext, false) != null;
        }
Exemple #13
0
        public void UpdateMenuActions(NavigationContext context, IDictionary <Guid, WorkflowAction> actions)
        {
            IConfigurationManager configurationManager = ServiceRegistration.Get <IConfigurationManager>();
            string        configLocation = GetConfigLocation(context);
            WorkflowState mainState;

            ServiceRegistration.Get <IWorkflowManager>().States.TryGetValue(new Guid(CONFIGURATION_MAIN_STATE_ID_STR),
                                                                            out mainState);
            IConfigurationNode currentNode = configurationManager.GetNode(configLocation);

            foreach (IConfigurationNode childNode in currentNode.ChildNodes)
            {
                if (childNode.ConfigObj is ConfigSection)
                {
                    bool supportedSettings = NumSettingsSupported(childNode) > 0;
                    // Hint (Albert): Instead of skipping, we could disable the transition in case there are no supported
                    // settings contained in it
                    if (!supportedSettings)
                    {
                        continue;
                    }
                    ConfigSection section = (ConfigSection)childNode.ConfigObj;
                    // Create transient state for new config section
                    WorkflowState newState = WorkflowState.CreateTransientState(
                        string.Format("Config: '{0}'", childNode.Location), section.SectionMetadata.Text, false, CONFIGURATION_SECTION_SCREEN,
                        false, WorkflowType.Workflow, context.WorkflowState.HideGroups);
                    // Add action for menu
                    IResourceString res = LocalizationHelper.CreateResourceString(section.Metadata.Text);
                    WorkflowAction  wa  = new PushTransientStateNavigationTransition(
                        Guid.NewGuid(), context.WorkflowState.Name + "->" + childNode.Location, null,
                        new Guid[] { context.WorkflowState.StateId }, newState, res)
                    {
                        DisplayCategory = ACTIONS_WORKFLOW_CATEGORY,
                        SortOrder       = childNode.Sort ?? res.Evaluate(),
                        WorkflowNavigationContextVariables = new Dictionary <string, object>
                        {
                            { CONFIG_LOCATION_KEY, childNode.Location }
                        }
                    };
                    actions.Add(wa.ActionId, wa);
                }
            }
        }
Exemple #14
0
        /// <summary>
        /// Helper for MainWindow_FormClosing event.
        /// </summary>
        /// <returns></returns>
        public bool Closing()
        {
            if (_btnSave.Enabled)
            {
                IResourceString message = LocalizationHelper.CreateLabelProperty("[configuration.save_on_exit]");
                IResourceString title   = LocalizationHelper.CreateLabelProperty("[configuration.unsaved_warning]");
                DialogResult    result  = MessageBox.Show(message.Evaluate(), title.Evaluate(), MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);

                switch (result)
                {
                case DialogResult.Yes:
                    ServiceScope.Get <IConfigurationManager>().Save();
                    break;

                case DialogResult.Cancel:
                    return(false);
                }
            }
            return(true);
        }
        protected override void Update()
        {
            base.Update();
            bool   isBrowseMode;
            string screenName;
            Guid   currentWorkflowState;

            if (!GetRootState(out screenName, out isBrowseMode, out currentWorkflowState))
            {
                _notInBrowsing = false;
                return;
            }

            IWorkflowManager workflowManager = ServiceRegistration.Get <IWorkflowManager>();

            _displayTitle  = LocalizationHelper.CreateResourceString(isBrowseMode ? Consts.RES_SWITCH_TO_MEDIALIBRARY_VIEW : Consts.RES_SWITCH_TO_BROWSE_SHARE_VIEW);
            _notInBrowsing = !workflowManager.IsAnyStateContainedInNavigationStack(new Guid[]
            {
                Consts.WF_STATE_ID_LOCAL_MEDIA_NAVIGATION_ROOT,
                Consts.WF_STATE_ID_BROWSE_MEDIA_NAVIGATION_ROOT,
            }) && MediaNavigationModel.GetNavigationData(workflowManager.CurrentNavigationContext, false) != null;
        }
        public MainWindow()
        {
            InitializeComponent();

            // Load plugins
            ServiceScope.Get <IConfigurationManager>().Load();
            // Localise window
            IResourceString settings = LocalizationHelper.CreateLabelProperty("[configuration.areas.settings]");

            areaSettings.Tag  = settings;
            areaSettings.Text = settings.ToString();
            IResourceString logs = LocalizationHelper.CreateLabelProperty("[configuration.areas.logs]");

            areaLogs.Tag     = logs;
            areaLogs.Text    = logs.ToString();
            areaLogs.Enabled = false;
            ServiceScope.Get <ILocalisation>().LanguageChange += LangageChange;
            CheckRightToLeft();
            // Initialize SettingsControl
            _settingsArea        = new SettingsControl();
            _settingsArea.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            _areaType            = AreaType.SettingsArea;
            areaControls.Controls.Add(_settingsArea);
        }
Exemple #17
0
 public PlayerConfigurationAction()
 {
     _displayTitle = LocalizationHelper.CreateResourceString(Consts.RES_PLAYER_CONFIGURATION);
 }
Exemple #18
0
 public MethodDelegateAction(Guid actionId, string name, IEnumerable <Guid> sourceStateIds, IResourceString displayTitle,
                             ParameterlessMethod executor) :
     base(actionId, name, sourceStateIds, displayTitle)
 {
     _executor = executor;
 }
Exemple #19
0
 public void SetLabel(string name, IResourceString value)
 {
     _labels[name] = value;
 }
Exemple #20
0
 /// <see cref="ListItem(string, IResourceString)"/>
 public TreeItem(string name, IResourceString value) : base(name, value)
 {
 }
 public MethodCallAction(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle, Guid modelId, string methodName) :
     this(actionId, name, sourceStateIds, displayTitle, null, modelId, methodName)
 {
 }
        public SearchAction()
        {
			_displayTitle = LocalizationHelper.CreateResourceString("[OnlineVideos.Search]");
        }
Exemple #23
0
 public override void SetMetadata(ConfigBaseMetadata metadata)
 {
     base.SetMetadata(metadata);
     _metadata = metadata;
     _help     = LocalizationHelper.CreateResourceString(SettingMetadata.HelpText);
 }
 protected void Update()
 {
   IServerConnectionManager scm = ServiceRegistration.Get<IServerConnectionManager>();
   _titleRes = LocalizationHelper.CreateResourceString(string.IsNullOrEmpty(scm.HomeServerSystemId) ? Consts.RES_SEARCH_FOR_SERVERS : Consts.RES_DETACH_FROM_SERVER);
   FireStateChanged();
 }
 public ColoredSelectionItem(Color backgroundColor, IResourceString resourceString)
 {
     BackgroundColor = backgroundColor;
     ResourceString  = resourceString;
 }
 public PushTransientStateNavigationTransition(Guid actionId, string name, string displayLabel, IEnumerable<Guid> sourceStateIds,
     WorkflowState transientTargetState, IResourceString displayTitle) :
   this(actionId, name, displayLabel, sourceStateIds, transientTargetState, displayTitle, null)
 {
 }
 public PlayerConfigurationAction()
 {
   _displayTitle = LocalizationHelper.CreateResourceString(Consts.RES_PLAYER_CONFIGURATION);
 }
Exemple #28
0
 public PushTransientStateNavigationTransition(Guid actionId, string name, string displayLabel, IEnumerable <Guid> sourceStateIds,
                                               WorkflowState transientTargetState, IResourceString displayTitle) :
     this(actionId, name, displayLabel, sourceStateIds, transientTargetState, displayTitle, null)
 {
 }
 public VisibilityDependsOnServerConnectStateAction(bool visibleOnServerConnect, Guid? targetWorkflowStateId, string displayTitleResource)
 {
   _visibleOnServerConnect = visibleOnServerConnect;
   _targetWorkflowStateId = targetWorkflowStateId;
   _displayTitle = LocalizationHelper.CreateResourceString(displayTitleResource);
 }
Exemple #30
0
 /// <see cref="ListItem(string, IResourceString)"/>
 public TreeItem(string name, IResourceString value) : base(name, value) { }
 public WorkflowContributorAction(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle,
     Guid contributorModelId) : this(actionId, name, sourceStateIds, displayTitle, null, contributorModelId)
 { }
 public virtual void SetMetadata(ConfigBaseMetadata metadata)
 {
     _metadata = metadata;
     _text     = LocalizationHelper.CreateResourceString(_metadata.Text);
 }
Exemple #33
0
 public void SetLabel(string name, IResourceString value)
 {
   _labels[name] = value;
 }
 public MethodCallAction(Guid actionId, string name, IEnumerable <Guid> sourceStateIds, IResourceString displayTitle, Guid modelId, string methodName) :
     this(actionId, name, sourceStateIds, displayTitle, null, modelId, methodName)
 {
 }
 protected void Update()
 {
   IPlayerContextManager playerContextManager = ServiceRegistration.Get<IPlayerContextManager>();
   IWorkflowManager workflowManager = ServiceRegistration.Get<IWorkflowManager>();
   IPlayerContext pcPrimary = playerContextManager.GetPlayerContext(PlayerManagerConsts.PRIMARY_SLOT);
   IPlayer primaryPlayer = pcPrimary == null ? null : pcPrimary.CurrentPlayer;
   IImagePlayer pp = primaryPlayer as IImagePlayer;
   IVideoPlayer vp = primaryPlayer as IVideoPlayer;
   IAudioPlayer ap = primaryPlayer as IAudioPlayer;
   bool visible = (pp != null || vp != null || ap != null) &&
       !workflowManager.IsStateContainedInNavigationStack(pcPrimary.FullscreenContentWorkflowStateId);
   IResourceString displayTitleRes;
   if (ap != null)
     displayTitleRes = LocalizationHelper.CreateResourceString(Consts.RES_AUDIO_VISUALIZATION);
   else if (vp != null)
     displayTitleRes = LocalizationHelper.CreateStaticString(
         LocalizationHelper.CreateResourceString(Consts.RES_FULLSCREEN_VIDEO).Evaluate(vp.Name));
   else
     displayTitleRes = LocalizationHelper.CreateResourceString(Consts.RES_FULLSCREEN_IMAGE);
   lock (_syncObj)
   {
     _isVisible = visible;
     _displayTitleResource = displayTitleRes;
   }
   FireStateChanged();
 }
 public MethodCallAction(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle, IResourceString helpText, Guid modelId, string methodName) :
     base(actionId, name, sourceStateIds, displayTitle, helpText)
 {
   _modelId = modelId;
   _methodName = methodName;
 }
Exemple #37
0
 public override void SetMetadata(ConfigBaseMetadata metadata)
 {
   base.SetMetadata(metadata);
   _metadata = metadata;
   _help = LocalizationHelper.CreateResourceString(SettingMetadata.HelpText);
 }
 public PopNavigationTransition(Guid actionId, string name, IEnumerable <Guid> sourceStateIds, IResourceString displayTitle, int numPop) :
     this(actionId, name, sourceStateIds, displayTitle, null, numPop)
 {
 }
 protected WorkflowAction(Guid actionId, string name, IEnumerable <Guid> sourceStateIds, IResourceString displayTitle, IResourceString helpText)
     : this(actionId, name, sourceStateIds, displayTitle)
 {
     _helpText = helpText;
 }
    protected readonly IResourceString _displayTitle; // TODO: Listen for language changes; update display title

    #endregion

    public CurrentMediaAction()
    {
      _displayTitle = LocalizationHelper.CreateResourceString(Consts.RES_CURRENT_MEDIA);
    }
    protected override void Update()
    {
      base.Update();
      bool isBrowseMode;
      string screenName;
      Guid currentWorkflowState;
      if (!GetRootState(out screenName, out isBrowseMode, out currentWorkflowState))
      {
        _notInBrowsing = false;
        return;
      }

      IWorkflowManager workflowManager = ServiceRegistration.Get<IWorkflowManager>();
      _displayTitle = LocalizationHelper.CreateResourceString(isBrowseMode ? Consts.RES_SWITCH_TO_MEDIALIBRARY_VIEW : Consts.RES_SWITCH_TO_BROWSE_SHARE_VIEW);
      _notInBrowsing = !workflowManager.IsAnyStateContainedInNavigationStack(new Guid[]
        {
            Consts.WF_STATE_ID_LOCAL_MEDIA_NAVIGATION_ROOT,
            Consts.WF_STATE_ID_BROWSE_MEDIA_NAVIGATION_ROOT,
        }) && MediaNavigationModel.GetNavigationData(workflowManager.CurrentNavigationContext, false) != null;
    }
Exemple #42
0
 public virtual void SetMetadata(ConfigBaseMetadata metadata)
 {
   _metadata = metadata;
   _text = LocalizationHelper.CreateResourceString(_metadata.Text);
 }
 public int CompareTo(IResourceString other)
 {
   return _stringValue.CompareTo(other.Evaluate());
 }
 public PushTransientStateNavigationTransition(Guid actionId, string name, string displayLabel, IEnumerable <Guid> sourceStateIds,
                                               WorkflowState transientTargetState, IResourceString displayTitle) :
     base(actionId, name, sourceStateIds, displayTitle)
 {
     _displayLabel   = displayLabel;
     _transientState = transientTargetState;
 }
 public PushNavigationTransition(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle,
     Guid targetStateId, string navigationContextDisplayLabel) : base(actionId, name, sourceStateIds, displayTitle)
 {
   _navigationContextDisplayLabel = navigationContextDisplayLabel;
   _targetStateId = targetStateId;
 }
Exemple #46
0
 public int CompareTo(IResourceString other)
 {
     return(_stringValue.CompareTo(other.Evaluate()));
 }
 public MethodDelegateAction(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle,
     ParameterlessMethod executor) :
     base(actionId, name, sourceStateIds, displayTitle)
 {
   _executor = executor;
 }
 public PushNavigationTransition(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle,
     Guid targetStateId, string navigationContextDisplayLabel) : this(actionId, name, sourceStateIds, displayTitle, null, targetStateId, navigationContextDisplayLabel)
 {
 }
Exemple #49
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ListItem"/> class with a resource string,
 /// which itself may be localized or unlocalized.
 /// </summary>
 /// <param name="name">The name of the label to be set to <paramref name="value"/>.</param>
 /// <param name="value">Localized or unlocalized resource string value of the new item.</param>
 public ListItem(string name, IResourceString value)
 {
     _labels[name] = value;
 }
Exemple #50
0
 public UserLoginAction()
 {
     _displayTitle = LocalizationHelper.CreateResourceString("[Login.Title]");
 }
 public PopNavigationTransition(Guid actionId, string name, IEnumerable <Guid> sourceStateIds, IResourceString displayTitle, int numPop) :
     base(actionId, name, sourceStateIds, displayTitle)
 {
     _numPop = numPop;
 }
Exemple #52
0
    void Init()
    {
      _playerContextProperty = new SProperty(typeof(PlayerChoice), PlayerChoice.PrimaryPlayer);
      _autoVisibilityProperty = new SProperty(typeof(bool), false);
      _isPlayerPresentProperty = new SProperty(typeof(bool), false);
      _isVideoPlayerPresentProperty = new SProperty(typeof(bool), false);
      _isImagePlayerPresentProperty = new SProperty(typeof(bool), false);
      _titleProperty = new SProperty(typeof(string), null);
      _mediaItemProperty = new SProperty(typeof(MediaItem), null);
      _mediaItemTitleProperty = new SProperty(typeof(string), null);
      _nextMediaItemTitleProperty = new SProperty(typeof(string), string.Empty);
      _hasNextMediaItemProperty = new SProperty(typeof(bool), false);
      _hasAudioProperty = new SProperty(typeof(bool), true);
      _volumeProperty = new SProperty(typeof(int), 0);
      _isAudioProperty = new SProperty(typeof(bool), false);
      _isMutedProperty = new SProperty(typeof(bool), false);
      _isPlayingProperty = new SProperty(typeof(bool), false);
      _isPausedProperty = new SProperty(typeof(bool), false);
      _isSeekingForwardProperty = new SProperty(typeof(bool), false);
      _isSeekingBackwardProperty = new SProperty(typeof(bool), false);
      _seekHintProperty = new SProperty(typeof(string), string.Empty);
      _isCurrentPlayerProperty = new SProperty(typeof(bool), false);
      _percentPlayedProperty = new SProperty(typeof(float), 0f);
      _currentTimeProperty = new SProperty(typeof(string), string.Empty);
      _durationProperty = new SProperty(typeof(string), string.Empty);
      _playerStateTextProperty = new SProperty(typeof(string), string.Empty);
      _showMouseControlsProperty = new SProperty(typeof(bool), false);
      _canPlayProperty = new SProperty(typeof(bool), false);
      _canPauseProperty = new SProperty(typeof(bool), false);
      _canStopProperty = new SProperty(typeof(bool), false);
      _canSkipForwardProperty = new SProperty(typeof(bool), false);
      _canSkipBackProperty = new SProperty(typeof(bool), false);
      _canSeekForwardProperty = new SProperty(typeof(bool), false);
      _canSeekBackwardProperty = new SProperty(typeof(bool), false);
      _isPlayerActiveProperty = new SProperty(typeof(bool), false);
      _isPipProperty = new SProperty(typeof(bool), false);
      _fixedImageWidth = 0f;
      _fixedImageHeight = 0f;
      _imageWidthProperty = new SProperty(typeof(float), 0f);
      _imageHeightProperty = new SProperty(typeof(float), 0f);
      _videoGenresProperty = new SProperty(typeof(IEnumerable<string>), EMPTY_NAMES_COLLECTION);
      _videoYearProperty = new SProperty(typeof(int?), null);
      _videoActorsProperty = new SProperty(typeof(IEnumerable<string>), EMPTY_NAMES_COLLECTION);
      _videoDirectorsProperty = new SProperty(typeof(IEnumerable<string>), EMPTY_NAMES_COLLECTION);
      _videoWritersProperty = new SProperty(typeof(IEnumerable<string>), EMPTY_NAMES_COLLECTION);
      _videoStoryPlotProperty = new SProperty(typeof(string), string.Empty);
      _imageSourceLocatorProperty = new SProperty(typeof(IResourceLocator), null);
      _imageRotateDegreesProperty = new SProperty(typeof(int), 0);
      _imageFlipXProperty = new SProperty(typeof(bool), false);
      _imageFlipYProperty = new SProperty(typeof(bool), false);

      _audioArtistsProperty = new SProperty(typeof(IEnumerable<string>), EMPTY_NAMES_COLLECTION);
      _audioYearProperty = new SProperty(typeof(int?), null);

      _fullscreenContentWFStateIDProperty = new SProperty(typeof(Guid?), null);
      _currentlyPlayingWFStateIDProperty = new SProperty(typeof(Guid?), null);

      _headerNormalResource = LocalizationHelper.CreateResourceString(RES_HEADER_NORMAL);
      _headerPiPResource = LocalizationHelper.CreateResourceString(RES_HEADER_PIP);
      _playbackRateHintResource = LocalizationHelper.CreateResourceString(RES_PLAYBACK_RATE_HINT);
    }
 protected WorkflowAction(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle, IResourceString helpText)
   :this(actionId, name, sourceStateIds, displayTitle)
 {
   _helpText = helpText;
 }
 public PopNavigationTransition(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle, int numPop) :
     base(actionId, name, sourceStateIds, displayTitle)
 {
   _numPop = numPop;
 }
 public VisibilityDependsOnServerConnectStateAction(bool visibleOnServerConnect, Guid?targetWorkflowStateId, string displayTitleResource)
 {
     _visibleOnServerConnect = visibleOnServerConnect;
     _targetWorkflowStateId  = targetWorkflowStateId;
     _displayTitle           = LocalizationHelper.CreateResourceString(displayTitleResource);
 }
Exemple #56
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ListItem"/> class with a resource string,
 /// which itself may be localized or unlocalized.
 /// </summary>
 /// <param name="name">The name of the label to be set to <paramref name="value"/>.</param>
 /// <param name="value">Localized or unlocalized resource string value of the new item.</param>
 public ListItem(string name, IResourceString value)
 {
   _labels[name] = value;
 }
 public MethodCallAction(Guid actionId, string name, IEnumerable <Guid> sourceStateIds, IResourceString displayTitle, Guid modelId, string methodName) :
     base(actionId, name, sourceStateIds, displayTitle)
 {
     _modelId    = modelId;
     _methodName = methodName;
 }
 public PopNavigationTransition(Guid actionId, string name, IEnumerable<Guid> sourceStateIds, IResourceString displayTitle, int numPop) :
   this(actionId, name, sourceStateIds, displayTitle, null, numPop)
 {
 }