public static bool GetWindowPositionForThisClient(out WindowPosition windowPosition) { Collection<WindowPosition> windowPositions = Settings.SettingsManager.Misc.WindowPositions; foreach (WindowPosition position in windowPositions) { if (position.Server == CoreManager.Current.CharacterFilter.Server && position.AccountName == CoreManager.Current.CharacterFilter.AccountName) { windowPosition = position; return true; } } windowPosition = new WindowPosition(); return false; }
public static void SetWindowPosition() { User32.RECT rect = new User32.RECT(); User32.GetWindowRect(CoreManager.Current.Decal.Hwnd, ref rect); WindowPosition windowPosition = new WindowPosition(CoreManager.Current.CharacterFilter.Server, CoreManager.Current.CharacterFilter.AccountName, rect.Left, rect.Top); Settings.SettingsManager.Misc.SetWindowPosition(windowPosition); }