public override void OnActivate() { base.OnActivate(); var fastAccessTools = new SplineFastAccessTools(ActionsGraph); RibbonPanel.Children.Add(fastAccessTools); GetOptions(); InitSession(); }
public override void OnActivate() { base.OnActivate(); DefinedPointCount = 0; ActionsGraph[InputNames.CoordinateParser].Send(CoordinatateParserNames.SetStage, ParserStage.PointAsked); Inputs[InputNames.Mouse3DEventsPipe].Send(NotificationNames.Suspend); var fastAccessTools = new SplineFastAccessTools(ActionsGraph); RibbonPanel.Children.Add(fastAccessTools); Document.Transact(); Points.Add(new Point3D()); }
protected override void FillUiDependencies() { Dependency.FunctionName = FunctionNames.Spline; var actionsGraph = Dependency.ActionsGraph; try { var ribbonPanel = actionsGraph[InputNames.FastToolbarInput].Get <StackPanel>(); var fastAccessTools = new SplineFastAccessTools(actionsGraph); ribbonPanel.Children.Add(fastAccessTools); } catch (Exception) { } Dependency.AddStepByName(InterpreterNames.Point3D); Dependency.AddStepByName(InterpreterNames.Point3D); Dependency.Steps[0].OnCandidateUpdateHandler += OnCandidateUpdate; Dependency.Steps[0].HintText = ModelingResources.SplineStep1; Dependency.Steps[1].OnCandidateUpdateHandler += OnCandidateUpdate; Dependency.Steps[1].HintText = ModelingResources.SplineStep2; Dependency.AutoFace = true; Dependency.AutoReset = false; Dependency.OnDisconnect += OnDeactivate; _solvedSteps = 0; var mouseCursorInput = Dependency.Inputs.Inputs[InputNames.MouseCursorInput]; mouseCursorInput.Send(NotificationNames.SetResourceManager, MetaActionResource.ResourceManager); mouseCursorInput.Send(NotificationNames.SetCursorName, "spline.cur"); _multiplePointsWarningShown = false; }