private static JournalMetadata CreateMetadata <T>(EPartitionType configValue, string workingDir, params string[] symbols) { var jconf = new JournalElement { DefaultPath = workingDir, PartitionType = configValue }; if (symbols != null) { foreach (string sym in symbols) { var se = new SymbolElement { AvgSize = 20, HintDistinctCount = 100, MaxSize = 120, Name = sym }; jconf.Columns.Add(se); } } var meta = JournalBuilder.CreateNewJournalMetadata(jconf, typeof(T)); return(meta); }
public static dynamic GetTSObject(SymbolElement dynObject) { if (dynObject is null) { return(null); } return(dynObject.teklaObject); }
private ColumnMetadata(IColumnSerializerMetadata serializerMetadata, SymbolElement symbolConfig, int columnID, int nullIndex) : this(serializerMetadata, (VarLenColumnElement)symbolConfig, columnID, nullIndex) { HintDistinctCount = symbolConfig.HintDistinctCount; Indexed = symbolConfig.Indexed; SameAs = symbolConfig.SameAs; }
public void SymbolHasAppropiateFieldDataForSymbol(SymbolKind symbol, char symChar) { var sut = new SymbolElement() { Content = symbol }; Assert.Contains($"^FD{symChar}", sut.ToString()); }
internal DiscreteElement(ColorDisplayType disPlay, SymbolElement symbolElement, string dValue, string dLegend, bool dIsEnabled) { this.m_DisType = disPlay; this.m_Symbol = symbolElement; this.m_elementcolor = this.m_Symbol.ForeColor; this.value = dValue; this.legend = dLegend; this.isenabled = dIsEnabled; }
public FieldView() : base() { m_CaptionElement = new TextLabelElement(this); m_CaptionElement.FieldControlContext = this; m_CaptionElement.Text = DEFAULT_FIELD_CAPTION; m_SymbolElement = new SymbolElement(this); m_SymbolElement.FieldControlContext = this; m_SymbolElement.SymbolType = SymbolType.Diamond; m_SymbolElement.Visible = false; }
public void AutoLoadData(ISubSystemData systemData) { PropagSubSystemData psd = (PropagSubSystemData) systemData; this.ClearUpPropagData(); this.m_ModelsMngr.PropModelCategoryList = psd.PropagationModelCategoryList; foreach (KeyValuePair<string, List<IPropagationModel>> kvpPropModel in psd.PropagationModelDic) { List<IPropagationModel> propModelList = kvpPropModel.Value; foreach (IPropagationModel propModel in propModelList) { this.PropParameterImp.AddPropModel(propModel); } } this.m_ModelsMngr.PropModelTree.PropModelCategoryList = psd.PropagationModelCategoryList; this.m_ModelsMngr.PropModelTree.UpdateTreeNodeList(); int cwSymInfoNum; int propFunctionIndex = 0; foreach (KeyValuePair<string, IList<FileInfoBase>> kvpFileInfo in psd.FileInfoDic) { this.m_PropFunctions[propFunctionIndex].CWFileInfoList = kvpFileInfo.Value; this.m_PropFunctions[propFunctionIndex].LegendSymbolDict.Clear(); List<CWSymboInformation> CWSymInfoList = psd.CWSymboInformationList[kvpFileInfo.Key]; for (cwSymInfoNum = 0; cwSymInfoNum < CWSymInfoList.Count; cwSymInfoNum++) { MaxMinValue key = CWSymInfoList[cwSymInfoNum].MMV; SymbolElement element = new SymbolElement(CWSymInfoList[cwSymInfoNum].SymbolValue, new FontFamily(CWSymInfoList[cwSymInfoNum].Family), CWSymInfoList[cwSymInfoNum].Style, CWSymInfoList[cwSymInfoNum].EMSize, CWSymInfoList[cwSymInfoNum].ForeColor); this.m_PropFunctions[propFunctionIndex].LegendSymbolDict.Add(key, element); } this.m_PropFunctions[propFunctionIndex].EncapsulationCwTree(); propFunctionIndex++; } for (cwSymInfoNum = 0; cwSymInfoNum < this.m_PropFunctionsTree.Count; cwSymInfoNum++) { this.SetTreeState(psd, this.m_PropFunctions[cwSymInfoNum].RootNode, this.m_PropFunctions[cwSymInfoNum]); } ((PLCalcDataMngr) this.m_PLCalcDataMngr).FileAccesser.LoadRecordFile(); ((PLCalcDataMngr)this.m_PLCalcDataMngr).RelayFileAccesser.LoadRecordFile(); }
private void AddFailReasonUser(DisplayUser disPlayUser, string userType, SymbolElement symbol, List<DisplayUser> selectUsers) { if (disPlayUser.UserState == userType) { disPlayUser.SymbolElement = symbol; selectUsers.Add(disPlayUser); } }
public DiscreteElement(SymbolElement symbolElement, string dValue, string dLegend, bool dIsEnabled) : this(ColorDisplayType.SimulationSymbol, symbolElement, dValue, dLegend, dIsEnabled) { }
public LabelBuilder AddSymbol(SymbolElement symbol) { Context.Content.Add(symbol ?? throw new ArgumentNullException(nameof(symbol))); return(this); }
private List<DisplayUser> BingNodeUsers(List<DisplayUser> userCollection, TreeNode node, SymbolElement symbol, FieldType ftType) { List<DisplayUser> selectUsers = new List<DisplayUser>(); foreach (DisplayUser user in userCollection) { this.AddDisplayUser(user, node.Text, symbol, ftType, selectUsers); } return selectUsers; }
private void CreateCurrentSetProperty(string filePath) { CurrentSetProperty e = new CurrentSetProperty(); if (File.Exists(filePath)) { XmlDocument document = new XmlDocument(); document.Load(filePath); XmlNode firstChild = document.FirstChild.FirstChild; Dictionary<string, FieldType> dictionary = new Dictionary<string, FieldType>(); dictionary.Add("State", FieldType.State); dictionary.Add("Mobility", FieldType.Name | FieldType.Terminal | FieldType.Code); dictionary.Add("Service", FieldType.Service); dictionary.Add("Terminal", FieldType.Name | FieldType.Terminal); dictionary.Add("UserProfile", FieldType.SpatialMutilplexingGainFactor | FieldType.CIStandardDeviation_dB); Dictionary<string, FontStyle> fontStyleDic = new Dictionary<string, FontStyle>(); fontStyleDic.Add(FontStyle.Bold.ToString(), FontStyle.Bold); fontStyleDic.Add(FontStyle.Italic.ToString(), FontStyle.Italic); fontStyleDic.Add(FontStyle.Regular.ToString(), FontStyle.Regular); fontStyleDic.Add(FontStyle.Strikeout.ToString(), FontStyle.Strikeout); fontStyleDic.Add(FontStyle.Underline.ToString(), FontStyle.Underline); e.DType = DisplayType.DiscreteValues; XmlNode node2 = firstChild.FirstChild; e.FType = dictionary[node2.Attributes[0].Value]; int num = int.Parse(node2.Attributes[1].Value); Dictionary<short, SymbolElement> dictionary3 = new Dictionary<short, SymbolElement>(); Dictionary<short, string> dictionary4 = new Dictionary<short, string>(); for (int i = 0; i < num; i++) { XmlNode node3 = node2.ChildNodes[i]; short key = short.Parse(node3.Attributes[0].Value); float size = float.Parse(node3.Attributes["EMSize"].Value); FontFamily fontfamily = new FontFamily(node3.Attributes["FontFamily"].Value); FontStyle fontstyle = this.getXmlFontStyle(fontStyleDic, node3.Attributes["Style"].Value); Color fontcolor = this.getXmlColor(node3.Attributes["ForeColor"].Value); int num5 = int.Parse(node3.Attributes["SymbolValue"].Value); string str = node3.Attributes["Legend"].Value; SymbolElement element = new SymbolElement(num5, fontfamily, fontstyle, size, fontcolor); dictionary3.Add(key, element); dictionary4.Add(key, str); } e.Name = "SimulationSymbol"; e.OutDiscreteSymbolMap = dictionary3; e.OutDiscreColorMap = new Dictionary<short, Color>(); e.OutDiscreteLegendMap = dictionary4; SimulationDisProperty property2 = new SimulationDisProperty(this.m_SubSysInterface); property2.Correct(e); this.m_SimGroupManager.SimlationDisProperty = property2; this.FT = e.FType; this.DT = e.DType; this.isfirst = false; this.m_CurrentSetProperty = e; this.m_SimlationDisProperty = property2; this.ChangeNodeMsg(this.m_CurrentSetProperty); } }
protected virtual Label CreateSymbolLabel(SymbolElement eSymbol) { SymbolLabel label = new SymbolLabel(); label.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; label.BorderStyle = BorderStyle.None; label.AutoSize = true; label.TextAlign = ContentAlignment.TopCenter; SymbolItemEventArgs args = new SymbolItemEventArgs(eSymbol.SymbolValue, eSymbol.Family, eSymbol.Style, eSymbol.EMSize, eSymbol.ForeColor); label.SymbolItem = args; label.SymbolChanged += new EventHandler(this.lb_symbol_SymbolChanged); return label; }
public void SymbolHasFieldOrigin() { var sut = new SymbolElement(); Assert.Contains("^FO", sut.ToString()); }
public void SymbolContainsCorrectElementCommand() { var sut = new SymbolElement(); Assert.Contains("^GS", sut.ToString()); }
private List<DisplayUser> BindingNodeState(SnapShotStatData snapData, FailReason reason, TreeNode node, string nodeName) { List<DisplayUser> list = new List<DisplayUser>(); List<StaSimuSiteResult> statSimuSiteResultList = snapData.StatSimuSiteResultList; List<User> userList = new List<User>(); List<SymbolElement> list4 = new List<SymbolElement>(); SymbolElement item = new SymbolElement(Color.Green); list4.Add(item); item = new SymbolElement(Color.Yellow); list4.Add(item); item = new SymbolElement(Color.Pink); list4.Add(item); item = new SymbolElement(Color.DarkRed); list4.Add(item); item = new SymbolElement(Color.OrangeRed); list4.Add(item); item = new SymbolElement(Color.PaleVioletRed); list4.Add(item); item = new SymbolElement(Color.DeepPink); list4.Add(item); item = new SymbolElement(Color.Black); list4.Add(item); item = new SymbolElement(Color.Red); list4.Add(item); userList = this.FindUserListByReason(snapData, reason, userList); foreach (User user in userList) { DisplayUser user2 = new DisplayUser(); StatSimuUserResult userResult = null; StatSimuCarrierResult carrier = null; this.getUserResult(user, snapData, out userResult, out carrier); user2.LTEUser = userResult; user2.SimulationName = node.Parent.Text; user2.SnapShotName = node.Text; user2.SymbolElement = list4[(int) reason]; user2.UserState = nodeName; if (carrier != null) { user2.BestServer = carrier.CarrierName; } else { user2.BestServer = ""; } list.Add(user2); } return list; }
private void AddDisplayUser(DisplayUser disPlayUser, string userType, SymbolElement symbol, FieldType ftType, List<DisplayUser> selectUsers) { switch (ftType) { case (FieldType.SpatialMutilplexingGainFactor | FieldType.CIStandardDeviation_dB): this.AddUserProfileUser(disPlayUser, userType, symbol, selectUsers); break; case FieldType.Service: this.AddServiceUser(disPlayUser, userType, symbol, selectUsers); break; case (FieldType.Name | FieldType.Terminal): this.AddTerminalUser(disPlayUser, userType, symbol, selectUsers); break; case (FieldType.Name | FieldType.Terminal | FieldType.Code): this.AddMobilityUser(disPlayUser, userType, symbol, selectUsers); break; case FieldType.State: this.AddFailReasonUser(disPlayUser, userType, symbol, selectUsers); break; } }
public void SymbolIsLabelContentElement() { var sut = new SymbolElement(); Assert.IsAssignableFrom <LabelContent>(sut); }
private void AddTerminalUser(DisplayUser disPlayUser, string userType, SymbolElement symbol, List<DisplayUser> selectUsers) { if (disPlayUser.LTEUser.LTEUser.Terminal.Name == userType) { disPlayUser.SymbolElement = symbol; selectUsers.Add(disPlayUser); } }
public void SymbolHasFieldSeperator() { var sut = new SymbolElement(); Assert.Contains("^FS", sut.ToString()); }
private void AddUserProfileUser(DisplayUser disPlayUser, string userType, SymbolElement symbol, List<DisplayUser> selectUsers) { if (disPlayUser.LTEUser.LTEUser.UserProfile == userType) { disPlayUser.SymbolElement = symbol; selectUsers.Add(disPlayUser); } }
public void SymbolIsCreatedWithDefaults() { var sut = new SymbolElement(); Assert.Equal(ZPLForgeDefaults.Elements.Symbol.FieldOrientation, sut.FieldOrientation); }
private List<DisplayUser> BindingNodeState(SnapShotStatData snapData, FailReason reason, TreeNode node, string nodeName) { List<DisplayUser> list = new List<DisplayUser>(); List<StaSimuSiteResult> statSimuSiteResultList = snapData.StatSimuSiteResultList; List<User> list3 = new List<User>(); List<SymbolElement> list4 = new List<SymbolElement>(); List<Color> list5 = new List<Color>(); list5.Add(Color.Green); list5.Add(Color.Yellow); list5.Add(Color.Pink); list5.Add(Color.DarkRed); list5.Add(Color.OrangeRed); list5.Add(Color.PaleVioletRed); list5.Add(Color.DeepPink); list5.Add(Color.Black); list5.Add(Color.Red); foreach (Color color in list5) { SymbolElement item = new SymbolElement(color); list4.Add(item); } Dictionary<FailReason, List<User>> dictionary = new Dictionary<FailReason, List<User>>(); dictionary.Add(FailReason.CallDrop, snapData.OffLineList); dictionary.Add(FailReason.DlRsrpFail, snapData.DlRsrpFailList); dictionary.Add(FailReason.UlRsSinrFail, snapData.UlRsSinrFailList); dictionary.Add(FailReason.DlRsSinrFail, snapData.DlRsSinrFailList); dictionary.Add(FailReason.UlRsrpFail, snapData.UlRsrpFailList); dictionary.Add(FailReason.Satisfied, snapData.SatisfiedList); list3 = dictionary[reason]; foreach (User user in list3) { DisplayUser user2 = new DisplayUser(); StatSimuUserResult userResult = null; StatSimuCarrierResult carrier = null; this.getUserResult(user, snapData, out userResult, out carrier); user2.LTEUser = userResult; user2.SimulationName = node.Parent.Text; user2.SnapShotName = node.Text; user2.SymbolElement = list4[(int) reason]; user2.UserState = nodeName; if (carrier != null) { user2.BestServer = carrier.CarrierName; } else { user2.BestServer = ""; } list.Add(user2); } return list; }