void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mnuEditPlayerAgainstPlayer = ((System.Windows.Controls.MenuItem)(target)); return; case 2: this.mnuEditDesignMode = ((System.Windows.Controls.MenuItem)(target)); return; case 3: this.mnuOptionFlashPiece = ((System.Windows.Controls.MenuItem)(target)); return; case 4: this.mnuOptionPGNNotation = ((System.Windows.Controls.MenuItem)(target)); return; case 5: this.m_toolbar = ((SrcChess2.ChessToolBar)(target)); return; case 6: this.m_statusBar = ((System.Windows.Controls.Primitives.StatusBar)(target)); return; case 7: this.m_statusLabelSearchMode = ((System.Windows.Controls.Primitives.StatusBarItem)(target)); return; case 8: this.m_statusLabelMove = ((System.Windows.Controls.Primitives.StatusBarItem)(target)); return; case 9: this.m_statusLabelPermutation = ((System.Windows.Controls.Primitives.StatusBarItem)(target)); return; case 10: this.m_chessCtl = ((SrcChess2.LocalChessBoardControl)(target)); return; case 11: this.m_moveViewer = ((SrcChess2.MoveViewer)(target)); return; case 12: this.m_lostPieceBlack = ((SrcChess2.LostPiecesControl)(target)); return; case 13: this.m_lostPieceWhite = ((SrcChess2.LostPiecesControl)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Save move viewer setting to properties setting /// </summary> /// <param name="moveViewer"> Move viewer</param> public void SaveMoveViewer(MoveViewer moveViewer) { m_settings.MoveNotation = (moveViewer.DisplayMode == MoveViewer.DisplayModeE.MovePos) ? 0 : 1; }
/// <summary> /// Load move viewer setting from properties setting /// </summary> /// <param name="moveViewer"> Move viewer</param> public void LoadMoveViewer(MoveViewer moveViewer) { moveViewer.DisplayMode = (m_settings.MoveNotation == 0) ? MoveViewer.DisplayModeE.MovePos : MoveViewer.DisplayModeE.PGN; }