コード例 #1
0
ファイル: TAStudio.cs プロジェクト: SilverlineDev/bizhawk
        private void Tastudio_Load(object sender, EventArgs e)
        {
            if (!InitializeOnLoad())
            {
                Close();
                this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
                return;
            }

            SetColumnsFromCurrentStickies();

            if (VersionInfo.DeveloperBuild)
            {
                RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems().ToArray());

                RightClickMenu.Items
                .OfType <ToolStripMenuItem>()
                .First(t => t.Name == "RotateMenuItem")
                .Click += (o, ov) =>
                {
                    CurrentTasMovie.FlagChanges();
                };
            }

            RefreshDialog();
            _initialized = true;
        }
コード例 #2
0
        private void Tastudio_Load(object sender, EventArgs e)
        {
            if (!Engage())
            {
                Close();
                return;
            }

            if (TasView.Rotatable)
            {
                RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems()
                                              .ToArray());

                RightClickMenu.Items
                .OfType <ToolStripMenuItem>()
                .First(t => t.Name == "RotateMenuItem")
                .Click += (o, ov) => { CurrentTasMovie.FlagChanges(); };
            }

            TasView.ScrollSpeed           = Settings.ScrollSpeed;
            TasView.AlwaysScroll          = Settings.FollowCursorAlwaysScroll;
            TasView.ScrollMethod          = Settings.FollowCursorScrollMethod;
            TasView.SeekingCutoffInterval = Settings.SeekingCutoffInterval;
            BookMarkControl.HoverInterval = Settings.BranchCellHoverInterval;

            _autosaveTimer       = new Timer(components);
            _autosaveTimer.Tick += AutosaveTimerEventProcessor;
            if (Settings.AutosaveInterval > 0)
            {
                _autosaveTimer.Interval = (int)Settings.AutosaveInterval;
                _autosaveTimer.Start();
            }

            MainVertialSplit.SetDistanceOrDefault(
                Settings.MainVerticalSplitDistance,
                _defaultMainSplitDistance);

            BranchesMarkersSplit.SetDistanceOrDefault(
                Settings.BranchMarkerSplitDistance,
                _defaultBranchMarkerSplitDistance);

            TasView.Font = TasViewFont;
            CurrentTasMovie.BindMarkersToInput = Settings.BindMarkersToInput;
            RefreshDialog();
            _initialized = true;
        }
コード例 #3
0
ファイル: TAStudio.cs プロジェクト: m35/BizHawk
        private void Tastudio_Load(object sender, EventArgs e)
        {
            if (!InitializeOnLoad())
            {
                Close();
                DialogResult = DialogResult.Cancel;
                return;
            }

            SetColumnsFromCurrentStickies();

            if (TasView.Rotatable)
            {
                RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems()
                                              .ToArray());

                RightClickMenu.Items
                .OfType <ToolStripMenuItem>()
                .First(t => t.Name == "RotateMenuItem")
                .Click += (o, ov) => { CurrentTasMovie.FlagChanges(); };
            }

            TasView.ScrollSpeed           = Settings.ScrollSpeed;
            TasView.AlwaysScroll          = Settings.FollowCursorAlwaysScroll;
            TasView.ScrollMethod          = Settings.FollowCursorScrollMethod;
            TasView.SeekingCutoffInterval = Settings.SeekingCutoffInterval;
            BookMarkControl.HoverInterval = Settings.BranchCellHoverInterval;

            _autosaveTimer       = new Timer(components);
            _autosaveTimer.Tick += AutosaveTimerEventProcessor;
            if (Settings.AutosaveInterval > 0)
            {
                _autosaveTimer.Interval = (int)Settings.AutosaveInterval;
                _autosaveTimer.Start();
            }

            // Remembering Split container logic
            if (Settings.MainVerticalSplitDistance > 0)
            {
                try
                {
                    MainVertialSplit.SplitterDistance = Settings.MainVerticalSplitDistance;
                }
                catch (Exception)
                {
                    MainVertialSplit.SplitterDistance = _defaultMainSplitDistance;
                }
            }

            if (Settings.BranchMarkerSplitDistance > 0)
            {
                try
                {
                    BranchesMarkersSplit.SplitterDistance = Settings.BranchMarkerSplitDistance;
                }
                catch (Exception)
                {
                    BranchesMarkersSplit.SplitterDistance = _defaultBranchMarkerSplitDistance;
                }
            }

            TasView.Font = TasViewFont;
            CurrentTasMovie.BindMarkersToInput = Settings.BindMarkersToInput;
            RefreshDialog();
            _initialized = true;
        }
コード例 #4
0
        private void Tastudio_Load(object sender, EventArgs e)
        {
            if (!InitializeOnLoad())
            {
                Close();
                DialogResult = DialogResult.Cancel;
                return;
            }

            SetColumnsFromCurrentStickies();

            if (VersionInfo.DeveloperBuild)
            {
                RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems().ToArray());

                RightClickMenu.Items
                .OfType <ToolStripMenuItem>()
                .First(t => t.Name == "RotateMenuItem")
                .Click += (o, ov) =>
                {
                    CurrentTasMovie.FlagChanges();
                };
            }

            TasView.InputPaintingMode     = Settings.DrawInput;
            TasView.ScrollSpeed           = Settings.ScrollSpeed;
            TasView.AlwaysScroll          = Settings.FollowCursorAlwaysScroll;
            TasView.ScrollMethod          = Settings.FollowCursorScrollMethod;
            TasView.SeekingCutoffInterval = Settings.SeekingCutoffInterval;
            BookMarkControl.HoverInterval = Settings.BranchCellHoverInterval;

            _autosaveTimer       = new Timer(components);
            _autosaveTimer.Tick += AutosaveTimerEventProcessor;
            if (Settings.AutosaveInterval > 0)
            {
                _autosaveTimer.Interval = (int)Settings.AutosaveInterval;
                _autosaveTimer.Start();
            }

            // Remembering Split container logic
            int defaultMainSplitDistance         = MainVertialSplit.SplitterDistance;
            int defaultBranchMarkerSplitDistance = BranchesMarkersSplit.SplitterDistance;

            ToolStripMenuItem restoreDefaults = TASMenu.Items
                                                .OfType <ToolStripMenuItem>()
                                                .Single(t => t.Name == "SettingsSubMenu")
                                                .DropDownItems
                                                .OfType <ToolStripMenuItem>()
                                                .Single(t => t.Text == "Restore &Defaults");

            restoreDefaults.Click += (o, ev) =>
            {
                MainVertialSplit.SplitterDistance     = defaultMainSplitDistance;
                BranchesMarkersSplit.SplitterDistance = defaultBranchMarkerSplitDistance;
            };

            if (Settings.MainVerticalSplitDistance > 0)
            {
                try
                {
                    MainVertialSplit.SplitterDistance = Settings.MainVerticalSplitDistance;
                }
                catch (Exception)
                {
                    MainVertialSplit.SplitterDistance = defaultMainSplitDistance;
                }
            }

            if (Settings.BranchMarkerSplitDistance > 0)
            {
                try
                {
                    BranchesMarkersSplit.SplitterDistance = Settings.BranchMarkerSplitDistance;
                }
                catch (Exception)
                {
                    BranchesMarkersSplit.SplitterDistance = defaultBranchMarkerSplitDistance;
                }
            }

            RefreshDialog();
            _initialized = true;
        }
コード例 #5
0
        private void Tastudio_Load(object sender, EventArgs e)
        {
            if (!InitializeOnLoad())
            {
                Close();
                DialogResult = DialogResult.Cancel;
                return;
            }

            // Set the screenshot to "1x" resolution of the core
            // cores like n64 and psx are going to still have sizes too big for the control, so cap them
            int width  = VideoProvider.BufferWidth;
            int height = VideoProvider.BufferHeight;

            if (width > 320)
            {
                double ratio = 320.0 / (double)width;
                width  = 320;
                height = (int)((double)(height) * ratio);
            }
            ScreenshotControl.DrawingHeight = height;
            ScreenshotControl.Size          = new Size(width, ScreenshotControl.DrawingHeight + ScreenshotControl.UserPadding);


            ScreenshotControl.Visible = false;
            Controls.Add(ScreenshotControl);
            ScreenshotControl.BringToFront();

            SetColumnsFromCurrentStickies();

            if (VersionInfo.DeveloperBuild)
            {
                RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems().ToArray());

                RightClickMenu.Items
                .OfType <ToolStripMenuItem>()
                .First(t => t.Name == "RotateMenuItem")
                .Click += (o, ov) =>
                {
                    CurrentTasMovie.FlagChanges();
                };
            }

            TasView.InputPaintingMode     = Settings.DrawInput;
            TasView.ScrollSpeed           = Settings.ScrollSpeed;
            TasView.AlwaysScroll          = Settings.FollowCursorAlwaysScroll;
            TasView.ScrollMethod          = Settings.FollowCursorScrollMethod;
            TasView.SeekingCutoffInterval = Settings.SeekingCutoffInterval;
            BookMarkControl.HoverInterval = Settings.BranchCellHoverInterval;

            _autosaveTimer.Tick += AutosaveTimerEventProcessor;
            if (Settings.AutosaveInterval > 0)
            {
                _autosaveTimer.Interval = (int)Settings.AutosaveInterval;
                _autosaveTimer.Start();
            }

            // Remembering Split container logic
            int defaultMainSplitDistance         = MainVertialSplit.SplitterDistance;
            int defaultBranchMarkerSplitDistance = BranchesMarkersSplit.SplitterDistance;

            ToolStripMenuItem restoreDefaults = TASMenu.Items
                                                .OfType <ToolStripMenuItem>()
                                                .Single(t => t.Name == "SettingsSubMenu")
                                                .DropDownItems
                                                .OfType <ToolStripMenuItem>()
                                                .Single(t => t.Text == "Restore &Defaults");

            restoreDefaults.Click += (o, ev) =>
            {
                MainVertialSplit.SplitterDistance     = defaultMainSplitDistance;
                BranchesMarkersSplit.SplitterDistance = defaultBranchMarkerSplitDistance;
            };

            if (Settings.MainVerticalSplitDistance > 0)
            {
                MainVertialSplit.SplitterDistance = Settings.MainVerticalSplitDistance;
            }

            if (Settings.BranchMarkerSplitDistance > 0)
            {
                BranchesMarkersSplit.SplitterDistance = Settings.BranchMarkerSplitDistance;
            }

            ////////////////

            RefreshDialog();
            _initialized = true;
        }
コード例 #6
0
        private void Tastudio_Load(object sender, EventArgs e)
        {
            if (!InitializeOnLoad())
            {
                Close();
                this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
                return;
            }

            SetColumnsFromCurrentStickies();

            if (VersionInfo.DeveloperBuild)
            {
                RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems().ToArray());

                RightClickMenu.Items
                .OfType <ToolStripMenuItem>()
                .First(t => t.Name == "RotateMenuItem")
                .Click += (o, ov) =>
                {
                    CurrentTasMovie.FlagChanges();
                };
            }

            TasView.InputPaintingMode = Settings.DrawInput;
            TasView.ScrollSpeed       = Settings.ScrollSpeed;
            TasView.AlwaysScroll      = Settings.FollowCursorAlwaysScroll;
            TasView.ScrollMethod      = Settings.FollowCursorScrollMethod;

            // Remembering Split container logic
            int defaultMainSplitDistance         = MainVertialSplit.SplitterDistance;
            int defaultBranchMarkerSplitDistance = BranchesMarkersSplit.SplitterDistance;

            ToolStripMenuItem restoreDefaults = TASMenu.Items
                                                .OfType <ToolStripMenuItem>()
                                                .Single(t => t.Name == "SettingsSubMenu")
                                                .DropDownItems
                                                .OfType <ToolStripMenuItem>()
                                                .Single(t => t.Text == "Restore &Defaults");

            restoreDefaults.Click += (o, ev) =>
            {
                MainVertialSplit.SplitterDistance     = defaultMainSplitDistance;
                BranchesMarkersSplit.SplitterDistance = defaultBranchMarkerSplitDistance;
            };

            if (Settings.MainVerticalSplitDistance > 0)
            {
                MainVertialSplit.SplitterDistance = Settings.MainVerticalSplitDistance;
            }

            if (Settings.BranchMarkerSplitDistance > 0)
            {
                BranchesMarkersSplit.SplitterDistance = Settings.BranchMarkerSplitDistance;
            }

            ////////////////

            RefreshDialog();
            _initialized = true;
        }