当前位置: 首页>>代码示例>>C#>>正文


C# IScreenManager类代码示例

本文整理汇总了C#中IScreenManager的典型用法代码示例。如果您正苦于以下问题:C# IScreenManager类的具体用法?C# IScreenManager怎么用?C# IScreenManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IScreenManager类属于命名空间,在下文中一共展示了IScreenManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TextButton

 /// <summary>
 /// Initialisiert einen Standard-Button mit Text-Inhalt
 /// </summary>
 /// <param name="text">Enthaltener Text</param>
 /// <returns>Button-Instanz</returns>
 public static Button TextButton(IScreenManager manager, string text, string style = "")
 {
     return new Button(manager, style)
     {
         Content = new Label(manager) { Text = text }
     };
 }
开发者ID:punker76,项目名称:monogameui,代码行数:12,代码来源:Button.cs

示例2: Grid

 public Grid(IScreenManager manager, string style = "")
     : base(manager, style)
 {
     Columns = new List<ColumnDefinition>();
     Rows = new List<RowDefinition>();
     ApplySkin(typeof(Grid));
 }
开发者ID:punker76,项目名称:monogameui,代码行数:7,代码来源:Grid.cs

示例3: MouseCaptureScreen

        public MouseCaptureScreen(IScreenManager manager)
            : base(manager)
        {
            DefaultMouseMode = MouseMode.Captured;

            Background = new BorderBrush(Color.Green);

            StackPanel stack = new StackPanel(manager);
            Controls.Add(stack);

            Label title = new Label(manager)
            {
                TextColor = Color.White,
                Text = "Press ESC to return to Main Screen",
            };

            output = new Label(manager)
            {
                TextColor = Color.White,
                Text = position.ToString(),
            };

            stack.Controls.Add(title);
            stack.Controls.Add(output);
        }
开发者ID:CsharpLassi,项目名称:monogameui,代码行数:25,代码来源:MouseCaptureScreen.cs

示例4: TabControl

        /// <summary>
        /// Base Constructor
        /// </summary>
        /// <param name="manager">ScreenManager</param>
        public TabControl(IScreenManager manager)
            : base(manager)
        {
            Manager = manager;

            Pages = new ItemCollection<TabPage>();
            Pages.OnInsert += OnInsert;
            Pages.OnRemove += OnRemove;

            tabControlStack = new StackPanel(manager);
            tabControlStack.HorizontalAlignment = HorizontalAlignment.Stretch;
            tabControlStack.VerticalAlignment = VerticalAlignment.Stretch;
            Content = tabControlStack;

            tabListStack = new StackPanel(manager);
            tabListStack.HorizontalAlignment = HorizontalAlignment.Stretch;
            tabListStack.Orientation = Orientation.Horizontal;
            tabListStack.Background = TabListBackground;
            tabControlStack.Controls.Add(tabListStack);

            tabPage = new ContentControl(manager);
            tabPage.HorizontalAlignment = HorizontalAlignment.Stretch;
            tabPage.VerticalAlignment = VerticalAlignment.Stretch;
            tabPage.Margin = new Border(0, 10, 0, 10);
            tabPage.Background = TabPageBackground;
            tabControlStack.Controls.Add(tabPage);
            tabPage.Margin = new Border(0, -50, 0, 0);

            ApplySkin(typeof(TabControl));
        }
开发者ID:CsharpLassi,项目名称:monogameui,代码行数:34,代码来源:TabControl.cs

示例5: SoundScreen

        /// <summary>
        /// Initializes a new instance of the <see cref="SoundScreen"/> class.
        /// </summary>
        /// <param name="graphicsManager">The graphics manager.</param>
        /// <param name="screenManager">The screen manager.</param>
        public SoundScreen(IBallerburgGraphicsManager graphicsManager, IScreenManager screenManager)
            : base(graphicsManager, screenManager, "Ballerburg3D")
        {
            // Zurück button
              zurueckMenuEntry = new MenuEntry(this, ResourceLoader.GetString("BackText"), 0) { Position = new Vector2(500, 450) };
              zurueckMenuEntry.Selected += ZurueckMenuEntrySelected;

              musicVolumeSlider = new HSlider(this, new Rectangle(250, 100, 300, 20), screenManager.ApplicationSettings.MusicVolume);
              musicVolumeSlider.ValueChanged += OnMusicVolumeChanged;
              soundFxVolumeSlider = new HSlider(this, new Rectangle(250, 200, 300, 20), screenManager.ApplicationSettings.FxVolume);
              menuEffectsVolumeSlider = new HSlider(this, new Rectangle(250, 300, 300, 20), screenManager.ApplicationSettings.MenuEffectsVolume);

              var musicList = new List<string> { "DarkStar", "High Tension", "Tentacle", "Death Row", "Boomerang", "Aus" };

              musicSelectButton = new ComboToggleButton(this, "Musik", new Collection<string>(musicList), 0, 0) { Position = new Vector2(20, 100) };
              musicSelectButton.Selected += OnMusicButtonSelected;

              toggleMenuEffectsActionButton = new OnOffToggleButton(this, "Menueeffekte", true, 0) { Position = new Vector2(20, 200) };

              toggleSoundEffectsActionButton = new OnOffToggleButton(this, "Soundeffekte", true, 0) { Position = new Vector2(20, 300) };

              ControlsContainer.Add(zurueckMenuEntry);
              ControlsContainer.Add(musicVolumeSlider);
              ControlsContainer.Add(soundFxVolumeSlider);
              ControlsContainer.Add(menuEffectsVolumeSlider);
              ControlsContainer.Add(musicSelectButton);
              ControlsContainer.Add(toggleMenuEffectsActionButton);
              ControlsContainer.Add(toggleSoundEffectsActionButton);
        }
开发者ID:urmuelle,项目名称:MonoGameBallerburg,代码行数:34,代码来源:SoundScreen.cs

示例6: PreferencesViewModel

        public PreferencesViewModel(ISettingsProvider settingsProvider, IScreenManager screenManager)
        {
            this.settingsProvider = settingsProvider;
            
            Screens = new ObservableCollection<DetailedScreen>(screenManager.GetScreens());

            Settings = settingsProvider.GetSettings<PopupSettings>();

            PlaceScreen();

            AvailableColors = new ObservableCollection<AvailableColor>();
            var properties = typeof(Colors).GetProperties(BindingFlags.Static | BindingFlags.Public);
            foreach (var prop in properties)
            {
                var name = prop.Name;
                var value = (Color)prop.GetValue(null, null);

                var availableColor = new AvailableColor(name, value);
                if (Settings.FontColor == name)
                    FontColor = availableColor;
                if (Settings.ItemBackgroundColor == name)
                    ItemBackgroundColor = availableColor;

                AvailableColors.Add(availableColor);
            }

            SaveCommand = new DelegateCommand(SaveSettings);
            ResetToDefaultsCommand = new DelegateCommand(() => settingsProvider.ResetToDefaults<PopupSettings>());
            VisitCommand = new DelegateCommand(Visit);
        }
开发者ID:bihai,项目名称:carnac,代码行数:30,代码来源:PreferencesViewModel.cs

示例7: InjectionInitialize

 private void InjectionInitialize(
     IScreenManager screenManager,
     IEventManager eventManager)
 {
     this.screenManager = screenManager;
     this.eventManager = eventManager;
 }
开发者ID:JonJam,项目名称:marveluniverse,代码行数:7,代码来源:ExplorerPanel.cs

示例8: StartScreen

        public StartScreen(IScreenManager manager)
            : base(manager)
        {
            Background = new BorderBrush(Color.DarkRed);

            StackPanel stack = new StackPanel(manager);
            Controls.Add(stack);

            // Button zur Controls Demo
            Button controlScreenButton = Button.TextButton(manager, "Controls", "special");          //Button mit speziellen Style erstellen
            controlScreenButton.LeftMouseClick += (s, e) =>                                      //Click Event festlegen
            {
                manager.NavigateToScreen(new SplitScreen(manager));                     //Screen wechseln
            };
            stack.Controls.Add(controlScreenButton);                                                   //Button zu Root hinzufügen

            // Button zur Mouse Capture Demo
            Button capturedMouseButton = Button.TextButton(manager, "Captured Mouse", "special");
            capturedMouseButton.LeftMouseClick += (s, e) => manager.NavigateToScreen(new MouseCaptureScreen(manager));
            stack.Controls.Add(capturedMouseButton);

            Button tabDemoScreen = Button.TextButton(manager, "Tab Demo", "special");
            tabDemoScreen.LeftMouseClick += (s, e) => manager.NavigateToScreen(new TabScreen(manager));
            stack.Controls.Add(tabDemoScreen);
        }
开发者ID:CsharpLassi,项目名称:monogameui,代码行数:25,代码来源:StartScreen.cs

示例9: Checkbox

 public Checkbox(IScreenManager manager)
     : base(manager)
 {
     CanFocus = true;
     TabStop = true;
     ApplySkin(typeof(Checkbox));
 }
开发者ID:CsharpLassi,项目名称:monogameui,代码行数:7,代码来源:Checkbox.cs

示例10: Splitter

        public Splitter(IScreenManager manager, string style = "")
            : base(manager, style)
        {
            CanFocus = true;
            TabStop = true;

            ApplySkin(typeof(Splitter));
        }
开发者ID:punker76,项目名称:monogameui,代码行数:8,代码来源:Splitter.cs

示例11: Button

        public Button(IScreenManager manager, string style = "")
            : base(manager, style)
        {
            TabStop = true;
            CanFocus = true;

            ApplySkin(typeof(Button));
        }
开发者ID:punker76,项目名称:monogameui,代码行数:8,代码来源:Button.cs

示例12: KeyMapper

            public KeyMapper(IScreenManager manager)
            {
                manager.KeyDown += KeyDown;
                manager.KeyUp += KeyUp;
                manager.KeyPress += KeyPressed;

                bindings = new Dictionary<string, Binding>();
            }
开发者ID:ManuelHu,项目名称:octoawesome,代码行数:8,代码来源:KeyMapper.cs

示例13: MenuScreen

 /// <summary>
 /// Initializes a new instance of the <see cref="MenuScreen"/> class.
 /// </summary>
 /// <param name="graphicsManager">The graphics manager.</param>
 /// <param name="screenManager">The screen manager.</param>
 /// <param name="menuTitle">The menu title.</param>
 protected MenuScreen(IBallerburgGraphicsManager graphicsManager, IScreenManager screenManager, string menuTitle)
     : base(graphicsManager)
 {
     this.menuTitle = menuTitle;
       this.screenManager = screenManager;
       TransitionOnTime = TimeSpan.FromSeconds(0);
       TransitionOffTime = TimeSpan.FromSeconds(0);
 }
开发者ID:urmuelle,项目名称:MonoGameBallerburg,代码行数:14,代码来源:MenuScreen.cs

示例14: GraphikScreen

 /// <summary>
 /// Initializes a new instance of the <see cref="GraphikScreen"/> class.
 /// </summary>
 /// <param name="graphicsManager">The graphics manager.</param>
 /// <param name="screenManager">The screen manager.</param>
 public GraphikScreen(IBallerburgGraphicsManager graphicsManager, IScreenManager screenManager)
     : base(graphicsManager, screenManager, "Ballerburg3D")
 {
     // Zurück button
       zurueckMenuEntry = new MenuEntry(this, ResourceLoader.GetString("BackText"), 0) { Position = new Vector2(500, 450) };
       zurueckMenuEntry.Selected += ZurueckMenuEntrySelected;
       ControlsContainer.Add(zurueckMenuEntry);
 }
开发者ID:urmuelle,项目名称:MonoGameBallerburg,代码行数:13,代码来源:GraphikScreen.cs

示例15: Textbox

        public Textbox(IScreenManager manager, string style = "")
            : base(manager, style)
        {
            TextColor = Color.Black;
            TabStop = true;
            CanFocus = true;
            Padding = Border.All(5);

            ApplySkin(typeof(Textbox));
        }
开发者ID:punker76,项目名称:monogameui,代码行数:10,代码来源:Textbox.cs


注:本文中的IScreenManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。