Ejemplo n.º 1
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (vdScrollableControl1.BaseControl.Focused)
            {
                return(false);                                         //new change
            }
            MainForm parent = this.MdiParent as MainForm;

            if (parent == null)
            {
                return(false);
            }
            VectorDraw.Professional.vdCommandLine.vdCommandLine cl = parent.commandLine;
            if (cl.Visible == false)
            {
                return(false);
            }

            if (keyData == Keys.Up || keyData == Keys.Down)
            {
                return(false);
            }
            Message nmsg = new Message();

            nmsg.HWnd   = cl.Handle;
            nmsg.Msg    = msg.Msg;
            nmsg.WParam = msg.WParam;
            nmsg.LParam = msg.LParam;
            cl.vdProcessKeyMessage(ref nmsg);
            return(false);
        }
Ejemplo n.º 2
0
        private void BaseControl_vdKeyDown(KeyEventArgs e, ref bool cancel)
        {
            BaseAction action = vdScrollableControl1.BaseControl.ActiveDocument.ActiveLayOut.OverAllActiveAction;

            if (!action.SendKeyEvents)
            {
                return;
            }

            MainForm parent = this.MdiParent as MainForm;

            if (parent == null)
            {
                return;
            }
            VectorDraw.Professional.vdCommandLine.vdCommandLine cl = parent.commandLine;
            if (cl.Visible == false)
            {
                return;
            }
            if (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down)
            {
                return;
            }
            Message msg = new Message();

            msg.HWnd   = cl.Handle;
            msg.Msg    = (int)VectorDraw.WinMessages.MessageManager.Messages.WM_KEYDOWN;
            msg.WParam = (IntPtr)e.KeyCode;
            cl.vdProcessKeyMessage(ref msg);
        }
Ejemplo n.º 3
0
        private void BaseControl_AfterOpenDocument(object sender)
        {
            MainForm parent = this.MdiParent as MainForm;

            if (parent == null)
            {
                return;
            }
            VectorDraw.Professional.vdCommandLine.vdCommandLine cl = parent.commandLine;
            FillPropertyGrid(vdScrollableControl1.BaseControl.ActiveDocument);
            cl.SelectDocument(vdScrollableControl1.BaseControl.ActiveDocument);
            vdScrollableControl1.BaseControl.Focus();
            if (vdScrollableControl1.BaseControl.ActiveDocument.FileName != "")
            {
                this.Text = vdScrollableControl1.BaseControl.ActiveDocument.FileName;
            }
        }
Ejemplo n.º 4
0
        private void BaseControl_AfterNewDocument(object sender)
        {
            MainForm parent = this.MdiParent as MainForm;

            if (parent == null)
            {
                return;
            }
            VectorDraw.Professional.vdCommandLine.vdCommandLine cl = parent.commandLine;
            FillPropertyGrid(vdScrollableControl1.BaseControl.ActiveDocument);
            cl.SelectDocument(vdScrollableControl1.BaseControl.ActiveDocument);

            vdScrollableControl1.BaseControl.Focus();
            int    i     = 1;
            string fname = i.ToString() + ".vdml";

            while (IsNewFileNameExist(fname))
            {
                i++;
                fname = i.ToString() + ".vdml";
            }
            vdScrollableControl1.BaseControl.ActiveDocument.FileName = fname;
            this.Text = fname;
        }