public UpdateInfoEntity GetUpdateInfoEntityFromTarget(TrackingTargetEntity entity)
 {
     foreach (UpdateInfoEntity updateEntity in updateInfoList)
     {
         if (updateEntity.trackingTarget.Equals(entity))
             return updateEntity;
     }
     return null;
 }
Example #2
0
        private List<TrackingTargetEntity> GetTrackingTargetListFromForm()
        {
            List<TrackingTargetEntity> ret = new List<TrackingTargetEntity>();

            foreach (DataGridViewRow row in trackingDataGrid.Rows)
            {
                if (row.Cells[2].Value == null)
                    continue;

                if (row.Cells[2].Value.Equals(""))
                    continue;

                if (row.Cells[0].Value == null)
                    row.Cells[0].Value = false;

                TrackingTargetEntity entity = new TrackingTargetEntity((string)row.Cells[2].Value, (string)row.Cells[1].Value, (bool)row.Cells[0].Value);
                ret.Add(entity);
            }

            return ret;
        }
Example #3
0
 public UpdateInfoEntity(TrackingTargetEntity entity, DateTime lastUpdate)
 {
     this.trackingTarget = entity.Clone();
     this.lastUpdate = lastUpdate;
     this.isShownInSiren = false;
 }
Example #4
0
        public DateTime GetLastModifiedDateTimeOfEntity(TrackingTargetEntity entity)
        {
            if ((this.isWorking) && (!this.isPrivateWork))
                return DateTime.MinValue;

            if (!this.isPrivateWork)
                this.isWorking = true;
            
            DateTime ret;

            SvnInfoEventArgs infoEventArgs;
            SvnUriTarget target;

            try
            {
                target = new SvnUriTarget(entity.path);
                svnClient.GetInfo(target, out infoEventArgs);
                ret = infoEventArgs.LastChangeTime;
            }
            catch (Exception e)
            {
                Console.Out.WriteLine(e.ToString());
                ret = DateTime.MinValue;
            }

            if (!this.isPrivateWork)
                this.isWorking = false;
            return ret;

        }
 public TrackingTargetEntity Clone()
 {
     TrackingTargetEntity copy = new TrackingTargetEntity(this.path, this.nickName, this.isEnabled);
     return copy;
 }