Beispiel #1
0
        private void dataGrid1_DoubleClick(object sender, System.EventArgs e)
        {
            if (dataGrid1.CurrentCell.RowNumber >= 0 && dataGrid1.CurrentCell.RowNumber <= _entries.Length)
            {
                _entry = _entries[dataGrid1.CurrentCell.RowNumber];

                // get a existing task info
                DemoTask task = new DemoTask(_entry.TaskId);

                // start a existing task
                try
                {
                    UIPManager.StartNavigationTask(_entry.NavGraphName, task);
                }
                catch (UIPException ex)
                {
                    if (ex.Message.IndexOf("Task not found") > -1)
                    {
                        MessageBox.Show(ex.Message + Environment.NewLine + "Remove the bad <task> element within the <tasks> in tasks.xml file to re-start");
                    }
                    else
                    {
                        throw ex;
                    }
                }
            }
        }
Beispiel #2
0
        private void btnLogon_Click_1(object sender, System.EventArgs e)
        {
            DemoTask task = new DemoTask();
            string   nav  = "navA";

            //  set first nav + view, since we are starting fresh
            _entry = new TaskLogEntry(Guid.Empty, "navA", "Form1", DateTime.Now);

            //  save this entry
            TaskLog.MakeTaskEntry(_entry);

            // start a new task
            UIPManager.StartNavigationTask(nav, task);
        }