Ejemplo n.º 1
0
        private static void Value_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            UltimaPacketFilterProperty property = d as UltimaPacketFilterProperty;

            if (property != null)
            {
                property.Validate();
            }
        }
Ejemplo n.º 2
0
        private static void Definition_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            UltimaPacketFilterProperty property = d as UltimaPacketFilterProperty;

            if (property != null)
            {
                property._Code = Type.GetTypeCode(property.Definition.Info.PropertyType);

                // Check operation
                if (property.Definition != null)
                {
                    UltimaPacketFilterTypeOperation operation = UltimaPacketFilterTypeOperation.Greater;

                    if (!UltimaPacketFilterParser.IsValidOperation(property.Definition, property.Operation, ref operation))
                    {
                        property.Operation = operation;
                    }
                }

                property.Validate();
            }
        }