Ejemplo n.º 1
0
        private void Bind()
        {
            _binding.Bind(this, "CommandClose", "CommandClose");

            BindCommand(menuDebugContinue, "CommandContinue");
            BindCommand(toolStripContinue, "CommandContinue");
            BindCommand(menuDebugBreak, "CommandBreak");
            BindCommand(toolStripBreak, "CommandBreak");
            BindCommand(menuDebugStepInto, "CommandStepInto");
            BindCommand(toolStripStepInto, "CommandStepInto");
            BindCommand(menuDebugStepOver, "CommandStepOver");
            BindCommand(toolStripStepOver, "CommandStepOver");
            BindCommand(menuDebugStepOut, "CommandStepOut");
            BindCommand(toolStripStepOut, "CommandStepOut");
            BindCommand(menuFileClose, "CommandClose");

            _binding.Bind(toolStripStatus, "Text", "StatusText");
            _binding.Bind(toolStripStatusTact, "Text", "StatusTact");
            _binding.Bind(statusStrip, "BackColor", "IsRunning", Converters.BoolToStatusBackColor);
            _binding.Bind(statusStrip, "ForeColor", "IsRunning", Converters.BoolToStatusForeColor);
        }
Ejemplo n.º 2
0
        public MainView()
        {
            m_deviceManager = new GraphicsDeviceManager(this);

            m_binding.Bind(this, "Title", "Title");
        }
Ejemplo n.º 3
0
 private void Bind()
 {
     _binding.Bind(lstItems, "DataSource", "Breakpoints");
     _binding.Bind(lstItems, "SelectedItem", "SelectedBreakpoint");
 }
Ejemplo n.º 4
0
        private void Bind()
        {
            _binding.Bind(this, "IsRunning", "IsRunning");

            var pText = "Text";

            _binding.Bind(txtRegPc, pText, "Pc", Converters.RegPairToString);
            _binding.Bind(txtRegSp, pText, "Sp", Converters.RegPairToString);
            _binding.Bind(txtRegIr, pText, "Ir", Converters.RegPairToString);
            _binding.Bind(txtRegIm, pText, "Im");
            _binding.Bind(txtRegWz, pText, "Wz", Converters.RegPairToString);
            _binding.Bind(txtRegLpc, pText, "Lpc", Converters.RegPairToString);
            _binding.Bind(txtRegAf, pText, "Af", Converters.RegPairToString);
            _binding.Bind(txtRegAf_, pText, "Af_", Converters.RegPairToString);
            _binding.Bind(txtRegHl, pText, "Hl", Converters.RegPairToString);
            _binding.Bind(txtRegHl_, pText, "Hl_", Converters.RegPairToString);
            _binding.Bind(txtRegDe, pText, "De", Converters.RegPairToString);
            _binding.Bind(txtRegDe_, pText, "De_", Converters.RegPairToString);
            _binding.Bind(txtRegBc, pText, "Bc", Converters.RegPairToString);
            _binding.Bind(txtRegBc_, pText, "Bc_", Converters.RegPairToString);
            _binding.Bind(txtRegIx, pText, "Ix", Converters.RegPairToString);
            _binding.Bind(txtRegIy, pText, "Iy", Converters.RegPairToString);
            _binding.Bind(lblRzxFetchValue, pText, "RzxFetch");
            _binding.Bind(lblRzxInputValue, pText, "RzxInput");
            _binding.Bind(lblRzxFrameValue, pText, "RzxFrame");
            var pChecked = "Checked";

            _binding.Bind(chkIff1, pChecked, "Iff1");
            _binding.Bind(chkIff2, pChecked, "Iff2");
            _binding.Bind(chkHalt, pChecked, "Halt");
            _binding.Bind(chkBint, pChecked, "Bint");
            _binding.Bind(chkFlagS, pChecked, "FlagS");
            _binding.Bind(chkFlagZ, pChecked, "FlagZ");
            _binding.Bind(chkFlag5, pChecked, "Flag5");
            _binding.Bind(chkFlagH, pChecked, "FlagH");
            _binding.Bind(chkFlag3, pChecked, "Flag3");
            _binding.Bind(chkFlagV, pChecked, "FlagV");
            _binding.Bind(chkFlagN, pChecked, "FlagN");
            _binding.Bind(chkFlagC, pChecked, "FlagC");
            var pVisible = "Visible";

            _binding.Bind(lblTitleRzx, pVisible, "IsRzxAvailable");
            _binding.Bind(sepRzx, pVisible, "IsRzxAvailable");
            _binding.Bind(lblRzxFetch, pVisible, "IsRzxAvailable");
            _binding.Bind(lblRzxInput, pVisible, "IsRzxAvailable");
            _binding.Bind(lblRzxFrame, pVisible, "IsRzxAvailable");
            _binding.Bind(lblRzxFetchValue, pVisible, "IsRzxAvailable");
            _binding.Bind(lblRzxInputValue, pVisible, "IsRzxAvailable");
            _binding.Bind(lblRzxFrameValue, pVisible, "IsRzxAvailable");
        }
Ejemplo n.º 5
0
        private void Bind()
        {
            _binding.Bind(this, "IsToolBarEnabled", "IsToolBarEnabled");
            _binding.Bind(this, "IsStatusBarEnabled", "IsStatusBarEnabled");
            _binding.Bind(this, "RenderSize", "RenderSize");
            BindCommandLight(menuViewSizeX1, "CommandViewScaleRatio", 1);
            BindCommandLight(menuViewSizeX2, "CommandViewScaleRatio", 2);
            BindCommandLight(menuViewSizeX3, "CommandViewScaleRatio", 3);
            BindCommandLight(menuViewSizeX4, "CommandViewScaleRatio", 4);
            _binding.Bind(this, "RenderScaleRatio", "RenderScaleRatio");

            BindCommand(menuFileOpen, "CommandFileOpen", this);
            BindCommand(menuFileSaveAs, "CommandFileSave", this);
            BindCommand(menuFileExit, "CommandFileExit");
            BindCommand(menuViewFullScreen, "CommandViewFullScreen");
            BindCommand(menuVmPause, "CommandVmPause");
            BindCommand(menuVmMaximumSpeed, "CommandVmMaxSpeed");
            BindCommand(menuVmWarmReset, "CommandVmWarmReset");
            BindCommand(menuVmColdReset, "CommandVmColdReset");
            BindCommand(menuVmNmi, "CommandVmNmi");
            BindCommand(menuVmSettings, "CommandVmSettings", this);
            BindCommand(menuHelpViewHelp, "CommandHelpViewHelp", this);
            BindCommand(menuHelpKeyboardHelp, "CommandHelpKeyboardHelp", this);
            BindCommand(menuHelpAbout, "CommandHelpAbout", this);

            BindCommand(tbrButtonOpen, "CommandFileOpen", this);
            BindCommand(tbrButtonSave, "CommandFileSave", this);
            BindCommand(tbrButtonPause, "CommandVmPause");
            BindCommand(tbrButtonMaxSpeed, "CommandVmMaxSpeed");
            BindCommand(tbrButtonWarmReset, "CommandVmWarmReset");
            BindCommand(tbrButtonColdReset, "CommandVmColdReset");
            BindCommand(tbrButtonFullScreen, "CommandViewFullScreen");
            BindCommand(tbrButtonQuickLoad, "CommandQuickLoad");
            BindCommand(tbrButtonSettings, "CommandVmSettings", this);

            BindCommand(menuViewCustomizeShowToolBar, "CommandViewToolBar");
            BindCommand(menuViewCustomizeShowStatusBar, "CommandViewStatusBar");
            _binding.Bind(this, "IsToolBarEnabled", "CommandViewToolBar.Checked");
            _binding.Bind(this, "IsStatusBarEnabled", "CommandViewStatusBar.Checked");

            BindCommandLight(menuViewFrameSyncTime, "CommandViewSyncSource", SyncSource.Time);
            BindCommandLight(menuViewFrameSyncSound, "CommandViewSyncSource", SyncSource.Sound);
            BindCommandLight(menuViewFrameSyncVideo, "CommandViewSyncSource", SyncSource.Video);
            _binding.Bind(this, "SelectedSyncSource", "SyncSource");

            BindCommandLight(menuViewScaleModeStretch, "CommandViewScaleMode", ScaleMode.Stretch);
            BindCommandLight(menuViewScaleModeKeepProportion, "CommandViewScaleMode", ScaleMode.KeepProportion);
            BindCommandLight(menuViewScaleModeFixedPixelSize, "CommandViewScaleMode", ScaleMode.FixedPixelSize);
            BindCommandLight(menuViewScaleModeSquarePixelSize, "CommandViewScaleMode", ScaleMode.SquarePixelSize);
            _binding.Bind(this, "SelectedScaleMode", "RenderScaleMode");

            BindCommandLight(menuViewVideoFilterNone, "CommandViewVideoFilter", VideoFilter.None);
            BindCommandLight(menuViewVideoFilterNoFlick, "CommandViewVideoFilter", VideoFilter.NoFlick);
            _binding.Bind(this, "SelectedVideoFilter", "RenderVideoFilter");

            BindCommand(menuViewSmoothing, "CommandViewSmooth");
            BindCommand(menuViewMimicTv, "CommandViewMimicTv");
            BindCommand(menuViewDisplayIcon, "CommandViewDisplayIcon");
            BindCommand(menuViewDebugInfo, "CommandViewDebugInfo");

            _binding.Bind(renderVideo, "AntiAlias", "CommandViewSmooth.Checked");
            _binding.Bind(renderVideo, "MimicTv", "CommandViewMimicTv.Checked");
            _binding.Bind(renderVideo, "DisplayIcon", "CommandViewDisplayIcon.Checked");
            _binding.Bind(renderVideo, "DebugInfo", "CommandViewDebugInfo.Checked");

            _binding.Bind(this, "Title", "Title");
            _binding.Bind(this, "IsFullScreen", "IsFullScreen");
            _binding.Bind(this, "IsRunning", "IsRunning");
            _binding.Bind(renderVideo, "IsRunning", "IsRunning");

            var imagePause      = global::ZXMAK2.Host.WinForms.Properties.Resources.EmuPause_32x32;
            var imageResume     = global::ZXMAK2.Host.WinForms.Properties.Resources.EmuResume_32x32;
            var imageWindowed   = global::ZXMAK2.Host.WinForms.Properties.Resources.EmuWindowed_32x32;
            var imageFullScreen = global::ZXMAK2.Host.WinForms.Properties.Resources.EmuFullScreen_32x32;

            _binding.Bind(
                tbrButtonPause,
                "Image",
                "IsRunning",
                arg => (bool)arg ? imagePause : imageResume);
            _binding.Bind(
                tbrButtonFullScreen,
                "Image",
                "IsFullScreen",
                arg => (bool)arg ? imageWindowed : imageFullScreen);

            _binding.Bind(this, "CommandViewFullScreen", "CommandViewFullScreen");
            _binding.Bind(this, "CommandVmPause", "CommandVmPause");
            _binding.Bind(this, "CommandVmMaxSpeed", "CommandVmMaxSpeed");
            _binding.Bind(this, "CommandVmWarmReset", "CommandVmWarmReset");
            _binding.Bind(this, "CommandTapePause", "CommandTapePause");
            _binding.Bind(this, "CommandQuickLoad", "CommandQuickLoad");
            _binding.Bind(this, "CommandOpenUri", "CommandOpenUri");
        }