/DICKManager/CustomTasks.cs
https://bitbucket.org/williamybs/uidipythontool · C# · 45 lines · 32 code · 5 blank · 8 comment · 0 complexity · 2dae0362385ceb3cbf8201edc0cd5900 MD5 · raw file
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Windows.Forms;
- using DICK;
- using DICK.UI;
- using DICK.B1;
- using DICK.Core;
-
- namespace DICK_Manager
- {
- public class CustomTasks
- {
-
- B1Engine engine = B1Engine.GetInstance();
- public CustomTasks(B1Engine engine)
- {
-
- }
-
- public void MySampleEvent(object sender, System.EventArgs e)
- {
- /*MessageToken res = new MessageToken();
- res.Header = "HELLO FROM MYEVENT!";
- MessageForm m = new MessageForm(res);
- MainForm mf = engine.GetFromContext("MainForm") as MainForm;
- mf.AddTabPage(m); */
- }
-
- public virtual void InnerMain(string[] args)
- {
- System.Collections.Generic.List<BuiltInTask> builtintasks = new List<BuiltInTask>();
- try
- {
- //TODO BUILT-IN TASKS BUILT IN TASKS
- //builtintasks.Add(new DICK.UI.BuiltInTask(MainForm.TargetPanels.EXPORTPANEL, "HEPS", "img\\2_b.gif", new System.EventHandler(this.MySampleEvent), false));
- //engine.AddToContext("BuiltInTasks", builtintasks);
- }
- catch (Exception ex)
- {
- MessageBox.Show("Failed adding the builtin task:" + ex.Message+" - Do you have the img folder properly set up?");
- }
- }
- }
- }