Пример #1
0
        private async void HandleCapabilitiesChangedAsync(CompositionCapabilities sender, object args)
        {
            _areEffectsSupported = _capabilities.AreEffectsSupported();
            _areEffectsFast      = _capabilities.AreEffectsFast();

            GalleryUI.NotifyCompositionCapabilitiesChanged(_areEffectsSupported, _areEffectsFast);

            SampleDefinitions.RefreshSampleList();


            //
            // Let the user know that the display config has changed and some samples may or may
            // not be available
            //

            if (!_areEffectsSupported || !_areEffectsFast)
            {
                string message;

                if (!_areEffectsSupported)
                {
                    message = "Your display configuration may have changed.  Your current graphics hardware does not support effects.  Some samples will not be available";
                }
                else
                {
                    message = "Your display configuration may have changed. Your current graphics hardware does not support advanced effects.  Some samples will not be available";
                }

                var messageDialog = new MessageDialog(message);
                messageDialog.Commands.Add(new UICommand("Close"));

                // Show the message dialog
                await messageDialog.ShowAsync();
            }
        }
    public void LoadBuildAssetMainMenuData()
    {
        galleryelementlist = new List <GalleryElement> ()
        {
        };
        //galleryelementlist.Clear ();
        for (int i = 0; i < maindatabase.DatabaseMapList.Count; i++)
        {
            currentelementid = i;
            maindatabase.DatabaseMapList [i].RealID = i;
            currentelementname   = maindatabase.DatabaseMapList[i].RealID + " - " + maindatabase.DatabaseMapList [i].Map[0].Name;
            currentelementsprite = Resources.Load <Sprite> ("");

            currentgalleryelement = new GalleryElement(currentelementid, currentelementname, currentelementsprite);
            galleryelementlist.Add(currentgalleryelement);
        }


        List <string> currentoptiontext = new List <string>()
        {
            "Edit Map", "Delete Map", "", "", ""
        };

        gallery = new GalleryUI(0, "Build Map Menu", true, "New Map", 2, currentoptiontext, galleryelementlist);
        menuuimanager.UpdateMenu();
    }
Пример #3
0
        public GideonBase()
        {
            InitializeComponent();
            //  var image = new BitmapImage();

            //   ImageBehavior.SetAnimatedSource(BgImage, (ImageSource) new ImageSourceConverter().ConvertFromString(GideonPath.Background));
            GrammarTableObj = new Hashtable();
            RemainderObj    = new RemainderUI();
            RemainderUI.ReadFromFile();
            GalleryObj = new GalleryUI();
            aobj       = new Alaram();
            try
            {
                EngineObj = new SpeechRecognitionEngine(new System.Globalization.CultureInfo("en-IN"));
                EngineObj.SetInputToDefaultAudioDevice();
                SynObj = new SpeechSynthesizer {
                    Volume = 100
                };
                SynObj.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Teen, 18, System.Globalization.CultureInfo.CurrentUICulture);
                LoadGrammar(Modules.Gideon, Grammars.GideonGrammar);
                LoadGrammar(Modules.PcInfo, Grammars.PcInfoGrammar);
                EngineObj.RecognizeAsync(RecognizeMode.Multiple);
                EngineObj.SpeechRecognized += new EventHandler <SpeechRecognizedEventArgs>(Engine_SpeechRecognized);


                MHObj = new ModulesHandler();
                MHObj.OpenModule(Modules.Remainder);

                dispatcherTimer          = new DispatcherTimer();
                dispatcherTimer.Tick    += new EventHandler(alaramTimer);
                dispatcherTimer.Interval = new TimeSpan(0, 0, 1);


                Timer          = new DispatcherTimer();
                Timer.Tick    += new EventHandler(showTime);
                Timer.Interval = new TimeSpan(0, 0, 1);
                Timer.Start();

                date.Content         = DateTime.Now.Date.ToShortDateString();
                DateTimeGrid.ToolTip = DateTime.Now.ToString("F");
                setBackgrounds();
                WeatherUpdate();
                NewsUpdate();
                SetValues();
                quotes = Motivational_Quotes.FetchQuotes();
                Greet();
            }
            catch (System.Net.WebException)
            {
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }
Пример #4
0
    public void LoadBuildAssetMainMenuData()
    {
        galleryelementlist = new List <GalleryElement> ()
        {
        };
        List <string> currentoptiontext = new List <string>()
        {
            "Build Map", "Build Template", "Map Type", "", ""
        };

        Sprite gallerythumbnail1 = Resources.Load <Sprite> ("");

        currentgalleryelement = new GalleryElement(0, "Map", gallerythumbnail1);
        galleryelementlist.Add(currentgalleryelement);
        //currentgalleryelement = new GalleryElement (1,"game 2",gallerythumbnail2);
        //galleryelementlist.Add (currentgalleryelement);


        buildassetselectgallery = new GalleryUI(0, "Build Asset Menu", false, "New Asset", 3, currentoptiontext, galleryelementlist);
    }
Пример #5
0
    private void LoadSelectGameMenuData()
    {
        galleryelementlist = new List <GalleryElement> ()
        {
        };
        List <string> currentoptiontext = new List <string>()
        {
            "Play Game", "Game Detail", "Build Game", "Duplicate Game", "Delete Game"
        };

        Sprite gallerythumbnail1 = Resources.Load <Sprite> ("Sprites/Game/Thumbnail/placeholder1");
        Sprite gallerythumbnail2 = Resources.Load <Sprite> ("Sprites/Game/Thumbnail/placeholder2");

        currentgalleryelement = new GalleryElement(0, "game 1", gallerythumbnail1);
        galleryelementlist.Add(currentgalleryelement);
        currentgalleryelement = new GalleryElement(1, "game 2", gallerythumbnail2);
        galleryelementlist.Add(currentgalleryelement);


        gameselectmenugallery = new GalleryUI(0, "Game Gallery", true, "New Game", 5, currentoptiontext, galleryelementlist);
    }
Пример #6
0
    private void StartGallery()
    {
        switch (MenuContent)
        {
        case 1:        //select game menu
            currentgallery = selectgamemenumanager.gameselectmenugallery;
            break;

        case 2:        //select build asset menu
            currentgallery = selectbuildassetmenumanager.buildassetselectgallery;
            break;

        case 3:        //select build map menu
            currentgallery = selectbuildmapmenumanager.gallery;
            break;

        default:
            break;
        }
        galleryuimanager.StartGalleryManager(currentgallery);
        galleryuimanager.IsGalleryCreated = true;
    }
Пример #7
0
    public int CurrentElementCount;     //how many elements in total



    public void StartGalleryManager(GalleryUI gallery)
    {
        ParentPanel   = this.transform.parent.gameObject;
        menuuimanager = ParentPanel.GetComponent <MenuUIManager> ();

        GallerySize      = 10;
        CurrentGalleryUI = gallery;

        if (IsGalleryCreated == true)
        {
            UpdateGalleryManager();
        }
        else
        {
            CurrentPage = 1;
            SetOptionButton();
            LoadGalleryData();
            DisableOptionButtonArray();
        }

        /*if (CurrentGalleryUI.ID != -1) {
         *
         * } */
    }