コード例 #1
0
        /// <summary>
        /// Инициализирует новый экземпляр класса <see cref="R440OForm"/>
        /// </summary>
        public R440OForm()
        {
            this.InitializeComponent();
            Antenna.StartServerPing();
            Antenna.ErrorEvent += ServerError;
            TextHelperForm textHelper = new TextHelperForm();

            textHelper.Show();
            LearnMain.setHelpForms(this, textHelper);
            LearnMain.setIntent(ModulesEnum.openPowerCabeltoPower);
        }
コード例 #2
0
        private void ImageMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (!_isPlacing)
            {
                return;
            }
            _lastPos = Mouse.GetPosition(EyeCanvas);
            TextHelperForm t = new TextHelperForm();

            if (t.ShowDialog() != true)
            {
                _isPlacing = false;
                return;
            }

            string text = t.Text;

            Ellipse ell = new Ellipse
            {
                Width           = 20,
                Height          = 20,
                Stroke          = Brushes.Orange,
                Fill            = Brushes.Transparent,
                StrokeThickness = 4
            };

            EllipseData ed = new EllipseData
            {
                Text   = text,
                Figure = ell
            };

            ell.MouseRightButtonDown += (ssender, args) => DeleteComment(ed);
            _ellipses.Add(ed);

            Canvas.SetLeft(ell, _lastPos.X - 5);
            Canvas.SetTop(ell, _lastPos.Y - 5);
            EyeCanvas.Children.Add(ell);
            _commentBinding.Add(text);
            _isPlacing           = false;
            AddComment.IsEnabled = true;
        }
コード例 #3
0
ファイル: R440OForm.cs プロジェクト: cinemyp/R440O
        /// <summary>
        /// Инициализирует новый экземпляр класса <see cref="R440OForm"/>
        /// </summary>
        public R440OForm()
        {
            this.InitializeComponent();
            Antenna.StartServerPing();
            Antenna.ErrorEvent += ServerError;

            TestMain.close += Close;

            if (ParametersConfig.getIsLearning())
            {
                TextHelperForm textHelper = new TextHelperForm();
                textHelper.Show();
                LearnMain.setHelpForms(this, textHelper);
                LearnMain.setIntent(ModulesEnum.openPowerCabeltoPower);
            }
            else if (ParametersConfig.IsTesting)
            {
                TestMain.setIntent(ModulesEnum.openPowerCabeltoPower);
            }
        }