public void setup(DumbCallback _retMethod, EveTask _task) { retMethod = _retMethod; task = _task; update(task); task.Ref = update; if (task.getStatus().ToString().Equals("Running")) StopButton.Text = "Stop"; else StopButton.Text = "Start"; }
public AddNewTask(DumbCallback _retMethod) { retMethod = _retMethod; InitializeComponent(); EveInstances.Instance.updateComboBox(EveList); if (!EveList.Size.IsEmpty) { EveEntry current = EveInstances.Instance.getEntry(((System.Data.DataRowView)EveList.SelectedItem).Row); task = new EveTask(current, update); _invalidate(); } else { MessageBox.Show("No Eve instance detected!"); retMethod(); } }
private void update(EveTask entry) { //if (entry == null || eveHandle != entry) // return; if (startX.InvokeRequired) startX.Invoke(new Action(()=>updateStartX(entry.startPoint.X.ToString()))); else startX.Text = entry.startPoint.X.ToString(); if (startY.InvokeRequired) startY.Invoke(new Action(()=>updateStartY(entry.startPoint.Y.ToString()))); else startY.Text = entry.startPoint.Y.ToString(); if (lastX.InvokeRequired) lastX.Invoke(new Action(()=>updateEndX(entry.endPoint.X.ToString()))); else lastX.Text = entry.endPoint.X.ToString(); if (lastY.InvokeRequired) lastY.Invoke(new Action(()=>updateEndY(entry.endPoint.Y.ToString()))); else lastY.Text = entry.endPoint.Y.ToString(); /// period if (period.InvokeRequired) period.Invoke(new Action(() => updatePeriod(entry.period.ToString()))); else period.Text = entry.period.ToString(); /// minimalize if (minimalize.InvokeRequired) minimalize.Invoke(new Action(() => updateMinimalize(entry.minimalize))); else minimalize.Checked = entry.minimalize; /// selectAll if (selectAll.InvokeRequired) selectAll.Invoke(new Action(() => updateSelectAll(entry.selectAll))); else selectAll.Checked = entry.selectAll; _invalidate(); }
public void AddNewEntry(EveTask newTask) { }
private void update(EveTask entry) { if (startX.InvokeRequired) startX.Invoke(new Action(() => updateStartX(entry.startPoint.X.ToString()))); else startX.Text = entry.startPoint.X.ToString(); if (startY.InvokeRequired) startY.Invoke(new Action(() => updateStartY(entry.startPoint.Y.ToString()))); else startY.Text = entry.startPoint.Y.ToString(); if (lastX.InvokeRequired) lastX.Invoke(new Action(() => updateEndX(entry.endPoint.X.ToString()))); else lastX.Text = entry.endPoint.X.ToString(); if (lastY.InvokeRequired) lastY.Invoke(new Action(() => updateEndY(entry.endPoint.Y.ToString()))); else lastY.Text = entry.endPoint.Y.ToString(); /// period if (period.InvokeRequired) period.Invoke(new Action(() => updatePeriod(entry.period.ToString()))); else period.Text = entry.period.ToString(); /// until if (until.InvokeRequired) until.Invoke(new Action(() => updateUntil(entry.until.ToString()))); else until.Text = entry.until.ToString(); /// minimalize if (minimalize.InvokeRequired) minimalize.Invoke(new Action(() => updateMinimalize(entry.minimalize))); else minimalize.Checked = entry.minimalize; /// selectAll if (selectAll.InvokeRequired) selectAll.Invoke(new Action(() => updateSelectAll(entry.selectAll))); else selectAll.Checked = entry.selectAll; }
public EditTaskForm(EveTask _task) { InitializeComponent(); editTask1.setup(close, _task); }