Changeset 12 for Common/FormDimensions.cs
- Timestamp:
- Mar 14, 2020, 1:11:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/FormDimensions.cs
r5 r12 1 using System;1 using System; 2 2 using System.Collections.Generic; 3 3 using System.Linq; … … 7 7 using System.Runtime.InteropServices; 8 8 using Microsoft.Win32; 9 10 9 11 10 namespace Common … … 212 211 } 213 212 } 213 if (control is SplitContainer) 214 { 215 RegistryKey regKey = Application.UserAppDataRegistry.OpenSubKey(RegSubKey + "\\" + form.Name + "\\" + control.Name, true); 216 if (regKey == null) regKey = Application.UserAppDataRegistry.CreateSubKey(RegSubKey + "\\" + form.Name + "\\" + control.Name); 217 218 if (regKey.GetValue("SplitterDistance") != null) 219 (control as SplitContainer).SplitterDistance = (int)regKey.GetValue("SplitterDistance"); 220 } 214 221 215 222 foreach (Control child in control.Controls) … … 240 247 regKey.SetValue("ColWidth" + I.ToString(), (control as DataGridView).Columns[I].Width); 241 248 } 249 } 250 if (control is SplitContainer) 251 { 252 RegistryKey regKey = Application.UserAppDataRegistry.OpenSubKey(RegSubKey + "\\" + form.Name + "\\" + control.Name, true); 253 if (regKey == null) regKey = Application.UserAppDataRegistry.CreateSubKey(RegSubKey + "\\" + form.Name + "\\" + control.Name); 254 255 regKey.SetValue("SplitterDistance", (control as SplitContainer).SplitterDistance); 242 256 } 243 257
Note:
See TracChangeset
for help on using the changeset viewer.