The Media Center Sandbox

Resources and discussion for developing experiences in the Windows Media Center platform.
Welcome to The Media Center Sandbox Sign in | Join | Help
in Search

Adding new items into central menu

Last post 03-23-2009, 11:36 AM by BILL007. 16 replies.
Page 1 of 2 (17 items)   1 2 Next >
Sort Posts: Previous Next
  •  03-12-2009, 2:45 PM 9107

    Adding new items into central menu

    Hello again!I am doing my first steps into  media center programming.I have seen very interesting things so far.My new thread has to do with a "simple thing",I believe.

    I would like to know,how can I put a new item into the central menu (like Nero do with Nero Live as seen into this screenshot)

     

    I would appreciate your precious help for one more time :)

    Best Regards

  •  03-12-2009, 3:25 PM 9109 in reply to 9107

    Re: Adding new items into central menu

    Have a look in the SDK for start menu integration, specifically addin a start menu strip.

    Cheers,
    Andrew
  •  03-12-2009, 4:39 PM 9110 in reply to 9109

    Re: Adding new items into central menu

    Τhanks for the key words!I will search it,and  I will let you know of my progress.Thanks again...:)
  •  03-13-2009, 11:43 AM 9112 in reply to 9110

    Re: Adding new items into central menu

    Everything went perfect!The keywords (start menu strip) were very accurate!Thanks AndyC !

  •  03-18-2009, 5:16 PM 9159 in reply to 9112

    Re: Adding new items into central menu

    I want to create my own menu which is similar to the picture below. Is there any way I can do that?

    One more question...all the applications which run through Media Center, are html applications or something like that?




  •  03-19-2009, 1:07 AM 9160 in reply to 9159

    Re: Adding new items into central menu

    Have a look at these examples (and slides) for creating something that looks like that  - the examples use the Music Library as data, but the concept is the same.

    http://www.digitallivingsolutions.co.uk/downloads/mvpday2007.zip (5mb)

    You will see from the examples the kind of code used in Media Center - it's a language called MCML, although you can also do stuff in HTML instead if you wanted to (but it is being discontinued in future versions of windows).

    Cheers,
    Andrew

  •  03-19-2009, 12:18 PM 9161 in reply to 9160

    Re: Adding new items into central menu

    i can't run the example 13....
    any ideas?

    ------ Build started: Project: ExampleThirteen, Configuration: Debug Any CPU ------
    "D:\Microsoft Visual Studio 9.0\Common7\IDE\..\..\SDK\v2.0\Bin\gacutil.exe" /u "ExampleThirteen"
    "C:\Windows\eHome\RegisterMceApp.exe" /u /allusers "C:\Users\M@jestic\Documents\Training\mvpday2007\13_ExampleThirteen\ExampleThirteen\\Registration.xml"
    exit 0
    Το σύστημα δεν είναι σε θέση να εντοπίσει την καθορισμένη διαδρομή δίσκου.(edit: The system is not in position it locates the determined way of disk.)

    Success
    C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:\Windows\assembly\GAC_MSIL\Microsoft.MediaCenter\6.0.6000.0__31bf3856ad364e35\Microsoft.MediaCenter.dll /reference:C:\Windows\assembly\GAC_MSIL\Microsoft.MediaCenter.UI\6.0.6000.0__31bf3856ad364e35\Microsoft.MediaCenter.UI.dll /reference:..\..\..\..\..\..\..\Windows\ehome\RegisterMCEApp.exe /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:obj\Debug\Interop.WMPLib.dll /debug+ /debug:full /keyfile:keypair.snk /optimize- /out:obj\Debug\ExampleThirteen.dll /resource:obj\Debug\ExampleThirteen.Resources.resources /target:library Code\Album.cs Code\Launch.cs Code\MyData.cs Properties\AssemblyInfo.cs Resources.Designer.cs

    Compile complete -- 0 errors, 0 warnings
    ExampleThirteen -> C:\Users\M@jestic\Documents\Training\mvpday2007\13_ExampleThirteen\ExampleThirteen\bin\Debug\ExampleThirteen.dll
    %windir%\eHome\McmlVerifier.exe -verbose -assemblyredirect:"C:\Users\M@jestic\Documents\Training\mvpday2007\13_ExampleThirteen\ExampleThirteen\bin\Debug" -directory:"C:\Users\M@jestic\Documents\Training\mvpday2007\13_ExampleThirteen\ExampleThirteen\Markup"
    del "ExampleThirteen.tmp.dll"
    ren "ExampleThirteen.dll" "ExampleThirteen.tmp.dll"
    "C:\Program Files\Microsoft\ILMerge\ILMerge.exe" /keyfile:..\..\keypair.snk /out:ExampleThirteen.dll ExampleThirteen.tmp.dll Interop.WMPLib.dll
    "D:\Microsoft Visual Studio 9.0\Common7\IDE\..\..\SDK\v2.0\Bin\gacutil.exe" /iF "C:\Users\M@jestic\Documents\Training\mvpday2007\13_ExampleThirteen\ExampleThirteen\bin\Debug\ExampleThirteen.dll"
    "%windir%\eHome\RegisterMceApp.exe" /allusers "C:\Users\M@jestic\Documents\Training\mvpday2007\13_ExampleThirteen\ExampleThirteen\\Registration.xml"

    Microsoft (R) MediaCenter Markup Language (MCML) Verifier version 1.00
    Copyright (C) Microsoft Corporation 2006. All rights reserved.

    file://C:\Users\M@jestic\Documents\Training\mvpday2007\13_ExampleThirteen\ExampleThirteen\Markup\Test.mcml - OK!
    No errors detected.
    Το σύστημα δεν είναι σε θέση να εντοπίσει την καθορισμένη διαδρομή δίσκου.(edit: The system is not in position it locates the determined way of disk.)

    Το σύστημα δεν είναι σε θέση να εντοπίσει την καθορισμένη διαδρομή δίσκου.(edit: The system is not in position it locates the determined way of disk.)

    Success
    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

  •  03-19-2009, 11:59 PM 9162 in reply to 9161

    Re: Adding new items into central menu

    It's most likely that the "gacutil.exe" file is not in the location that is expected by the build process.  Find gacutil.exe on your PC and change the line in the build events to match the correct path.

    *edit* Plus, you'll need to download ILMerge from Microsoft - this merges the interop assembly for accessing the Windows Media Player library in to the add-in.

    Cheers,
    Andrew

  •  03-20-2009, 8:48 AM 9163 in reply to 9162

    Re: Adding new items into central menu

    I take this message to 12 and 13 example....


    [img=http://img10.imageshack.us/img10/3994/mcml.th.jpg]
  •  03-21-2009, 9:47 AM 9164 in reply to 9163

    Re: Adding new items into central menu

    What happens when you attach the debugger as instructed in the error message?

    Cheers,
    Andrew

  •  03-21-2009, 11:20 AM 9165 in reply to 9164

    Re: Adding new items into central menu

    when attach i take this picture




    probably i have problem with MyData.cs.....

    message:

    Microsoft.MediaCenter.UI.Template.LoadException was unhandled
      Message="file://C:\\Users\\M@jestic\\Documents\\Training\\mvpday2007\\13_ExampleThirteen\\ExampleThirteen\\Markup\\Test.mcml(11): Attempt to build an object of type 'MyData' failed. (Δημιουργήθηκε εξαίρεση από τον προορισμό μιας κλήσης.)"
      Source="Microsoft.MediaCenter.UI"
      StackTrace:
           σε Microsoft.MediaCenter.UI.Template.MarkupSystem.ThrowLoadException(Exception eInner, String stUri, Int32 nLineNumber, String stMessageFormat, Object[] arobjParams)
           σε Microsoft.MediaCenter.UI.Template.Blueprint.ThrowLoadException(Exception eInner, String stMessageFormat, Object[] arobjParams)
           σε Microsoft.MediaCenter.UI.Template.ObjectBlueprint.Build(Object objContext, Object objRoot)
           σε Microsoft.MediaCenter.UI.Template.PropertyBlueprint.BuildValue(ValuePacket packet, Object objRoot)
           σε Microsoft.MediaCenter.UI.Template.PropertyBlueprint.Build(Object objContext, Object objRoot)
           σε Microsoft.MediaCenter.UI.Template.ViewBlueprint.EnsureInitialized()
           σε Microsoft.MediaCenter.UI.Host.OnPreInitialize()
           σε Microsoft.MediaCenter.UI.ViewItem.PreInitializeTreeWorker()
           σε Microsoft.MediaCenter.UI.ViewItem.PreInitializeTreeWorker()
           σε Microsoft.MediaCenter.UI.ViewItem.PreInitializeTreeWorker()
           σε Microsoft.MediaCenter.UI.ViewItem.InitializeTree(InitPass pass)
           σε Microsoft.MediaCenter.UI.NewUiZone.DeliverInitializations()
           σε Microsoft.MediaCenter.UI.NewUiZone.ImplementUiTask(UiTask task, Object param)
           σε Microsoft.MediaCenter.UI.UiZone.ProcessUiTask(UiTask task, Object param)
           σε Microsoft.MediaCenter.UI.UiSession.ProcessInitialization()
           σε Microsoft.MediaCenter.UI.UiSession.WorkCallback.Dispatch()
           σε Microsoft.MediaCenter.UI.Dispatcher.DispatchNextItem(Queue queue)
           σε Microsoft.MediaCenter.UI.Dispatcher.MainLoopBody(Feeder feeder)
           σε Microsoft.MediaCenter.UI.Dispatcher.MainLoop(LoopCondition condition, LoopBody body)
           σε Microsoft.MediaCenter.UI.Dispatcher.MainLoop(LoopCondition loopCondition)
           σε Microsoft.MediaCenter.UI.Application.Run()
           σε Microsoft.MediaCenter.Tools.StandAlone.Run()
           σε Microsoft.MediaCenter.Tools.McmlPad.Main(String[] args)
      InnerException: System.Reflection.TargetInvocationException
           Message="Δημιουργήθηκε εξαίρεση από τον προορισμό μιας κλήσης."
           Source="mscorlib"
           StackTrace:
                σε System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
                σε System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
                σε System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
                σε Microsoft.MediaCenter.UI.Template.FastConstructorInfo.Invoke(Object[] arArgs)
                σε Microsoft.MediaCenter.UI.Template.ObjectBlueprint.Build(Object objContext, Object objRoot)
           InnerException: System.ArgumentException
                Message="Η διαδρομή δεν έχει έγκυρη μορφή."
                Source="mscorlib"
                StackTrace:
                     σε System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
                     σε System.IO.Path.NormalizePath(String path, Boolean fullCheck)
                     σε System.IO.Path.GetDirectoryName(String path)
                     σε ExampleThirteen.Album..ctor(IWMPMedia media)
                     σε ExampleThirteen.MyData..ctor()
                InnerException:

  •  03-22-2009, 12:16 AM 9166 in reply to 9165

    Re: Adding new items into central menu

    It looks like a path problem in the ExampleThirteen Album constructor - if you put a debug line in for the path being passed to GetDirectoryName you should be able to see what the problem is.

    "Η διαδρομή δεν έχει έγκυρη μορφή" seems to translate to "The route is not a valid form" - this may mean that the Windows Media Player API is sending back an invalid URL for an album in your library, which in this particular example, I hadn't coded for.

    Cheers,
    Andrew

  •  03-22-2009, 8:13 AM 9167 in reply to 9107

    Menu in multiple applications buttons

    Hello again!After all that useful posts in this thread I finally managed out to built my own menu with multiple application buttons as you can see in picture 1.

    Picture 1:


    I would like to ask you something that I can't find.I would like to add a toolbar like this in orange circle (picture 2) to my custom menu (picture 1).

    Picture 2:

    How can I put something like that?Do you have any similar example in order to find out how can I put it in?

    Thanks for one more time,Best Regards
  •  03-22-2009, 1:08 PM 9168 in reply to 9167

    Re: Menu in multiple applications buttons

    Hello!
    I would like to change the thirteenth example above. It shows a menu - grid with pictures from Windows Media Player. I would like to put my own pictures on that grid. Is there any way I can do this? Any examples? Thank you in advance.

  •  03-23-2009, 12:56 AM 9169 in reply to 9167

    Re: Menu in multiple applications buttons

    BILL007:
    I would like to add a toolbar like this in orange circle (picture 2) to my custom menu (picture 1).

    The toolbar is known as a pivot menu in Media Center.

    You've now come across the biggest issue you'll have to face with Media Center: apart from the gallery views, created using a scroller and a repeater, there are only three other "visual" primitives in Media Center Markup Language (MCML) - these are Text, Graphic, and ColorFill.  You need to create your own pivot menu using those three visuals, plus Panel (a layout container).  The pivot menu is probably one of the more difficult to do - you might want to start out putting together a button control first, and working your way up to a pivot menu once you've got the hang of things.

    Cheers,
    Andrew

Page 1 of 2 (17 items)   1 2 Next >
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems