public bool IsScriptValid()
        {
            bool IsValid = true;

            if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetGlobalEventById(GlobalEvent)) == false)
            {
                GlobalEvent = Guid.Empty;
                IsValid     = false;
            }
            return(IsValid);
        }
Exemplo n.º 2
0
        public bool IsScriptValid()
        {
            bool IsValid = true;

            if (Character != new Guid(GlobalConstants.CURRENT_PLAYER_ID) && ValidationTools.CheckObjectExistence(GameCore.Instance.GetPlayableCharacterById(Character)) == false)
            {
                Character = Guid.Empty;
                IsValid   = false;
            }
            return(IsValid);
        }
        public bool IsScriptValid()
        {
            bool IsValid = true;

            if (ValidationTools.CheckObjectExistence(Coords) == false || ValidationTools.CheckMapExistence(Coords) == false)
            {
                Coords.Map = Guid.Empty;
                IsValid    = false;
            }
            return(IsValid);
        }
Exemplo n.º 4
0
        public bool IsScriptValid()
        {
            bool IsValid = true;

            if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetTriggerById(Button)) == false)
            {
                Button  = Guid.Empty;
                IsValid = false;
            }
            return(IsValid);
        }
Exemplo n.º 5
0
        protected override void OnBefore(IInvocation invocation)
        {
            var validator  = (IValidator)Activator.CreateInstance(_validatorType);
            var entityType = _validatorType.BaseType.GetGenericArguments()[0];
            var entities   = invocation.Arguments.Where(t => t.GetType() == entityType);

            foreach (var entity in entities)
            {
                ValidationTools.Validate(validator, entity);
            }
        }
Exemplo n.º 6
0
        public bool IsScriptValid()
        {
            bool IsValid = true;

            if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetVariableById(Variable)) == false)
            {
                Variable = Guid.Empty;
                IsValid  = false;
            }
            return(IsValid);
        }
        public bool IsScriptValid()
        {
            bool IsValid = true;

            if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetStageCharacter(Character)) == false)
            {
                Character = Guid.Empty;
                IsValid   = false;
            }
            return(IsValid);
        }
        protected override void OnBefore(IInvocation invocation)
        {
            var validator  = (IValidator)Activator.CreateInstance(_validatorType);
            var entityType = _validatorType.BaseType.GetGenericArguments()[0];//0.prop u ifade eder, yani PRODUCT ı çeker

            //invocation method , bu methodun argumanlarına bak
            var entities = invocation.Arguments.Where(t => t.GetType() == entityType);

            foreach (var entity in entities)
            {
                ValidationTools.Validate(validator, entity);
            }
        }
Exemplo n.º 9
0
        private void Init()
        {
            try
            {
                this._Validator = new ValidationTools();
            }
            catch (Exception ex)
            {
                MessageBoxEnhanced.Error(ex.Message);
                return;
            }

            FillComboBoxes();
        }
Exemplo n.º 10
0
 private void Init()
 {
     try
     {
         this._RevenuesValidator = new ValidationTools();
     }
     catch (Exception ex)
     {
         MessageBoxEnhanced.Error(ex.Message);
         return;
     }
     this._Revenues      = new List <RevenueModel>();
     this._ValidRevenues = new List <RevenueModel>();
 }
Exemplo n.º 11
0
        public pEditBooking(Booking booking)
        {
            if (booking == null)
            {
                throw new Exception("Booking cannot be null.");
            }

            InitializeComponent();
            this.validator      = new ValidationTools();
            this.currentBooking = booking;

            // Fülle Felder
            fillFieldsWithSavedData(booking);
        }
Exemplo n.º 12
0
        /// <summary>
        /// Récupère une nouvelle instance d'un objet
        /// </summary>
        /// <param name="pId"></param>
        /// <returns></returns>
        public VO_Animation GetCharAnimationById(Guid idChar, Guid idAnim)
        {
            VO_Character character = GameCore.Instance.GetCharacterById(idChar);

            if (character.Id != Guid.Empty)
            {
                VO_Animation charAnimation = character.Animations.Find(p => p.Id == idAnim);
                if (charAnimation != null)
                {
                    return(charAnimation);
                }
            }
            return((VO_Animation)ValidationTools.CreateEmptyRessource(new VO_Animation()));
        }
Exemplo n.º 13
0
 public VO_StageAnimation GetStageAnimation(Guid animation)
 {
     foreach (VO_Stage item in Game.Stages)
     {
         foreach (VO_Layer layer in item.ListLayers)
         {
             VO_StageAnimation stageAnimation = layer.ListAnimations.Find(i => i.Id == animation);
             if (stageAnimation != null)
             {
                 return(stageAnimation);
             }
         }
     }
     return((VO_StageAnimation)ValidationTools.CreateEmptyRessource(new VO_StageAnimation()));
 }
        public bool IsScriptValid()
        {
            bool IsValid = true;

            if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetPlayableCharacterById(Character)) == false)
            {
                Character = Guid.Empty;
                IsValid   = false;
            }
            else if (UseOldCoords == false && (ValidationTools.CheckObjectExistence(Coords) == false || ValidationTools.CheckMapExistence(Coords) == false))
            {
                Coords.Map = Guid.Empty;
                IsValid    = false;
            }
            return(IsValid);
        }
Exemplo n.º 15
0
        private bool validation()
        {
            BulletedList_InfoFeedBack.Items.Clear();

            if (!ValidationTools.chequeDestination(TextBox_Destination.Text))
            {
                BulletedList_InfoFeedBack.Items.Add("Invalid Destination");
                return(false);
            }
            if (!ValidationTools.chequeTime(TextBox_Hour.Text, TextBox_Minute.Text))
            {
                BulletedList_InfoFeedBack.Items.Add("Invalid Time");
                return(false);
            }
            return(true);
        }
Exemplo n.º 16
0
        private void Init()
        {
            try
            {
                _Validator = new ValidationTools();
            }
            catch (Exception ex)
            {
                MessageBoxEnhanced.Error(ex.Message);
                return;
            }


            this.DataContext = _CurrentTeamMember;

            FillComboBoxes();
        }
Exemplo n.º 17
0
        private void Init()
        {
            this.deletedChilds = new List <int>();

            try
            {
                this._PartnerChildValidator = new ValidationTools();
            }
            catch (Exception ex)
            {
                MessageBoxEnhanced.Error(ex.Message);
                return;
            }
            this._Childs      = new List <ChildModel>();
            this._ValidChilds = new List <ChildModel>();
            this.DataContext  = _currentPerson;
        }
Exemplo n.º 18
0
        public bool IsScriptValid()
        {
            VO_PlayableCharacter playableCharacter = GameCore.Instance.GetPlayableCharacterById(Character);

            bool IsValid = true;

            if (ValidationTools.CheckObjectExistence(playableCharacter) == false)
            {
                Character = Guid.Empty;
                IsValid   = false;
            }
            if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetCharAnimationById(playableCharacter.CharacterId, Animation)) == false)
            {
                Animation = Guid.Empty;
                IsValid   = false;
            }
            return(IsValid);
        }
Exemplo n.º 19
0
        public pNewBooking()
        {
            InitializeComponent();
            this.validator = new ValidationTools();

            // Generiere Menüeinträge
            List <Account> accounts = Account.GetAccounts().ToList();

            cbSourceAccount.ItemsSource = accounts;
            cbTargetAccount.ItemsSource = accounts;

            cbTargetAccount.SelectionChanged -= cbTargetAccount_SelectionChanged;
            cbSourceAccount.SelectionChanged -= cbSourceAccount_SelectionChanged;
            cbSourceAccount.SelectedItem      = null;
            cbTargetAccount.SelectedItem      = null;
            cbTargetAccount.SelectionChanged += cbTargetAccount_SelectionChanged;
            cbSourceAccount.SelectionChanged += cbSourceAccount_SelectionChanged;
        }
Exemplo n.º 20
0
        private void Init()
        {
            try
            {
                this._PartnerChildValidator = new ValidationTools();
            }
            catch (Exception ex)
            {
                MessageBoxEnhanced.Error(ex.Message);
                return;
            }
            this._Childs      = new List <ChildModel>();
            this._ValidChilds = new List <ChildModel>();
            personLastName    = "";

            // Title ComboBox
            cbTitle1.ItemsSource = DB.Title.GetTitles();
        }
Exemplo n.º 21
0
        /// <summary>
        /// Initialisiert alle Variablen
        /// </summary>
        private void Init()
        {
            this.validator                  = new ValidationTools();
            this.DataContext                = this.currentUserAccount;
            tbBenutzername.Text             = this.currentUserAccount.Username;
            tbPasswort.Password             = this.currentUserAccount.Password;
            tbPasswortConfirmation.Password = this.currentUserAccount.Password;
            chkbIsAdmin.IsChecked           = this.currentUserAccount.IsAdmin;
            tbImage.Text  = this.currentUserAccount.ImageName;
            this.fileName = this.currentUserAccount.ImageName;

            string image = IniParser.GetSetting("SETTINGS", "imagePath") + "/" + this.currentUserAccount.ImageName;

            if (File.Exists(image))
            {
                userImage.Source = BitmapFrame.Create(new Uri(image, UriKind.Relative));
            }
        }
Exemplo n.º 22
0
        public pNewAccount()
        {
            InitializeComponent();

            this.validator = new ValidationTools();

            lbIsOfficial.Content      = IniParser.GetSetting("ACCOUNTING", "lbIsOfficial");
            lbIsCapital.Content       = IniParser.GetSetting("ACCOUNTING", "lbIsCapital");
            lbWhenZeroBilance.Content = IniParser.GetSetting("ACCOUNTING", "lbWhenZeroBilance");
            lbFixedAccount.Content    = IniParser.GetSetting("ACCOUNTING", "lbFixedAccount");

            // Initialisiere ComboBox mit Null-Zeiträumen
            List <AccountZeroPeriodEnum> zeroPeriods = new List <AccountZeroPeriodEnum>();

            zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.EveryCashClosure));
            zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Annually));
            zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Monthly));
            zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Never));
            cbZeroPeriod.ItemsSource = zeroPeriods;
        }
Exemplo n.º 23
0
        private void Init()
        {
            try
            {
                _Validator = new ValidationTools();
            }
            catch (Exception ex)
            {
                MessageBoxEnhanced.Error(ex.Message);
                return;
            }

            // Title ComboBox
            cbTitle.ItemsSource = DataModel.Title.GetTitles();

            // FundingType ComboBox
            cBFundingTyp.ItemsSource = FundingType.GetFundingTypes();

            gbCompanySponsor.Visibility = System.Windows.Visibility.Collapsed;
            gbCompanySponsor.IsEnabled  = false;
        }
Exemplo n.º 24
0
        /// <summary>
        /// Initialisiert alle Variablen
        /// </summary>
        private void Init()
        {
            this.validator             = new ValidationTools();
            this.DataContext           = this.currentAccount;
            tbAccountName.Text         = this.currentAccount.Name;
            tbAccountDescription.Text  = this.currentAccount.Description;
            chkbIsOfficial.IsChecked   = this.currentAccount.IsOfficial;
            chkbIsCapital.IsChecked    = this.currentAccount.IsCapital;
            chkbIsFixAccount.IsChecked = this.currentAccount.IsFixed;

            // Initialisiere ComboBox mit Null-Zeiträumen
            List <AccountZeroPeriodEnum> zeroPeriods = new List <AccountZeroPeriodEnum>();

            zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.EveryCashClosure));
            zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Annually));
            zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Monthly));
            zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Never));
            cbZeroPeriod.ItemsSource = zeroPeriods;

            // wähle das richtige aus
            if (this.currentAccount.ZeroPeriod == (int)DataModel.Enums.ZeroPeriod.EveryCashClosure)
            {
                cbZeroPeriod.SelectedIndex = 0;
            }
            if (this.currentAccount.ZeroPeriod == (int)DataModel.Enums.ZeroPeriod.Annually)
            {
                cbZeroPeriod.SelectedIndex = 1;
            }
            if (this.currentAccount.ZeroPeriod == (int)DataModel.Enums.ZeroPeriod.Monthly)
            {
                cbZeroPeriod.SelectedIndex = 2;
            }
            if (this.currentAccount.ZeroPeriod == (int)DataModel.Enums.ZeroPeriod.Never)
            {
                cbZeroPeriod.SelectedIndex = 3;
            }
        }
Exemplo n.º 25
0
 public void Update(Product product)
 {
     ValidationTools.Validata(new ProoductValidator(), product);
     this._productDal.Update(product);
 }
Exemplo n.º 26
0
 public void Add(Product product)
 {
     ValidationTools.Validata(new ProoductValidator(), product);
     this._productDal.Add(product);
 }
Exemplo n.º 27
0
 public void Add(Arac entity)
 {
     ValidationTools.Validate(new AracValidator(), entity);
     _dal.Add(entity);
 }
Exemplo n.º 28
0
 public void CreateOrder(Order order)
 {
     ValidationTools.FluentValidate(new OrderValidator(), order);
     order.OrderPlaced = DateTime.Now;
     _orderDal.Add(order);
 }
Exemplo n.º 29
0
 public void Update(Arac entity)
 {
     ValidationTools.Validate(new AracValidator(), entity);
     _dal.Update(entity);
 }
Exemplo n.º 30
0
 public void Update(Fatura entity)
 {
     ValidationTools.Validate(new FaturaValidator(), entity);
     _dal.Update(entity);
 }