/// <summary> /// 2012.06.29 增加 /// 目的:根据给定的SourceField找到树中对应的 /// </summary> private void SelectSourceField(PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField Aim, TreeNodeCollection source) { if (Aim != null && source != null) { foreach (TreeNode node in source) { if (Aim.Equals(node.Tag)) { this.DataSource.SelectedNode = node; break; } else { if (node.Nodes != null) { SelectSourceField(Aim, node.Nodes); } } } } }
public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { if (null != context && null != context.Instance && null != context.Container) { PMSChartCtrl element = context.Instance as PMSChartCtrl; if (null != element) { if (element.Parent == null || (element.Parent != null && element.Parent as IPmsReportDataBind == null)) { PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField sfAll = (PMS.Libraries.ToolControls.PMSPublicInfo.CurrentPrjInfo.GetCurrentReportDataDefine()) as PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField; //SourceBindDialog fbd = new SourceBindDialog(sfAll, element.SourceField); PMS.Libraries.ToolControls.Report.Controls.EditorDialog.SourceBindDialog fbd = new PMS.Libraries.ToolControls.Report.Controls.EditorDialog.SourceBindDialog(sfAll, element.SourceField, true); if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { value = fbd.SourceField; } } else { PMS.Libraries.ToolControls.Report.Controls.EditorDialog.SourceBindDialog fbd = new PMS.Libraries.ToolControls.Report.Controls.EditorDialog.SourceBindDialog(GetSourceField(element.Parent as IElement), element.SourceField, true); if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { value = fbd.SourceField; } } } return(value); } return(base.EditValue(context, provider, value)); }
public TrendCurveApperence(PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField father) { InitializeComponent(); _FatherSource = father; }
private void DealWithDataTable() { if (null != this) { PMSChartCtrl element = this as PMSChartCtrl; if (null != element) { if (element.Parent == null || (element.Parent != null && element.Parent as IPmsReportDataBind == null)) { PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField sfAll = (PMS.Libraries.ToolControls.PMSPublicInfo.CurrentPrjInfo.GetCurrentReportDataDefine()) as PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField; //SourceBindDialog fbd = new SourceBindDialog(sfAll, element.SourceField); PMS.Libraries.ToolControls.Report.Controls.EditorDialog.SourceBindDialog fbd = new PMS.Libraries.ToolControls.Report.Controls.EditorDialog.SourceBindDialog(sfAll, element.SourceField, true); if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { DataTable = fbd.SourceField; if (null != Site) { IComponentChangeService cs = Site.GetService(typeof(IComponentChangeService)) as IComponentChangeService; if (null != cs) { cs.OnComponentChanged(this, null, null, null); } } } } else { PMS.Libraries.ToolControls.Report.Controls.EditorDialog.SourceBindDialog fbd = new PMS.Libraries.ToolControls.Report.Controls.EditorDialog.SourceBindDialog(GetSourceField(element.Parent as IElement), element.SourceField, true); if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { DataTable = fbd.SourceField; if (null != Site) { IComponentChangeService cs = Site.GetService(typeof(IComponentChangeService)) as IComponentChangeService; if (null != cs) { cs.OnComponentChanged(this, null, null, null); } } } } } } }