示例#1
0
 private void PrintObject1_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         select.ShowMenu(con.PointToScreen(new Point(e.X, e.Y)));
     }
     if (e.Button == MouseButtons.Left)
     {
         if (this.sizebk != con.Size || this.locationbk != con.Location)
         {
             select.Record();
         }
     }
 }
示例#2
0
        private void PrintObject1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            IDesign design = (IDesign)this.FindForm();
            IInput  input  = new InputString();
            string  def    = "";

            if (design.GetSelectObjects().Count == 1)
            {
                IContextable contextable = (IContextable)design.GetSelectObjects()[0];
                def = contextable.Context;
            }
            if (input.Input(def, out def) == true)
            {
                foreach (IPrintObject ins in design.GetSelectObjects())
                {
                    IContextable contextable = (IContextable)ins;
                    contextable.Context = def;
                }
                design.Record();
            }
        }