Exemplo n.º 1
0
        private void ExecuteAddTaskButtonClick(object obj)
        {
            Model.MyTask myTask = null;

            myTask = new Model.MyTask
            {
                URL             = this.Text,
                Searched        = this.SearchedText,
                MaxCountThreads = ComboBoxSelectedValue,
                MaxCountUrls    = MaxScannedUrls
            };
            Messenger.Default.Send(myTask);
        }
Exemplo n.º 2
0
        public static Client.MyTask Convert(Model.MyTask modelTask)
        {
            if (modelTask == null)
            {
                throw new ArgumentNullException(nameof(modelTask));
            }

            var clientPriority = TaskPriorityConverter.Convert(modelTask.Priority);
            var clientTask     = new Client.MyTask
            {
                Id            = modelTask.Id.ToString(),
                UserId        = modelTask.UserId.ToString(),
                Title         = modelTask.Title,
                CreatedAt     = modelTask.CreatedAt,
                LastUpdatedAt = modelTask.LastUpdatedAt,
                Priority      = clientPriority,
                Done          = modelTask.Done,
                DeadLine      = modelTask.DeadLine,
                Text          = modelTask.Text
            };

            return(clientTask);
        }