本文整理汇总了C#中Category.getCategoryName方法的典型用法代码示例。如果您正苦于以下问题:C# Category.getCategoryName方法的具体用法?C# Category.getCategoryName怎么用?C# Category.getCategoryName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Category
的用法示例。
在下文中一共展示了Category.getCategoryName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainForm
//.........这里部分代码省略.........
XMLSerializer.Serialize<Config>(Config.SettingPath, config);
};
_editor.TextChanged += (sender, e) => {
if (dirty) {
//var manager = category.getManger(getSelectedCategory());
//var item = manager.EditingData;
//var item = category.GetItem(category.EditingID);
//if (item != null) {
//item.Text = _editor.Text;
//manager.UpDate(item);
//category.UpDate(item);
category.UpDateText(category.EditingID, _editor.Text);
//}
}
dirty = true;
};
NewItemToolStripButton.Click += (sender, e) => {
CreateItem();
};
NewFileToolStripButton.Click += (sender, e) => {
CreateNewFile("new");
};
category = new Category();
category.DataDir = config.DataDirPath;
category.eventHandler = (sender, e) => {
switch (e.type) {
case ChangeType.Create: {
//if (Tabs[e.Name] == GetCurrentTabControl()) {
var name = category.getCategoryName(e.FromCategoryID);
if (TabPanel.Controls[name] == GetCurrentTabControl()) {
//ItemTabControl.SelectedTab = AllPage;
GetCurrentTabControl().SelectedIndex = 0;
var listview = GetSelctedTabListViewControl();// GetTabListViewControl(AllPage);
var iindex = listview.AddItem(e.Item);
if (iindex == (listview.DataItems.Count - 1)) {
reBuild(e.Item);
}
else {
reBuild(listview.DataItems[iindex + 1].ID, e.Item);
}
this.EditItem(e.Item.ID, true);
}
else {
//var tabc = Tabs[e.Name];
//var listview = GetTabListViewControl(Tabs[e.Name].TabPages[0]);
var listview = GetTabListViewControl(((TabControl)TabPanel.Controls[name]).TabPages[0]);
listview.AddItem(e.Item);
}
}
break;
case ChangeType.UpDateText: {
//if (Tabs[e.Name] == GetCurrentTabControl()) {
var name = category.getCategoryName(e.FromCategoryID);
if (TabPanel.Controls[name] == GetCurrentTabControl()) {
editContent(e.Item);
//var cf = InvokeScript("js_getComeFrom");
//var list = JsonSerializer.Deserialize<List<string>>(cf.ToString());
//config.ComeFormWords.Union(list);
}
}