Beispiel #1
0
        public virtual object GetWizard(WizardInputModel model)
        {
            if (!_unlockApi)
            {
                return(JToken.FromObject(new ApiStatusMessage("You do not have permissions to perform that action", "Permissions Denied", ApiMessageType.Alert)));
            }

            return(WizardFactory.CreateWizardScreenContent(model.Wizard, model.Screen));
        }
Beispiel #2
0
        public void AddWizardClones(int id)
        {
            var wizard       = this.GetWizard(id);
            var name         = wizard.Name;
            var magicalPower = wizard.MagicalPower / 2;
            var firstChild   = WizardFactory.CreateWizard(name, magicalPower, this.wizards.Count);

            this.wizards.Add(this.wizards.Count, firstChild);
            var secondChild = WizardFactory.CreateWizard(name, magicalPower, this.wizards.Count);

            this.wizards.Add(this.wizards.Count, secondChild);
            wizard.CastMagic += firstChild.Cast;
            wizard.CastMagic += secondChild.Cast;
        }
Beispiel #3
0
        public static IWizardForm CreateWizard()
        {
            switch (WizStyle)
            {
            case WizardStyle.Aero:
                return(new W3b.Wizards.WindowsForms.Aero.AeroWizardForm());

            case WizardStyle.Wizard97:
                return(new W3b.Wizards.WindowsForms.Wizard97.Wizard97WizardForm());

            case WizardStyle.PlatformDefault:
            default:
                return(WizardFactory.Create());
            }
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            ICharacterFactory factory;

            Character character;

            //// Create archer
            factory   = new ArcherFactory();
            character = factory.Create();

            //// Create warrior
            factory   = new WarriorFactory();
            character = factory.Create();

            //// Create wizard
            factory   = new WizardFactory();
            character = factory.Create();
        }
        protected override object ProcessWizard(object inputModel, bool isSave = false)
        {
            var model = new WizardInputModel(inputModel);

            string groupKey  = $"{WizardPrefix}";
            string screenKey = string.IsNullOrWhiteSpace(model.Screen) ? "Screen_Start" : model.Screen;

            //screenKey = "Screen_DoesNotExist";

            /*
             * switch (model.Section)
             * {
             *  case 0:
             *      groupKey = $"{WizardPrefix}_0";
             *      break;
             *  case 1:
             *      if (model.Step < 1)
             *          groupKey = $"{WizardPrefix}_1.1";
             *
             *      if (isSave)
             *      {
             *          model.Validate(ValidationOptions.PersonalInfo);
             *      }
             *      break;
             *  case 3:
             *      if (isSave)
             *      {
             *          model.Validate(ValidationOptions.ApplicationOptions);
             *      }
             *
             *      break;
             *  case 4:
             *      if (model.Step < 1)
             *          groupKey = $"{WizardPrefix}_4";
             *      break;
             * }
             */
            //var fields = DataRepository.GetFieldData(groupKey);


            return(WizardFactory.CreateWizardScreenContent(groupKey, screenKey, model));
        }
Beispiel #6
0
        public void AddWizard(string name, int magicalPower, int id = 0)
        {
            var wizard = WizardFactory.CreateWizard(name, magicalPower, id);

            this.wizards.Add(id, wizard);
        }
Beispiel #7
0
 protected virtual object ProcessWizard(object model, bool isSave = false)
 {
     return(WizardFactory.CreateWizardContent(null, model));
 }