예제 #1
0
 private void lnkSpanish_Click(object sender, RoutedEventArgs e)
 {
     Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("es");
     Helpers.ResourceWrapper res = this.localizationProxy.DataContext as Helpers.ResourceWrapper;
     res.UpdateBinding();
     ContentFrame.Refresh();
 }
예제 #2
0
        public void RefreshContent()
        {
            RefreshGamesList();

            if (ContentFrame.CurrentSourcePageType == typeof(HomePage))
            {
                (ContentFrame.Content as HomePage).Refresh();
            }
            else if (ContentFrame.CurrentSourcePageType == typeof(GameDetails))
            {
                (ContentFrame.Content as GameDetails).Refresh();
            }

            ContentFrame.Refresh();
        }
        private void GraphicsSettingsButton_OnClick(object sender, RoutedEventArgs e)
        {
            // Show DXEngineSettingsWindow where user can change graphics adapter and quality settings
            // DXEngineSettingsWindow is defined in Ab3d.DirectX.Client.Settings project that is available with full source code
            var dxEngineSettingsWindow = new DXEngineSettingsWindow();

            dxEngineSettingsWindow.Owner = this;

            if (DXEngineSettings.Current.GraphicsProfiles != null && DXEngineSettings.Current.GraphicsProfiles.Length > 0)
            {
                dxEngineSettingsWindow.SelectedGraphicsProfile = DXEngineSettings.Current.GraphicsProfiles[0];
            }
            else
            {
                dxEngineSettingsWindow.SelectedGraphicsProfile = null;
            }

            dxEngineSettingsWindow.SelectedDpiScale = _selectedDpiScale;

            dxEngineSettingsWindow.SelectedMaxBackgroundThreadsCount = MaxBackgroundThreadsCount;

            dxEngineSettingsWindow.ShowDialog();


            GraphicsProfile selectedGraphicsProfile = dxEngineSettingsWindow.SelectedGraphicsProfile;

            ShowGraphicsProfile(selectedGraphicsProfile, dxViewportView: null);

            // Save the selected GraphicsProfile to application settings
            DXEngineSettings.Current.SaveGraphicsProfile(selectedGraphicsProfile);

            _selectedDpiScale         = dxEngineSettingsWindow.SelectedDpiScale;
            MaxBackgroundThreadsCount = dxEngineSettingsWindow.SelectedMaxBackgroundThreadsCount;


            // Now create an array of GraphicsProfile from selectedGraphicsProfiles
            // If selectedGraphicsProfiles is hardware GraphicProfile, than we will also add software and WPF 3D rendering as fallback to the array
            DXEngineSettings.Current.GraphicsProfiles = DXEngineSettings.Current.SystemCapabilities.CreateArrayOfRecommendedGraphicsProfiles(selectedGraphicsProfile);

            if (ContentFrame.Content != null)
            {
                ContentFrame.Refresh(); // This will reload the current sample with the new graphics settings
            }
        }
예제 #4
0
 public void Refresh()
 {
     ContentFrame.Refresh();
 }