public void AddItem() { var ret = new SymbolItemModel(Items); Items.Add(ret); Items.SelectedItem = ret; }
public override object SymbolItemOper() { SymbolItemModel sym = (SymbolItemModel)SymbolItemDesignManage.SymbolItemDesignManageHt[_iD]; DrawItemName drawItemName = new DrawItemName(); drawItemName.ItemStyle = DrawItemStyle.SymbolItem; drawItemName.DrawItemShowName = sym.ItemName.Trim(); drawItemName.ItemSubStyle = sym.SymDISubStyle.Trim(); drawItemName.DrawItemID = this._iD; return(drawItemName); }
protected override void SymbolItemBuild() { if (null != SymbolItemDesignManage.SymbolItemDesignManageHt && SymbolItemDesignManage.SymbolItemDesignManageHt.Count > 0) { foreach (DictionaryEntry de in SymbolItemDesignManage.SymbolItemDesignManageHt) { SymbolItemModel curmodel = (SymbolItemModel)de.Value; DrawItemName drawItemName = new DrawItemName(); drawItemName.DrawItemID = curmodel.ID.Trim(); drawItemName.DrawItemShowName = curmodel.ItemName; drawItemName.ItemStyle = DrawItemStyle.SymbolItem; drawItemName.ItemSubStyle = curmodel.SymDISubStyle; DrawItemNamesManage.DrawItemNamesList.Add(drawItemName); } } }
public SymbolItemDesignStruct(SymbolItemModel symbolItemModel) { ItemField = symbolItemModel.ItemField.Trim(); ItemName = symbolItemModel.ItemName.Trim(); ItemTable = symbolItemModel.ItemTable.Trim(); this.SyblIfHorFill = BoolUtil.GetBoolByBindID(symbolItemModel.SyblIfHorFill.Trim(), false); this.SyBolOffset = StrUtil.StrToDouble(symbolItemModel.SyBolOffset.Trim(), 0, "符号项设置有误"); this.SyHeaderStartheigh = StrUtil.StrToDouble(symbolItemModel.SyHeaderStartheigh.Trim(), 0, "符号项设置有误"); this.SyItemTxtVerSpace = StrUtil.StrToDouble(symbolItemModel.SyItemTxtVerSpace.Trim(), 0, "符号项设置有误"); this.SyJDBottom = symbolItemModel.SyJDBottom.Trim(); this.SyJDHeigh = symbolItemModel.SyJDHeigh.Trim(); this.SyJDTop = symbolItemModel.SyJDTop.Trim(); this.SymbolFramePro = EnumUtil.GetEnumByStr(symbolItemModel.SymbolFrame, SymbolFrame.NoFrame); //SymbolItemClass.GetSymbolFrameStyle(symbolItemModel.SymbolFrame.Trim()); this.SymbolItemColor = StrUtil.StrToInt(symbolItemModel.SymbolItemColor.Trim(), DrawCommonData.BlackColorRGB, "符号项颜色设置有误"); this.SymbolItemTitleHorPos = EnumUtil.GetEnumByStr(symbolItemModel.SymbolItemTitleHorPos, ItemTitlePos.Mid); //ItemOper.GetDrawingItemTitlePos(symbolItemModel.SymbolItemTitleHorPos.Trim()); this.SymbolOrder = StrUtil.StrToInt(symbolItemModel.SymbolOrder, 0, "符号项设置有误"); this.SymDISubStyle = SymbolItemClass.GetSymDISubStyleByStr(symbolItemModel.SymDISubStyle.Trim()); this.SymDepthFieldStyle = ZuoBiaoOper.GetDepthFieldStyle(symbolItemModel.SyJDTop, symbolItemModel.SyJDBottom, symbolItemModel.SyJDHeigh); }
private void MenuActionEditGoToSymbol(object sender, EventArgs e) { Debug.Assert(tcFiles.SelectedTab != null); EditorState editorState = (EditorState)tcFiles.SelectedTab.Tag; if (editorState.DoxyTree != null) { List <SymbolItemModel> symbols = new List <SymbolItemModel>(); HashSet <string> types = new HashSet <string>(); // @TODO(final): Implement this for BaseTree! var allSources = SymbolCache.GetSources(editorState); foreach (var source in allSources) { if (source.Value.Node == null) { continue; } symbols.Add(new SymbolItemModel() { Caption = null, Id = source.Key, Type = source.Value.Kind.ToString(), Position = source.Value.Range.Position, }); types.Add(source.Value.Kind.ToString()); } SymbolSearchForm form = new SymbolSearchForm(symbols, types); if (form.ShowDialog(this) == DialogResult.OK) { SymbolItemModel selectedItem = form.SelectedItem; editorState.GoToPosition(selectedItem.Position.Index); } } }
public override SymbolItemDesignStruct GetItemDrawStrucByID(string ItemID) { SymbolItemModel symbolItemModel = (SymbolItemModel)HashUtil.FindObjByKey(ItemID, SymbolItemDesignManageHt); return(new SymbolItemDesignStruct(symbolItemModel)); }
private void listViewResults_SelectedIndexChanged(object sender, EventArgs e) { ListViewItem selItem = listViewResults.SelectedItems.Count > 0 ? listViewResults.SelectedItems[0] : null; SelectedItem = selItem != null ? (SymbolItemModel)selItem.Tag : null; }
public override object SymbolItemOper() { SymbolItemModel sym = (SymbolItemModel)SymbolItemDesignManage.SymbolItemDesignManageHt[_iD]; return(sym.ItemTable.Trim()); }