PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/DICKManager/CustomTasks.cs

https://bitbucket.org/williamybs/uidipythontool
C# | 45 lines | 32 code | 5 blank | 8 comment | 0 complexity | 2dae0362385ceb3cbf8201edc0cd5900 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Windows.Forms;
  5. using DICK;
  6. using DICK.UI;
  7. using DICK.B1;
  8. using DICK.Core;
  9. namespace DICK_Manager
  10. {
  11. public class CustomTasks
  12. {
  13. B1Engine engine = B1Engine.GetInstance();
  14. public CustomTasks(B1Engine engine)
  15. {
  16. }
  17. public void MySampleEvent(object sender, System.EventArgs e)
  18. {
  19. /*MessageToken res = new MessageToken();
  20. res.Header = "HELLO FROM MYEVENT!";
  21. MessageForm m = new MessageForm(res);
  22. MainForm mf = engine.GetFromContext("MainForm") as MainForm;
  23. mf.AddTabPage(m); */
  24. }
  25. public virtual void InnerMain(string[] args)
  26. {
  27. System.Collections.Generic.List<BuiltInTask> builtintasks = new List<BuiltInTask>();
  28. try
  29. {
  30. //TODO BUILT-IN TASKS BUILT IN TASKS
  31. //builtintasks.Add(new DICK.UI.BuiltInTask(MainForm.TargetPanels.EXPORTPANEL, "HEPS", "img\\2_b.gif", new System.EventHandler(this.MySampleEvent), false));
  32. //engine.AddToContext("BuiltInTasks", builtintasks);
  33. }
  34. catch (Exception ex)
  35. {
  36. MessageBox.Show("Failed adding the builtin task:" + ex.Message+" - Do you have the img folder properly set up?");
  37. }
  38. }
  39. }
  40. }