bool GetPreferences(string section, out Win32.RECT rect, out long style, out long exStyle) { rect = new Win32.RECT(); style = 0; exStyle = 0; if (!Preferences.HasSection(section)) { return false; } string[] keys = { "rectLeft", "rectTop", "rectRight", "rectBottom", "style", "exStyle" }; foreach (string key in keys) { if (!Preferences[section].HasKey(key)) { return false; } } if (!int.TryParse(Preferences[section]["rectLeft"].Value, out rect.Left)) { return false; } if (!int.TryParse(Preferences[section]["rectTop"].Value, out rect.Top)) { return false; } if (!int.TryParse(Preferences[section]["rectRight"].Value, out rect.Right)) { return false; } if (!int.TryParse(Preferences[section]["rectBottom"].Value, out rect.Bottom)) { return false; } if (!long.TryParse(Preferences[section]["style"].Value, out style)) { return false; } if (!long.TryParse(Preferences[section]["exStyle"].Value, out exStyle)) { return false; } return true; }
public void Clear() { rect = new Win32.RECT(); style = 0; exStyle = 0; }
public void Clear() { rect = new Win32.RECT(); style = 0; exStyle = 0; }