public void AlignByKey()
        {
            using (var form = new FormKeyGrabber())
            {
                form.SetLocation(Handle, KeyGrabOffset);

                if (form.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
                    return;

                if (form.AlignFromPosition)
                    AlignByDialog(alignFromCaret:true);
                else
                    AlignBy(form.Result, form.ForceFromCaret);
            }
        }
Exemple #2
0
        public void AlignByKey()
        {
            using (var form = new FormKeyGrabber())
            {
                form.SetLocation(Handle, KeyGrabOffset);

                if (form.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
                {
                    return;
                }

                if (form.AlignFromPosition)
                {
                    AlignByDialog(alignFromCaret: true);
                }
                else
                {
                    AlignBy(form.Result, form.ForceFromCaret);
                }
            }
        }