Using IWorkflowManager and IScreenManager (1 Viewer)

FreakyJ

Development Group
  • Team MediaPortal
  • July 25, 2010
    4,024
    1,420
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #1
    @morpheus_xx
    Sorry to bother you again :(

    I basically have one workflow model with several Screens.
    Inside the plugin.xml it is defined like this:
    XML:
    <Register Location="/Workflow/States">
        <WorkflowState Id="CB09DF01-65FA-4550-977C-B685C237ED3D"
            Name="TEST"
            MainScreen="ConfigScreen"
            DisplayLabel="InputDevices"
            WorkflowModel="CC11183C-01A9-4F96-AF90-FAA046981006"/>
        <WorkflowState Id="6ABF367E-346B-459F-B5A6-B61A1E285A64"
            Name="changingInputsMain" MainScreen="ConfigScreenKeyMapping"
            DisplayLabel="changingInputsMain"/>
        <WorkflowState Id="9907E2BF-CCE9-4CF7-9F4D-807F14A5DF47"
            Name="AddKey" MainScreen="ConfigScreenAddKey"
            DisplayLabel="ConfigScreenAddKey"/>
        <WorkflowState Id="FD7FEDE0-9268-41AE-AD0A-CC8066A41ED9"
            Name="AddAction" MainScreen="ConfigScreenAddAction"
            DisplayLabel="ConfigScreenAddAction"/>
      </Register>
    Inside the Workflow Model I use:
    Code:
    ServiceRegistration.Get<IWorkflowManager>().NavigatePush(Guid.Parse("6ABF367E-346B-459F-B5A6-B61A1E285A64"));
    It works, but the problem is that the screen gets added to the Navigation Stack. That means the user can go backwards by using Esc, but this screws up my workflow :(

    So I basically want to swap screens (.xaml files) without putting them on the navigation Stack (read: you can't go back by using Esc, it doesn't appear in the Navigation list on the top left corner.)

    I am sure this is a easy one, but I already spend sooo many hours on it... I promise I always try to figure it out myself first before I start asking you, but I am lost :(
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,400
    6,972
    Germany Germany
    Country flag
    First you could try to use: https://github.com/MediaPortal/Medi...tation/Workflow/IWorkflowManager.cs#L126-L138.

    But I don't remember exactly if it still pushes the step to navigation history. According to interface docs its main difference is to be able to use dynamical created WF state ids.

    And you should know that there are always ways to leave a screen, even if you prevent "escape" to pop a navigation state (i.e. by all shortcuts like "H" for "home"). So maybe it's better to use a dialog for input of new items?
    Or only conditionally show different controls in same screen?

    Please explain more in detail what you like to achieve.
     

    FreakyJ

    Development Group
  • Team MediaPortal
  • July 25, 2010
    4,024
    1,420
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #3
    I have basically a wizzard:
    1) you anter Configuration -> than you'Re asked to push a button on the input device you would like to configure
    2) you have a list with all the ammpings for this device -> There you can press add or delete mappins
    3) after pressing Add: A Screen come where you push your key combination
    4) The next screen lets add you a action to this combination
    5) Back to step 2)

    Yousing NavigatePush always adds a an extra item to the nvigation stack, so after adding 5 mappings you have ~15 items in the navigation stack. That feels wrong to me^^

    I saw that function, but was confused that I have to create a new WorkflowState, because I already defined one in th eplugin.xml or am I wrong?
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,400
    6,972
    Germany Germany
    Country flag
    Yousing NavigatePush always adds a an extra item to the nvigation stack, so after adding 5 mappings you have ~15 items in the navigation stack. That feels wrong to me^^
    The "Finish" step should do a "NavigatePop" to your starting workflow state. This removes all later steps.

    I saw that function, but was confused that I have to create a new WorkflowState, because I already defined one in th eplugin.xml or am I wrong?
    You are right, it's not related to your question.
     

    FreakyJ

    Development Group
  • Team MediaPortal
  • July 25, 2010
    4,024
    1,420
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #5
    I've solved my issue by including the subscreens into a main screen file and use IsVisible on a container element for each subscreen :)
    So thank you for your help ;)
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    toricred Using TMM, How to Stop Importer From Going to The Movie Database for Data General 1
    morpheus_xx [WiP] OnlineVideos: New browser based playback support using WebDriver, new Amazon siteutil MediaPortal 2 6
    toricred [solved] Configuring TV Server to use NAS General 5
    vvulture Using Windows 10 MediaPortal 1 Talk 8
    atlantic How to use Spotify inside Mediaportal? Listen Music 18
    Megane Too much RAM used (over 2 GB). General Support 18
    doskabouter 1.23.0 MatroskaTagInfo uses the wrong casing for tags Bugreports 27
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    D I just installed MP 1.23. Which version of Schedules Direct should I use, where do I obtain it from Newcomers Forum 6
    M Can i use my Vu+ Zero 4k Tuner for Mediaportal? General 0
    benicehavefun Using MePo TV Server 1.23 via MPExtended/WebMediaPortal as a Backend for Plex MPExtended 4
    G MP1 TV Server "failed to upgrade the database" using MS Sql Server Installation, configuration support 3
    1gkar Use Alternative Sites to Scrape Series Info My TVSeries 5
    T Can Emprex 3009ARF III MCE Remote Control be used to toggle Fullscreen/Windowed mode?? Remotes 7
    S [solved] Live TV subtitle issue if not using 100% font General 31
    N [Proposal] Make text input using remote control easier MediaPortal 2 4
    T Issues with MediaPortal not starting correctly using versions after 1.20 Final General Support 6
    erika jandova Using SD and MediaPortal 1 Newcomers Forum 4
    D Large xml database in My Movies Management. I remain unclear on use My Films as bridge to MP2.2 General 9
    N [solved] When MP2-Client is trying to register credentials, it uses the wrong machine name MediaPortal 2 7
    high [Help Me!] Atlassian Fisheye/Crucible still used? Team Lounge 8
    D [solved] HID remote for mp2 and w10 64 bit? using all tools: sony, cisco, homeworkx ng General 2
    Symphy Still being used? ASIO music player 0
    P no signal when scanning for channels using antenna and dual hd General Support 2
    N Using mediaportal in lieu of hauppauge wintv Newcomers Forum 10
    Similar threads

























    Top Bottom