コード例 #1
0
ファイル: DrawingLine2D.cs プロジェクト: robwahl/watchalerts
        private void mnuSealMeasure_Click(object sender, EventArgs e)
        {
            // display a dialog that let the user specify how many real-world-units long is this line.

            if (m_StartPoint.X != m_EndPoint.X || m_StartPoint.Y != m_EndPoint.Y)
            {
                if (!m_bShowMeasure)
                {
                    m_bShowMeasure = true;
                }

                DrawingToolLine2D.ShowMeasure = true;

                DelegatesPool dp = DelegatesPool.Instance();
                if (dp.DeactivateKeyboardHandler != null)
                {
                    dp.DeactivateKeyboardHandler();
                }

                formConfigureMeasure fcm = new formConfigureMeasure(m_ParentMetadata, this);
                ScreenManagerKernel.LocateForm(fcm);
                fcm.ShowDialog();
                fcm.Dispose();

                // Update traj for distance and speed after calibration.
                m_ParentMetadata.UpdateTrajectoriesForKeyframes();

                CallInvalidateFromMenu(sender);

                if (dp.ActivateKeyboardHandler != null)
                {
                    dp.ActivateKeyboardHandler();
                }
            }
        }
コード例 #2
0
        private void btnBackColor_Click(object sender, EventArgs e)
        {
            FormColorPicker picker = new FormColorPicker();

            ScreenManagerKernel.LocateForm(picker);
            if (picker.ShowDialog() == DialogResult.OK)
            {
                rtbComment.SelectionBackColor = picker.PickedColor;
            }
            picker.Dispose();
        }
コード例 #3
0
        private void editor_Click(object sender, EventArgs e)
        {
            FormColorPicker picker = new FormColorPicker();

            ScreenManagerKernel.LocateForm(picker);
            if (picker.ShowDialog() == DialogResult.OK)
            {
                m_Color = picker.PickedColor;
                RaiseValueChanged();
                ((Control)sender).Invalidate();
            }
            picker.Dispose();
        }