Esempio n. 1
0
        public void Timeline(List <string> label, double minutes)
        {
            string input = string.Join(" ", label);

            if (!string.IsNullOrEmpty(input))
            {
                var tags = label.Where(l => l.StartsWith("#")).Select(l => l.ToUpper().Substring(1)).ToList();


                if (input.Length > MAXLABELSIZE)
                {
                    SendUpdate(string.Format("The label has been truncated to {0} characters", MAXLABELSIZE.ToString()));
                    input = input.Substring(0, 1000);
                }

                var tl = TimelineService.InsertTimeline(this.TimeUser, DateTime.Now.AddMinutes(-1 * minutes), input, tags);

                this.LastEntryDate = DateTime.Now;
                SendUpdate(string.Format("Timeline #{0} has been added.", tl.Id));
                this.RecordAway = true;
            }
        }