private void TrendCurveApperence_Load(object sender, EventArgs e) { _Load = true; PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.FieldTreeViewData fvd = PMS.Libraries.ToolControls.PMSPublicInfo.CurrentPrjInfo.GetCurrentReportDataDefine() as PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.FieldTreeViewData; if (null == fvd) { return; } if (null != _FatherSource) { PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.FieldTreeNodeData currentNode = fvd.FindNodeBySource(_FatherSource); if (null != currentNode) { fvd.PopulateTreeAddRoot(this.DataSource, currentNode); } } else { fvd.PopulateTree(this.DataSource); } _DeleteNode.Clear(); FilterField(this.DataSource); foreach (TreeNode node in _DeleteNode) { this.DataSource.Nodes.Remove(node); } this.DataSource.ExpandAll(); if (_LabelSource != null) { if (_LabelSource.TrendLabelSource != null) { SelectSourceField(_LabelSource.TrendLabelSource); } if (_LabelSource.FieldFlag != null) { SelectFieldFlag(_LabelSource.FieldFlag); } SelectTextLineAlignment(_LabelSource.TextAlignment); SelectTextAlignment(_LabelSource.TextLineAlignment); comboBox1.Text = Enum.GetName(typeof(System.Windows.Forms.DataVisualization.Charting.TextOrientation), _LabelSource.TextOrientation); colorComBoBox1.SelectedItem = _LabelSource.LineColor; numericUpDown1.Value = _LabelSource.LineWidth; } _Load = false; }
private void DataSource_AfterSelect(object sender, TreeViewEventArgs e) { if (DataField.Rows != null) { DataField.Rows.Clear(); } if (e.Node != null) { if (e.Node.Tag != null && e.Node.Tag is SourceFieldDataTable) { PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.FieldTreeViewData fvd = PMS.Libraries.ToolControls.PMSPublicInfo.CurrentPrjInfo.GetCurrentReportDataDefine() as PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.FieldTreeViewData; if (null == fvd) { return; } List <PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField> SubChild = (e.Node.Tag as PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField).GetSubSourceField(fvd); if (SubChild != null) { foreach (PMS.Libraries.ToolControls.PmsSheet.PmsPublicData.SourceField filed in SubChild) { int i = DataField.Rows.Add(); DataGridViewRow temp = DataField.Rows[i]; temp.Cells[0].Tag = filed; temp.Cells[2].Value = filed.Name; } } if (_LabelSource != null) { if (_LabelSource.TrendLabelSource != null && _LabelSource.TrendLabelSource.Equals(e.Node.Tag)) { SelectFieldFlag(_LabelSource.FieldFlag); } } } } Apply.Enabled = true; _Saved = false; }