Esempio n. 1
0
        /// <summary>
        /// Upgrade Apsim Next Generation
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">Event arguments</param>
        private void OnUpgrade(object sender, EventArgs e)
        {
            // Get the version of the current assembly.
            Version version = Assembly.GetExecutingAssembly().GetName().Version;

            if (version.Revision == 0)
            {
                view.ShowMessage("You are on a custom build. You cannot upgrade.", Simulation.ErrorLevel.Error);
            }
            else
            {
                if (AllowClose())
                {
                    Forms.UpgradeForm form = new Forms.UpgradeForm(view);
                    form.Show();
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Upgrade Apsim Next Generation
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">Event arguments</param>
        private void OnUpgrade(object sender, EventArgs e)
        {
            // Get the version of the current assembly.
            Version version = Assembly.GetExecutingAssembly().GetName().Version;

            if (version.Revision == 0)
            {
                ShowError("You are on a custom build. You cannot upgrade.");
            }
            else
            {
                if (this.AllowClose())
                {
                    Forms.UpgradeForm form = new Forms.UpgradeForm(this.view);
                    form.Show();
                }
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Upgrade Apsim Next Generation
 /// </summary>
 /// <param name="sender">Sender object</param>
 /// <param name="e">Event arguments</param>
 private void OnUpgrade(object sender, EventArgs e)
 {
     // Get the version of the current assembly.
     Version version = Assembly.GetExecutingAssembly().GetName().Version;
     if (version.Revision == 0)
         view.ShowMessage("You are on a custom build. You cannot upgrade.", DataStore.ErrorLevel.Error);
     else
     {
         if (AllowClose())
         {
             Forms.UpgradeForm form = new Forms.UpgradeForm(view);
             form.Show();
         }
     }
 }