Esempio n. 1
0
        private void syncButtonClickMethod(RouterMirror routerMirror, RouterMirrorSide sourceSide)
        {
            if ((routerMirror.RouterA == null) || (routerMirror.RouterB == null))
            {
                return;
            }
            Router sourceRouter      = sourceSide.Choose(routerMirror.RouterA, routerMirror.RouterB);
            Router destinationRouter = sourceSide.Choose(routerMirror.RouterA, routerMirror.RouterB, true);
            string messageBoxText    = string.Format("Are sure you want to synchronize crosspoints from router [(#{0}) {1}] to router [(#{2}) {3}]?",
                                                     sourceRouter.ID, sourceRouter.Name, destinationRouter.ID, destinationRouter.Name);

            if (MessageBox.Show(messageBoxText, "Router synchronization", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                routerMirror.Synchronize(sourceSide);
            }
        }
Esempio n. 2
0
        private void routerRefCellUpdaterMethod(RouterMirror routerMirror, DataGridViewCell cell, RouterMirrorSide side)
        {
            Router router = side.Choose(routerMirror.RouterA, routerMirror.RouterB);

            if (router == null)
            {
                cell.Value = "-";
                return;
            }
            cell.Value = string.Format("(#{0}) {1}", router.ID, router.Name);
        }