private static void DefaultOnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs) { switch (propertyChangedEventArgs.PropertyName) { case "HuntWidgetHuntTimeout": PastHunts.updateWidget(); break; case "WidgetClickThroughEnabled": WinAPI.ToggleClickThrough(Widgets.Instance.HuntWidget); break; case "HuntWidgetUIScale": try { Settings.Default.HuntWidgetWidth = (int)(250 * Double.Parse(Settings.Default.HuntWidgetUIScale)); Settings.Default.HuntWidgetHeight = (int)(450 * Double.Parse(Settings.Default.HuntWidgetUIScale)); } catch (Exception ex) { Settings.Default.HuntWidgetWidth = 250; Settings.Default.HuntWidgetHeight = 450; } break; } }
private static void OnTimedEvent(Object source, ElapsedEventArgs e) { PastHunts.updateWidget(); }