예제 #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();
        }
예제 #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();
        }
예제 #3
0
 public void End()
 {
     cumulative.Stop();
 }