先测试下Windows Live Writer

windows xp下的Writer 14.0不支持设置插入图片的set to default功能。但是用起来,还算OK。如下:

Far Away World

Beech trees in evening sunlight, Wuppertal, Germany

 

发布Live Writer代码着色插件CNBlogs.CodeHighlighter提供的代码插入插件:

/**
     * Loads the AdnRecords in efid and returns them as a
     * List of AdnRecords
     *
     * throws SecurityException if no READ_CONTACTS permission
     *
     * @param efid the EF id of a ADN-like ICC
     * @return List of AdnRecord
     */
    public List<AdnRecord> getAdnRecordsInEf(int efid) {

        if (phone.getContext().checkCallingOrSelfPermission(
                android.Manifest.permission.READ_CONTACTS)
                != PackageManager.PERMISSION_GRANTED) {
            throw new SecurityException(
                    "Requires android.permission.READ_CONTACTS permission");
        }

        efid = updateEfForIccType(efid);
        if (DBG) logd("getAdnRecordsInEF: efid=" + efid);

        synchronized(mLock) {
            checkThread();
            AtomicBoolean status = new AtomicBoolean(false);
            Message response = mBaseHandler.obtainMessage(EVENT_LOAD_DONE, status);
            if (adnCache != null) {
                adnCache.requestLoadAllAdnLike(efid, adnCache.extensionEfForEf(efid), response);
                waitForResult(status);
            } else {
                logd("Failure while trying to load from SIM due to uninitialised adncache");
            }
        }
        return records;
    }

官方的代码插入插件,有折叠功能。Windows Live Writer Plug-ins,其实就是这里的:LiveWriter插入高亮代码插件介绍 基于SyntaxHighighter

折叠代码示例

 

可见还是用后者,效果好。


 

Technorati 标签:
posted @ 2013-01-04 14:16  Leo L.Cao  阅读(...)  评论(...编辑  收藏