TaskOptionsEditor

Topics: Errors, Examples
Sep 3, 2015 at 6:40 PM
Hi all, is this UI version working at all? I ask before I start getting into the source code and trying to find what may be happening. I just don't get any of the controls filled with the data (I tried the exact same code with TaskEditorDialog instead and it seems to work). Below is the code I'm using.
        Using TS As New TaskService()
            Dim aTaskEditDialog As TaskOptionsEditor
            Dim aTaskDef As TaskDefinition = TS.NewTask
            aTaskDef.XmlText = tbTaskDef.Text 'this can be blank, but usually have the XML from a TaskDefinition.XML
            Dim aTaskOptionsEditor As TaskOptionsEditor = New TaskOptionsEditor(TS, aTaskDef, True, False)
            aTaskEditDialog = New TaskOptionsEditor(TS, aTaskDef, True, False)
            aTaskEditDialog.TaskFolder = "\" + TScourmanService.TASK_SCHEDULER_FOLDER
            aTaskEditDialog.TaskName = PlugInDef.Name 'PlugInDef.Name is a string
            'aTaskEditDialog.ReinitializeControls() 'not doing aything
            If aTaskEditDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
                'aTaskEditDialog always appears empty, not even the task name shows 
                tbTaskDef.Text = FormatXML(aTaskEditDialog.TaskDefinition.XmlText)
            End If
            'remove the task we just added - we don't want this task registered in the client machine
            TS.GetFolder("\" + TScourmanService.TASK_SCHEDULER_FOLDER).DeleteTask(PlugInDef.Name, False)
        End Using

Coordinator
Sep 3, 2015 at 9:53 PM
I will try this code and let you know how to fix or I will fix the code. You actually may be the first one to use this new concept editor. Thanks for the alert.
Sep 3, 2015 at 11:03 PM
Thanks, Dahall, I can(and I'm willing to) help too, except the projects are in VS 2015, and cannot read them completely (using 2013 gets stuck with ITaskHandler COM Server Project Template). I also have found some problems with TaskEditorDialog (for example, it does not seem to modify the task definition to reflect that you selected the option to delete the task immediately if the task is not scheduled to be run again!). I'm writing an application that does a fair amount of work with the task scheduler using your library, so I might be able to do some basic debugging to the UI components, if you can provide a version that I can compile using VS 2013.
Coordinator
Sep 4, 2015 at 3:15 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.