private void OnClickAddCertainDefinition(WritingSystemTreeItem treeItem)
        {
            var suggestionItem = (WritingSystemCreationTreeItem)treeItem;
            var def            = suggestionItem.ShowDialogIfNeededAndGetDefinition();

            if (def != null)            //if the didn't cancel
            {
                _setupModel.AddPredefinedDefinition(def);
            }
        }
        private void AddOtherLanguages(List <WritingSystemTreeItem> items)
        {
            var item = new WritingSystemTreeItem("Other Languages", null);

            item.Children = new List <WritingSystemTreeItem>(from suggestion in this.Suggestor.GetOtherLanguageSuggestions(_setupModel.WritingSystemDefinitions)
                                                             select(WritingSystemTreeItem) new WritingSystemCreationTreeItem(suggestion, OnClickAddCertainDefinition));
            if (item.Children.Count() > 0)
            {
                items.Add(item);
            }
        }
		private void OnClickAddCertainDefinition(WritingSystemTreeItem treeItem)
		{
			var suggestionItem = (WritingSystemCreationTreeItem)treeItem;
			var def = suggestionItem.ShowDialogIfNeededAndGetDefinition();
			if (def != null)//if the didn't cancel
			{
				_setupModel.AddPredefinedDefinition(def);
			}
		}
		private void AddOtherLanguages(List<WritingSystemTreeItem> items)
		{
			var item = new WritingSystemTreeItem("Other Languages", null);
			item.Children = new List<WritingSystemTreeItem>(from suggestion in this.Suggestor.GetOtherLanguageSuggestions(_setupModel.WritingSystemDefinitions)
							select (WritingSystemTreeItem) new WritingSystemCreationTreeItem(suggestion, OnClickAddCertainDefinition));
			if(item.Children.Count()>0)
				items.Add(item );
		}
		private void OnClickExistingDefinition(WritingSystemTreeItem treeItem)
		{
			_setupModel.SetCurrentDefinition(((WritingSystemDefinitionTreeItem)treeItem).Definition);
		}
 private void OnClickExistingDefinition(WritingSystemTreeItem treeItem)
 {
     _setupModel.SetCurrentDefinition(((WritingSystemDefinitionTreeItem)treeItem).Definition);
 }