public void Render(EventLookupValueCriteriaModel model) { Model = model; cbTargetName.Items.Clear(); foreach (var item in Keywords.GetKeyWords()) { cbTargetName.Items.Add(item); } cbTargetName.Text = model.Item.TargetName; cbOperator.Items.Clear(); foreach (var item in Keywords.GetOperators()) { cbOperator.Items.Add(item); } cbOperator.Text = model.Item.Operator; CRUDUIService.RenderEnumList <LookupTargetType>(cbCriteriaType, model.Item.CriteriaType); RefreshCriteriaType(); tbTargetValue.Text = model.Item.TargetValue; cbTargetName.Text = model.Item.TargetName; cbSourceName.Items.Clear(); foreach (var item in cbTargetName.Items) { cbSourceName.Items.Add(item); } cbSourceName.Text = model.Item.SourceName; }
public FileSelectionView() { InitializeComponent(); AcceptButton = btnOk; CancelButton = btnCancel; CRUDUIService.RenderEnumList <FileTreeViewGroupEnum>(cbGrouping, FileTreeViewGroupEnum.Customer); ColorService.Setup(this); }
public void Render(EventLookupValueModel model) { Model = model; ckbUseCategory.Checked = Model.Item.UseCategory; tbCategory.Text = Model.Item.Category; ckbOnlyNetwork.Checked = Model.Item.OnlyNetworkValues; RefreshCategory(); CRUDUIService.RenderList(Model.Item.Criteria, lbCriteria); CRUDUIService.RenderList(Model.Item.ValueNames, lbValueNames); CRUDUIService.RenderList(Model.Item.Conditions, lbConditions); CRUDUIService.RenderEnumList <LookupDirection>(cbLookupDirection, Model.Item.LookupDirection); }
public void Render(NetworkMapCriteriaModel model) { Model = model; cbOperator.Items.Clear(); foreach (var item in Keywords.GetOperators()) { cbOperator.Items.Add(item); } cbOperator.Text = model.Item.Operator; cbSourceName.Items.Clear(); foreach (var item in Keywords.GetKeyWords()) { cbSourceName.Items.Add(item); } cbSourceName.Text = model.Item.SourceName; CRUDUIService.RenderEnumList <MappingDataType>(cbSourceType, model.Item.SourceType); cbTargetName.Items.Clear(); foreach (var item in Keywords.GetKeyWords()) { cbTargetName.Items.Add(item); } cbTargetName.Text = model.Item.SourceName; CRUDUIService.RenderEnumList <MappingDataType>(cbTargetType, model.Item.TargetType); tbTimeCondition.Text = model.Item.TimeConditionMs.ToString(); cbSourceValue.Checked = model.Item.UseSourceValue; tbSourceValue.Text = model.Item.SourceValue; cbTargetValue.Checked = model.Item.UseTargetValue; tbTargetValue.Text = model.Item.TargetValue; cbEnabled.Checked = model.Item.Enabled; }
public void Render(ValueModel model) { Model = model; var i = model.Item; tbExpression.Text = i.Expression; ckbDocumentMap.Checked = i.DocumentMap; ckbFileInfo.Checked = i.FileInfo; ckbLazyLoad.Checked = i.LazyLoad; ckbDistinct.Checked = i.Distinct; tbSort.Text = i.Sort; cbValueName.Items.Clear(); foreach (var item in Keywords.GetKeyWords()) { cbValueName.Items.Add(item); } cbValueName.Text = i.Name; clbCategory.Items.Clear(); foreach (var item in model.Categories) { clbCategory.Items.Add(item); foreach (var category in model.Item.Categories) { if (item.CategoryId == category.CategoryId) { clbCategory.SetItemChecked(clbCategory.Items.Count - 1, true); } } } UICommon.AutoColumnWidth(clbCategory); clbSourceType.Items.Clear(); clbSourceType.Items.Add(Keywords.ALL, model.Item.SourceTypes.Contains(Keywords.ALL)); foreach (var item in model.SourceTypes) { clbSourceType.Items.Add(item); foreach (var sourceType in model.Item.SourceTypes) { if (item == sourceType) { clbSourceType.SetItemChecked(clbSourceType.Items.Count - 1, true); } } } UICommon.AutoColumnWidth(clbSourceType); switch (model.Mode) { case InputMode.Add: Text = @"Add Value"; break; case InputMode.Edit: Text = @"Edit Value"; break; } CRUDUIService.RenderEnumList <DocumentMapLevel>(cbLevel, i.Level); }
public void Render(EventModel model) { Model = model; var i = model.Item; tbSort.Text = i.Sort; tbDocumentation.Rtf = i.Documentation; ckbDocumentMap.Checked = i.DocumentMap; tbName.Text = i.Name; ckbGapNormal.Checked = i.GapNormal; ckbTimeFromParent.Checked = i.DisplayDurationFromParent; ckbDurationFromSibling.Checked = i.DisplayDurationFromSibling; tbRegularExpression.Text = i.RegularExpression; tbExample.Text = i.Example; clbCategory.Items.Clear(); foreach (var item in model.Categories) { clbCategory.Items.Add(item); foreach (var category in model.Item.Categories) { if (item.CategoryId == category.CategoryId) { clbCategory.SetItemChecked(clbCategory.Items.Count - 1, true); } } } UICommon.AutoColumnWidth(clbCategory); clbSourceType.Items.Clear(); clbSourceType.Items.Add(Keywords.ALL, model.Item.SourceTypes.Contains(Keywords.ALL)); foreach (var item in model.SourceTypes) { clbSourceType.Items.Add(item); foreach (var sourceType in model.Item.SourceTypes) { if (item == sourceType) { clbSourceType.SetItemChecked(clbSourceType.Items.Count - 1, true); } } } UICommon.AutoColumnWidth(clbSourceType); cbFoldingEventId.Items.Clear(); foreach (EventLR item in model.Events) { cbFoldingEventId.Items.Add(item); if (item.EventId == model.Item.FoldingEventId) { cbFoldingEventId.SelectedItem = item; } } switch (model.Mode) { case InputMode.Add: Text = @"Add EventPattern"; break; case InputMode.Edit: Text = @"Edit EventPattern"; break; } cbSourceType.Items.Clear(); cbSourceType.Items.Add(""); foreach (var item in XmlDal.DataModel.Options.FileTypes) { cbSourceType.Items.Add(item); } cbSourceType.Text = i.SourceType ?? ""; cbNetworkCommunication.Items.Clear(); cbNetworkCommunication.Items.Add(""); foreach (var item in Enum.GetNames(typeof(NetworkDirection)).ToList()) { if (item == "Na") { continue; } cbNetworkCommunication.Items.Add(item); } cbNetworkCommunication.Text = i.Network == NetworkDirection.Na ? "" : i.Network.ToString(); CRUDUIService.RenderEnumList <DocumentMapLevel>(cbLevel, i.Level); cbIgnoreDocumentation.Checked = i.IgnoreDocumentation; Type t = typeof(Color); var p = t.GetProperties(); foreach (var item in p) { if (item.PropertyType.FullName.Equals("System.Drawing.Color", StringComparison.CurrentCultureIgnoreCase)) { cbColor.Items.Add(item.Name); cbDocumentMapHighlightColor.Items.Add(item.Name); } } cbColor.Text = i.HighlightColor == Color.Transparent.Name ? "" : i.HighlightColor; cbDocumentMapHighlightColor.Text = i.DocumentMapHighlightColor == Color.Transparent.Name ? "" : i.DocumentMapHighlightColor; CRUDUIService.RenderList(i.EventValues, lbValues); CRUDUIService.RenderList(i.EventLookupValues, lbLookupValues); ckbIgnoreName.Checked = i.IgnoreName; }