예제 #1
0
        private void OnClickAddCertainDefinition(WritingSystemTreeItem treeItem)
        {
            var suggestionItem = (WritingSystemCreationTreeItem)treeItem;
            var def            = suggestionItem.ShowDialogIfNeededAndGetDefinition();

            if (def != null)            //if the didn't cancel
            {
                _setupModel.AddPredefinedDefinition(def);
            }
        }
예제 #2
0
        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);
		}
예제 #6
0
 private void OnClickExistingDefinition(WritingSystemTreeItem treeItem)
 {
     _setupModel.SetCurrentDefinition(((WritingSystemDefinitionTreeItem)treeItem).Definition);
 }