コード例 #1
0
        private bool CheckSubSourceFieldName(TreeNodeCollection Aim, string value)
        {
            bool result = false;

            foreach (TreeNode node in Aim)
            {
                if (node.Nodes != null)
                {
                    result = CheckSubSourceFieldName(node.Nodes, value);
                    if (result == false)
                    {
                        return(result);
                    }
                }
                PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField sf = node.Tag as PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField;
                if (sf != null && sf.ID != this.ID && sf.GetType() == typeof(SourceFieldDataTable))
                {
                    if (sf.Name == value)
                    {
                        result = false;
                        return(result);
                    }
                }
            }
            result = true;
            return(result);
        }
コード例 #2
0
 private void DealWithTrendCurve()
 {
     if (null != this)
     {
         TrendCurve element = this as TrendCurve;
         if (null != element)
         {
             if (element.Parent == null ||
                 (element.Parent != null && element.Parent as PMS.Libraries.ToolControls.Report.Element.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);
                 TrendCurveApperence fbd = new TrendCurveApperence();
                 fbd.LabelSource = element.LabelSource;
                 fbd.ChartParent = element;
                 if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 {
                     LabelSource = fbd.LabelSource;
                     if (null != Site)
                     {
                         IComponentChangeService cs = Site.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
                         if (null != cs)
                         {
                             cs.OnComponentChanged(this, null, null, null);
                         }
                     }
                 }
             }
             else
             {
                 TrendCurveApperence fbd = new TrendCurveApperence(GetSourceField(element.Parent as PMS.Libraries.ToolControls.Report.Element.IElement));
                 fbd.LabelSource = element.LabelSource;
                 fbd.ChartParent = element;
                 if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 {
                     LabelSource = fbd.LabelSource;
                     if (null != Site)
                     {
                         IComponentChangeService cs = Site.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
                         if (null != cs)
                         {
                             cs.OnComponentChanged(this, null, null, null);
                         }
                     }
                 }
             }
         }
     }
 }
コード例 #3
0
 public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (null != context && null != context.Instance && null != context.Container)
     {
         TrendCurve element = context.Instance as TrendCurve;
         if (null != element)
         {
             if (element.Parent == null ||
                 (element.Parent != null && element.Parent as PMS.Libraries.ToolControls.Report.Element.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);
                 TrendCurveApperence fbd = new TrendCurveApperence();
                 fbd.LabelSource = element.LabelSource;
                 fbd.ChartParent = element;
                 if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 {
                     value = fbd.LabelSource;
                 }
             }
             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);
                 TrendCurveApperence fbd = new TrendCurveApperence(GetSourceField(element.Parent as PMS.Libraries.ToolControls.Report.Element.IElement));
                 fbd.LabelSource = element.LabelSource;
                 fbd.ChartParent = element;
                 if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 {
                     value = fbd.LabelSource;
                 }
             }
         }
         return(value);
     }
     return(base.EditValue(context, provider, value));
 }
コード例 #4
0
ファイル: RadarChart.cs プロジェクト: trigrass2/myreport
 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)
         {
             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;
             }
         }
         return(value);
     }
     return(base.EditValue(context, provider, value));
 }