Ejemplo n.º 1
0
        private void FormAbout_Load(object sender, System.EventArgs e)
        {
            string softwareName = PrefC.GetString(PrefName.SoftwareName);

            if (Programs.GetCur(ProgramName.BencoPracticeManagement).Enabled)
            {
                pictureOpenDental.Image = Properties.Resources.bencoLogo;
            }
            if (softwareName != "Open Dental Software" && !Programs.GetCur(ProgramName.BencoPracticeManagement).Enabled)
            {
                pictureOpenDental.Visible = false;
            }
            labelVersion.Text = Lan.g(this, "Version:") + " " + Application.ProductVersion;
            UpdateHistory updateHistory = UpdateHistories.GetForVersion(Application.ProductVersion);

            if (updateHistory != null)
            {
                labelVersion.Text += "  " + Lan.g(this, "Since:") + " " + updateHistory.DateTimeUpdated.ToShortDateString();
            }
            //keeps the trailing year up to date
            labelCopyright.Text      = softwareName + " " + Lan.g(this, "Copyright 2003-") + DateTime.Now.ToString("yyyy") + ", Jordan S. Sparks, D.M.D.";
            labelMySQLCopyright.Text = Lan.g(this, "MySQL - Copyright 1995-") + DateTime.Now.ToString("yyyy") + Lan.g(this, ", www.mysql.com");
            //Database Server----------------------------------------------------------
            List <string> serviceList = Computers.GetServiceInfo();

            labelName.Text         += serviceList[2].ToString();         //MiscData.GetODServer();//server name
            labelService.Text      += serviceList[0].ToString();         //service name
            labelMySqlVersion.Text += serviceList[3].ToString();         //service version
            labelServComment.Text  += serviceList[1].ToString();         //service comment
            labelMachineName.Text  += Environment.MachineName.ToUpper(); //current client or remote application machine name
        }
Ejemplo n.º 2
0
        private void FormUpdate_Load(object sender, System.EventArgs e)
        {
            if (ODBuild.IsWeb())
            {
                MsgBox.Show(this, "Updates are not allowed manually from within the program. Please call support.");
                Close();
                return;
            }
            SetButtonVisibility();
            labelVersion.Text = Lan.g(this, "Using Version:") + " " + Application.ProductVersion;
            UpdateHistory updateHistory = UpdateHistories.GetForVersion(Application.ProductVersion);

            if (updateHistory != null)
            {
                labelVersion.Text += "  " + Lan.g(this, "Since") + ": " + updateHistory.DateTimeUpdated.ToShortDateString();
            }
            if (PrefC.GetBool(PrefName.UpdateWindowShowsClassicView))
            {
                //Default location is (74,9).  We move it 5 pixels up since butShowPrev is 5 pixels bigger then labelVersion
                butShowPrev.Location  = new Point(74 + labelVersion.Width + 2, 9 - 5);
                panelClassic.Visible  = true;
                panelClassic.Location = new Point(67, 29);
                textUpdateCode.Text   = PrefC.GetString(PrefName.UpdateCode);
                textWebsitePath.Text  = PrefC.GetString(PrefName.UpdateWebsitePath); //should include trailing /
                butDownload.Enabled   = false;
                if (!Security.IsAuthorized(Permissions.Setup))                       //gives a message box if no permission
                {
                    butCheck.Enabled = false;
                }
            }
            else
            {
                if (Security.IsAuthorized(Permissions.Setup, true))
                {
                    butCheck2.Visible = true;
                }
                else
                {
                    textConnectionMessage.Text = Lan.g(this, "Not authorized for") + " " + GroupPermissions.GetDesc(Permissions.Setup);
                }
            }
        }