public static bool CreateMessageBox(TriggerReader reader)
        {
            string msg = (reader.PeekString()) ? reader.ReadString() : "";

            MessageBox.Show(msg);
            return(true);
        }
Esempio n. 2
0
 private bool LoadLibraryFromFile(TriggerReader reader)
 {
     if (!reader.PeekString())
     {
         return(false);
     }
     reader.Page.LoadLibraryFromAssembly(reader.ReadString());
     return(true);
 }
Esempio n. 3
0
        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);
 }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 8
0
        private bool FileExists(TriggerReader reader)
        {
            string file = (reader.PeekString()) ? reader.ReadString() : "";

            return(File.Exists(file));
        }