示例#1
0
        /**
         * @fn		public void SetMode(EnRoiMode mode, EnDrawMode drawmode = 0)
         * @brief	Draw Mode 설정.
         * @return	void
         * @param	EnRoiMode  mode     : ROI Mode
         * @param	EnDrawMode drawmode : Draw Mode
         * @remark
         * -
         * @author	선경규(Kyeong Kyu - Seon)
         * @date	2020/11/15  15:13
         */
        public void SetMode(EnRoiMode mode)
        {
            // Clear
            if (mode == EnRoiMode.ModeClear)
            {
                int childrencnt = lib_Canvas.Children.Count;
                if (childrencnt > 0)
                {
                    for (int i = childrencnt - 1; i > m_nChildCount - 1; i--)
                    {
                        lib_Canvas.Children.RemoveAt(i);
                    }
                }
            }
            else
            {
                m_enMode = mode;

                if (m_enMode == EnRoiMode.ModeMove)
                {
                    this.Cursor = Cursors.SizeAll;
                }
                else
                {
                    this.Cursor = Cursors.Cross;
                }
                //fn_SetContextMenu(m_enMode, m_enSelObj);
                delCM?.Invoke(m_enMode, m_enSelObj);
            }
        }
        private void fn_SetButton(EnRoiMode mode)
        {
            bn_Move.Background  = G_COLOR_BTNNORMAL;
            bn_Draw.Background  = G_COLOR_BTNNORMAL;
            bn_Theta.Background = G_COLOR_BTNNORMAL;

            ac_Align.SetMove(mode);
            switch (mode)
            {
            case EnRoiMode.ModeMove:
                bn_Move.Background = G_COLOR_BTNCLICKED;
                break;

            case EnRoiMode.ModeDraw:
                bn_Draw.Background = G_COLOR_BTNCLICKED;
                break;

            case EnRoiMode.ModeTheta:
                bn_Theta.Background = G_COLOR_BTNCLICKED;
                break;

            default:
                break;
            }
        }
示例#3
0
        private void fn_SetContextMenu(EnRoiMode mode, EnObjectSelect obj)
        {
//             try
//             {
//                 for (int i = 0; i < cm_Right.Items.Count; i++)
//                 {
//                     (cm_Right.Items[i] as MenuItem).IsChecked = false;
//                 }
//                 switch (mode)
//                 {
//                     case EnRoiMode.ModeMove:
//                         (cm_Right.Items[0] as MenuItem).IsChecked = true;
//                         break;
//                     case EnRoiMode.ModeSelect:
//                         switch (obj)
//                         {
//                             case EnObjectSelect.Select1:
//                                 (cm_Right.Items[1] as MenuItem).IsChecked = true;
//                                 break;
//                             case EnObjectSelect.Select2:
//                                 (cm_Right.Items[5] as MenuItem).IsChecked = true;
//                                 break;
//                         }
//                         break;
//                 }
//             }
//             catch { }
        }