SIL.FieldWorks.TE.KeyTermsControl.OnLoadSettings C# (CSharp) Method

OnLoadSettings() protected method

Load settings
protected OnLoadSettings ( RegistryKey key ) : void
key Microsoft.Win32.RegistryKey
return void
		protected override void OnLoadSettings(RegistryKey key)
		{
			if (key != null)
			{
				KeyTermsTree tree = MainPanelContent as KeyTermsTree;
				if (tree == null)
					return;

				Guid guid = Guid.Empty;
				try
				{
					guid = new Guid((string)key.GetValue("SelectedKeyTerm", string.Empty));

				}
				catch
				{
				}
				TreeNode node = tree.FindNode(guid);
				if (node != null)
					tree.SelectedNode = node;
			}

			base.OnLoadSettings(key);
		}