public static bool CreateMessageBox(TriggerReader reader) { string msg = (reader.PeekString()) ? reader.ReadString() : ""; MessageBox.Show(msg); return(true); }
private bool LoadLibraryFromFile(TriggerReader reader) { if (!reader.PeekString()) { return(false); } reader.Page.LoadLibraryFromAssembly(reader.ReadString()); return(true); }
private bool DeleteFile(TriggerReader reader) { if (!reader.PeekString()) { return(false); } string file = reader.ReadString(); File.Delete(Path.Combine(DefaultAuthorizedPath, file)); return(true); }
public bool TestTriggerHandlerEffectMethod(TriggerReader reader) { if (reader.PeekString()) { Console.WriteLine(reader.ReadString()); } else { Console.WriteLine("Error!!!... no value."); } return(true); }
private bool IsVariableEqualToString(TriggerReader reader) { var var = reader.ReadVariable(); if (var == null) { return(false); } if (reader.PeekString()) { var str = reader.ReadString(); return(var.Value.AsString(string.Empty).Equals(str, StringComparison.InvariantCulture)); } return(false); }
public static bool SetText(TriggerReader reader) { if (reader.PeekNumber() == false) { return(false); } Control control; bool containsControl = controls.TryGetValue(reader.ReadNumber(), out control); if (containsControl == false) { return(false); } control.Text = (reader.PeekString()) ? reader.ReadString() : ""; return(true); }
public static bool CreateForm(TriggerReader reader) { string formName = (reader.PeekString()) ? reader.ReadString() : "Form"; if (reader.PeekVariable() == false) { return(false); } Variable var = reader.ReadVariable(true); Form form = new Form(); form.Text = formName; double id = ControlLib.CreateRandomID(); reader.Page.SetVariable(var.Name, id, var.IsConstant); form.Name = id.ToString(); ControlLib.controls.Add(id, form); form.ShowDialog(); form.Visible = true; return(true); }
private bool FileExists(TriggerReader reader) { string file = (reader.PeekString()) ? reader.ReadString() : ""; return(File.Exists(file)); }