Ejemplo n.º 1
0
            public void CopyFromNoBarcode(VoucherItem itemNoBarcode)
            {
                Debug.Assert(itemNoBarcode != null);
                //Debug.Assert(!itemNoBarcode.HasBarcode);
                //Debug.Assert(HasBarcode);

                //JobID = itemNoBarcode.JobID;
                //CountryID = item.CountryID;
                //RetailerID = item.RetailerID;
                //VoucherID = item.VoucherID;
                //Barcode = item.Barcode;

                //Don't copy site code
                //SiteCode = item.SiteCode;
                State      = itemNoBarcode.State;
                HasBarcode = true;
                //Don't delete SessionID
                //SessionID = item.SessionID;

                FileInfoList.Clear();
                FileInfoList.AddRange(itemNoBarcode.FileInfoList);

                Thumbnail = itemNoBarcode.Thumbnail;
                Selected  = itemNoBarcode.Selected;
                Message   = itemNoBarcode.Message;
            }
Ejemplo n.º 2
0
            public void CopyFromWithBarcode(VoucherItem itemHasBarcode)
            {
                Debug.Assert(itemHasBarcode != null);
                Debug.Assert(itemHasBarcode.HasBarcode);

                JobID      = itemHasBarcode.JobID;
                CountryID  = itemHasBarcode.CountryID;
                RetailerID = itemHasBarcode.RetailerID;
                VoucherID  = itemHasBarcode.VoucherID;
                Barcode    = itemHasBarcode.Barcode;

                //Don't copy site code
                SiteCode   = itemHasBarcode.SiteCode ?? SiteCode;
                State      = itemHasBarcode.State;
                HasBarcode = itemHasBarcode.HasBarcode;
                //Don't delete SessionID
                //SessionID = item.SessionID;

                FileInfoList.Clear();
                FileInfoList.AddRange(itemHasBarcode.FileInfoList);

                Thumbnail = itemHasBarcode.Thumbnail;
                Selected  = itemHasBarcode.Selected;
                Message   = itemHasBarcode.Message;
            }
Ejemplo n.º 3
0
 private void ClearList()
 {
     if (Dispatcher == null)
     {
         FileInfoList.Clear();
     }
     else
     {
         Dispatcher.BeginInvoke(new ThreadStart(() => FileInfoList.Clear()));
     }
 }
Ejemplo n.º 4
0
            public virtual void Zero()
            {
                JobID     = 0;
                CountryID = 0;

                State = eState.NA;

                //Don't delete SessionID
                //SessionID = Guid.Empty;
                FileInfoList.Clear();
                Thumbnail = null;
                Selected  = false;
                Message   = null;
            }
Ejemplo n.º 5
0
        private void LoadFiles(string Filename)
        {
            LoadTree(Filename);
            DirectoryInfo di = (new FileInfo(Filename)).Directory;

            if (olddi == null || (olddi != null && !di.FullName.Equals(olddi.FullName)))
            {
                olddi = di;
                FileInfoList.Clear();
                List <PhotoFileInfo> _FileInfoList = new List <PhotoFileInfo>();
                foreach (FileInfo fi in di.GetFiles("*.jpg", SearchOption.TopDirectoryOnly))
                {
                    _FileInfoList.Add(new PhotoFileInfo(fi));
                }
                FileInfoList.AddRange(_FileInfoList.OrderBy(x => x.Name));
                this.Invoke((MethodInvoker) delegate
                {
                    dGVFiles.DataSource = null;
                    dGVFiles.DataSource = FileInfoList;
                    dGVFiles.Refresh();
                });
            }
        }
Ejemplo n.º 6
0
 public void RescanFolder()
 {
     FileInfoList.Clear();
     ScanFolder(RootFolder + "\\Data");
 }