Exemplo n.º 1
0
 public static void Initialize()
 {
     internalvalue = QueryPageHelper.RegisterSection("TMCustomSkills", "Custom Skills");
     foreach (string s in MiscSkillNames)
     {
         miscsearch.Add(s);
     }
     foreach (string s in CombatSkillNames)
     {
         combsearch.Add(s);
     }
     foreach (string s in ActionSkillNames)
     {
         actisearch.Add(s);
     }
     foreach (string s in LoreSkillNames)
     {
         loresearch.Add(s);
     }
     foreach (SkillInfo si in SkillInfo.Table)
     {
         if (!miscsearch.Contains(si.Name) && !combsearch.Contains(si.Name) && !actisearch.Contains(si.Name) && !loresearch.Contains(si.Name))
         {
             custsearch.Add(si.Name);
         }
     }
     SkinHelper.LoadSkin("Skill Skin", typeof(TMSS.SkillSkin), true);
 }
Exemplo n.º 2
0
        public static void LMS_OnCommand(CommandEventArgs e)
        {
            string which = "";

            if (e.Arguments.Length > 0)
            {
                try { which = e.Arguments[0]; }
                catch (Exception ex)
                { Console.WriteLine("Invalid arguments. " + ex); }
            }
            if (which != "")
            {
                try { SkinHelper.LoadSkin(which, typeof(TMSS4Skin), true); }
                catch (Exception ex) { Console.WriteLine("Invalid skin name argument: " + ex); }
            }
            else
            {
                try
                {
                    DirectoryInfo di = new DirectoryInfo("TMSS/Data/Skins");
                    foreach (FileInfo f in di.GetFiles())
                    {
                        if (f.Extension == ".tskn")
                        {
                            string skname = f.Name.Remove(f.Name.IndexOf(".tskn"), 5);
                            try
                            {
                                BaseSkin sk = SkinHelper.skList[skname];
                                try
                                {
                                    TMSS4Skin skfour = (TMSS4Skin)sk;
                                    SkinHelper.LoadSkin(skname, typeof(TMSS4Skin), true);
                                }
                                catch
                                {
                                    SkillSkin skskill = (SkillSkin)sk;
                                    SkinHelper.LoadSkin(skname, typeof(SkillSkin), true);
                                }
                                finally
                                {
                                    DoTell("Attempted reload of skin. Filename: " + f.FullName);
                                }
                            }
                            catch
                            { DoTell("Unable to load skin: " + skname + ". Please use the function provided by the creating class to load it."); }
                        }
                    }
                }
                catch (Exception ex)
                {
                    SystemWrite("Error when reloading a skin. " + ex);
                }
            }
            //LoadSkin(SkillSettings.CCSkinName, true);
        }
        protected override void BindCommands()
        {
            ColorSelectedCommand = new RelayCommand(() =>
            {
                SkinColorType colorType = BooleanToSkinColorType();
                SkinHelper.LoadSkin(colorType);
                SaveSkin(colorType);
            });

            CancelCommand = new RelayCommand(() =>
            {
                SkinColorTypeToBoolean(DefaultColorType);
                SkinHelper.LoadSkin(DefaultColorType);
                Messenger.Default.Send(new NotificationMessage(this, UIMessageType.SkinConfiguration_CloseWindowEvent));
            });

            OKCommand = new RelayCommand(() =>
            {
                Messenger.Default.Send(new NotificationMessage(this, UIMessageType.SkinConfiguration_CloseWindowEvent));
            });
        }
Exemplo n.º 4
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            try
            {
                if (ConfigurationMaster.ContainsKey(SkinHelper.SkinColorConfigurationKey))
                {
                    SkinColorType skin = SkinHelper.StringToSkinColorType(ConfigurationMaster.Get(SkinHelper.SkinColorConfigurationKey));
                    SkinHelper.LoadSkin(skin);
                }

                LanguageLoader.LoadLanguageResource(CultureHelper.Component, CultureHelper.Culture);
            }
            catch (Exception ex)
            {
                ExceptionHandler.Handle(ex);
            }

            LoginModel     model     = new LoginModel();
            LoginViewModel viewModel = new LoginViewModel(model, LoginResultCallback);

            loginView.DataContext = viewModel;
        }
Exemplo n.º 5
0
 public void RSS_OnCommand(CommandEventArgs e)
 {
     SkinHelper.LoadSkin("Skill Skin", typeof(Server.TMSS.SkillSkin), true);
 }