public void Tick() { if (!LokiPoe.IsInGame) { return; } // If the flag to refresh the item eval is set, refresh and clear it. We have to do this here, like this, // since otherwise the event would come from the Gui thread, and we'd need to AcquireFrame, which via settings // is not always the cleanest and can lead to unintended side effects. if (ItemFilterEditorSettings.Instance.RefreshItemEvaluator) { ItemFilterEditorSettings.Instance.RefreshItemEvaluator = false; ItemEvaluator.Refresh(); } }
private void SaveButtonClick(object sender, RoutedEventArgs e) { try { if (!ConfigurableItemEvaluator.Instance.VerifyFilters()) { MessageBox.Show("The filter contains errors. Please correct them first.", Util.RandomWindowTitle("Error"), MessageBoxButton.OK, MessageBoxImage.Error); return; } ConfigurableItemEvaluator.Instance.Save(ConfigurableItemEvaluator.DefaultPath); ItemEvaluator.Refresh(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), Util.RandomWindowTitle("Exception"), MessageBoxButton.OK, MessageBoxImage.Error); } }