コード例 #1
0
ファイル: ILConeWrapper.cs プロジェクト: profix898/ILNEditor
 private void OnMouseDoubleClick(object sender, ILMouseEventArgs args)
 {
     MouseDoubleClickShowEditor(this, args);
 }
コード例 #2
0
ファイル: ILWrapperBase.cs プロジェクト: profix898/ILNEditor
 protected void MouseDoubleClickShowEditor(object sender, ILMouseEventArgs args)
 {
     editor.MouseDoubleClickShowEditor(sender, args);
 }
コード例 #3
0
        private void OnMouseClick(object sender, ILMouseEventArgs e)
        {
            if (e.Button != MouseButtons.Right || e.Cancel)
                return;

            var contextMenu = new ContextMenu();
            // Reset view
            contextMenu.MenuItems.Add("Reset View", (o, args) =>
            {
                Panel.SceneSyncRoot.First<ILPlotCube>().Reset();
                Panel.Refresh();
            });
            // Switch planes
            if (!TwoDMode)
            {
                contextMenu.MenuItems.Add("-");
                contextMenu.MenuItems.Add("X-Y Plane", (o, args) =>
                {
                    Panel.SceneSyncRoot.First<ILPlotCube>().Rotation = Matrix4.Identity;
                    Panel.Refresh();
                });
                contextMenu.MenuItems.Add("X-Z Plane", (o, args) =>
                {
                    Panel.SceneSyncRoot.First<ILPlotCube>().Rotation = Matrix4.Rotation(Vector3.UnitX, Math.PI / 2.0);
                    Panel.Refresh();
                });
                contextMenu.MenuItems.Add("Y-Z Plane", (o, args) =>
                {
                    Panel.SceneSyncRoot.First<ILPlotCube>().Rotation = Matrix4.Rotation(Vector3.UnitY, Math.PI / 2.0);
                    Panel.Refresh();
                });
            }
            // Plot browser
            contextMenu.MenuItems.Add("-");
            contextMenu.MenuItems.Add("Plot Browser", (o, args) => Editor.PanelEditor.PlotBrowser.Show());

            contextMenu.Show(Panel, e.Location);

            e.Cancel = true;
        }
コード例 #4
0
ファイル: ILShapeWrapper.cs プロジェクト: profix898/ILNEditor
        private void OnMouseDoubleClick(object sender, ILMouseEventArgs args)
        {
            if (!args.DirectionUp)
                return;

            MouseDoubleClickShowEditor(this, args);
        }
コード例 #5
0
ファイル: ILPanelEditor.cs プロジェクト: profix898/ILNEditor
        internal void MouseDoubleClickShowEditor(object sender, ILMouseEventArgs args)
        {
            // 1) In a 'standard' scene, the MouseDoubleClick handler of the original item is invoked -> use sender
            // 2) In a ILPlotCube scene, the MouseDoubleClick handler of ILPlotCube is invoke (with original item in the ILMouseEventArgs.Target) -> lookup args.Target
            object item = (FindWrapperById(args.Target.ID) ?? sender) as ILWrapperBase;
            if (item == null)
                return;

            ShowEditor(((ILWrapperBase) item).Path);
            args.Cancel = true;
        }