home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Skins and Design
Skinning contest: One month to go
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Baboonanza" data-source="post: 677125" data-attributes="member: 101901"><p>I'm afraid the Wrokflow page on the wiki isn't very useful Albert. It's too general and wordy to serve as a useful introduction.</p><p></p><p>As a skinner you don't have to worry about workflow states/actions. They control how the plugin wndows and dialogs connect together and are completely independent of the visual appearance. I expect that some skinners will eventually want to change this for some plugins but it's certainly not something to worry about when you start. Workflow knowledge is really only essential for plugin coders.</p><p></p><p>I'll give you the summary of my knowledge and maybe Albert can correct me where I've got it wrong (and then we can both learn soemthing!):</p><p></p><p><u><strong>The long strings of numbers</strong></u>: These are just Guids, numbers that are big enough that you can almost guarantee that randomly generated ones are unique. I'd like to move toward using human readable names at some point but that has some implementation problems. All workflow models, states and actions have a guid.</p><p></p><p><u><strong>Workflow States</strong></u>: These are the stopping points in the GUI, like Windows or Dialogs, that wait for user action. These are linked to a WorkflowModel that provides the code and data to run the window and an XAML screen that defines it's visual appearance. For example:</p><p>[CODE] <WorkflowState Id="44E1CF89-66D0-4850-A076-E1B602432983" Name="Weather" MainScreen="Weather"</p><p> DisplayLabel="Weather" WorkflowModel="92BDB53F-4159-4dc2-B212-6083C820A214"/>[/CODE]</p><p><strong>Id</strong>: this is a new guid that can be used to refer to this WorkflowState. These can be generated <a href="http://createguid.com/" target="_blank">here</a></p><p><strong>Name</strong>: Not 100% sure about this one, I think this is just an internal name.</p><p><strong>MainScren</strong>: This is the name of the XAML screen file to use for the window</p><p><strong>DisplayLabel</strong>: I think this is the text that will be displayed in the navigator bar when this WorkflowState is active, but maybe not since it isn't using language translation.</p><p><strong>WorkflowModel</strong>: This is the class that will provide the code to run the screen. One class can be the model for several different screens and dialogs. In this example the Guid is the ModelId of the WeatherModel class.</p><p></p><p><u><strong>Workflow Actions</strong></u>: These define the transitions between workflow states. For example, when you select a menu item on the main screen it triggers the corresponding workflow action that tells it how to get to another state. The clever bit is that the menu has been created by looking through all of the actions for ones that have a starting state that matches the current window (for instance 'Home'). I'm less certain about how these work, but I'll give my best guess:</p><p>[CODE] <PushNavigationTransition Id="E34FDB62-1F3E-4aa9-8A61-D143E0AF77B5"</p><p> Name="Home->Weather"</p><p> DisplayCategory="a-Weather"</p><p> SortOrder="a"</p><p> SourceState="7F702D9C-F2DD-42da-9ED8-0BA92F07787F"</p><p> TargetState="44E1CF89-66D0-4850-A076-E1B602432983"</p><p> DisplayTitle="[Weather.Title]"/>[/CODE]</p><p>A PushNavigationTransition is a transition that adds a new item onto the navigation stack- so opening Weather adds 'Weather' to the stack and pressing ESCAPE takes the top item off the stack. It's the normal model changing transition basically.</p><p><strong>Name</strong>: Internal name?</p><p><strong>DisplayCategory & SortOrder</strong>: Presumably these have something to do with how the items are ordered when displayed in a menu list.</p><p><strong>SourceState</strong>: This is the state that the action will start from. This is used by MP2 to find possible actions for a workflow state and build the menus. In this case the WorkflowState id corresponds to the home state, so this action will be displayed in the main menu on the home screen.</p><p><strong>TargetState</strong>: This is the state that the action will transition to. In this case it is the Weather state, and the Guid matches the WorkflowState in our examaple above.</p><p><strong>DisplayTitle</strong>: This is the name that will be used when the action is displayed in a menu. In this case it's looking up [Weather.Title] from the plugin's language file to get the correct translation.</p><p></p><p>There are other forms of actions, such as the Method action that calls a method on the Model but keeps the same state.</p><p></p><p></p><p></p><p>I hope this has been of some help. Like a lot of the MP2 skinning it looks much more complicated than it really is, but I can understand that in the absence of good docs it's difficult to get started. Once you get your head around everything it all starts to make sense <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> </p><p></p><p>I'll write some docs myself when I have some more experience.</p></blockquote><p></p>
[QUOTE="Baboonanza, post: 677125, member: 101901"] I'm afraid the Wrokflow page on the wiki isn't very useful Albert. It's too general and wordy to serve as a useful introduction. As a skinner you don't have to worry about workflow states/actions. They control how the plugin wndows and dialogs connect together and are completely independent of the visual appearance. I expect that some skinners will eventually want to change this for some plugins but it's certainly not something to worry about when you start. Workflow knowledge is really only essential for plugin coders. I'll give you the summary of my knowledge and maybe Albert can correct me where I've got it wrong (and then we can both learn soemthing!): [U][B]The long strings of numbers[/B][/U]: These are just Guids, numbers that are big enough that you can almost guarantee that randomly generated ones are unique. I'd like to move toward using human readable names at some point but that has some implementation problems. All workflow models, states and actions have a guid. [U][B]Workflow States[/B][/U]: These are the stopping points in the GUI, like Windows or Dialogs, that wait for user action. These are linked to a WorkflowModel that provides the code and data to run the window and an XAML screen that defines it's visual appearance. For example: [CODE] <WorkflowState Id="44E1CF89-66D0-4850-A076-E1B602432983" Name="Weather" MainScreen="Weather" DisplayLabel="Weather" WorkflowModel="92BDB53F-4159-4dc2-B212-6083C820A214"/>[/CODE] [B]Id[/B]: this is a new guid that can be used to refer to this WorkflowState. These can be generated [URL="http://createguid.com/"]here[/URL] [B]Name[/B]: Not 100% sure about this one, I think this is just an internal name. [B]MainScren[/B]: This is the name of the XAML screen file to use for the window [B]DisplayLabel[/B]: I think this is the text that will be displayed in the navigator bar when this WorkflowState is active, but maybe not since it isn't using language translation. [B]WorkflowModel[/B]: This is the class that will provide the code to run the screen. One class can be the model for several different screens and dialogs. In this example the Guid is the ModelId of the WeatherModel class. [U][B]Workflow Actions[/B][/U]: These define the transitions between workflow states. For example, when you select a menu item on the main screen it triggers the corresponding workflow action that tells it how to get to another state. The clever bit is that the menu has been created by looking through all of the actions for ones that have a starting state that matches the current window (for instance 'Home'). I'm less certain about how these work, but I'll give my best guess: [CODE] <PushNavigationTransition Id="E34FDB62-1F3E-4aa9-8A61-D143E0AF77B5" Name="Home->Weather" DisplayCategory="a-Weather" SortOrder="a" SourceState="7F702D9C-F2DD-42da-9ED8-0BA92F07787F" TargetState="44E1CF89-66D0-4850-A076-E1B602432983" DisplayTitle="[Weather.Title]"/>[/CODE] A PushNavigationTransition is a transition that adds a new item onto the navigation stack- so opening Weather adds 'Weather' to the stack and pressing ESCAPE takes the top item off the stack. It's the normal model changing transition basically. [B]Name[/B]: Internal name? [B]DisplayCategory & SortOrder[/B]: Presumably these have something to do with how the items are ordered when displayed in a menu list. [B]SourceState[/B]: This is the state that the action will start from. This is used by MP2 to find possible actions for a workflow state and build the menus. In this case the WorkflowState id corresponds to the home state, so this action will be displayed in the main menu on the home screen. [B]TargetState[/B]: This is the state that the action will transition to. In this case it is the Weather state, and the Guid matches the WorkflowState in our examaple above. [B]DisplayTitle[/B]: This is the name that will be used when the action is displayed in a menu. In this case it's looking up [Weather.Title] from the plugin's language file to get the correct translation. There are other forms of actions, such as the Method action that calls a method on the Model but keeps the same state. I hope this has been of some help. Like a lot of the MP2 skinning it looks much more complicated than it really is, but I can understand that in the absence of good docs it's difficult to get started. Once you get your head around everything it all starts to make sense :) I'll write some docs myself when I have some more experience. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Skins and Design
Skinning contest: One month to go
Contact us
RSS
Top
Bottom