SIL.FieldWorks.TE.ImportWizard.RestoreWindowsSettings C# (CSharp) Method

RestoreWindowsSettings() private method

Get, from the registry, the dialog's location and size along with the widths of the list view columns.
private RestoreWindowsSettings ( ) : void
return void
		private void RestoreWindowsSettings()
		{
			try
			{
				using (RegistryKey key = m_app.SettingsKey.OpenSubKey("ImportDialog"))
				{
				//				// Get the dialog's saved location.
				//				this.Location = new Point((int)key.GetValue("LocationX", this.Location.X),
				//					(int)key.GetValue("LocationY", this.Location.Y));

				// Get the dialog's saved size.
				this.Size = new Size((int)key.GetValue("SizeX", this.MinimumSize.Width),
					(int)key.GetValue("SizeY", this.MinimumSize.Height));

				sfFileListBuilder.LoadSettings(key);

				// Get the column widths for the Scripture mapping list view.
				for (int i = 0; i < lvScrMappings.Columns.Count; i++)
				{
					lvScrMappings.Columns[i].Width =
						(int)key.GetValue("MappingCol" + i.ToString(), lvScrMappings.Columns[i].Width);
				}
				// Get the column widths for the Annotations mapping list view.
				for (int i = 0; i < lvAnnotationMappings.Columns.Count; i++)
				{
					lvAnnotationMappings.Columns[i].Width =
						(int)key.GetValue("AnnotMappingCol" + i.ToString(), lvAnnotationMappings.Columns[i].Width);
				}
			}
			}
			catch
			{
				this.Size = this.MinimumSize;
			}
		}
		#endregion