예제 #1
0
        public void AddFile(string FileName)
        {
            for (int i = 0; i < this.Rows.Count; i++)
            {
                this.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.LightBlue;
            }
            VCFFile teFile = new VCFFile(FileName);

            this._VCFFile.Merge(teFile);
            RefreshDataFromFile(teFile);
        }
예제 #2
0
 public VCFVisLstObj()
 {
     this._VCFFile = new VCFFile();
     //this._OtherFiles = new List<VCFFile>();
     this.AllowUserToAddRows      = false;
     this.AllowUserToDeleteRows   = false;
     this.AllowUserToOrderColumns = true;
     this.EditMode      = DataGridViewEditMode.EditProgrammatically;
     this.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
     this.Click        += new System.EventHandler(this.VCFVisLstObj_Click);
 }
예제 #3
0
        protected void RefreshDataFromFile(VCFFile CardsFile)
        {
            List <string> tecolslist;

            string[] rowString;
            bool     isThereData = false;
            int      i;

            tecolslist = CardsFile.ColumnsList;

            for (i = 0; i < tecolslist.Count; i++)
            {
                if (_GetColumnPosAfterName(tecolslist[i]) == -1)
                {
                    this.ColumnCount += 1;
                    this.Columns[ColumnCount - 1].Name = tecolslist[i];
                }
            }

            foreach (VCFCard teCard in CardsFile.CardList)
            {
                rowString   = new string[this.ColumnCount];
                isThereData = false;

                foreach (VCFElement teElement in teCard.ElementsList)
                {
                    int teint = _GetColumnPosAfterName(teElement.Name);
                    rowString[teint] = teElement.Value;
                    isThereData      = true;
                }
                if (isThereData)
                {
                    this.Rows.Add(rowString);
                    foreach (int col in _GetPhotoColumnList())
                    {
                        for (i = 0; i < this.RowCount; i++)
                        {
                            if ((this.Rows[i].Cells[col].Value != null) &&
                                (Object.ReferenceEquals(this.Rows[i].Cells[col].Value.GetType(), "".GetType())))
                            {
                                DataGridViewImageCell IC = new DataGridViewImageCell();
                                VCFPhoto tePhoto         = new VCFPhoto(this.Rows[i].Cells[col].Value.ToString());
                                IC.Value = (Image)tePhoto.Img;
                                this.Rows[i].Cells[col] = IC;
                                this.Rows[i].Height     = tePhoto.Img.Height;
                            }
                        }
                    }
                }
            }
            this._NumerotateTable();
        }
예제 #4
0
        public void Merge(string fileName)
        {
            VCFFile teFile = new VCFFile(fileName);

            Merge(teFile);
        }
예제 #5
0
 public void Merge(VCFFile pVCFFile)
 {
     this._CardList.AddRange(pVCFFile.CardList);
 }