Example #1
0
        // Notes:
        //  - Links the camera of two scenes without adding GC references
        //  - View3dControls do not use these directly, they are a helper for higher level code.

        public ViewLink(View3dControl source, View3dControl target, ELinkCameras cam = ELinkCameras.None)
        {
            Source  = new WeakReference <View3dControl>(source);
            Target  = new WeakReference <View3dControl>(target);
            CamLink = cam;

            // Watch for navigation events on 'source' and apply them to 'target'
            source.Window.MouseNavigating += WeakRef.MakeWeak <View3d.MouseNavigateEventArgs>(OnSourceNavigation, h => source.Window.MouseNavigating -= h);
        }
Example #2
0
        public View3dMeasurementUI(View3dControl owner)
        {
            InitializeComponent();
            Owner = GetWindow(owner);

            View3dCtrl  = owner;
            Measurement = new Measurement(owner.Window);
            PinState    = new PinData(this, EPin.TopRight);

            // Set up commands
            SetSpotColour   = Command.Create(this, SetSpotColourInternal);
            ReferenceFrames = new ListCollectionView(Enum <Measurement.EReferenceFrame> .ValuesArray);

            DataContext = this;
        }