コード例 #1
0
        private void HWindowTool_Smart_MouseWheel(object sender, MouseEventArgs e)
        {
            Point          pt   = SmartWindow.Location;
            MouseEventArgs newe = new MouseEventArgs(e.Button, e.Clicks, e.X - pt.X, e.Y - pt.Y, e.Delta);

            SmartWindow.HSmartWindowControl_MouseWheel(sender, newe);
        }
コード例 #2
0
    public static SmartWindow GetWindowFor(IWindowFactory factory, IWindow viewModel = null,
                                           bool createNewIfMultipleAllowed           = true)
    {
        SmartWindow drawer = null;

        if (factory.Multiple && createNewIfMultipleAllowed)
        {
        }
        else if (factory.Multiple && !createNewIfMultipleAllowed)
        {
            drawer = GetByFactoryId(factory.Identifier).FirstOrDefault() as SmartWindow;
        }
        else if (!factory.Multiple)
        {
            drawer = GetByFactoryId(factory.Identifier).FirstOrDefault() as SmartWindow;
        }

        if (drawer == null)
        {
            drawer = ScriptableObject.CreateInstance <SmartWindow>();
            drawer.WindowFactoryId = factory.Identifier;
            BindDrawerToWindow(drawer, factory, viewModel);
        }

        return(drawer);
    }