コード例 #1
0
        public override void DoWork(Action <string, double> ReportProgress, Action Done)
        {
            Parent.Message = "Sending...";
            var converter = (Parent as SendLocalComponent)?.Converter;

            converter?.SetContextDocument(Rhino.RhinoDoc.ActiveDoc);
            var converted    = Utilities.DataTreeToNestedLists(data, converter);
            var ObjectToSend = new Base();

            ObjectToSend["@data"] = converted;
            sentObjectId          = Operations.Send(ObjectToSend).Result;
            Done();
        }
コード例 #2
0
        public override void DoWork(Action <string, double> ReportProgress, Action Done)
        {
            Parent.Message = "Sending...";
            try
            {
                var converter = (Parent as SendLocalComponent)?.Converter;
                converter?.SetContextDocument(Rhino.RhinoDoc.ActiveDoc);
                var converted    = Utilities.DataTreeToNestedLists(data, converter);
                var ObjectToSend = new Base();
                ObjectToSend["@data"] = converted;
                sentObjectId          = Operations.Send(ObjectToSend).Result;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                RuntimeMessages.Add((GH_RuntimeMessageLevel.Warning, e.Message));
            }

            Done();
        }