コード例 #1
0
        public DrawRect(MonoConfig _monoconfig)
        {
            InitializeComponent();

            thisForm = this;

            rectFRoiTotalPoints = 0;
            this.monoconfig     = _monoconfig;
            rectsBLK[0]         = rect1stBLK;
            rectsROI[0]         = RectConverter.rect1stROI;
            rectsBLK[1]         = rect2ndBLK;
            rectsROI[1]         = RectConverter.rect2ndROI;
            rectsBLK[2]         = rect3rdBLK;
            rectsROI[2]         = RectConverter.rect3rdROI;
            rectsBLK[3]         = rect4thBLK;
            rectsROI[3]         = RectConverter.rect4thROI;
            for (int i = 0; i < 4; i++)
            {
                setnames[i] = _monoconfig.name + "-" + i.ToString();
            }
            tp_lu = new PointF();
            tp_ru = new PointF();
            tp_ld = new PointF();
            tp_rd = new PointF();

            for (int i = 0; i < RectConverter.eyepieces.Length; ++i)
            {
                if (RectConverter.eyepieces[i] == _monoconfig.amp)
                {
                    amp = i;
                    break;
                }
            }

            if (amp == 1)
            {
                x_step = RectConverter.xstep_20x;
                y_step = RectConverter.ystep_20x;
            }
            else if (amp == 2)
            {
                x_step = RectConverter.xstep_40x;
                y_step = RectConverter.ystep_40x;
            }

            if (x_step == 0.0F || y_step == 0.0F)
            {
                is_amp_ok = false;
                MessageBox.Show("扫描目前仅支持20x或40x的放大倍数,请重新选择。");
            }
            else
            {
                is_amp_ok = true;
            }


            InfoPanelUtil.MyConsoleWrite(ref thisForm, "hello");
        }
コード例 #2
0
        public override ConsoleControl FindControlByAddress(string address)
        {
            ConsoleControl c;

            c = FindAddressFromList(ChannelLink, address);
            if (c == null)
            {
                c = FindAddressFromList(AuxLink, address);
                if (c == null)
                {
                    c = FindAddressFromList(FxLink, address);
                    if (c == null)
                    {
                        c = FindAddressFromList(BusLink, address);
                        if (c == null)
                        {
                            c = FindAddressFromList(MatrixLink, address);
                            if (c == null)
                            {
                                c = LinkConfig.FindControlByAddress(Address);
                                if (c == null)
                                {
                                    c = MonoConfig.FindControlByAddress(Address);
                                    if (c == null)
                                    {
                                        c = SoloConfig.FindControlByAddress(Address);
                                        if (c == null)
                                        {
                                            c = Talkback.FindControlByAddress(Address);
                                            if (c == null)
                                            {
                                                c = TapeConfig.FindControlByAddress(address);
                                                if (c == null)
                                                {
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return(c);
        }