Exemple #1
0
        /// <summary>
        /// Проверить необходимость обновления.
        /// </summary>
        private void UpdateCheck()
        {
            string     version;
            string     numberUpdate;
            string     resultMessage;
            const bool showMes = true;

            SysUpdate.UpdateCheck(out version, out numberUpdate, out resultMessage, showMes);
        }
Exemple #2
0
        ///Скачать обновление в папку Update.
        ///

        private void UpdateDownload()
        {
            string     version;
            string     numberUpdate;
            string     resultMessage;
            bool       needUpdate;
            const bool showMes = true;

            if (!SysUpdate.UpdateCheck(out version, out numberUpdate, out resultMessage, showMes))
            {
                return;
            }

            if (SysUpdate.UpdateDownload(version, numberUpdate, out resultMessage, out needUpdate, false))
            {
                if (resultMessage != "")
                {
                    sys.SM(resultMessage);
                }
                return;
            }
            sys.SM(resultMessage, MessageType.Information);
        }
Exemple #3
0
        /// <summary>
        /// Форма о программе.
        /// </summary>
        public FormAbout()
        {
            InitializeComponent();
            this.MdiParent = Var.FormMainObj;
            //this.Icon = this.MdiParent.Icon;
            //ProcessorArchitecture: MSIL
            //PathDesigner: не заполнено!

            string connectionDirect = "Not available";
            string connectionID     = "Not available";
            string connectionName   = "Not available";
            string serverName       = "Not available";
            string serverType       = "Not available";
            string serverTypeRemote = "Not available";
            string databaseName     = "Not available";
            string userForm         = "Not available";
            string userLogin        = "******";
            string version          = "Not available";
            string numberUpdate     = "Not available";
            string needUpdateStr    = "Not available";
            string connectionGUID   = "Not available";
            string timePassed       = sys.GetDateDiff(Var.DateTimeStart, DateTime.Now);

            if (Var.con != null)
            {
                connectionDirect = Var.con.ConnectionDirect.ToString();
                connectionID     = Var.con.ConnectionID;
                connectionName   = Var.con.ConnectionName;
                serverName       = Var.con.ServerName;
                serverType       = Var.con.serverType.ToString();
                serverTypeRemote = Var.con.serverTypeRemote.ToString();
                databaseName     = Var.con.DatabaseName;
                userForm         = Var.con.UserForm;
                userLogin        = Var.con.UserLogin;
                connectionGUID   = Var.con.ConnectionGUID;
                string Mes        = "";
                bool   needUpdate = SysUpdate.UpdateCheck(out version, out numberUpdate, out Mes, true);
                if (needUpdate)
                {
                    needUpdateStr = "True";
                }
                else
                {
                    needUpdateStr = "False";
                }
            }

            textAbout.Clear();
            textAbout.AppendText("SystemName:            " + Var.SystemName + Var.CR +
                                 "ConnectionGUID:        " + connectionGUID + Var.CR +
                                 "ConnectionDirect:      " + connectionDirect + Var.CR +
                                 "ConnectionID:          " + connectionID + Var.CR +
                                 "ConnectionName:        " + connectionName + Var.CR +
                                 "LocalPort:             " + Var.LocalServerPort + Var.CR +
                                 "LocalHost:             " + Var.LocalHost + Var.CR +
                                 "LocalIP:               " + Var.LocalIP + Var.CR +
                                 "ServerAppPort:         " + Var.ServerAppPortDefault + Var.CR +
                                 "ServerType:            " + serverType + Var.CR +
                                 "ServerTypeRemote:      " + serverTypeRemote + Var.CR +
                                 "ServerName:            " + serverName + Var.CR +
                                 "DatabaseName:          " + databaseName + Var.CR +
                                 "UserID:                " + Var.UserID + Var.CR +
                                 "UserForm:              " + userForm + Var.CR +
                                 "UserLogin:             "******"ApplicationVersion:    " + Var.ApplicationVersion + Var.CR +  //Пример: 1.0.6256.25762
                                 "Update required:       " + needUpdateStr + Var.CR +
                                 "Latest version:        " + version + Var.CR +
                                 "Latest number update:  " + numberUpdate + Var.CR +
                                 "PathMain:              " + FBAPath.PathMain + Var.CR +
                                 "PathAdditional:        " + FBAPath.PathAdditional + Var.CR +
                                 "PathLog:               " + FBAPath.PathLog + Var.CR +
                                 "PathTemp:              " + FBAPath.PathTemp + Var.CR +
                                 "PathApp:               " + FBAPath.PathApp + Var.CR +
                                 "PathUpdate:            " + FBAPath.PathUpdate + Var.CR +
                                 "PathRollback:          " + FBAPath.PathRollback + Var.CR +
                                 "EnterMode:             " + Var.enterMode.ToString() + Var.CR +
                                 "ComputerName:          " + Var.ComputerName + Var.CR +
                                 "ComputerUserName:      "******"System start:          " + Var.DateTimeStart + Var.CR +
                                 "Time passed:           " + timePassed + Var.CR);
        }