Beispiel #1
0
 internal void SetSelectedObjects(Snap.NX.NXObject[] objs)
 {
     TaggedObject[] propValue = new TaggedObject[objs.Length];
     for (int i = 0; i < objs.Length; i++)
     {
         propValue[i] = objs[i].NXOpenTaggedObject;
     }
     PropertyAccess.SetPropertyValue(this, Snap.UI.Block.PropertyType.ObjectArray, "SelectedObjects", propValue);
 }
Beispiel #2
0
        internal void CopyFromDictionary(BlockForm form)
        {
            string  privateName = this.privateName;
            UIBlock block       = form.SnapBlockDialog.TopBlock.FindBlock(privateName);

            this.NXOpenBlock = block;
            foreach (PropertyKey key in this.PropertyDictionary.Keys)
            {
                PropertyAccess.DictionaryToBlock(this, key);
            }
        }
Beispiel #3
0
 internal Snap.NX.NXObject[] GetSelectedObjects()
 {
     TaggedObject[] objArray = (TaggedObject[])PropertyAccess.GetPropertyValue(this, Snap.UI.Block.PropertyType.ObjectArray, "SelectedObjects");
     if (((objArray == null) || (objArray.Length == 0)) || ((objArray.Length == 1) && (objArray[0] == null)))
     {
         return(new Snap.NX.NXObject[0]);
     }
     Snap.NX.NXObject[] objArray2 = new Snap.NX.NXObject[objArray.Length];
     for (int i = 0; i < objArray2.Length; i++)
     {
         objArray2[i] = Snap.NX.NXObject.CreateNXObject(objArray[i]);
     }
     return(objArray2);
 }
Beispiel #4
0
        internal void BlockToDictionary(BlockForm form)
        {
            Dictionary <PropertyKey, object> dict = new Dictionary <PropertyKey, object>();

            foreach (PropertyKey key in this.PropertyDictionary.Keys)
            {
                string name = key.Name;
                Snap.UI.Block.PropertyType propType = key.Type;
                object propValue = PropertyAccess.GetNxopenBlockValue(this, propType, name);
                if (name != "SelectedObjects")
                {
                    PropertyAccess.SetDictionaryValue(this, propType, name, propValue, dict);
                }
            }
            this.PropertyDictionary = dict;
        }