Ejemplo n.º 1
0
    private Patcher()
    {
        UpdateInfo   = new CUpdateInfo();
        m_VersionMan = new VersionMan();

        //初始化文件名
        strGameOldVerFile      = "patcher/config/game_ver.sw";
        strGameNewVerFile      = "patcher/temp/game_servernewver.sw";
        strUpdateIncFile       = "patcher/temp/inc.sw";
        strServerListXML       = "patcher/ServerList.xml";
        strServerListJSON      = "patcher/ServerList.json";
        strAccountRoleListJSON = "patcher/AccountRoleList.json";

        strDownloadPath          = "patcher/temp/";
        strErrorLog              = "Logs/update.log";
        strTempWritePackFileName = "writepack.tmp";
        //strAnnoucementFile = "patcher/temp/annoucement.txt";

        //strLibPatcherDir = "patcher/";
        //strLibPackageDir = "package/";
        //strLibPatcherConfigDir = "patcher/config/";
        strLibPatcherTmpDir = "patcher/temp/";
        //strLibAssetBundleDir = "AssetBundles/";

        _UpdateLog = new UpdateLog();
    }
Ejemplo n.º 2
0
    protected void btnCheckOut_Click(object sender, EventArgs e)
    {
        try
        {
            // Check out the document
            if (Node != null)
            {
                // Check modify permissions
                if (CheckPermissions && (CMSContext.CurrentUser.IsAuthorizedPerDocument(Node, NodePermissionsEnum.Modify) == AuthorizationResultEnum.Denied))
                {
                    return;
                }

                // Raise event
                RaiseOnBeforeCheckOut(sender, e);

                VersionMan.EnsureVersion(Node, Node.IsPublished);

                // Check out the document
                VersionMan.CheckOut(Node);

                ReloadMenu();

                if (UIHelper.DisplayCheckedOutIcon(CMSContext.CurrentSiteName))
                {
                    RefreshTree(Node.NodeParentID, NodeID);
                }
            }
        }
        catch (WorkflowException)
        {
            AddAlert(GetString("EditContent.DocumentCannotCheckOut"));
        }
        catch (Exception ex)
        {
            // Log exception
            EventLogProvider ep = new EventLogProvider();
            ep.LogEvent("Content", "CHECKOUT", ex);
            AddAlert(ex.Message);
        }

        // Ensure js script for split mode
        EnsureSplitModeScript();

        if (EnablePassiveRefresh)
        {
            PassiveRefresh(NodeID);
        }
    }