Ejemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (treeView1.SelectedNode == null || treeView1.SelectedNode.Level != 2)
            {
                MessageBox.Show("Please select a subnet in the treeview above first");
                return;
            }

            Random rd  = new Random();
            string r   = rd.Next().ToString();
            string mac = maskedTextBox6.Text;

            VM vm = new VM();

            vm.NUName = maskedTextBox5.Text;
            vm.NUUUID = maskedTextBox4.Text;
            VMInterface vmi = new VMInterface();

            vmi.NUAttachedNetworkType = VMInterface.EAttachedNetworkType.SUBNET;
            vmi.NUAttachedNetworkID   = treeView1.SelectedNode.Name;
            vmi.NUName      = mac.Replace(':', '_');
            vmi.NUMAC       = mac;
            vm.NUInterfaces = new List <VMInterface>();
            vm.NUInterfaces.Add(vmi);
            session.getMe().createChild(session, vm);
            updateVMList();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates an instance of the interpreter.
        /// </summary>
        /// <param name="in_args">Arguments passed to the script (e.g. through the command line)</param>
        public VirtualMachine(string[] in_args)
        {
            vminterface = new VirtualMachine.VMInterface(this);
            LoadStdLib();

            //Set args
            Table arg = new Table();
            for (double i = 0; i < in_args.Length; ++i) {
                arg[i] = in_args[(int)i];
            }
            globals["arg"] = arg;
            globals["_VERSION"] = "Lua 5.1";
        }
Ejemplo n.º 3
0
 public vieUsrInterface(string ftpU, string ftpP, bool isSiglo = false)
 {
     InitializeComponent();
     DataContext = new VMInterface(ftpU, ftpP, isSiglo);
 }