Exemplo n.º 1
0
        private void StarterWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            HideLoading();

            if (e.Error != null)
            {
                ShowNotification(NotificationType.Error, e.Error);
                return;
            }

            // Set filter
            _Filter.Initialize();
            FilterView.Filter = _Filter;

            if (_Filter != null && File.Exists(_DefaultFilter))
            {
                using (FileStream stream = File.Open(_DefaultFilter, FileMode.Open))
                {
                    try
                    {
                        _Filter.Load(stream);
                    }
                    catch
                    {
                        ShowNotification(NotificationType.Warning, "Could not load filter table, using a new one...");
                    }
                }
            }

            if (Globals.Instance.LegacyClientFolder != null)
            {
                ShowNotification(NotificationType.Info, String.Format("Detected classic client in folder '{0}'", Globals.Instance.LegacyClientFolder));
            }

            if (Globals.Instance.EnhancedClientFolder != null)
            {
                ShowNotification(NotificationType.Info, String.Format("Detected enhanced client in folder '{0}'", Globals.Instance.EnhancedClientFolder));
            }

            if (Globals.Instance.VlcInstallationFolder != null)
            {
                ShowNotification(NotificationType.Info, String.Format("Detected VLC player version '{0}'", VlcPlayer.GetVersion(Globals.Instance.VlcInstallationFolder)));
            }
            else
            {
                ShowNotification(NotificationType.Warning, "VLC player not installed. Some features will not be supported.");
            }

            if (Globals.Instance.ItemDefinitions != null && Globals.Instance.ItemProperties != null)
            {
                LootAnalyzerButton.IsEnabled = true;
            }
        }
Exemplo n.º 2
0
        private void StarterWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            HideLoading();

            if (e.Error != null)
            {
                ShowNotification(NotificationType.Error, e.Error);
                return;
            }

            // Set filter
            _Filter.Initialize();
            FilterView.Filter = _Filter;

            if (_Filter != null)
            {
                using (IsolatedStorageFile storage = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain, null, null))
                {
                    if (storage.FileExists(_DefaultFilter))
                    {
                        using (IsolatedStorageFileStream stream = storage.OpenFile(_DefaultFilter, FileMode.Open, FileAccess.Read, FileShare.Read))
                        {
                            if (stream != null)
                            {
                                _Filter.Load(stream);
                            }
                        }
                    }
                }
            }

            if (Globals.Instance.LegacyClientFolder != null)
            {
                ShowNotification(NotificationType.Info, String.Format("Detected classic client in folder '{0}'", Globals.Instance.LegacyClientFolder));
            }

            if (Globals.Instance.EnhancedClientFolder != null)
            {
                ShowNotification(NotificationType.Info, String.Format("Detected enhanced client in folder '{0}'", Globals.Instance.EnhancedClientFolder));
            }

            if (Globals.Instance.VlcInstallationFolder != null)
            {
                ShowNotification(NotificationType.Info, String.Format("Detected VLC player version '{0}'", VlcPlayer.GetVersion(Globals.Instance.VlcInstallationFolder)));
            }
            else
            {
                ShowNotification(NotificationType.Warning, "VLC player not installed. Some features will not be supported.");
            }

            if (Globals.Instance.ItemDefinitions != null && Globals.Instance.ItemProperties != null)
            {
                LootAnalyzerButton.IsEnabled = true;
            }
        }