예제 #1
0
        private void CheckFirstRun(AddInHost host)
        {
            if (Properties.Settings.Default.ShowFirstRunPrompt == true)
            {
                List <string> buttons = new List <string>();
                buttons.Add("Configure OML");
                buttons.Add("No Thanks");
                Microsoft.MediaCenter.MediaCenterEnvironment env = host.MediaCenterEnvironment;
                string dialogText = "Would you like to configure Open Media Library now? To run this wizard later you can access OML from the program library.";
                Microsoft.MediaCenter.DialogResult res = env.Dialog(dialogText, "OPEN MEDIA LIBRARY", buttons, -1, true, null, delegate(Microsoft.MediaCenter.DialogResult dialogResult) { });
                if ((int)res == 100)
                {
                    //tmp until firstrun page
                    Properties.Settings.Default.ShowFirstRunPrompt = false;
                    Properties.Settings.Default.Save();

                    //run setup
                    s_session = new Library.Code.V3.HistoryOrientedPageSessionEx();
                    GoToLoader();
                    Microsoft.MediaCenter.UI.Application.DeferredInvoke(new Microsoft.MediaCenter.UI.DeferredHandler(this.BeginStart), (object)host, new TimeSpan(1));
                }
                else
                {
                    Properties.Settings.Default.ShowFirstRunPrompt = false;
                    Properties.Settings.Default.Save();
                    //env.Dialog("You can access OML from the program library.", "OPEN MEDIA LIBRARY", Microsoft.MediaCenter.DialogButtons.Ok, -1, true);
                }
            }
        }
예제 #2
0
        public void Launch(AddInHost host)
        {
            //set our location to the programdata dir - if we don't theme support breaks!
            Environment.CurrentDirectory = OMLEngine.FileSystemWalker.PublicRootDirectory;
            //need to start checking ehres themes on startup!
            ThemeManager.CreateThemeFiles();

            //_id = "FirstRun";
            if (_id == "FirstRun")
            {
                //generate our themes - this happens every time mc starts
                //ThemeManager.CreateThemeFiles();
                CheckFirstRun(host);
            }
            else
            {
                s_session = new Library.Code.V3.HistoryOrientedPageSessionEx();
                GoToLoader();
                Microsoft.MediaCenter.UI.Application.DeferredInvoke(new Microsoft.MediaCenter.UI.DeferredHandler(this.BeginStart), (object)host, new TimeSpan(1));
            }
        }
예제 #3
0
        public void Launch(AddInHost host)
        {
            //set our location to the programdata dir - if we don't theme support breaks!
            Environment.CurrentDirectory = OMLEngine.FileSystemWalker.PublicRootDirectory;
            //need to start checking ehres themes on startup!
            ThemeManager.CreateThemeFiles();

            //_id = "FirstRun";
            if (_id == "FirstRun")
            {
                //generate our themes - this happens every time mc starts
                //ThemeManager.CreateThemeFiles();
                CheckFirstRun(host);
            }
            else
            {
                s_session = new Library.Code.V3.HistoryOrientedPageSessionEx();
                GoToLoader();
                Microsoft.MediaCenter.UI.Application.DeferredInvoke(new Microsoft.MediaCenter.UI.DeferredHandler(this.BeginStart), (object)host, new TimeSpan(1));
            }
        }
예제 #4
0
        private void CheckFirstRun(AddInHost host)
        {
            if (Properties.Settings.Default.ShowFirstRunPrompt == true)
            {
                List<string> buttons = new List<string>();
                buttons.Add("Configure OML");
                buttons.Add("No Thanks");
                Microsoft.MediaCenter.MediaCenterEnvironment env = host.MediaCenterEnvironment;
                string dialogText = "Would you like to configure Open Media Library now? To run this wizard later you can access OML from the program library.";
                Microsoft.MediaCenter.DialogResult res = env.Dialog(dialogText, "OPEN MEDIA LIBRARY", buttons, -1, true, null, delegate(Microsoft.MediaCenter.DialogResult dialogResult) { });
                if ((int)res == 100)
                {
                    //tmp until firstrun page
                    Properties.Settings.Default.ShowFirstRunPrompt = false;
                    Properties.Settings.Default.Save();

                    //run setup
                    s_session = new Library.Code.V3.HistoryOrientedPageSessionEx();
                    GoToLoader();
                    Microsoft.MediaCenter.UI.Application.DeferredInvoke(new Microsoft.MediaCenter.UI.DeferredHandler(this.BeginStart), (object)host, new TimeSpan(1));
                }
                else
                {
                    Properties.Settings.Default.ShowFirstRunPrompt = false;
                    Properties.Settings.Default.Save();
                    //env.Dialog("You can access OML from the program library.", "OPEN MEDIA LIBRARY", Microsoft.MediaCenter.DialogButtons.Ok, -1, true);
                }

            }
        }