320 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			320 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Linq;
 | |
| using System.Text;
 | |
| using System.Threading.Tasks;
 | |
| 
 | |
| namespace XMLConvert
 | |
| {
 | |
| 	public partial class frmConvertXML
 | |
| 	{
 | |
| 		private string xmlSample1 = @"<C1FlexGrid version='1.0.5612.18617'>
 | |
|   <Control>
 | |
|     <MyBorderDetailString><?xml version='1.0' encoding='utf-16'?>
 | |
| <VlnBorders Rows='5' Columns='3'>
 | |
|   <VerticalLines Rows='5' Columns='4'>
 | |
|     <Lines>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|     </Lines>
 | |
|   </VerticalLines>
 | |
|   <HorizontalLines Rows='6' Columns='3'>
 | |
|     <Lines>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|       <GridLinePattern>Single</GridLinePattern>
 | |
|     </Lines>
 | |
|   </HorizontalLines>
 | |
| </VlnBorders></MyBorderDetailString>
 | |
|     <MyBorders>Volian Custom Borders</MyBorders>
 | |
|     <IsRoTable>False</IsRoTable>
 | |
|     <RODbId>0</RODbId>
 | |
|     <DPI>96</DPI>
 | |
|     <FirstEntry>False</FirstEntry>
 | |
|     <BorderColor>Black</BorderColor>
 | |
|     <StyleBackColor>255, 255, 255</StyleBackColor>
 | |
|     <AllowMerging>Custom</AllowMerging>
 | |
|     <AllowResizing>Both</AllowResizing>
 | |
|     <HighLight>WithFocus</HighLight>
 | |
|     <FocusRect>Solid</FocusRect>
 | |
|     <DrawMode>OwnerDraw</DrawMode>
 | |
|     <BackColor>255, 255, 255</BackColor>
 | |
|     <VisualStyle>Custom</VisualStyle>
 | |
|     <ScrollBars>None</ScrollBars>
 | |
|     <Cursor>Default</Cursor>
 | |
|     <Font>Courier New, 12pt</Font>
 | |
|     <Margin>3, 3, 3, 3</Margin>
 | |
|     <MaximumSize>0, 0</MaximumSize>
 | |
|     <MinimumSize>0, 0</MinimumSize>
 | |
|     <RightToLeft>No</RightToLeft>
 | |
|     <Padding>0, 0, 0, 0</Padding>
 | |
|     <ImeMode>NoControl</ImeMode>
 | |
|   </Control>
 | |
|   <ColumnInfo>
 | |
|     <Count>3</Count>
 | |
|     <Fixed>0</Fixed>
 | |
|     <DefaultSize>125</DefaultSize>
 | |
|   </ColumnInfo>
 | |
|   <Columns>
 | |
|     <Column index='0'>
 | |
|       <Width>68</Width>
 | |
|     </Column>
 | |
|     <Column index='1'>
 | |
|       <Width>178</Width>
 | |
|     </Column>
 | |
|     <Column index='2'>
 | |
|       <Width>368</Width>
 | |
|     </Column>
 | |
|   </Columns>
 | |
|   <RowInfo>
 | |
|     <Count>5</Count>
 | |
|     <Fixed>0</Fixed>
 | |
|     <DefaultSize>25</DefaultSize>
 | |
|   </RowInfo>
 | |
|   <Rows>
 | |
|     <Row index='0'>
 | |
|       <Height>25</Height>
 | |
|     </Row>
 | |
|     <Row index='1'>
 | |
|       <Height>25</Height>
 | |
|     </Row>
 | |
|     <Row index='2'>
 | |
|       <Height>25</Height>
 | |
|     </Row>
 | |
|     <Row index='3'>
 | |
|       <Height>25</Height>
 | |
|     </Row>
 | |
|     <Row index='4'>
 | |
|       <Height>51</Height>
 | |
|     </Row>
 | |
|   </Rows>
 | |
|   <Cells>
 | |
|     <Cell index='0,0'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  PROC \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='0,1'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  PROC TITLE      \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='0,2'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  FUNCTION                         \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='1,0'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  R-3  \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='1,1'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  Restore CCW     \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='1,2'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  Cross-tie CCW from Unit Two \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='2,0'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  R-11 \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='2,1'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  Restore RHR     \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='2,2'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  Repower RHR pump(s) from Unit Two  \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='3,0'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  LS-2 \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='3,1'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  Start-up AFW    \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='3,2'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  Cross-tie AFW from Unit Two \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>16</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='4,0'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  LS-6 \par
 | |
|       \par
 | |
|       \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>48</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='4,1'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  RCS Make-up     \par
 | |
|  With CVCS       \par
 | |
|  Cross-tie       \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>48</UserData>
 | |
|     </Cell>
 | |
|     <Cell index='4,2'>
 | |
|       <Data>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Courier New;}}
 | |
| \viewkind4\uc1\pard\sl-240\slmult0\f0\fs24  CVCS Cross-tie For Level Control\par
 | |
|  \par
 | |
| }
 | |
| </Data>
 | |
|       <UserData type='System.Int32'>32</UserData>
 | |
|     </Cell>
 | |
|   </Cells>
 | |
|   <Styles>
 | |
|     <Style>
 | |
|       <Name>Normal</Name>
 | |
|       <Definition>Font:Courier New, 12pt;BackColor:255, 255, 255;TextAlign:LeftTop;Border:Flat,1,Black,Both;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Alternate</Name>
 | |
|       <Definition>BackColor:255, 255, 255;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Fixed</Name>
 | |
|       <Definition>BackColor:Control;ForeColor:ControlText;Border:Flat,1,ControlDark,Both;BackgroundImageLayout:Hide;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Highlight</Name>
 | |
|       <Definition>BackColor:LightCyan;ForeColor:Black;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Focus</Name>
 | |
|       <Definition>BackColor:LightCyan;ForeColor:Black;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Editor</Name>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Search</Name>
 | |
|       <Definition>BackColor:Highlight;ForeColor:HighlightText;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Frozen</Name>
 | |
|       <Definition>BackColor:Beige;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>NewRow</Name>
 | |
|       <Definition>ForeColor:GrayText;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>EmptyArea</Name>
 | |
|       <Definition>BackColor:Transparent;Border:None,1,Black,Both;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>SelectedColumnHeader</Name>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>SelectedRowHeader</Name>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>GrandTotal</Name>
 | |
|       <Definition>BackColor:Black;ForeColor:White;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Subtotal0</Name>
 | |
|       <Definition>BackColor:ControlDarkDark;ForeColor:White;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Subtotal1</Name>
 | |
|       <Definition>BackColor:ControlDarkDark;ForeColor:White;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Subtotal2</Name>
 | |
|       <Definition>BackColor:ControlDarkDark;ForeColor:White;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Subtotal3</Name>
 | |
|       <Definition>BackColor:ControlDarkDark;ForeColor:White;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Subtotal4</Name>
 | |
|       <Definition>BackColor:ControlDarkDark;ForeColor:White;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>Subtotal5</Name>
 | |
|       <Definition>BackColor:ControlDarkDark;ForeColor:White;</Definition>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>FilterEditor</Name>
 | |
|     </Style>
 | |
|     <Style>
 | |
|       <Name>FirstCustomStyle</Name>
 | |
|     </Style>
 | |
|   </Styles>
 | |
| </C1FlexGrid>";
 | |
| 	}
 | |
| }
 |