Ejemplo n.º 1
0
 // all of these need to raise the click as if on this control, not the TV, so the palette form can do resizing
 // gripper now done by base class
 private void tvOutline_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         OnMouseDown(new MouseEventArgs(e.Button, 1, e.X + tvOutline.Left, e.Y + tvOutline.Top, e.Delta));
     }
     if (e.Button != MouseButtons.Right)
     {
         return;
     }
     if (tvOutline.SelectedNode == null)
     {
         return;
     }
     ContextMenuTools.PrepareEditMenu(ctxEdit.Items);
     ContextMenuTools.PrepareContextMenu(ctxEdit);
     ctxEdit.Show(tvOutline, e.Location);
 }
Ejemplo n.º 2
0
        public ctrDocumentOutline()
        {
            m_Filling = true;
            InitializeComponent();
            AddGripper();
            Globals.Root.CurrentDocumentChanged += CurrentDocumentChanged;
            Globals.TransactionStored           += Engine_TransactionStored;
            Globals.UpdateInfo       += UpdateInfo;
            this.VisibleChanged      += ctrDocumentOutline_VisibleChanged;
            this.tvOutline.NodeMoved += tvOutline_NodeMoved;

            imlItems.Images.Add(Resources.AM.InactiveItem_16);
            imlItems.Images.Add(Resources.AM.ActiveItem_16);       // =1
            imlItems.Images.Add(Resources.AM.Page_16);             // =2
            imlItems.Images.Add(Resources.AM.Popup_16);            // =3
            imlItems.Images.Add(Resources.AM.PopupHidden_16);      // =4
            imlItems.Images.Add(Resources.AM.help_16);             // =5 for help item

            ContextMenuTools.InitialiseMenu(ctxEdit);
            Strings.Translate(ctxEdit);             // must be after initialising

            m_Filling = false;
        }