Esempio n. 1
0
 public VCFObj(VCFCard _VCFCard)
 {
     foreach (VCFElement elem in _VCFCard.ElementsList)
     {
         _CreateElement(elem.Name, elem.Value);
     }
 }
Esempio n. 2
0
 public void ShowCard(VCFCard _VCFCard)
 {
     //foreach(Control cntrlElem in )
     this._ClearControls();
     foreach (VCFElement elem in _VCFCard.ElementsList)
     {
         _CreateElement(elem.Name, elem.Value);
     }
 }
Esempio n. 3
0
        private int RawReadVCFFile()
        {
            string  fileLine, teStr = "";
            Boolean firstLine = true;
            VCFCard teCard    = null;

            if (this._FileName != null)
            {
                if (File.Exists(this._FileName))
                {
                    StreamReader file = new StreamReader(this._FileName);

                    while ((fileLine = file.ReadLine()) != null)
                    {
                        fileLine += "\n";
                        if (fileLine.Contains(VCFFile._CardBeg))
                        {
                            teCard    = new VCFCard();
                            firstLine = true;
                            continue;
                        }
                        if (fileLine.Contains(VCFFile._CardEnd))
                        {
                            teCard.AddStrElement(teStr);
                            teStr = "";
                            this._CardList.Add(teCard);
                            continue;
                        }
                        if (fileLine.Contains(":"))
                        {
                            if (!(firstLine))
                            {
                                teCard.AddStrElement(teStr);
                                teStr = "";
                            }
                            firstLine = false;
                        }
                        teStr += fileLine;
                    }
                }
            }

            return(1);
        }