コード例 #1
0
ファイル: MainForm.cs プロジェクト: JustasUnity/MouseRobot
        private void SetWindowTheme(ThemeBase theme, bool emptyLayout = false)
        {
            if (!emptyLayout)
            {
                DockLayout.Save(m_DockPanel);
                DockLayout.CloseAllContents(m_DockPanel);
            }

            m_CurrentTheme    = theme;
            m_DockPanel.Theme = theme;

            EnableVSDesignForToolstrips(m_VsVersion, theme);

            if (m_DockPanel.Theme.ColorPalette != null)
            {
                statusStrip.BackColor = m_DockPanel.Theme.ColorPalette.MainWindowStatusBarDefault.Background;
            }

            if (!emptyLayout)
            {
                DockLayout.Restore(m_DockPanel);
            }
        }
コード例 #2
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();
        }