Ejemplo n.º 1
0
        public ResourceElementVM(ResourceElementOptions options, ModuleDef ownerModule, bool canDeserialize)
        {
            origOptions         = options;
            this.canDeserialize = canDeserialize;

            BooleanVM             = new BooleanVM(a => HasErrorUpdated());
            CharVM                = new CharVM(a => HasErrorUpdated());
            ByteVM                = new ByteVM(a => HasErrorUpdated());
            SByteVM               = new SByteVM(a => HasErrorUpdated());
            Int16VM               = new Int16VM(a => HasErrorUpdated());
            UInt16VM              = new UInt16VM(a => HasErrorUpdated());
            Int32VM               = new Int32VM(a => HasErrorUpdated());
            UInt32VM              = new UInt32VM(a => HasErrorUpdated());
            Int64VM               = new Int64VM(a => HasErrorUpdated());
            UInt64VM              = new UInt64VM(a => HasErrorUpdated());
            SingleVM              = new SingleVM(a => HasErrorUpdated());
            DoubleVM              = new DoubleVM(a => HasErrorUpdated());
            DecimalVM             = new DecimalVM(a => HasErrorUpdated());
            DateTimeVM            = new DateTimeVM(a => HasErrorUpdated());
            TimeSpanVM            = new TimeSpanVM(a => HasErrorUpdated());
            UserTypeVM            = new UserTypeVM(ownerModule, canDeserialize);
            ResourceElementTypeVM = new EnumListVM(resourceElementTypeList, (a, b) => OnResourceElementTypeChanged());

            UserTypeVM.PropertyChanged += (s, e) => {
                if (e.PropertyName == nameof(UserTypeVM.HasError))
                {
                    HasErrorUpdated();
                }
            };

            Reinitialize();
        }
Ejemplo n.º 2
0
        public ResourceElementVM(ResourceElementOptions options, ModuleDef ownerModule, bool canDeserialize)
        {
            this.origOptions    = options;
            this.canDeserialize = canDeserialize;

            this.booleanVM             = new BooleanVM(a => HasErrorUpdated());
            this.charVM                = new CharVM(a => HasErrorUpdated());
            this.byteVM                = new ByteVM(a => HasErrorUpdated());
            this.sbyteVM               = new SByteVM(a => HasErrorUpdated());
            this.int16VM               = new Int16VM(a => HasErrorUpdated());
            this.uint16VM              = new UInt16VM(a => HasErrorUpdated());
            this.int32VM               = new Int32VM(a => HasErrorUpdated());
            this.uint32VM              = new UInt32VM(a => HasErrorUpdated());
            this.int64VM               = new Int64VM(a => HasErrorUpdated());
            this.uint64VM              = new UInt64VM(a => HasErrorUpdated());
            this.singleVM              = new SingleVM(a => HasErrorUpdated());
            this.doubleVM              = new DoubleVM(a => HasErrorUpdated());
            this.decimalVM             = new DecimalVM(a => HasErrorUpdated());
            this.dateTimeVM            = new DateTimeVM(a => HasErrorUpdated());
            this.timeSpanVM            = new TimeSpanVM(a => HasErrorUpdated());
            this.userTypeVM            = new UserTypeVM(ownerModule, canDeserialize);
            this.resourceElementTypeVM = new EnumListVM(resourceElementTypeList, (a, b) => OnResourceElementTypeChanged());

            this.UserTypeVM.PropertyChanged += (s, e) => {
                if (e.PropertyName == "HasError")
                {
                    HasErrorUpdated();
                }
            };

            Reinitialize();
        }
Ejemplo n.º 3
0
        public ResourceElementVM(ResourceElementOptions options, ModuleDef ownerModule, bool canDeserialize)
        {
            this.origOptions = options;
            this.canDeserialize = canDeserialize;

            this.booleanVM = new BooleanVM(a => HasErrorUpdated());
            this.charVM = new CharVM(a => HasErrorUpdated());
            this.byteVM = new ByteVM(a => HasErrorUpdated());
            this.sbyteVM = new SByteVM(a => HasErrorUpdated());
            this.int16VM = new Int16VM(a => HasErrorUpdated());
            this.uint16VM = new UInt16VM(a => HasErrorUpdated());
            this.int32VM = new Int32VM(a => HasErrorUpdated());
            this.uint32VM = new UInt32VM(a => HasErrorUpdated());
            this.int64VM = new Int64VM(a => HasErrorUpdated());
            this.uint64VM = new UInt64VM(a => HasErrorUpdated());
            this.singleVM = new SingleVM(a => HasErrorUpdated());
            this.doubleVM = new DoubleVM(a => HasErrorUpdated());
            this.decimalVM = new DecimalVM(a => HasErrorUpdated());
            this.dateTimeVM = new DateTimeVM(a => HasErrorUpdated());
            this.timeSpanVM = new TimeSpanVM(a => HasErrorUpdated());
            this.userTypeVM = new UserTypeVM(ownerModule, canDeserialize);
            this.resourceElementTypeVM = new EnumListVM(resourceElementTypeList, (a, b) => OnResourceElementTypeChanged());

            this.UserTypeVM.PropertyChanged += (s, e) => {
                if (e.PropertyName == "HasError")
                    HasErrorUpdated();
            };

            Reinitialize();
        }
Ejemplo n.º 4
0
		public ResourceElementVM(ResourceElementOptions options, ModuleDef ownerModule, bool canDeserialize) {
			origOptions = options;
			this.canDeserialize = canDeserialize;

			BooleanVM = new BooleanVM(a => HasErrorUpdated());
			CharVM = new CharVM(a => HasErrorUpdated());
			ByteVM = new ByteVM(a => HasErrorUpdated());
			SByteVM = new SByteVM(a => HasErrorUpdated());
			Int16VM = new Int16VM(a => HasErrorUpdated());
			UInt16VM = new UInt16VM(a => HasErrorUpdated());
			Int32VM = new Int32VM(a => HasErrorUpdated());
			UInt32VM = new UInt32VM(a => HasErrorUpdated());
			Int64VM = new Int64VM(a => HasErrorUpdated());
			UInt64VM = new UInt64VM(a => HasErrorUpdated());
			SingleVM = new SingleVM(a => HasErrorUpdated());
			DoubleVM = new DoubleVM(a => HasErrorUpdated());
			DecimalVM = new DecimalVM(a => HasErrorUpdated());
			DateTimeVM = new DateTimeVM(a => HasErrorUpdated());
			TimeSpanVM = new TimeSpanVM(a => HasErrorUpdated());
			UserTypeVM = new UserTypeVM(ownerModule, canDeserialize);
			ResourceElementTypeVM = new EnumListVM(resourceElementTypeList, (a, b) => OnResourceElementTypeChanged());

			UserTypeVM.PropertyChanged += (s, e) => {
				if (e.PropertyName == nameof(UserTypeVM.HasError))
					HasErrorUpdated();
			};

			Reinitialize();
		}