Exemplo n.º 1
0
        /// <summary>
        /// MainForm is about to load
        /// </summary>
        private void MainForm_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < 4; i++)
              {
            RhinoInstall install = null;
            if (i == 0)
              install = new Rhino6Install();
            else if (i == 1)
              install = new Rhino5x64Install();
            else if (i == 2)
              install  = new Rhino5Install();
            else if (i == 3)
              install = new Rhino4Install();

            if (null != install)
            {
              if (install.Find() && install.IsValid())
            comboInstalls.Items.Add(install);
            }
              }

              if (comboInstalls.Items.Count > 0)
              {
            comboInstalls.SelectedIndex = 0;
              }
              else
              {
            MessageBox.Show(this, "No Rhino installations found!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            this.Close();
              }

              this.CenterToScreen();
        }
Exemplo n.º 2
0
        /// <summary>
        ///   MainForm is about to load
        /// </summary>
        private void MainForm_Load(object sender, EventArgs e)
        {
            for (var i = 0; i < 6; i++)
            {
                RhinoInstall install = null;
                if (i == 0)
                {
                    install = new Rhino8Install();
                }
                else if (i == 1)
                {
                    install = new Rhino7Install();
                }
                else if (i == 2)
                {
                    install = new Rhino6Install();
                }
                else if (i == 3)
                {
                    install = new Rhino5x64Install();
                }
                else if (i == 4)
                {
                    install = new Rhino5Install();
                }
                else if (i == 5)
                {
                    install = new Rhino4Install();
                }

                if (null != install)
                {
                    if (install.Find() && install.IsValid())
                    {
                        comboInstalls.Items.Add(install);
                    }
                }
            }

            if (comboInstalls.Items.Count > 0)
            {
                comboInstalls.SelectedIndex = 0;
            }
            else
            {
                MessageBox.Show(this, "No Rhino installations found!", Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Close();
            }

            CenterToScreen();
        }