コード例 #1
0
 public TestServices With(
     IAssetLoader assetLoader                      = null,
     IFocusManager focusManager                    = null,
     IInputManager inputManager                    = null,
     Func <IKeyboardDevice> keyboardDevice         = null,
     IKeyboardNavigationHandler keyboardNavigation = null,
     ILayoutManager layoutManager                  = null,
     Func <IMouseDevice> mouseDevice               = null,
     IRuntimePlatform platform                     = null,
     IPlatformRenderInterface renderInterface      = null,
     IRenderLoop renderLoop = null,
     IScheduler scheduler   = null,
     ICursorFactory standardCursorFactory = null,
     IStyler styler      = null,
     Func <Styles> theme = null,
     IPlatformThreadingInterface threadingInterface = null,
     IWindowImpl windowImpl = null,
     IWindowingPlatform windowingPlatform = null,
     PlatformHotkeyConfiguration platformHotkeyConfiguration = null,
     IFontManagerImpl fontManagerImpl     = null,
     IFormattedTextImpl formattedTextImpl = null)
 {
     return(new TestServices(
                assetLoader: assetLoader ?? AssetLoader,
                focusManager: focusManager ?? FocusManager,
                inputManager: inputManager ?? InputManager,
                keyboardDevice: keyboardDevice ?? KeyboardDevice,
                keyboardNavigation: keyboardNavigation ?? KeyboardNavigation,
                layoutManager: layoutManager ?? LayoutManager,
                mouseDevice: mouseDevice ?? MouseDevice,
                platform: platform ?? Platform,
                renderInterface: renderInterface ?? RenderInterface,
                scheduler: scheduler ?? Scheduler,
                standardCursorFactory: standardCursorFactory ?? StandardCursorFactory,
                styler: styler ?? Styler,
                theme: theme ?? Theme,
                threadingInterface: threadingInterface ?? ThreadingInterface,
                windowingPlatform: windowingPlatform ?? WindowingPlatform,
                windowImpl: windowImpl ?? WindowImpl,
                platformHotkeyConfiguration: platformHotkeyConfiguration ?? PlatformHotkeyConfiguration,
                fontManagerImpl: fontManagerImpl ?? FontManagerImpl,
                formattedTextImpl: formattedTextImpl ?? FormattedTextImpl));
 }
コード例 #2
0
 public TestServices(
     IAssetLoader assetLoader                      = null,
     IFocusManager focusManager                    = null,
     IInputManager inputManager                    = null,
     Func <IKeyboardDevice> keyboardDevice         = null,
     IKeyboardNavigationHandler keyboardNavigation = null,
     ILayoutManager layoutManager                  = null,
     Func <IMouseDevice> mouseDevice               = null,
     IRuntimePlatform platform                     = null,
     IPlatformRenderInterface renderInterface      = null,
     IRenderLoop renderLoop = null,
     IScheduler scheduler   = null,
     ICursorFactory standardCursorFactory = null,
     IStyler styler      = null,
     Func <Styles> theme = null,
     IPlatformThreadingInterface threadingInterface = null,
     IWindowImpl windowImpl = null,
     IWindowingPlatform windowingPlatform = null,
     PlatformHotkeyConfiguration platformHotkeyConfiguration = null,
     IFontManagerImpl fontManagerImpl     = null,
     IFormattedTextImpl formattedTextImpl = null)
 {
     AssetLoader           = assetLoader;
     FocusManager          = focusManager;
     InputManager          = inputManager;
     KeyboardDevice        = keyboardDevice;
     KeyboardNavigation    = keyboardNavigation;
     LayoutManager         = layoutManager;
     MouseDevice           = mouseDevice;
     Platform              = platform;
     RenderInterface       = renderInterface;
     Scheduler             = scheduler;
     StandardCursorFactory = standardCursorFactory;
     Styler                      = styler;
     Theme                       = theme;
     ThreadingInterface          = threadingInterface;
     WindowImpl                  = windowImpl;
     WindowingPlatform           = windowingPlatform;
     PlatformHotkeyConfiguration = platformHotkeyConfiguration;
     FontManagerImpl             = fontManagerImpl;
     FormattedTextImpl           = formattedTextImpl;
 }
コード例 #3
0
        private void InitializeComponent()
        {
            AvaloniaXamlLoader.Load(this);

            _keyMap    = AvaloniaLocator.Current.GetService <PlatformHotkeyConfiguration>();
            _clipboard = AvaloniaLocator.Current.GetService <IClipboard>();
            _textBoxes = new[]
            {
                this.FindControl <TextBox>("one"),
                this.FindControl <TextBox>("two"),
                this.FindControl <TextBox>("three"),
                this.FindControl <TextBox>("four"),
                this.FindControl <TextBox>("five"),
                this.FindControl <TextBox>("six"),
            };

            foreach (TextBox textBox in _textBoxes)
            {
                SetUpTextBox(textBox);
            }
        }