Example #1
0
        void runProgram(int index)
        {
            string Name = "";

            foreach (Label thisLabel in progLabels)
            {
                if (index.ToString() == (string)thisLabel.Tag)
                {
                    Name = thisLabel.Text;
                }
            }
            statusLabel.Text = "Loading " + Name + "...";
//			string result=ProgChooser.launchProgram(index);
//			if (result=null) Application.Exit();
//			else statusLabel.Text=result;
            bool result = ProgChooser.launchProgram(index);

            if (result)
            {
                Application.Exit();
            }
            else
            {
                statusLabel.Text = "Could not launch program: " + ProgChooser.getError();
            }
        }