public override void Unload()
        {
            NetHandler.Unload();
            NPCSets.Unload();
            SquireMinionTypes.Unload();
            NecromancerAccessory.Unload();
            SquireGlobalProjectile.Unload();
            IdleLocationSets.Unload();
            TargetSelectionTacticHandler.Unload();
            UserInterfaces.Unload();
            MinionTacticsGroupMapper.Unload();
            LandChunkConfigs.Unload();
            SpriteCompositionManager.Unload();
            CritterConfigs.Unload();
            AmuletOfManyMinionsWorld.Unload();
            PartyHatSystem.Unload();
            CombatPetLevelTable.Unload();
            CombatPetBuff.Unload();
            BlackCatMinion.Unload();
            QuizResult.Unload();
            DefaultPetsQuizData.Unload();

            CycleTacticHotKey       = null;
            CycleTacticsGroupHotKey = null;
            QuickDefendHotKey       = null;
        }
        public override void Load()
        {
            NetHandler.Load();
            NPCSets.Load();
            SquireMinionTypes.Load();
            NecromancerAccessory.Load();
            SquireGlobalProjectile.Load();
            IdleLocationSets.Load();
            TargetSelectionTacticHandler.Load();
            UserInterfaces.Load();
            MinionTacticsGroupMapper.Load();
            LandChunkConfigs.Load();
            SpriteCompositionManager.Load();
            CritterConfigs.Load();
            AmuletOfManyMinionsWorld.Load();
            CombatPetLevelTable.Load();
            CombatPetBuff.Load();
            DefaultPetsQuizData.Load();

            CycleTacticHotKey       = RegisterHotKey("Cycle Minion Tactic", "K");
            CycleTacticsGroupHotKey = RegisterHotKey("Cycle Tactics Group", "L");
            QuickDefendHotKey       = RegisterHotKey("Minion Quick Defend", "V");
            if (!Main.dedServ)
            {
                AddEquipTexture(null, EquipType.Legs, "RoyalGown_Legs", "AmuletOfManyMinions/Items/Armor/RoyalArmor/RoyalGown_Legs");
            }
        }
        /// <summary>
        ///   Checks the specified version.
        /// </summary>
        /// <param name="host">User interface host address</param>
        /// <param name="version">The User interface module version.</param>
        /// <exception cref="System.ArgumentNullException">
        ///   <paramref name="host"/> or <paramref name="version"/> is <see langword="null"/>.
        /// </exception>
        public void Check(string host, string version)
        {
            if (string.IsNullOrEmpty(host))
            {
                throw new ArgumentNullException(nameof(host));
            }

            if (string.IsNullOrEmpty(version))
            {
                throw new ArgumentNullException(nameof(version));
            }

            var hostUrl = new Uri(host);

            var hostUri = hostUrl.AbsoluteUri;

            var context = OperationContext.Current;

            var remoteIp = context.GetRemoteIp();

            var remotePort = context.GetRemotePort();

            var userInterfaceModule = _userInterfacesRepository.Get(hostUri).SingleOrDefault();

            if (userInterfaceModule != null)
            {
                userInterfaceModule.LastCheckedUtc = _timeService.GetUtc();
                userInterfaceModule.RemoteIp       = remoteIp;
                userInterfaceModule.RemotePort     = remotePort;
                userInterfaceModule.Version        = version;
            }
            else
            {
                userInterfaceModule =
                    new UserInterfaces
                {
                    Host           = hostUri,
                    LastCheckedUtc = _timeService.GetUtc(),
                    RegisteredUtc  = _timeService.GetUtc(),
                    RemoteIp       = remoteIp,
                    RemotePort     = remotePort,
                    Version        = version
                };

                _userInterfacesRepository.Insert(userInterfaceModule);
            }

            _userInterfacesRepository.Save();

            ValidateVersion(version);
        }
Esempio n. 4
0
        public virtual void CommandBackExecute(object parameter)
        {
            var isproceed = true;

            if (base.IsDirty && !this.IsReadOnly)
            {
                var result = ModernDialog.ShowMessage("Uncommitted changes will be lost, are you sure you want to proceed?",
                                                      "Close", MessageBoxButton.YesNo, AppCache.MainWindow);
                isproceed = result == MessageBoxResult.Yes;
            }

            //Is this UI link to parent, if yes, go back to it
            if (isproceed)
            {
                var parentUI = UserInterfaces.GetParent(this.UserInterface);
                if (parentUI != null)
                {
                    NavigationManager.Show(parentUI);
                }
            }
        }
Esempio n. 5
0
        protected override void OnSet(ApplicationDefinition definition)
        {
            Namespace = definition.Namespace;

            Enumerations.Set(definition.Enumerations);

            Models.Set(definition.Models);
            Models.SetRef(this);
            Models.SetAdd(this);

            Databases.Set(definition.Databases);
            Databases.SetRef(this);
            Databases.SetAdd(this);

            Services.Set(definition.Services);
            Services.SetRef(this);
            Services.SetAdd(this);

            UserInterfaces.Set(definition.UserInterfaces);

            Models.OrderEntities();
        }
 public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers)
 {
     UserInterfaces.ModifyInterfaceLayers(layers);
 }
 public override void UpdateUI(GameTime gameTime)
 {
     UserInterfaces.UpdateUI(gameTime);
 }