Esempio n. 1
0
        private void buttonLaunch_Click(object sender, EventArgs e)
        {
            decimal Price = 0;

            if (!comboBoxPrice.Text.Contains("Full price"))
            {
                Price = Convert.ToDecimal(comboBoxPrice.Text.Split(' ')[0]);
            }

            //Collect the apps
            ZAws.ZAwsAmi.NewApp[] apps = new ZAwsAmi.NewApp[listView1.Items.Count];
            for (int i = 0; i < listView1.Items.Count; i++)
            {
                apps[i] = (ZAws.ZAwsAmi.NewApp)listView1.Items[i].Tag;
            }

            string instanceId = Ami.Launch(comboBoxInstanceType.Text, SecGroup, KeyPair, textBoxInstanceName.Text, textBoxStrtupScript.Text, apps, Price);

            NewInstanceId = instanceId;
            DialogResult  = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }
Esempio n. 2
0
        private void buttonLaunch_Click(object sender, EventArgs e)
        {
            decimal Price = 0;
            if (!comboBoxPrice.Text.Contains("Full price"))
            {
                Price = Convert.ToDecimal(comboBoxPrice.Text.Split(' ')[0]);
            }

            //Collect the apps
            ZAws.ZAwsAmi.NewApp[] apps = new ZAwsAmi.NewApp[listView1.Items.Count];
            for (int i = 0; i < listView1.Items.Count; i++)
            {
                apps[i] = (ZAws.ZAwsAmi.NewApp)listView1.Items[i].Tag;
            }

            string instanceId = Ami.Launch(comboBoxInstanceType.Text, SecGroup, KeyPair, textBoxInstanceName.Text, textBoxStrtupScript.Text, apps, Price);
            NewInstanceId = instanceId;
            DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }