//Show the user the login page
        public void GoToLoginPage()
        {
            Dictionary <string, object> properties = new Dictionary <string, object>();

            properties["Application"] = this;

            if (session != null)
            {
                session.GoToPage("resx://AmazonMCEAddin/AmazonMCEAddin.Resources/Login", properties);
            }
            else
            {
                Debug.WriteLine("GoToLoginPage");
            }
        }
Ejemplo n.º 2
0
        public void GoToMenu()
        {
            Dictionary <string, object> properties = new Dictionary <string, object>();

            properties["Application"] = this;
            //properties.Add("WTVRecordsList", new WTVRecordsList());

            if (session != null)
            {
                session.GoToPage("resx://edleditor/edleditor.Resources/Menu", properties);
            }
            else
            {
                Debug.WriteLine("GoToMenu");
            }
        }
 public void Launch(AddInHost host)
 {
     if (host != null && host.ApplicationContext != null)
     {
         host.ApplicationContext.SingleInstance = true;
     }
     s_session = new HistoryOrientedPageSession();
     s_session.GoToPage("resx://CellarTrackerAddIn2/CellarTrackerAddIn2.Resources.Default");
 }
 public void Launch(AddInHost host)
 {
     if (host != null && host.ApplicationContext != null)
     {
         host.ApplicationContext.SingleInstance = true;
     }
     s_session = new HistoryOrientedPageSession();
     s_session.GoToPage("resx://$projectname$/$safeprojectname$.Resources/Default");
 }
        private void LaunchMoreWithThis(Dictionary <string, object> props, string sample)
        {
            MediaMetadata mediaContext = host.MediaContext;

            try
            {
                foreach (KeyValuePair <string, object> kvp in mediaContext)
                {
                    WriteDebugMessage(String.Format("{0}{1} = {2}", "MediaContext: ", kvp.Key, kvp.Value));
                }
            }
            catch (Exception ex)
            {
                WriteExceptionDebugMessage(ex);
            }

            session.GoToPage(sample, props);
        }
        public void Launch(AddInHost host)
        {
            if (host != null && host.ApplicationContext != null)
            {
                host.ApplicationContext.SingleInstance = true;
            }
            //host.MediaCenterEnvironment.PlayMedia(Microsoft.MediaCenter.MediaType.Datacast,
            s_session = new HistoryOrientedPageSession();
            s_session.GoToPage("resx://CellarTrackerAddIn/CellarTrackerAddIn.Resources/Default");
            XMLData Data = new XMLData();

            Data.Test();
        }
Ejemplo n.º 7
0
        public void Launch(AddInHost host)
        {
            if (host != null && host.ApplicationContext != null)
            {
                host.ApplicationContext.SingleInstance = true;
            }

            s_session = new HistoryOrientedPageSession();
            s_session.GoToPage("resx://CellarTrackerProject/CellarTrackerProject.Resources/CellarMain");

            //CellarTrackerProject.Properties.Settings.Default.Username = "******";
            //CellarTrackerProject.Properties.Settings.Default.Password = "******";
            //CellarTrackerProject.Properties.Settings.Default.Save();
        }
Ejemplo n.º 8
0
        public void GoToMenu()
        {
            Dictionary <string, object> properties = new Dictionary <string, object>();

            properties["Application"] = this;

            if (session != null)
            {
                session.GoToPage("resx://$projectname$/$safeprojectname$.Resources/Menu", properties);
            }
            else
            {
                Debug.WriteLine("GoToMenu");
            }
        }
Ejemplo n.º 9
0
        public void GoToMenu()
        {
            Dictionary <string, object> properties = new Dictionary <string, object>();

            properties["Application"] = this;

            if (session != null)
            {
                session.GoToPage("resx://MediaCenterLightApp/MediaCenterLightApp.Resources/Menu", properties);
            }
            else
            {
                Debug.WriteLine("GoToMenu");
            }
        }
Ejemplo n.º 10
0
        public void Start()
        {
            Dictionary <string, object> properties = new Dictionary <string, object>();

            properties["Application"] = this;

            if (session != null)
            {
                session.GoToPage("resx://EyeCandy/EyeCandy.Resources/Default", properties);
                MediaCenterEnvironment.PlayMedia(MediaType.Video, @"http://jolt-media/scratch2/charlieo/Phelps400mIndividualMedley.wmv", false);
            }
            else
            {
                Debug.WriteLine("GoToMenu");
            }
        }
Ejemplo n.º 11
0
        public void GoToMenu()
        {
            var properties = GetDefaultViewProperties();

            if (session != null)
            {
                session.GoToPage("resx://PlexWMC/PlexWMC.Resources/Menu", properties);
            }
            else
            {
                Debug.WriteLine("GoToMenu");
            }
        }
Ejemplo n.º 12
0
        public void Launch(AddInHost host)
        {
            WriteDebugMessage("Launch");

            this.host = host;

            if (host != null && host.ApplicationContext != null)
            {
                WriteDebugMessage("Set SingleInstance = True");
                host.ApplicationContext.SingleInstance = true;
            }

            // List out the capabilities to the debug window.

            Dictionary <string, object> capabilities = host.MediaCenterEnvironment.Capabilities;

            try
            {
                foreach (KeyValuePair <string, object> kvp in capabilities)
                {
                    WriteDebugMessage(String.Format("{0}{1} = {2}", "Capability: ", kvp.Key, kvp.Value));
                }
            }
            catch (Exception ex)
            {
                WriteExceptionDebugMessage(ex);
            }

            session = new HistoryOrientedPageSession();

            Categories = new ArrayListDataSet();

            Samples = new ArrayListDataSet();

            publicDocumentsPath = GetPath(KnownFolder.PublicDocuments);

            SetInstallationFolder();

            SetPaths();

            SetLocalContent();

            SetDataFile();

            LoadDataAndCategories();

            Dictionary <string, object> props = new Dictionary <string, object>();

            props.Add("Session", session);
            props.Add("Categories", Categories);
            props.Add("Sampler", this);

            automationfile = publicDocumentsPath + @"\" + samplerAutomationFile;

            KeepCurrentOnBackstack = true;

            // Look to see if we have a file which tells us to load a specific example.
            // If so, go there.

            switch (id)
            {
            case "{7f1e2adf-5006-44fb-8f3d-095e635ab443}":
                // Launched from Extras Library (More Programs)
                WriteDebugMessage("Launched from Extras Library");
                if (NavigateFromAutomationFile())
                {
                    break;
                }
                // Else failed to navigate to sample, so fall through for default navigate

                // Go to the default page for the application.
                session.GoToPage("resx://Sampler/Sampler.Resources/Default", props);
                WriteDebugMessage("GoToDefaultPage");
                break;

            case "{7b42c522-ac1e-4eff-b60b-0e01208551cc}":
                WriteDebugMessage("Launched from More With This.Audio.Album");
                LaunchMoreWithThis(props, "resx://Sampler/Sampler.Resources/ObjectModelMediaCenterAddInHostMediaContextAlbum");
                break;

            case "{5f51f6cd-7bd9-48d2-a016-c8dd7b1e82c3}":
                WriteDebugMessage("Launched from More With This.Audio.Artist");
                LaunchMoreWithThis(props, "resx://Sampler/Sampler.Resources/ObjectModelMediaCenterAddInHostMediaContextArtist");
                break;

            case "{084c6878-b10b-4453-a707-8025fc2cad77}":
                WriteDebugMessage("Launched from More With This.Audio.Genre");
                LaunchMoreWithThis(props, "resx://Sampler/Sampler.Resources/ObjectModelMediaCenterAddInHostMediaContextGenre");
                break;

            case "{e90d1b82-2d5d-4916-8022-52b5c994aa1b}":
                WriteDebugMessage("Launched from More With This.Audio.Playlist");
                LaunchMoreWithThis(props, "resx://Sampler/Sampler.Resources/ObjectModelMediaCenterAddInHostMediaContextPlaylist");
                break;

            case "{f06c05c0-7f5a-471a-8560-a35fa243b72e}":
                WriteDebugMessage("Launched from More With This.Audio.Song");
                LaunchMoreWithThis(props, "resx://Sampler/Sampler.Resources/ObjectModelMediaCenterAddInHostMediaContextSong");
                break;

            case "{37cc3cf8-c2b9-4da0-aa95-2aac0f37d393}":
                WriteDebugMessage("Launched from More With This.Picture");
                LaunchMoreWithThis(props, "resx://Sampler/Sampler.Resources/ObjectModelMediaCenterAddInHostMediaContextPicture");
                break;

            case "{9608152f-4996-4928-9a34-8115d893971e}":
                WriteDebugMessage("Launched from More With This.Video");
                LaunchMoreWithThis(props, "resx://Sampler/Sampler.Resources/ObjectModelMediaCenterAddInHostMediaContextVideo");
                break;

            case "{fb69d092-51c7-4a6d-8f87-5b12d1d88c42}":
                WriteDebugMessage("Launched from More With This.DVD");
                LaunchMoreWithThis(props, "resx://Sampler/Sampler.Resources/ObjectModelMediaCenterAddInHostMediaContextDVD");
                break;

            case "{33c6fd2f-a538-4604-8242-ce57e6724427}":
                WriteDebugMessage("Launched from More With This.TV");
                LaunchMoreWithThis(props, "resx://Sampler/Sampler.Resources/ObjectModelMediaCenterAddInHostMediaContextTV");
                break;
            }

            SetupWatcher();

            WriteDebugMessage("Launch Complete");
        }
Ejemplo n.º 13
0
        private void StartPlaylist()
        {
            Debug.WriteLine("StartPlaylist");
            int    rowid = 0;
            string contentpath;
            string slideshowpath;
            string visualizationpath;

            Debug.WriteLine("Evaluating EntrypointID");
            switch (id)
            {
            // Even though the registration GUIDs have ALL CAPS
            // they are written to the registry with lower case.
            // These should match exactly what is shown in the
            // registry instead of the registration file.
            case "{30f10141-61f8-45b1-b369-1b508d080bd7}":
                session = new HistoryOrientedPageSession();
                session.GoToPage("resx://PowerPlaylist/PowerPlaylist.Resources/Default");
                break;

            case "{dfd75e76-7530-4d0d-a126-71863200a556}":
                rowid = 1;
                break;

            case "{b9b49dbf-fb85-4a80-beb7-5732c4ba849e}":
                rowid = 2;
                break;

            case "{4a03b055-eea0-466f-b4fd-ae72d41fdb02}":
                rowid = 3;
                break;

            case "{f8216194-c5c8-4fc8-98b8-b33ef15b36aa}":
                rowid = 4;
                break;

            case "{9580a0b8-f06f-4422-94d2-4aae0a26b3b3}":
                rowid = 5;
                break;
            }

            if (rowid <= 5 && rowid >= 1)
            {
                Debug.WriteLine("Getting data from dataset.");
                try
                {
                    DataRow dataRow = GetSingleDataRow(dataSet.Tables["Table"], "ID=" + rowid.ToString());

                    contentpath = (null == dataRow[(int)DataColumnPath.ContentPath]) ? null : dataRow[(int)DataColumnPath.ContentPath].ToString();

                    slideshowpath = (null == dataRow[(int)DataColumnPath.SlideshowPath]) ? null : dataRow[(int)DataColumnPath.SlideshowPath].ToString();

                    visualizationpath = (null == dataRow[(int)DataColumnPath.VisualizationPath]) ? null : dataRow[(int)DataColumnPath.VisualizationPath].ToString();
                }

                catch (System.Exception e)
                {
                    MessageBox("PowerPlaylist had a problem reading the data file and can't continue. Exception: " + e.Message.ToString());
                    return;
                }

                if (!string.IsNullOrEmpty(contentpath))
                {
                    Debug.WriteLine(contentpath);
                    PlayContent(contentpath);
                }

                if (string.IsNullOrEmpty(visualizationpath) && string.IsNullOrEmpty(slideshowpath))
                {
                    // The user has specified only audio content.
                    // Thus we will navgate to the full screen experience.

                    GoFullscreen();
                    return;
                }

                // If the user specifies both visualization and
                // slideshow paths the slideshow will win.

                if (!string.IsNullOrEmpty(slideshowpath))
                {
                    Debug.WriteLine(slideshowpath);
                    StartSlideshow(slideshowpath);
                }

                else
                {
                    if (!string.IsNullOrEmpty(visualizationpath))
                    {
                        Debug.WriteLine(visualizationpath);
                        StartVisualization(visualizationpath);
                    }
                }
            }
        }
Ejemplo n.º 14
0
 public void Launch(AddInHost host)
 {
     s_session = new HistoryOrientedPageSession();
     s_session.GoToPage("resx://MCRadio/MCRadio.Resources/Default");
 }