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

OnClosing() protected method

Save in the registry the dialog's location and size along with the widths of the list view columns.
protected OnClosing ( CancelEventArgs e ) : void
e CancelEventArgs
return void
		protected override void OnClosing(CancelEventArgs e)
		{
			base.OnClosing(e);

			if (DesignMode)
				return;

			try
			{
				m_LatestImportFolder.Value = sfFileListBuilder.LatestImportFolder;
				using (RegistryKey key = m_app.SettingsKey.CreateSubKey("ImportDialog"))
				{
				//				key.SetValue("LocationX", Location.X);
				//				key.SetValue("LocationY", Location.Y);
				key.SetValue("SizeX", Size.Width);
				key.SetValue("SizeY", Size.Height);

				sfFileListBuilder.SaveSettings(key);

				for (int i = 0; i < lvScrMappings.Columns.Count; i++)
					key.SetValue("MappingCol" + i.ToString(), lvScrMappings.Columns[i].Width);

				for (int i = 0; i < lvAnnotationMappings.Columns.Count; i++)
					key.SetValue("AnnotMappingCol" + i.ToString(), lvAnnotationMappings.Columns[i].Width);
			}
			}
			catch
			{
			}
		}