예제 #1
0
            public static bool Heman(EndianReader reader)
            {
                try
                {
                    if (Settings.applicationEasterEggs)
                    {
                        //if (CheckFileIsDownloaded())
                        //{
                        reader.SeekTo(0x00);
                        if (reader.ReadUInt32() == 1230464614)
                        {
                            // Play Video
                            Settings.homeWindow.mediaIWff.LoadedBehavior = System.Windows.Controls.MediaState.Manual;
                            Settings.homeWindow.mediaIWff.Source = new Uri("http://assembly.xboxchaos.com/kbdata/IWff.etmp");
                            Settings.homeWindow.maskingIWff.Visibility = Visibility.Visible;
                            Settings.homeWindow.mediaIWff.Play();
                            Settings.homeWindow.mediaIWff.MediaEnded += (o, args) =>
                                {
                                    Settings.homeWindow.mediaIWff.Position = new TimeSpan(0);
                                    Settings.homeWindow.mediaIWff.Play();
                                };

                            return true;
                        }
                        //}
                    }

                    return false;
                }
                catch { return false; }
            }
예제 #2
0
        /// <summary>
        /// Load a language into the listview
        /// </summary>
        private void LoadLanguage()
        {
            using (EndianReader reader = new EndianReader(_streamManager.OpenRead(), Endian.BigEndian))
            {
                _currentLocaleTable = _currentLanguage.LoadStrings(reader);
            }

            _locales = new List<LocaleEntry>();
            _localeView = CollectionViewSource.GetDefaultView(_locales);
            _localeView.Filter = LocaleFilter;

            for (int i = 0; i < _currentLocaleTable.Strings.Count; i++)
            {
                Locale locale = _currentLocaleTable.Strings[i];
                string stringId = _cache.StringIDs.GetString(locale.ID);
                if (stringId == null)
                    stringId = locale.ID.ToString();

                _locales.Add(new LocaleEntry(i, stringId, locale.Value));
            }

            LoadGroups();

            Dispatcher.Invoke(new Action( delegate { lvLocales.DataContext = _localeView; }));
        }