示例#1
0
        public RamWatch()
        {
            InitializeComponent();
            Settings = new RamWatchSettings();

            WatchListView.QueryItemText    += WatchListView_QueryItemText;
            WatchListView.QueryItemBkColor += WatchListView_QueryItemBkColor;
            Closing += (o, e) =>
            {
                if (AskSaveChanges())
                {
                    SaveConfigSettings();
                }
                else
                {
                    e.Cancel = true;
                }
            };

            _sortedColumn = "";
            _sortReverse  = false;


            SetColumns();
        }
示例#2
0
        private void RestoreDefaultsMenuItem_Click(object sender, EventArgs e)
        {
            Settings = new RamWatchSettings();
            Size     = new Size(_defaultWidth, _defaultHeight);

            RamWatchMenu.Items.Remove(
                RamWatchMenu.Items
                .OfType <ToolStripMenuItem>()
                .First(x => x.Name == "GeneratedColumnsSubMenu"));

            RamWatchMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback));

            Global.Config.DisplayRamWatch = false;

            RefreshFloatingWindowControl(Settings.FloatingWindow);
            LoadColumnInfo(WatchListView, Settings.Columns);
        }
示例#3
0
        private void NewRamWatch_Load(object sender, EventArgs e)
        {
            // Hack for previous config settings
            if (Settings.Columns.Any(c => string.IsNullOrWhiteSpace(c.Text)))
            {
                Settings = new RamWatchSettings();
            }

            TopMost  = Settings.TopMost;
            _watches = new WatchList(MemoryDomains, Emu.SystemId);
            LoadConfigSettings();
            RamWatchMenu.Items.Add(WatchListView.ToColumnsMenu(ColumnToggleCallback));
            UpdateStatusBar();

            PokeAddressToolBarItem.Enabled       =
                FreezeAddressToolBarItem.Enabled =
                    SelectedIndices.Any() &&
                    SelectedWatches.All(w => w.Domain.CanPoke());
        }
示例#4
0
        public RamWatch()
        {
            InitializeComponent();
            Settings = new RamWatchSettings();

            WatchListView.QueryItemText += WatchListView_QueryItemText;
            WatchListView.QueryItemBkColor += WatchListView_QueryItemBkColor;
            WatchListView.VirtualMode = true;
            Closing += (o, e) =>
            {
                if (AskSaveChanges())
                {
                    SaveConfigSettings();
                }
                else
                {
                    e.Cancel = true;
                }
            };

            _sortedColumn = string.Empty;
            _sortReverse = false;
        }
示例#5
0
文件: RamWatch.cs 项目: jokm1/BizHawk
        public RamWatch()
        {
            InitializeComponent();
            newToolStripMenuItem.Image           = Resources.AddWatch;
            EditContextMenuItem.Image            = Resources.Cut;
            RemoveContextMenuItem.Image          = Resources.Delete;
            DuplicateContextMenuItem.Image       = Resources.Duplicate;
            PokeContextMenuItem.Image            = Resources.Poke;
            FreezeContextMenuItem.Image          = Resources.Freeze;
            UnfreezeAllContextMenuItem.Image     = Resources.Unfreeze;
            InsertSeperatorContextMenuItem.Image = Resources.InsertSeparator;
            MoveUpContextMenuItem.Image          = Resources.MoveUp;
            MoveDownContextMenuItem.Image        = Resources.MoveDown;
            MoveTopContextMenuItem.Image         = Resources.MoveTop;
            MoveBottomContextMenuItem.Image      = Resources.MoveBottom;
            ErrorIconButton.Image                  = Resources.ExclamationRed;
            newToolStripButton.Image               = Resources.NewFile;
            openToolStripButton.Image              = Resources.OpenFile;
            saveToolStripButton.Image              = Resources.SaveAs;
            newWatchToolStripButton.Image          = Resources.AddWatch;
            editWatchToolStripButton.Image         = Resources.Cut;
            cutToolStripButton.Image               = Resources.Delete;
            clearChangeCountsToolStripButton.Image = Resources.Placeholder;
            duplicateWatchToolStripButton.Image    = Resources.Duplicate;
            PokeAddressToolBarItem.Image           = Resources.Poke;
            FreezeAddressToolBarItem.Image         = Resources.Freeze;
            seperatorToolStripButton.Image         = Resources.InsertSeparator;
            moveUpToolStripButton.Image            = Resources.MoveUp;
            moveDownToolStripButton.Image          = Resources.MoveDown;
            NewListMenuItem.Image                  = Resources.NewFile;
            OpenMenuItem.Image            = Resources.OpenFile;
            SaveMenuItem.Image            = Resources.SaveAs;
            RecentSubMenu.Image           = Resources.Recent;
            NewWatchMenuItem.Image        = Resources.Find;
            EditWatchMenuItem.Image       = Resources.Cut;
            RemoveWatchMenuItem.Image     = Resources.Delete;
            DuplicateWatchMenuItem.Image  = Resources.Duplicate;
            PokeAddressMenuItem.Image     = Resources.Poke;
            FreezeAddressMenuItem.Image   = Resources.Freeze;
            InsertSeparatorMenuItem.Image = Resources.InsertSeparator;
            MoveUpMenuItem.Image          = Resources.MoveUp;
            MoveDownMenuItem.Image        = Resources.MoveDown;
            MoveTopMenuItem.Image         = Resources.MoveTop;
            MoveBottomMenuItem.Image      = Resources.MoveBottom;
            Icon = Resources.WatchIcon;

            Settings = new RamWatchSettings();

            WatchListView.QueryItemText    += WatchListView_QueryItemText;
            WatchListView.QueryItemBkColor += WatchListView_QueryItemBkColor;
            Closing += (o, e) =>
            {
                if (AskSaveChanges())
                {
                    SaveConfigSettings();
                }
                else
                {
                    e.Cancel = true;
                }
            };

            _sortedColumn = "";
            _sortReverse  = false;


            SetColumns();
        }
示例#6
0
        private void RestoreDefaultsMenuItem_Click(object sender, EventArgs e)
        {
            Settings = new RamWatchSettings();
            Size = new Size(_defaultWidth, _defaultHeight);

            RamWatchMenu.Items.Remove(
                RamWatchMenu.Items
                    .OfType<ToolStripMenuItem>()
                    .First(x => x.Name == "GeneratedColumnsSubMenu")
            );

            RamWatchMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback));

            Global.Config.DisplayRamWatch = false;

            RefreshFloatingWindowControl();
            LoadColumnInfo();
        }