public void SetLHPScanNormalInfo( LHPScanInfo.ScanNormalInfo lhpScanNormalInfo )
        {
            this.CheckBoxAllowSR.Checked = lhpScanNormalInfo.AllowScanSR;

            if ( lhpScanNormalInfo.ScanDateType == LHPScanInfo.NormalScanDateType.ScanNow )
            {
                this.RadioButtonNow.Checked = true;
            }
            else if ( lhpScanNormalInfo.ScanDateType == LHPScanInfo.NormalScanDateType.ScanSelect )
            {
                this.RadioButtonSelect.Checked = true;
            }

            this.DateTimePickerSelect.Value = lhpScanNormalInfo.ScanDate;
        }
예제 #2
0
        public static LHPScanInfo LoadLHPScanInfo( string strConfigFile )
        {
            if ( File.Exists( strConfigFile ) == false )
            {
                if ( strConfigFile == GlobalSetting.LHPScanInfoFilePath )
                    SaveLHPScanInfo( GlobalSetting.LHPScanInfoFilePath, new LHPScanInfo() );
                else
                    return null;
            }

            XDocument documentConfig = XDocument.Load( strConfigFile );
            if ( documentConfig == null )
                return null;

            XElement elementRoot = documentConfig.Element( (XName)"Demo.Stock" );
            if ( elementRoot == null )
                return null;

            XAttribute attributeVer = elementRoot.Attribute( (XName)"Ver" );
            if ( attributeVer == null )
                return null;

            //////////////////////////////////////////////////////////////////////////
            // <Settings>
            XElement elementLHPScanInfo = elementRoot.Element( (XName)"LHPScanInfo" );
            if ( elementLHPScanInfo == null )
                return null;

            LHPScanInfo lhpScanInfo = new LHPScanInfo();

            XElement elementScanBaseInfo = elementLHPScanInfo.Element( (XName)"ScanBaseInfo" );
            if ( elementScanBaseInfo == null )
                return null;
            else
            {
                XAttribute attributeAllowPSR = elementScanBaseInfo.Attribute( (XName)"AllowPSR" );
                if ( attributeAllowPSR == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowPSR = bool.Parse( attributeAllowPSR.Value );

                XAttribute attributeScanType = elementScanBaseInfo.Attribute( (XName)"ScanType" );
                if ( attributeScanType == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.ScanType = (LHPScanInfo.BaseScanType)( int.Parse( attributeScanType.Value ) );

                XAttribute attributeScanSpace = elementScanBaseInfo.Attribute( (XName)"ScanSpace" );
                if ( attributeScanSpace == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.ScanSpace = int.Parse( attributeScanSpace.Value );

                XAttribute attributeAllowScanDCHP = elementScanBaseInfo.Attribute( (XName)"AllowScanDCHP" );
                if ( attributeAllowScanDCHP == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowScanDCHP = bool.Parse( attributeAllowScanDCHP.Value );

                XAttribute attributeAllowDCHP313 = elementScanBaseInfo.Attribute( (XName)"AllowDCHP313" );
                if ( attributeAllowDCHP313 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCHP313 = bool.Parse( attributeAllowDCHP313.Value );

                XAttribute attributeAllowDCHP214 = elementScanBaseInfo.Attribute( (XName)"AllowDCHP214" );
                if ( attributeAllowDCHP214 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCHP214 = bool.Parse( attributeAllowDCHP214.Value );

                XAttribute attributeAllowDCHP115 = elementScanBaseInfo.Attribute( (XName)"AllowDCHP115" );
                if ( attributeAllowDCHP115 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCHP115 = bool.Parse( attributeAllowDCHP115.Value );

                XAttribute attributeAllowDCHP412 = elementScanBaseInfo.Attribute( (XName)"AllowDCHP412" );
                if ( attributeAllowDCHP412 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCHP412 = bool.Parse( attributeAllowDCHP412.Value );

                XAttribute attributeAllowDCHP511 = elementScanBaseInfo.Attribute( (XName)"AllowDCHP511" );
                if ( attributeAllowDCHP511 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCHP511 = bool.Parse( attributeAllowDCHP511.Value );

                XAttribute attributeAllowScanDCLP = elementScanBaseInfo.Attribute( (XName)"AllowScanDCLP" );
                if ( attributeAllowScanDCLP == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowScanDCLP = bool.Parse( attributeAllowScanDCLP.Value );

                XAttribute attributeAllowDCLP313 = elementScanBaseInfo.Attribute( (XName)"AllowDCLP313" );
                if ( attributeAllowDCLP313 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCLP313 = bool.Parse( attributeAllowDCLP313.Value );

                XAttribute attributeAllowDCLP214 = elementScanBaseInfo.Attribute( (XName)"AllowDCLP214" );
                if ( attributeAllowDCLP214 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCLP214 = bool.Parse( attributeAllowDCLP214.Value );

                XAttribute attributeAllowDCLP115 = elementScanBaseInfo.Attribute( (XName)"AllowDCLP115" );
                if ( attributeAllowDCLP115 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCLP115 = bool.Parse( attributeAllowDCLP115.Value );

                XAttribute attributeAllowDCLP412 = elementScanBaseInfo.Attribute( (XName)"AllowDCLP412" );
                if ( attributeAllowDCLP412 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCLP412 = bool.Parse( attributeAllowDCLP412.Value );

                XAttribute attributeAllowDCLP511 = elementScanBaseInfo.Attribute( (XName)"AllowDCLP511" );
                if ( attributeAllowDCLP511 == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowDCLP511 = bool.Parse( attributeAllowDCLP511.Value );

                XAttribute attributeAllowScanGapUp = elementScanBaseInfo.Attribute( (XName)"AllowScanGapUp" );
                if ( attributeAllowScanGapUp == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowScanGapUp = bool.Parse( attributeAllowScanGapUp.Value );

                XAttribute attributeAllowGULK = elementScanBaseInfo.Attribute( (XName)"AllowGULK" );
                if ( attributeAllowGULK == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowGULK = bool.Parse( attributeAllowGULK.Value );

                XAttribute attributeAllowGUHK = elementScanBaseInfo.Attribute( (XName)"AllowGUHK" );
                if ( attributeAllowGUHK == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowGULK = bool.Parse( attributeAllowGUHK.Value );

                XAttribute attributeGapUpPercentum = elementScanBaseInfo.Attribute( (XName)"GapUpPercentum" );
                if ( attributeGapUpPercentum == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.GapUpPercentum = int.Parse( attributeGapUpPercentum.Value );

                XAttribute attributeAllowScanGapDown = elementScanBaseInfo.Attribute( (XName)"AllowScanGapDown" );
                if ( attributeAllowScanGapDown == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowScanGapDown = bool.Parse( attributeAllowScanGapDown.Value );

                XAttribute attributeAllowGDLK = elementScanBaseInfo.Attribute( (XName)"AllowGDLK" );
                if ( attributeAllowGDLK == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowGDLK = bool.Parse( attributeAllowGDLK.Value );

                XAttribute attributeAllowGDHK = elementScanBaseInfo.Attribute( (XName)"AllowGDHK" );
                if ( attributeAllowGDHK == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.AllowGDHK = bool.Parse( attributeAllowGDHK.Value );

                XAttribute attributeGapDownPercentum = elementScanBaseInfo.Attribute( (XName)"GapDownPercentum" );
                if ( attributeGapDownPercentum == null )
                    return null;
                else
                    lhpScanInfo.m_ScanBaseInfo.GapDownPercentum = int.Parse( attributeGapDownPercentum.Value );
            }

            XElement elementScanNormalInfo = elementLHPScanInfo.Element( (XName)"ScanNormalInfo" );
            if ( elementScanNormalInfo == null )
                return null;
            else
            {
                XAttribute attributeAllowScanSR = elementScanNormalInfo.Attribute( (XName)"AllowScanSR" );
                if ( attributeAllowScanSR == null )
                    return null;
                else
                    lhpScanInfo.m_ScanNormalInfo.AllowScanSR = bool.Parse( attributeAllowScanSR.Value );

                XAttribute attributeScanDateType = elementScanNormalInfo.Attribute( (XName)"ScanDateType" );
                if ( attributeScanDateType == null )
                    return null;
                else
                    lhpScanInfo.m_ScanNormalInfo.ScanDateType = (LHPScanInfo.NormalScanDateType)( int.Parse( attributeScanDateType.Value ) );

                XAttribute attributeScanDate = elementScanNormalInfo.Attribute( (XName)"ScanDate" );
                if ( attributeScanDate == null )
                    return null;
                else
                    lhpScanInfo.m_ScanNormalInfo.ScanDate = DateTime.Parse( attributeScanDate.Value );

                XElement elementScanTrendInfo = elementScanNormalInfo.Element( (XName)"ScanTrendInfo" );
                if ( elementScanTrendInfo == null )
                    return null;
                else
                {
                    XAttribute attributeScanTrendSpace = elementScanTrendInfo.Attribute( (XName)"ScanTrendSpace" );
                    if ( attributeScanTrendSpace == null )
                        return null;
                    else
                        lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.ScanTrendSpace = int.Parse( attributeScanTrendSpace.Value );

                    XElement elementScanUpTrendInfo = elementScanTrendInfo.Element( (XName)"ScanUpTrendInfo" );
                    if ( elementScanUpTrendInfo == null )
                        return null;
                    else
                    {
                        XAttribute attributeScanContinueUpDate = elementScanUpTrendInfo.Attribute( (XName)"ScanContinueUpDate" );
                        if ( attributeScanContinueUpDate == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ScanContinueUpDate = int.Parse( attributeScanContinueUpDate.Value );

                        XAttribute attributeScanUpTrendNeedHigh = elementScanUpTrendInfo.Attribute( (XName)"ScanUpTrendNeedHigh" );
                        if ( attributeScanUpTrendNeedHigh == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ScanUpTrendNeedHigh = bool.Parse( attributeScanUpTrendNeedHigh.Value );

                        XAttribute attributeAllowCheckDCLP = elementScanUpTrendInfo.Attribute( (XName)"AllowCheckDCLP" );
                        if ( attributeAllowCheckDCLP == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.AllowCheckDCLP = bool.Parse( attributeAllowCheckDCLP.Value );

                        XAttribute attributeCheckDCLP = elementScanUpTrendInfo.Attribute( (XName)"CheckDCLP" );
                        if ( attributeCheckDCLP == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.CheckDCLP = (LHPScanInfo.NormalTrendCheckDCLP)int.Parse( attributeCheckDCLP.Value );

                        XAttribute attributeNeedDCLP313 = elementScanUpTrendInfo.Attribute( (XName)"NeedDCLP313" );
                        if ( attributeNeedDCLP313 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP313 = bool.Parse( attributeNeedDCLP313.Value );

                        XAttribute attributeNeedDCLP214 = elementScanUpTrendInfo.Attribute( (XName)"NeedDCLP214" );
                        if ( attributeNeedDCLP214 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP214 = bool.Parse( attributeNeedDCLP214.Value );

                        XAttribute attributeNeedDCLP115 = elementScanUpTrendInfo.Attribute( (XName)"NeedDCLP115" );
                        if ( attributeNeedDCLP115 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP115 = bool.Parse( attributeNeedDCLP115.Value );

                        XAttribute attributeNeedDCLP412 = elementScanUpTrendInfo.Attribute( (XName)"NeedDCLP412" );
                        if ( attributeNeedDCLP412 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP412 = bool.Parse( attributeNeedDCLP412.Value );

                        XAttribute attributeNeedDCLP511 = elementScanUpTrendInfo.Attribute( (XName)"NeedDCLP511" );
                        if ( attributeNeedDCLP511 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP511 = bool.Parse( attributeNeedDCLP511.Value );

                        XAttribute attributeAllowCheckDCHP = elementScanUpTrendInfo.Attribute( (XName)"AllowCheckDCHP" );
                        if ( attributeAllowCheckDCHP == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.AllowCheckDCHP = bool.Parse( attributeAllowCheckDCHP.Value );

                        XAttribute attributeCheckDCHP = elementScanUpTrendInfo.Attribute( (XName)"CheckDCHP" );
                        if ( attributeCheckDCHP == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.CheckDCHP = (LHPScanInfo.NormalTrendCheckDCHP)int.Parse( attributeCheckDCHP.Value );

                        XAttribute attributeExcludeDCHP313 = elementScanUpTrendInfo.Attribute( (XName)"ExcludeDCHP313" );
                        if ( attributeExcludeDCHP313 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP313 = bool.Parse( attributeExcludeDCHP313.Value );

                        XAttribute attributeExcludeDCHP214 = elementScanUpTrendInfo.Attribute( (XName)"ExcludeDCHP214" );
                        if ( attributeExcludeDCHP214 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP214 = bool.Parse( attributeExcludeDCHP214.Value );

                        XAttribute attributeExcludeDCHP115 = elementScanUpTrendInfo.Attribute( (XName)"ExcludeDCHP115" );
                        if ( attributeExcludeDCHP115 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP115 = bool.Parse( attributeExcludeDCHP115.Value );

                        XAttribute attributeExcludeDCHP412 = elementScanUpTrendInfo.Attribute( (XName)"ExcludeDCHP412" );
                        if ( attributeExcludeDCHP412 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP412 = bool.Parse( attributeExcludeDCHP412.Value );

                        XAttribute attributeExcludeDCHP511 = elementScanUpTrendInfo.Attribute( (XName)"ExcludeDCHP511" );
                        if ( attributeExcludeDCHP511 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP511 = bool.Parse( attributeExcludeDCHP511.Value );
                    }

                    XElement elementScanDownTrendInfo = elementScanTrendInfo.Element( (XName)"ScanDownTrendInfo" );
                    if ( elementScanDownTrendInfo == null )
                        return null;
                    else
                    {
                        XAttribute attributeScanContinueDownDate = elementScanDownTrendInfo.Attribute( (XName)"ScanContinueDownDate" );
                        if ( attributeScanContinueDownDate == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ScanContinueDownDate = int.Parse( attributeScanContinueDownDate.Value );

                        XAttribute attributeScanDownTrendNeedLow = elementScanDownTrendInfo.Attribute( (XName)"ScanDownTrendNeedLow" );
                        if ( attributeScanDownTrendNeedLow == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ScanContinueDownDate = int.Parse( attributeScanContinueDownDate.Value );

                        XAttribute attributeAllowCheckDCHP = elementScanDownTrendInfo.Attribute( (XName)"AllowCheckDCHP" );
                        if ( attributeAllowCheckDCHP == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.AllowCheckDCHP = bool.Parse( attributeAllowCheckDCHP.Value );

                        XAttribute attributeCheckDCHP = elementScanDownTrendInfo.Attribute( (XName)"CheckDCHP" );
                        if ( attributeCheckDCHP == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.CheckDCHP = (LHPScanInfo.NormalTrendCheckDCHP)int.Parse( attributeCheckDCHP.Value );

                        XAttribute attributeNeedDCHP313 = elementScanDownTrendInfo.Attribute( (XName)"NeedDCHP313" );
                        if ( attributeNeedDCHP313 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP313 = bool.Parse( attributeNeedDCHP313.Value );

                        XAttribute attributeNeedDCHP214 = elementScanDownTrendInfo.Attribute( (XName)"NeedDCHP214" );
                        if ( attributeNeedDCHP214 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP214 = bool.Parse( attributeNeedDCHP214.Value );

                        XAttribute attributeNeedDCHP115 = elementScanDownTrendInfo.Attribute( (XName)"NeedDCHP115" );
                        if ( attributeNeedDCHP115 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP115 = bool.Parse( attributeNeedDCHP115.Value );

                        XAttribute attributeNeedDCHP412 = elementScanDownTrendInfo.Attribute( (XName)"NeedDCHP412" );
                        if ( attributeNeedDCHP412 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP412 = bool.Parse( attributeNeedDCHP412.Value );

                        XAttribute attributeNeedDCHP511 = elementScanDownTrendInfo.Attribute( (XName)"NeedDCHP511" );
                        if ( attributeNeedDCHP511 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP511 = bool.Parse( attributeNeedDCHP511.Value );

                        XAttribute attributeAllowCheckDCLP = elementScanDownTrendInfo.Attribute( (XName)"AllowCheckDCLP" );
                        if ( attributeAllowCheckDCLP == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.AllowCheckDCLP = bool.Parse( attributeAllowCheckDCLP.Value );

                        XAttribute attributeCheckDCLP = elementScanDownTrendInfo.Attribute( (XName)"CheckDCLP" );
                        if ( attributeCheckDCLP == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.CheckDCLP = (LHPScanInfo.NormalTrendCheckDCLP)int.Parse( attributeCheckDCLP.Value );


                        XAttribute attributeExcludeDCLP313 = elementScanDownTrendInfo.Attribute( (XName)"ExcludeDCLP313" );
                        if ( attributeExcludeDCLP313 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP313 = bool.Parse( attributeExcludeDCLP313.Value );

                        XAttribute attributeExcludeDCLP214 = elementScanDownTrendInfo.Attribute( (XName)"ExcludeDCLP214" );
                        if ( attributeExcludeDCLP214 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP214 = bool.Parse( attributeExcludeDCLP214.Value );

                        XAttribute attributeExcludeDCLP115 = elementScanDownTrendInfo.Attribute( (XName)"ExcludeDCLP115" );
                        if ( attributeExcludeDCLP115 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP115 = bool.Parse( attributeExcludeDCLP115.Value );

                        XAttribute attributeExcludeDCLP412 = elementScanDownTrendInfo.Attribute( (XName)"ExcludeDCLP412" );
                        if ( attributeExcludeDCLP412 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP412 = bool.Parse( attributeExcludeDCLP412.Value );

                        XAttribute attributeExcludeDCLP511 = elementScanDownTrendInfo.Attribute( (XName)"ExcludeDCLP511" );
                        if ( attributeExcludeDCLP511 == null )
                            return null;
                        else
                            lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP511 = bool.Parse( attributeExcludeDCLP511.Value );
                    }
                }
            }

            return lhpScanInfo;
        }
예제 #3
0
        public static SRDynamicData ScanSRDynamicData( StockFileInfo stockFileInfo, LHPScanInfo lhpScanInfo, SRStaticData srStaticData )
        {
            SRDynamicData srDynamicData = new SRDynamicData();



            return srDynamicData;
        }
예제 #4
0
        public static void SaveLHPScanInfo( string strConfigFile, LHPScanInfo lhpScanInfo )
        {
            if ( lhpScanInfo == null )
                return;

            if ( File.Exists( strConfigFile ) == true )
            {
                File.SetAttributes( strConfigFile, FileAttributes.Archive );
                File.Delete( strConfigFile );
            }

            XElement elementRoot = new XElement( "Demo.Stock", new XAttribute( "Ver", "0.0.1.0" ) );
            {
                XElement elementLHPScanInfo = new XElement( "LHPScanInfo" );
                {
                    XElement elementScanBaseInfo = new XElement( "ScanBaseInfo", new XAttribute( "AllowPSR", lhpScanInfo.m_ScanBaseInfo.AllowPSR.ToString() ) );
                    {
                        elementScanBaseInfo.Add( new XAttribute( "ScanType", ( (int)lhpScanInfo.m_ScanBaseInfo.ScanType ).ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "ScanSpace", lhpScanInfo.m_ScanBaseInfo.ScanSpace.ToString() ) );

                        elementScanBaseInfo.Add( new XAttribute( "AllowScanDCHP", lhpScanInfo.m_ScanBaseInfo.AllowScanDCHP.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCHP313", lhpScanInfo.m_ScanBaseInfo.AllowDCHP313.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCHP214", lhpScanInfo.m_ScanBaseInfo.AllowDCHP214.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCHP115", lhpScanInfo.m_ScanBaseInfo.AllowDCHP115.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCHP412", lhpScanInfo.m_ScanBaseInfo.AllowDCHP412.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCHP511", lhpScanInfo.m_ScanBaseInfo.AllowDCHP511.ToString() ) );

                        elementScanBaseInfo.Add( new XAttribute( "AllowScanDCLP", lhpScanInfo.m_ScanBaseInfo.AllowScanDCLP.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCLP313", lhpScanInfo.m_ScanBaseInfo.AllowDCLP313.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCLP214", lhpScanInfo.m_ScanBaseInfo.AllowDCLP214.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCLP115", lhpScanInfo.m_ScanBaseInfo.AllowDCLP115.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCLP412", lhpScanInfo.m_ScanBaseInfo.AllowDCLP412.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowDCLP511", lhpScanInfo.m_ScanBaseInfo.AllowDCLP511.ToString() ) );

                        elementScanBaseInfo.Add( new XAttribute( "AllowScanGapUp", lhpScanInfo.m_ScanBaseInfo.AllowScanGapUp.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowGULK", lhpScanInfo.m_ScanBaseInfo.AllowGULK.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowGUHK", lhpScanInfo.m_ScanBaseInfo.AllowGUHK.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "GapUpPercentum", lhpScanInfo.m_ScanBaseInfo.GapUpPercentum.ToString() ) );

                        elementScanBaseInfo.Add( new XAttribute( "AllowScanGapDown", lhpScanInfo.m_ScanBaseInfo.AllowScanGapDown.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowGDLK", lhpScanInfo.m_ScanBaseInfo.AllowGDLK.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "AllowGDHK", lhpScanInfo.m_ScanBaseInfo.AllowGDHK.ToString() ) );
                        elementScanBaseInfo.Add( new XAttribute( "GapDownPercentum", lhpScanInfo.m_ScanBaseInfo.GapDownPercentum.ToString() ) );
                    }
                    elementLHPScanInfo.Add( elementScanBaseInfo );

                    XElement elementScanNormalInfo = new XElement( "ScanNormalInfo", new XAttribute( "AllowScanSR", lhpScanInfo.m_ScanNormalInfo.AllowScanSR.ToString() ) );
                    {
                        elementScanNormalInfo.Add( new XAttribute( "ScanDateType", ( (int)lhpScanInfo.m_ScanNormalInfo.ScanDateType ).ToString() ) );
                        elementScanNormalInfo.Add( new XAttribute( "ScanDate", lhpScanInfo.m_ScanNormalInfo.ScanDate.ToString() ) );

                        XElement elementScanTrendInfo = new XElement( "ScanTrendInfo", new XAttribute( "ScanTrendSpace", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.ScanTrendSpace.ToString() ) );
                        {
                            XElement elementScanUpTrendInfo = new XElement( "ScanUpTrendInfo", new XAttribute( "AllowScanUpTrend", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.AllowScanUpTrend.ToString() ) );
                            {
                                elementScanUpTrendInfo.Add( new XAttribute( "ScanContinueUpDate", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ScanContinueUpDate.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "ScanUpTrendNeedHigh", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ScanUpTrendNeedHigh.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "AllowCheckDCLP", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.AllowCheckDCLP.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "CheckDCLP", ( (int)lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.CheckDCLP ).ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "NeedDCLP313", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP313.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "NeedDCLP214", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP214.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "NeedDCLP115", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP115.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "NeedDCLP412", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP412.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "NeedDCLP511", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.NeedDCLP511.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "AllowCheckDCHP", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.AllowCheckDCHP.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "CheckDCHP", ( (int)lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.CheckDCHP ).ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "ExcludeDCHP313", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP313.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "ExcludeDCHP214", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP214.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "ExcludeDCHP115", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP115.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "ExcludeDCHP412", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP412.ToString() ) );
                                elementScanUpTrendInfo.Add( new XAttribute( "ExcludeDCHP511", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.UpTrendInfo.ExcludeDCHP511.ToString() ) );
                            }
                            elementScanTrendInfo.Add( elementScanUpTrendInfo );

                            XElement elementScanDownTrendInfo = new XElement( "ScanDownTrendInfo", new XAttribute( "AllowScanDownTrend", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.AllowScanDownTrend.ToString() ) );
                            {
                                elementScanDownTrendInfo.Add( new XAttribute( "ScanContinueDownDate", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ScanContinueDownDate.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "ScanDownTrendNeedLow", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ScanDownTrendNeedLow.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "AllowCheckDCHP", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.AllowCheckDCHP.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "CheckDCHP", ( (int)lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.CheckDCHP ).ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "NeedDCHP313", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP313.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "NeedDCHP214", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP214.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "NeedDCHP115", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP115.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "NeedDCHP412", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP412.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "NeedDCHP511", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.NeedDCHP511.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "AllowCheckDCLP", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.AllowCheckDCLP.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "CheckDCLP", ( (int)lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.CheckDCLP ).ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "ExcludeDCLP313", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP313.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "ExcludeDCLP214", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP214.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "ExcludeDCLP115", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP115.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "ExcludeDCLP412", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP412.ToString() ) );
                                elementScanDownTrendInfo.Add( new XAttribute( "ExcludeDCLP511", lhpScanInfo.m_ScanNormalInfo.ScanTrendInfo.DownTrendInfo.ExcludeDCLP511.ToString() ) );
                            }
                            elementScanTrendInfo.Add( elementScanDownTrendInfo );

                        }
                        elementScanNormalInfo.Add( elementScanTrendInfo );

                    }
                    elementLHPScanInfo.Add( elementScanNormalInfo );

                }
                elementRoot.Add( elementLHPScanInfo );

            }

            XDocument documentConfig = new XDocument( new XDeclaration( "1.0", "utf - 8", "yes" ), elementRoot );
            documentConfig.Save( strConfigFile );
        }