Beispiel #1
0
        private void GenerateAssemblyEventHandler()
        {
            Point[]        anchorRelativeSampled = UserInputs[0].GetSampledCurve();
            ConnectionInfo info;

            if (IsEndPointSelected)
            {
                //var target = (CanvasElements.First(element =>
                //    element is Ellipse &&
                //    ((Ellipse)element).Tag is ConnectionInfo &&
                //    ((ConnectionInfo)((Ellipse)element).Tag).IsSelected)) as Ellipse;

                //if (target == null) return;
                //info = target?.Tag as ConnectionInfo;

                GenerateAssemblyToFitCurveEvent.GenerateAssemblyToFitCurveEventArgs args =
                    new GenerateAssemblyToFitCurveEvent.GenerateAssemblyToFitCurveEventArgs()
                {
                    SampledeCurve = anchorRelativeSampled,
                    Info          = null
                };
                _eventAggregator.GetEvent <GenerateAssemblyToFitCurveEvent>().Publish(args);
            }
        }
        private void GenerateAssemblyToFitCurveEventHandler(GenerateAssemblyToFitCurveEvent.GenerateAssemblyToFitCurveEventArgs args)
        {
            var assembly = AssemblySolver.SolveForAssembly(args);

            _eventAggregator.GetEvent <SolvedAssemblyEvent>().Publish(assembly);
        }