コード例 #1
0
        public TestFixtureWindow(ITestRunner TestRunner, ITestFixtureManager TestFixtureManager,
                                 IHierarchyNodeStringConverter HierarchyNodeStringConverter, ICommandFactory CommandFactory)
        {
            this.TestRunner                   = TestRunner;
            this.TestFixtureManager           = TestFixtureManager;
            this.HierarchyNodeStringConverter = HierarchyNodeStringConverter;
            this.CommandFactory               = CommandFactory;

            InitializeComponent();
            AutoScaleMode = AutoScaleMode.Dpi;

            treeListView.Font = Fonts.Default;

            TestRunner.TestRunEnd += OnScriptsFinishedRunning;
            TestRunner.TestData.CommandRunningCallback += OnCommandRunning;

            treeListView.FormatCell += UpdateFontsTreeListView;
            HierarchyUtils.CreateColumns(treeListView, HierarchyNodeStringConverter);

            // subscribing for both treeListView and contextMenuStrip creation, since it's not clear which will be created first
            treeListView.HandleCreated     += AddNewCommandsToCreateMenu;
            contextMenuStrip.HandleCreated += AddNewCommandsToCreateMenu;
            CommandFactory.NewUserCommands += AddNewCommandsToCreateMenu;

            UpdateHierarchy();
        }
コード例 #2
0
        public void Initialize()
        {
            Container = new UnityContainer();
            RobotRuntime.Program.RegisterInterfaces(Container);
            Robot.Program.RegisterInterfaces(Container);

            Container.RegisterType <ILogger, FakeLogger>(new ContainerControlledLifetimeManager());
            Logger.Instance = Container.Resolve <ILogger>();

            var ProjectManager = Container.Resolve <IProjectManager>();

            AssetManager       = Container.Resolve <IAssetManager>();
            TestFixtureManager = Container.Resolve <ITestFixtureManager>();
            TestFixture        = Container.Resolve <TestFixture>();

            ProjectManager.InitProject(TempProjectPath);
        }
コード例 #3
0
        public AssetsWindow(IAssetManager AssetManager, IScriptManager ScriptManager, ITestFixtureManager TestFixtureManager, IPluginManager PluginManager)
        {
            this.AssetManager       = AssetManager;
            this.ScriptManager      = ScriptManager;
            this.TestFixtureManager = TestFixtureManager;
            this.PluginManager      = PluginManager;

            InitializeComponent();
            AutoScaleMode            = AutoScaleMode.Dpi;
            treeView.Font            = Fonts.Default;
            treeView.NodeMouseClick += (sender, args) => treeView.SelectedNode = args.Node;

            treeView.AfterRename += OnAfterRenameNode;

            AssetManager.RefreshFinished += OnRefreshFinished;
            AssetManager.AssetCreated    += OnAssetCreated;
            AssetManager.AssetDeleted    += OnAssetDeleted;

            treeView.HandleCreated += OnRefreshFinished;
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: JustasUnity/MouseRobot
        public MainForm(IUnityContainer Container, IMouseRobot MouseRobot, IScreenPaintForm ScreenPaintForm, IFeatureDetectionThread FeatureDetectionThread, ISettingsManager SettingsManager,
                        IScriptManager ScriptManager, IAssetManager AssetManager, IHierarchyWindow HierarchyWindow, IPropertiesWindow PropertiesWindow, IScreenPreviewWindow ScreenPreviewWindow,
                        IAssetsWindow AssetsWindow, IProfilerWindow ProfilerWindow, IInspectorWindow InspectorWindow, IScreenStateThread ScreenStateThread, IInputCallbacks InputCallbacks,
                        IProjectSelectionDialog ProjectSelectionDialog, IConsoleWindow ConsoleWindow, IStatusManager StatusManager, ITestFixtureManager TestFixtureManager,
                        ITestRunnerWindow TestRunnerWindow, ITestRunner TestRunner)
        {
            this.Container = Container;

            this.MouseRobot             = MouseRobot;
            this.ScreenPaintForm        = ScreenPaintForm;
            this.FeatureDetectionThread = FeatureDetectionThread;
            this.SettingsManager        = SettingsManager;
            this.ScriptManager          = ScriptManager;
            this.AssetManager           = AssetManager;
            this.ScreenStateThread      = ScreenStateThread;
            this.InputCallbacks         = InputCallbacks;
            this.StatusManager          = StatusManager;
            this.TestFixtureManager     = TestFixtureManager;
            this.TestRunner             = TestRunner;

            this.m_HierarchyWindow     = HierarchyWindow;
            this.m_PropertiesWindow    = PropertiesWindow;
            this.m_ScreenPreviewWindow = ScreenPreviewWindow;
            this.m_AssetsWindow        = AssetsWindow;
            this.m_ProfilerWindow      = ProfilerWindow;
            this.m_InspectorWindow     = InspectorWindow;
            this.m_ConsoleWindow       = ConsoleWindow;
            this.m_TestRunnerWindow    = TestRunnerWindow;

            this.ProjectSelectionDialog = ProjectSelectionDialog;

            MouseRobot.AsyncOperationOnUI = AsyncOperationManager.CreateOperation(null);

            InitializeComponent();
            AutoScaleMode    = AutoScaleMode.Dpi;
            this.WindowState = FormWindowState.Maximized;

            //ShowSplashScreen(2000);

            ((Form)ScreenPaintForm).Owner = this;

            PutLayoutWindowsInArray();
            SetWindowTheme(this.vS2015DarkTheme1, emptyLayout: true);

            DockLayout.Windows = m_Windows;
            DockLayout.Restore(m_DockPanel);

            visualStudioToolStripExtender.DefaultRenderer = new ToolStripProfessionalRenderer();

            actionOnRec.SelectedIndex  = 2;
            actionOnPlay.SelectedIndex = 2;

            InputCallbacks.InputEvent += OnInputEvent;

            m_AssetsWindow.AssetSelected         += OnAssetSelected;
            m_HierarchyWindow.OnSelectionChanged += ShowSelectedObjectInInspector;

            MouseRobot.RecordingStateChanged     += OnRecordingStateChanged;
            MouseRobot.PlayingStateChanged       += OnPlayingStateChanged;
            MouseRobot.VisualizationStateChanged += OnVisualizationStateChanged;

            StatusManager.StatusUpdated += OnStatusUpdated;

            TestFixtureManager.FixtureAdded   += OnFixtureAdded;
            TestFixtureManager.FixtureRemoved += OnFixtureRemoved;

            this.Activated += (x, y) => AssetManager.Refresh();

            ((Form)ScreenPaintForm).Show();
        }