Ejemplo n.º 1
0
        internal static void DictionaryToBlock(General block, PropertyKey propKey)
        {
            object propValue = block.PropertyDictionary[propKey];

            SetNxopenBlockValue(block, propKey.Type, propKey.Name, propValue);
        }
Ejemplo n.º 2
0
        internal static void SetDictionaryValue(General block, Snap.UI.Block.PropertyType propType, string propName, object propValue, Dictionary <PropertyKey, object> dict)
        {
            PropertyKey key = new PropertyKey(propType, propName);

            if (!dict.ContainsKey(key))
            {
                dict.Add(key, propValue);
            }
            if ((propType == Snap.UI.Block.PropertyType.IntegerArray) && (propValue != null))
            {
                int[] numArray  = (int[])propValue;
                int[] numArray2 = (int[])numArray.Clone();
                dict[key] = numArray2;
            }
            else if ((propType == Snap.UI.Block.PropertyType.DoubleArray) && (propValue != null))
            {
                double[] numArray3 = (double[])propValue;
                double[] numArray4 = (double[])numArray3.Clone();
                dict[key] = numArray4;
            }
            if ((propType == Snap.UI.Block.PropertyType.IntegerMatrix) && (propValue != null))
            {
                int[,] numArray5 = (int[, ])propValue;
                int[,] numArray6 = (int[, ])numArray5.Clone();
                dict[key]        = numArray6;
            }
            else if ((propType == Snap.UI.Block.PropertyType.DoubleMatrix) && (propValue != null))
            {
                double[,] numArray7 = (double[, ])propValue;
                double[,] numArray8 = (double[, ])numArray7.Clone();
                dict[key]           = numArray8;
            }
            else if ((propType == Snap.UI.Block.PropertyType.StringArray) && (propValue != null))
            {
                string[] strArray  = (string[])propValue;
                string[] strArray2 = (string[])strArray.Clone();
                dict[key] = strArray2;
            }
            else if ((propType == Snap.UI.Block.PropertyType.ObjectArray) && (propValue != null))
            {
                TaggedObject[] objArray  = (TaggedObject[])propValue;
                TaggedObject[] objArray2 = (TaggedObject[])objArray.Clone();
                dict[key] = objArray2;
            }
            else if ((propType == Snap.UI.Block.PropertyType.EnumMembers) && (propValue != null))
            {
                string[] strArray3 = (string[])propValue;
                string[] strArray4 = (string[])strArray3.Clone();
                dict[key] = strArray4;
            }
            else if ((propType == Snap.UI.Block.PropertyType.Filter) && (propValue != null))
            {
                Selection.MaskTriple[] tripleArray  = (Selection.MaskTriple[])propValue;
                Selection.MaskTriple[] tripleArray2 = (Selection.MaskTriple[])tripleArray.Clone();
                dict[key] = tripleArray2;
            }
            else
            {
                dict[key] = propValue;
            }
        }
Ejemplo n.º 3
0
 internal static void AddProperty(General block, PropertyKey propKey, object propValue)
 {
     block.PropertyDictionary.Add(propKey, propValue);
 }