Example #1
0
        public static RadialControllerConfiguration Initialize(IntPtr hWnd)
        {
            IRadialControllerConfigurationInterop radialControllerConfigInterop = (IRadialControllerConfigurationInterop)InteropHelper.GetActivationFactory <IRadialControllerInterop>(typeof(RadialControllerConfiguration));
            Guid guid = typeof(RadialControllerConfiguration).GUID;

            return(radialControllerConfigInterop.GetForWindow(hWnd, ref guid));
        }
        public static RadialControllerConfiguration Initialize(IntPtr hWnd)
        {
            IRadialControllerConfigurationInterop radialControllerConfigInterop = (IRadialControllerConfigurationInterop)WindowsRuntimeMarshal.GetActivationFactory(typeof(RadialControllerConfiguration));
            Guid guid = typeof(RadialControllerConfiguration).GUID;

            return(radialControllerConfigInterop.GetForWindow(hWnd, ref guid));
        }
Example #3
0
        private RadialControllerConfiguration GetConfig()
        {
            RadialControllerConfiguration         radialControllerConfig;
            IRadialControllerConfigurationInterop radialControllerConfigInterop = (IRadialControllerConfigurationInterop)System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal.GetActivationFactory(typeof(RadialControllerConfiguration));
            Guid guid = typeof(RadialControllerConfiguration).GetInterface("IRadialControllerConfiguration").GUID;

            radialControllerConfig = radialControllerConfigInterop.GetForWindow(this.windowHandle, ref guid);
            return(radialControllerConfig);
        }
Example #4
0
        private void MenuSuppressionCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            RadialControllerConfiguration         radialControllerConfig;
            IRadialControllerConfigurationInterop radialControllerConfigInterop = (IRadialControllerConfigurationInterop)System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal.GetActivationFactory(typeof(RadialControllerConfiguration));
            Guid guid = typeof(RadialControllerConfiguration).GetInterface("IRadialControllerConfiguration").GUID;

            radialControllerConfig = radialControllerConfigInterop.GetForWindow(this.Handle, ref guid);
            radialControllerConfig.ActiveControllerWhenMenuIsSuppressed = radialController;
            radialControllerConfig.IsMenuSuppressed = MenuSuppressionCheckBox.Checked;
        }
Example #5
0
        private void SetDefaultItems()
        {
            RadialControllerConfiguration         radialControllerConfig;
            IRadialControllerConfigurationInterop radialControllerConfigInterop = (IRadialControllerConfigurationInterop)System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal.GetActivationFactory(typeof(RadialControllerConfiguration));
            Guid guid = typeof(RadialControllerConfiguration).GetInterface("IRadialControllerConfiguration").GUID;

            radialControllerConfig = radialControllerConfigInterop.GetForWindow(this.Handle, ref guid);
            radialControllerConfig.SetDefaultMenuItems(new[] { RadialControllerSystemMenuItemKind.Volume, RadialControllerSystemMenuItemKind.Scroll });
            radialControllerConfig.TrySelectDefaultMenuItem(RadialControllerSystemMenuItemKind.Scroll);
        }