// Class Constructors public FlueXTask(ref string f_topic, ref string f_type, FLUEX_PRIORITITYPE f_priorityType, ref FlueXUser f_user, ref FlueXProject f_project, ref string f_description, int f_id = 0) { _topic = f_topic; _type = f_type; _priorityType = f_priorityType; _user = f_user; _project = f_project; _id = f_id; _description = f_description; }
// Class Methods::Create bool CreateTask() { // Function Variables int f_num = 0; FlueXProject f_project = null; FlueXUser f_user = null; string f_topic = null; string f_type = null; string f_description = null; FLUEX_PRIORITITYPE f_priorType = FLUEX_PRIORITITYPE.LOW; // Variables Defenition if (!ControlUserList(ref f_num, true)) { return(false); } f_user = _systemUser._listUser[f_num - 1]; if (!ControlProjectList(ref f_num, true)) { return(false); } f_project = _systemProject._listProject[f_num - 1]; Console.Clear(); if (0 == FlueXInput.TextInput("Topic", ref f_topic, true)) { return(false); } Console.Clear(); if (0 == FlueXInput.TextInput("Type", ref f_type, true)) { return(false); } Console.Clear(); if (0 == FlueXInput.TextInput("Prioriti (1-3)", ref f_num, 3, true, false, 1)) { return(false); } f_priorType = (FLUEX_PRIORITITYPE)f_num - 1; Console.Clear(); if (0 == FlueXInput.TextInput("Description", ref f_description, true)) { return(false); } // Create New Object _systemTask._listTask.Add(new FlueXTask(ref f_topic, ref f_type, f_priorType, ref f_user, ref f_project, ref f_description)); // Set Personal ID _systemTask._listTask[_systemTask._listTask.Count - 1]._id = _systemTask._idCounter++; // Add Pointers f_user._listTask.Add(_systemTask._listTask[_systemTask._listTask.Count - 1]); f_project._listTask.Add(_systemTask._listTask[_systemTask._listTask.Count - 1]); // Successful Return Value return(true); }