private void LoadTool(string FileName, bool Custom) { Tool T = new Tool(); if (T.Load(FileName, Custom)) { if(Custom) CustomToolList.Add(T); else ToolList.Add(T); } else { Log.WriteLine(String.Format("Could not load tool file: {0:s}", FileName)); } }
public void RunAction(Script S, int Index, Tool.Tool T, Tool.Tools Tools, List<Tool.Options.OptionListItem> Options) { if ((S == null) || Busy || (T == null)) { FireonActionCompleted(Index, false, "No script or busy, or no tool", ""); return; } if (S.Actions.Count <= Index) { FireonActionCompleted(Index, false, "Invalid index", ""); return; } Thread Thr = new Thread(ActionThread); ActiveOptions = Options; ActiveTool = T; ActionIndex = Index; ActiveScript = S; Toolset = Tools; Busy = true; Thr.Start(); }