AODL.Document.Content.Charts.Chart.GetCellRangeFromXMLString C# (CSharp) Метод

GetCellRangeFromXMLString() публичный Метод

analyse the xml string which contains the cell range of the data table
public GetCellRangeFromXMLString ( ) : CellRanges
Результат CellRanges
		public CellRanges GetCellRangeFromXMLString()
		{
			CellRanges chartData = new CellRanges ();

			string cellrange   = this.CellRange ;

			#region
			
			if (cellrange!=null&&cellrange!="")
			{
				int index1         = cellrange.IndexOf (".",0);

				if (index1!=-1)
				{
					
					string tableName        = cellrange.Substring (0,index1);
					Table  dataTable        = GetTable(tableName);

					if (dataTable!=null)
						chartData.table     =dataTable;

					int index2              = cellrange.IndexOf (":",0);
					string startCell        = cellrange.Substring ((index1+1),index2-index1-1);
					CellPos   StartCell        = GetCellPos(startCell,dataTable);

					
					chartData.startcell =StartCell;

					int index3              = cellrange.IndexOf (".",(index1+1));
					int length              = cellrange.Length ;
					string endCell          = cellrange.Substring ((index3+1),length-index3-1);
					CellPos   EndCell          = GetCellPos(endCell,dataTable);

					
					chartData.endcell   = EndCell;
					TableData           = chartData;
				}

				
			}
			#endregion
			return chartData;
		}