Beispiel #1
0
        public FormMain(Loader Loader)
        {
            InitializeComponent();
            this.Ambiente = new Ambiente();
            this.Loader   = Loader;
            this.Models   = new List <ScriptModel>();

            il.Images.Add(new Icon(@"Icons\default.ico"));
            il.Images.Add(new Icon(@"Icons\dispfile.ico"));
            il.Images.Add(new Icon(@"Icons\project.ico"));

            treeView1.ImageList = il;
        }
Beispiel #2
0
        public static string SetValue(string Variable, string Value, Ambiente Ambiente)
        {
            Boolean seted = false;

            foreach (var v in Ambiente.userVariables)
            {
                if (v.name.Equals(Variable))
                {
                    v.value = Value;
                    seted   = true;
                    break;
                }
            }

            if (!seted)
            {
                Ambiente.userVariables.Add(new Variable(Variable));
                SetValue(Variable, Value, Ambiente);
            }

            return((seted) ? "success" : "error");
        }
Beispiel #3
0
        public DispLoader(string[] args)
        {
            Ambiente = new Ambiente();
            Ambiente.DefaultCommandClassName = new Disp.DString("Disp");

            this.Loader = new Disp.Internal.Loader(this.Ambiente);

            Console.Title = "DISP NEXT " + Ambiente.CurrentFolder;

            args = args.Except(new string[] { "dispx", "dispx.exe", "disp", "disp.exe" }).ToArray();

            if (args != null)
            {
                if (args.Count() > 0)
                {
                    String comando = "";

                    for (int i = 0; i < args.Count(); i++)
                    {
                        comando += args[i];
                        comando += " ";
                    }

                    var cmd = new ConsoleCommand(comando);

                    string result = Loader.Execute(cmd);

                    WriteToConsole(result);

                    Console.ReadKey();
                }
                else
                {
                    Run();
                }
            }
        }
Beispiel #4
0
 public Application(Disp.Internal.Ambiente Ambiente)
 {
     this.Ambiente = Ambiente;
 }