void ReleaseDesignerOutlets() { if (TaskTable != null) { TaskTable.Dispose(); TaskTable = null; } if (TaskTitle != null) { TaskTitle.Dispose(); TaskTitle = null; } if (SaveButton != null) { SaveButton.Dispose(); SaveButton = null; } if (DeleteButton != null) { DeleteButton.Dispose(); DeleteButton = null; } }
public override int GetHashCode() { int hash = 1; if (TaskProject.Length != 0) { hash ^= TaskProject.GetHashCode(); } if (TaskTitle.Length != 0) { hash ^= TaskTitle.GetHashCode(); } if (OldNote.Length != 0) { hash ^= OldNote.GetHashCode(); } if (NewNote.Length != 0) { hash ^= NewNote.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> // Adds New Task /// </summary> private async void ExecuteAddTaskCommandAsync() { if (IocContainer.Instance.Container.Resolve <IPlatformService>().IsConnected()) { if (!string.IsNullOrEmpty(TaskTitle?.Trim())) { IsLoading = true; var task = new TodoItem { Id = Guid.NewGuid().ToString(), Name = TaskTitle, Status = "Waiting" }; var result = await _taskService.SaveTaskAsync(task); if (result != null) { var item = new TodoDBItem() { Id = result.Id, Name = result.Name, Status = result.Status }; await _taskRepo.Insert(item); TaskList = _taskRepo.Get(); TaskTitle = string.Empty; ExecuteFilterCommand(string.Empty); } IsLoading = false; } else { await _pageDialog.DisplayAlertAsync(AppConstants.AppName, AppConstants.AlertEmptyFieldInfo, AppConstants.AlertOkBtnTitle); } } else { await _pageDialog.DisplayAlertAsync(AppConstants.AlertOfflineTitle, AppConstants.AlertOfflineInfo, AppConstants.AlertOkBtnTitle); } }