Ejemplo n.º 1
0
        public void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            if (e.Properties.ObjectID == Preferences.Primitive)
            {
                Preferences = new AutoSitPreferences
                {
                    Primitive     = Preferences.Primitive,
                    PrimitiveName = e.Properties.Name,
                    Enabled       = Preferences.Enabled
                };

                m_instance.Client.Objects.ObjectProperties -= Objects_ObjectProperties;
            }
        }
Ejemplo n.º 2
0
        public void PrimitiveContextAction(object sender, EventArgs e)
        {
            Primitive prim = (Primitive)sender;

            Preferences = new AutoSitPreferences
            {
                Primitive     = prim.ID,
                PrimitiveName = prim.Properties != null ? prim.Properties.Name : "",
                Enabled       = Preferences.Enabled
            };
            if (prim.Properties == null)
            {
                m_instance.Client.Objects.ObjectProperties        += Objects_ObjectProperties;
                m_instance.Client.Objects.ObjectPropertiesUpdated += Objects_ObjectProperties;
            }
        }