Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: Open to new trigger window

$
0
0
There is not a simple property that will allow this. However you can use a sneaky method for doing this, though it has risks of internals breaking it in the future so definitely make sure you build in error handling.
using (TaskService mgr = new TaskService())
{
  var dlg = new TaskEditDialog(mgr.RootFolder.Tasks[0], false, false);
  try
  {
    TabControl tabs = dlg.Controls["taskPropertiesControl1"].Controls["tabControl"] as TabControl;
    TabPage triggerTab = dlg.Controls["taskPropertiesControl1"].Controls["tabControl"].Controls["triggersTab"] as TabPage;
    if (tabs != null && triggerTab != null)
      tabs.SelectedTab = triggerTab;
  }
  catch { }
  dlg.ShowDialog(this);
}

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>