Esempio n. 1
0
        public void Stop()
        {
            IsRunning = false;
            MyStopWatch.Stop();
            EndTime = DateTime.Now;

            var        ctx    = new TimeTrackerEntities();
            DJobTiming timing = ctx.DJobTimings.FirstOrDefault(x => x.JobTimingId == JobTimingId);

            timing.EndTime   = EndTime;
            timing.IsRunning = false;
            ctx.SaveChanges();
        }
Esempio n. 2
0
        public async void CheckUrl(string url)
        {
            ProccessIsDone = false;
            MyStopWatch.Restart();
            WebRequest  webRequest = WebRequest.Create(url);
            WebResponse response   = await webRequest.GetResponseAsync();

            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
            {
                string numberOfCharacters = await reader.ReadToEndAsync();

                UrlSize = $"The Size Of Your Site Is: {numberOfCharacters.Length.ToString()} Bytes.";
            }
            ProccessIsDone = true;
            MyStopWatch.Stop();
        }
Esempio n. 3
0
 public void End()
 {
     cumulative.Stop();
 }