コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: tsebalj1/rawr
        public void LoadCharacterFromArmory(string characterName, CharacterRegion region, string realm)
        {
            ArmoryLoadDialog armoryLoad = new ArmoryLoadDialog();

            armoryLoad.Closed += new EventHandler(armoryLoad_Closed);
            armoryLoad.Show();
            armoryLoad.Load(characterName, region, realm);
        }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: tsebalj1/rawr
        private void LoadFromArmory(object sender, RoutedEventArgs args)
        {
            if (_unsavedChanges)
            {
                NeedToSaveCharacter();
            }
            ArmoryLoadDialog armoryLoad = new ArmoryLoadDialog();

            armoryLoad.Closed += new EventHandler(armoryLoad_Closed);
            armoryLoad.Show();
        }
コード例 #3
0
ファイル: MainPage.xaml.cs プロジェクト: tsebalj1/rawr
        private void armoryLoad_Closed(object sender, EventArgs e)
        {
            ArmoryLoadDialog ald = sender as ArmoryLoadDialog;

            if (((ArmoryLoadDialog)sender).DialogResult.GetValueOrDefault(false))
            {
                Character character = ald.Character;
                // The removes force it to put those items at the end.
                // So we can use that for recall later on what was last used
                if (Rawr.Properties.RecentSettings.Default.RecentChars.Contains(character.Name))
                {
                    Rawr.Properties.RecentSettings.Default.RecentChars.Remove(character.Name);
                }
                if (Rawr.Properties.RecentSettings.Default.RecentServers.Contains(character.Realm))
                {
                    Rawr.Properties.RecentSettings.Default.RecentServers.Remove(character.Realm);
                }
                Rawr.Properties.RecentSettings.Default.RecentChars.Add(character.Name);
                Rawr.Properties.RecentSettings.Default.RecentServers.Add(character.Realm);
                Rawr.Properties.RecentSettings.Default.RecentRegion = character.Region.ToString();

                this.Character = character;
            }
        }
コード例 #4
0
ファイル: MainPage.xaml.cs プロジェクト: LucasPeacecraft/rawr
 // Armory (Retired)
 public void LoadCharacterFromArmory(string characterName, CharacterRegion region, string realm)
 {
     ArmoryLoadDialog armoryLoad = new ArmoryLoadDialog();
     armoryLoad.Closed += new EventHandler(armoryLoad_Closed);
     armoryLoad.Show();
     armoryLoad.Load(characterName, region, realm);
 }