網路編輯器插件ckeditor+ckfinder配置

来源:http://www.cnblogs.com/xujingyang/archive/2016/04/18/5405510.html
-Advertisement-
Play Games

原帖地址 另外一個 去掉編輯器的下邊欄 在config.js中加入: config.removePlugins = 'elementspath'; config.resize_enabled = false; 就ok了 ckeditor+ckfinder配置用法 一、使用方法: 1、在頁面<head ...


原帖地址

另外一個

 

 

去掉編輯器的下邊欄

在config.js中加入:

config.removePlugins = 'elementspath';
config.resize_enabled = false;

就ok了

 

 

 

ckeditor+ckfinder配置用法  
一、使用方法:   
1、在頁面<head>中引入ckeditor核心文件ckeditor.js   
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>   
2、在使用編輯器的地方插入HTML控制項<textarea>   
<textarea id="TextArea1" cols="20" rows="2" class="ckeditor"></textarea>   
如果是ASP.NET環境,也可用伺服器端控制項<TextBox>   
<asp:TextBox ID="tbContent" runat="server" TextMode="MultiLine" class="ckeditor"></asp:TextBox>   
註意在控制項中加上 class="ckeditor" 。   
3、將相應的控制項替換成編輯器代碼   
<script type="text/javascript">   
    CKEDITOR.replace('TextArea1');   
//如果是在ASP.NET環境下用的伺服器端控制項<TextBox>   
    CKEDITOR.replace('tbContent');   
//如果<TextBox>控制項在母版頁中,要這樣寫   
    CKEDITOR.replace('<%=tbContent.ClientID.Replace("_","$") %>');   
</script>   
4、配置編輯器(這些配置預設也是沒關係的)   
    ckeditor的配置都集中在 ckeditor/config.js 文件中,下麵是一些常用的配置參數:   
// 界面語言,預設為 'en'   
    config.language = 'zh-cn';   
// 設置寬高   
    config.width = 400;   
    config.height = 400;   
// 編輯器樣式,有三種:'kama'(預設)、'office2003'、'v2'   
    config.skin = 'v2';   
// 背景顏色   
    config.uiColor = '#FFF';   
// 工具欄(基礎'Basic'、全能'Full'、自定義)plugins/toolbar/plugin.js   
    config.toolbar = 'Basic';   
    config.toolbar = 'Full';   
    這將配合:   
    config.toolbar_Full = [   
       ['Source','-','Save','NewPage','Preview','-','Templates'],   
       ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],   
       ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],   
       ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],   
       '/',   
       ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],   
        ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],   
        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],   
        ['Link','Unlink','Anchor'],   
       ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],   
       '/',   
        ['Styles','Format','Font','FontSize'],   
        ['TextColor','BGColor']   
    ];   
    //工具欄是否可以被收縮   
    config.toolbarCanCollapse = true;   
    //工具欄的位置   
    config.toolbarLocation = 'top';//可選:bottom   
    //工具欄預設是否展開   
    config.toolbarStartupExpanded = true;   
// 取消 “拖拽以改變尺寸”功能 plugins/resize/plugin.js   
    config.resize_enabled = false;   
    //改變大小的最大高度   
    config.resize_maxHeight = 3000;   
    //改變大小的最大寬度   
    config.resize_maxWidth = 3000;   
    //改變大小的最小高度   
    config.resize_minHeight = 250;   
    //改變大小的最小寬度   
    config.resize_minWidth = 750;   
// 當提交包含有此編輯器的表單時,是否自動更新元素內的數據   
    config.autoUpdateElement = true;   
// 設置是使用絕對目錄還是相對目錄,為空為相對目錄   
    config.baseHref = ''   
    // 編輯器的z-index值   
    config.baseFloatZIndex = 10000;   
//設置快捷鍵   
    config.keystrokes = [   
       [ CKEDITOR.ALT + 121 , 'toolbarFocus' ], //獲取焦點   
        [ CKEDITOR.ALT + 122 , 'elementsPathFocus' ], //元素焦點   
       [ CKEDITOR.SHIFT + 121 , 'contextMenu' ], //文本菜單   
       [ CKEDITOR.CTRL + 90 , 'undo' ], //撤銷   
        [ CKEDITOR.CTRL + 89 , 'redo' ], //重做   
        [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 , 'redo' ], //   
        [ CKEDITOR.CTRL + 76 , 'link' ], //鏈接   
        [ CKEDITOR.CTRL + 66 , 'bold' ], //粗體   
        [ CKEDITOR.CTRL + 73 , 'italic' ], //斜體   
        [ CKEDITOR.CTRL + 85 , 'underline' ], //下劃線   
        [ CKEDITOR.ALT + 109 , 'toolbarCollapse' ]   
    ]   
    //設置快捷鍵 可能與瀏覽器快捷鍵衝突 plugins/keystrokes/plugin.js.   
    config.blockedKeystrokes = [   
        CKEDITOR.CTRL + 66 ,   
        CKEDITOR.CTRL + 73 ,   
        CKEDITOR.CTRL + 85   
    ]   
    //設置編輯內元素的背景色的取值 plugins/colorbutton/plugin.js.   
    config.colorButton_backStyle = {   
        element : 'span',   
        styles : { 'background-color' : '#(color)' }   
    }   
    //設置前景色的取值 plugins/colorbutton/plugin.js   
    config.colorButton_colors = '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,   
        006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,   
        A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,   
        FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF’   
    //是否在選擇顏色時顯示“其它顏色”選項 plugins/colorbutton/plugin.js   
    config.colorButton_enableMore = false   
    //區塊的前景色預設值設置 plugins/colorbutton/plugin.js   
    config.colorButton_foreStyle = {   
        element : 'span',   
        styles : { 'color' : '#(color)' }   
    };   
    //所需要添加的CSS文件 在此添加 可使用相對路徑和網站的絕對路徑   
    config.contentsCss = './contents.css';   
    //文字方向   
    config.contentsLangDirection = 'rtl'; //從左到右   
    //CKeditor的配置文件 若不想配置 留空即可   
    CKEDITOR.replace( 'myfiled', { customConfig : './config.js' } );   
    //界面編輯框的背景色 plugins/dialog/plugin.js   
    config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)'; //可設置參考   
    config.dialog_backgroundCoverColor = 'white' //預設   
    //背景的不透明度 數值應該在:0.0~1.0 之間 plugins/dialog/plugin.js   
    config.dialog_backgroundCoverOpacity = 0.5   
    //移動或者改變元素時 邊框的吸附距離 單位:像素 plugins/dialog/plugin.js   
    config.dialog_magnetDistance = 20;   
    //是否拒絕本地拼寫檢查和提示 預設為拒絕 目前僅firefox和safari支持 plugins/wysiwygarea/plugin.js.   
    config.disableNativeSpellChecker = true   
    //進行表格編輯功能 如:添加行或列 目前僅firefox支持 plugins/wysiwygarea/plugin.js   
    config.disableNativeTableHandles = true; //預設為不開啟   
    //是否開啟 圖片和表格 的改變大小的功能 config.disableObjectResizing = true;   
    config.disableObjectResizing = false //預設為開啟   
    //設置HTML文檔類型   
    config.docType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"' ;   
    //是否對編輯區域進行渲染 plugins/editingblock/plugin.js   
    config.editingBlock = true;   
    //編輯器中回車產生的標簽   
    config.enterMode = CKEDITOR.ENTER_P; //可選:CKEDITOR.ENTER_BR或CKEDITOR.ENTER_DIV   
    //是否使用HTML實體進行輸出 plugins/entities/plugin.js   
    config.entities = true;   
    //定義更多的實體 plugins/entities/plugin.js   
    config.entities_additional = '#39'; //其中#代替了&   
    //是否轉換一些難以顯示的字元為相應的HTML字元 plugins/entities/plugin.js   
    config.entities_greek = true;   
    //是否轉換一些拉丁字元為HTML plugins/entities/plugin.js   
    config.entities_latin = true;   
    //是否轉換一些特殊字元為ASCII字元 如"This is Chinese: 漢語."轉換為"This is Chinese: &#27721;&#35821;."   
plugins/entities/plugin.js   
    config.entities_processNumerical = false;   
    //添加新組件   
    config.extraPlugins = 'myplugin'; //非預設 僅示例   
    //使用搜索時的高亮色 plugins/find/plugin.js   
    config.find_highlight = {   
        element : 'span',   
        styles : { 'background-color' : '#ff0', 'color' : '#00f' }   
    };   
    //預設的字體名 plugins/font/plugin.js   
    config.font_defaultLabel = 'Arial';   
    //字體編輯時的字元集 可以添加常用的中文字元:宋體、楷體、黑體等 plugins/font/plugin.js   
    config.font_names = 'Arial;Times New Roman;Verdana';   
    //文字的預設式樣 plugins/font/plugin.js   
    config.font_style = {   
        element   : 'span',   
        styles   : { 'font-family' : '#(family)' },   
        overrides : [ { element : 'font', attributes : { 'face' : null } } ]   
    };   
    //字體預設大小 plugins/font/plugin.js   
    config.fontSize_defaultLabel = '12px';   
    //字體編輯時可選的字體大小 plugins/font/plugin.js   
    config.fontSize_sizes   
='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48   
px;72/72px'   
    //設置字體大小時 使用的式樣 plugins/font/plugin.js   
    config.fontSize_style = {   
        element   : 'span',   
        styles   : { 'font-size' : '#(size)' },   
        overrides : [ { element : 'font', attributes : { 'size' : null } } ]   
    };   
    //是否強制複製來的內容去除格式 plugins/pastetext/plugin.js   
    config.forcePasteAsPlainText =false //不去除   
    //是否強制用“&”來代替“&amp;”plugins/htmldataprocessor/plugin.js   
    config.forceSimpleAmpersand = false;   
    //對address標簽進行格式化 plugins/format/plugin.js   
    config.format_address = { element : 'address', attributes : { class : 'styledAddress' } };   
    //對DIV標簽自動進行格式化 plugins/format/plugin.js   
    config.format_div = { element : 'div', attributes : { class : 'normalDiv' } };   
    //對H1標簽自動進行格式化 plugins/format/plugin.js   
    config.format_h1 = { element : 'h1', attributes : { class : 'contentTitle1' } };   
    //對H2標簽自動進行格式化 plugins/format/plugin.js   
    config.format_h2 = { element : 'h2', attributes : { class : 'contentTitle2' } };   
    //對H3標簽自動進行格式化 plugins/format/plugin.js   
    config.format_h1 = { element : 'h3', attributes : { class : 'contentTitle3' } };   
    //對H4標簽自動進行格式化 plugins/format/plugin.js   
    config.format_h1 = { element : 'h4', attributes : { class : 'contentTitle4' } };   
    //對H5標簽自動進行格式化 plugins/format/plugin.js   
    config.format_h1 = { element : 'h5', attributes : { class : 'contentTitle5' } };   
    //對H6標簽自動進行格式化 plugins/format/plugin.js   
    config.format_h1 = { element : 'h6', attributes : { class : 'contentTitle6' } };   
    //對P標簽自動進行格式化 plugins/format/plugin.js   
    config.format_p = { element : 'p', attributes : { class : 'normalPara' } };   
    //對PRE標簽自動進行格式化 plugins/format/plugin.js   
    config.format_pre = { element : 'pre', attributes : { class : 'code' } };   
    //用分號分隔的標簽名字 在工具欄上顯示 plugins/format/plugin.js   
    config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address;div';   
    //是否使用完整的html編輯模式 如使用,其源碼將包含:<html><body></body></html>等標簽   
    config.fullPage = false;   
    //是否忽略段落中的空字元 若不忽略 則字元將以“”表示 plugins/wysiwygarea/plugin.js   
    config.ignoreEmptyParagraph = true;   
    //在清除圖片屬性框中的鏈接屬性時 是否同時清除兩邊的<a>標簽 plugins/image/plugin.js   
    config.image_removeLinkByEmptyURL = true;   
    //一組用逗號分隔的標簽名稱,顯示在左下角的層次嵌套中 plugins/menu/plugin.js.   
    config.menu_groups   
='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,te   
xtfield,hiddenfield,imagebutton,button,select,textarea';   
    //顯示子菜單時的延遲,單位:ms plugins/menu/plugin.js   
    config.menu_subMenuDelay = 400;   
    //當執行“新建”命令時,編輯器中的內容 plugins/newpage/plugin.js   
    config.newpage_html = '';   
    //當從word里複製文字進來時,是否進行文字的格式化去除 plugins/pastefromword/plugin.js   
    config.pasteFromWordIgnoreFontFace = true; //預設為忽略格式   
    //是否使用<h1><h2>等標簽修飾或者代替從word文檔中粘貼過來的內容 plugins/pastefromword/plugin.js   
    config.pasteFromWordKeepsStructure = false;   
    //從word中粘貼內容時是否移除格式 plugins/pastefromword/plugin.js   
    config.pasteFromWordRemoveStyle = false;   
    //對應後臺語言的類型來對輸出的HTML內容進行格式化,預設為空   
    config.protectedSource.push( /<?[sS]*??>/g );   // PHP Code   
    config.protectedSource.push( //g );   // ASP Code   
    config.protectedSource.push( /(]+>[s|S]*?</asp:[^>]+>)|(]+/>)/gi );   // ASP.Net Code   
    //當輸入:shift+Enter時插入的標簽   
    config.shiftEnterMode = CKEDITOR.ENTER_P; //可選:CKEDITOR.ENTER_BR或CKEDITOR.ENTER_DIV   
    //可選的表情替代字元 plugins/smiley/plugin.js.   
    config.smiley_descriptions = [   
        ':)', ':(', ';)', ':D', ':/', ':P',   
        '', '', '', '', '', '',   
        '', ';(', '', '', '', '',   
        '', ':kiss', '' ];   
    //對應的表情圖片 plugins/smiley/plugin.js   
    config.smiley_images = [   
'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',   
'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_   
smile.gif',   
       'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',   
        'broken_heart.gif','kiss.gif','envelope.gif'];   
    //表情的地址 plugins/smiley/plugin.js   
    config.smiley_path = 'plugins/smiley/images/';   
    //頁面載入時,編輯框是否立即獲得焦點 plugins/editingblock/plugin.js plugins/editingblock/plugin.js.   
    config.startupFocus = false;   
    //載入時,以何種方式編輯 源碼和所見即所得 "source"和"wysiwyg" plugins/editingblock/plugin.js.   
    config.startupMode ='wysiwyg';   
    //載入時,是否顯示框體的邊框 plugins/showblocks/plugin.js   
    config.startupOutlineBlocks = false;   
    //是否載入樣式文件 plugins/stylescombo/plugin.js.   
    config.stylesCombo_stylesSet = 'default';   
    //以下為可選   
    config.stylesCombo_stylesSet = 'mystyles';   
    config.stylesCombo_stylesSet = 'mystyles:/editorstyles/styles.js';   
    config.stylesCombo_stylesSet = 'mystyles:http://www.example.com/editorstyles/styles.js';
    //起始的索引值   
    config.tabIndex = 0;   
    //當用戶鍵入TAB時,編輯器走過的空格數,(&nbsp;) 當值為0時,焦點將移出編輯框 plugins/tab/plugin.js   
    config.tabSpaces = 0;   
    //預設使用的模板 plugins/templates/plugin.js.   
    config.templates = 'default';   
    //用逗號分隔的模板文件plugins/templates/plugin.js.   
    config.templates_files = [ 'plugins/templates/templates/default.js' ]   
    //當使用模板時,“編輯內容將被替換”框是否選中 plugins/templates/plugin.js   
    config.templates_replaceContent = true;   
    //主題   
    config.theme = 'default';   
    //撤銷的記錄步數 plugins/undo/plugin.js   
    config.undoStackSize =20;   
// 在 CKEditor 中集成 CKFinder,註意 ckfinder 的路徑選擇要正確。   
//CKFinder.SetupCKEditor(null, '/ckfinder/');   
二、 一些使用技巧   
1、在頁面中即時設置編輯器   
<script type="text/javascript">   
//示例1:設置工具欄為基本工具欄,高度為70   
    CKEDITOR.replace('<%=tbLink.ClientID.Replace("_","$") %>',   
        { toolbar:'Basic', height:70 });   
//示例2:工具欄為自定義類型   
    CKEDITOR.replace( 'editor1',   
         {   
             toolbar :   
             [   
//加粗     斜體,     下劃線      穿過線      下標字        上標字   
                ['Bold','Italic','Underline','Strike','Subscript','Superscript'],   
//數字列表          實體列表            減小縮進    增大縮進   
                ['NumberedList','BulletedList','-','Outdent','Indent'],   
//左對齊             居中對齊          右對齊          兩端對齊   
                ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],   
//超鏈接 取消超鏈接 錨點   
                ['Link','Unlink','Anchor'],   
//圖片    flash    表格       水平線            表情       特殊字元        分頁符   
                ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],   
'/',   
//樣式       格式      字體    字體大小   
                ['Styles','Format','Font','FontSize'],   
//文本顏色     背景顏色   
                ['TextColor','BGColor'],   
//全屏           顯示區塊   
                ['Maximize', 'ShowBlocks','-']   
             ]   
         }   
    );   
</script>   
三、精簡ckeditor   
    在部署到Web伺服器上時,下列文件夾和文件都可以刪除:   
    /_samples :示例文件夾;   
    /_source :未壓縮源程式;   
    /lang文件夾下除 zh-cn.js、en.js 以外的文件(也可以根據需要保留其他語言文件);   
    根目錄下的 changes.html(更新列表),install.html(安裝指向),license.html(使用許可);   
    /skins 目錄下不需要的皮膚,一般用V2(簡單,朴素) ,如果只保留V2則必須在config.js中指定皮膚。   
這些東西是免費的,使用相對fckeditor來說,省了類庫fckdetior.dll的引用,直接在頁面使用js!。。。。。。。但是這個時候   
發現上傳功能使用不了!原來fckefitor把他以前的功能整合拆分了,ckeditor、ckfinder,兩部分,後者是上傳功能要錢的!!再   
在網上找找,有破解方法,下了個ckfinder放進工程根目錄!!在頁面添加了   
<script type="text/javascript">   
                       //如果是在ASP.NET環境下用的伺服器端控制項<TextBox>   
                       var editor = CKEDITOR.replace('tbContent');   
                       CKFinder.SetupCKEditor(editor, '/ckfinder/');(這個是在ckeditor基礎上加的ckfinder)   
                       </script>   
發現還是不行,上傳出來錯誤頁面!接著費了好多周折:   
ckfinder/config:   
public override bool CheckAuthentication()   
{   
  return true;   
}   
ckeditror/config.js加入:   
CKEDITOR.editorConfig = function( config )   
{   
// Define changes to default configuration here. For example:   
// config.language = 'fr';   
    // config.uiColor = '#AADC6E';   
config.filebrowserBrowseUrl = location.hash + '../ckfinder/ckfinder.html';   
config.filebrowserImageBrowseUrl = location.hash + '../ckfinder/ckfinder.html?Type=Images';   
config.filebrowserFlashBrowseUrl = location.hash+'../ckfinder/ckfinder.html?Type=Flash';   
config.filebrowserUploadUrl = location.hash + '../ckfinder/core/connector/aspx/connector.aspx?   
command=QuickUpload&type=Files';   
config.filebrowserImageUploadUrl = location.hash + '../ckfinder/core/connector/aspx/connector.aspx?   
command=QuickUpload&type=Images';   
config.filebrowserFlashUploadUrl = location.hash + '../ckfinder/core/connector/aspx/connector.aspx?   
command=QuickUpload&type=Flash';   
// config.filebrowserWindowWidth = '800';   
// config.filebrowserWindowHeight = '500';   
};   
帶顏色的部分是容易出錯的地方,開始我沒有放..(根目錄)   
      登錄後,您就出現在這裡。                     一直出錯後來加了..在前面表示從工程根目錄開始。錯誤解決!! 最後   
就是破解了:   
下麵簡單說一下我的破解步驟:(摘自別人)   
1、使用FF瀏覽器中的firebug插件;   
2、打開安裝好的文件瀏覽器,發現是調用的ckfinder.html文件;   
3、在ckfinder.html中發現<td id ="iO " >這個單元格中寫入了一個iframe,src是core/pages/ckffiles.html;   
4、繼續打開iframe節點在<tr id="he">和<tr id="qu">兩個標簽之間有一個<tr>沒有id,那個叫你給錢的話就在這裡面了~;   
5、打開 core/pages/ckffiles.html源文件,發現 <tr id="he">和<tr id="qu">之間沒有東西,說明這個<tr>是代碼生成的;   
6、接下來就可以在CKfinder的js裡面去找答案了,幸好以前FCKeditor還是比較熟悉,直接到ckfindercorejs文件夾下麵找;   
7、這個文件夾下麵兩個js一個是給IE用的,另一個是給其他瀏覽器的,這個和FCKeditor一樣;   
8、打開ckfinder_gecko.js搜索"qu",很快就發現了eF=B.getElementById('qu');這句;   
9、再往後面看   
if ((1==(dK.indexOf(ab.bW.substr(1,1)) % 5)&&window.top[qC+'143141x74x69157x6E'][qF+'163x74'].toLowerCase   
().replace(s4,"")!=ab.eo.replace(s4,""))||ab.bW.substr(3,1)!=dK.substr(((dK.indexOf(ab.bW.substr(0,1))+dK.indexOf   
(ab.bW.substr(2,1)))*9) % (dK.length-1),1)){en.call(window,qo);};eF.appendChild(D);   
這段最後的 appendChild~,差不多就在這裡了;   
10、前面一大堆條件,執行的就只有 en.call(window,qo);,不是它還是什麼~;   
11、刪除 en.call(window,qo);或者* en.call(window,qo); *,再刷新看看果然沒了~;   
12、完了再修改ckfinder_ie.js,一樣的。   
整個CKfinder就簡單破解完成了~,如果你覺得這個好用最好還是給點錢買個序列號吧,官方可以給你技術幫助可以節約很多時間的


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 本來是想試著做一個簡單OA項目玩玩的,真是不做不知道,一做嚇死人,原來以為很簡單的事情,但是做起來不是忘這就是忘那的,有的技術還得重新溫習。所以還是得記錄。免得哪天電腦掛了,就全沒有了。 開始是看了園子里何鎮汐的一系列文章,寫的太好了,只看了幾篇就有想寫代碼的衝動,很大一部分都是搬他的東西。但是我還 ...
  • 關於寄宿和AppDomain 微軟開發CLR時,將它實現成包含在一個DLL中的COM伺服器。 任何Windows應用程式都能寄宿(容納)CLR。(簡單來講,就是CLR在一個DLL中,通過引用這個DLL,可以實現包含CLR) CLR COM伺服器初始化會創建一個預設AppDomain,這個AppDom ...
  • 【ASP.NET實戰教程】ASP.NET實戰教程大集合,各種項目實戰集合,希望大家可以好好學習教程中,有的比較老了,但是一直很經典!!!!論壇中很多小伙伴說.net沒有實戰教程學習,所以小編連夜搜集整理出一些比較好的教程,望君好好珍惜,資源不易,且保持,且珍惜直接上資源截圖:下載地址【回覆可見】:h ...
  • 歲末主推:牛牛老師主講,多用戶博客系統,基於ASP.NET技術,年後將帶來移動業務平臺項目項目目標: 打造個性品牌Blogo,定製多用戶博客 為每一個博客用戶提供個性化的 blogo解決方案,打造精品blogo門戶網站 環境:VS2008+SQL Server2005 【小編推薦:現在學習可以使用 ...
  • .Net進銷存系統詳細課程大綱(開發工具採用VS2008+sqlsever2005) 【小編提醒:現在學習的話,可以使用vs2012+sql 2008 學習的是思路,教學環境不一定要一模一樣】1.項目概況及項目開發流程: 課程目標: ·瞭解項目相關各類情況,對項目開發及本項目有個總體認識 主要內容: ...
  • 1、上傳永久圖片素材,註意構造請求頭部信息時name="media"就行了 視圖代碼: @using (Html.BeginForm("UploadFile", "MenuConfig", FormMethod.Post, new { enctype = "multipart/form-data" ...
  • 小弟新手程式員一枚,代碼技術和文章水平均不才。所寫文章均為對自己所寫所學代碼的簡單記錄,可能對於老手程式員營養價值不高,望莫見怪。 我工作上有個需求:從某處API介面上獲取數據(大約1W條而已)並插入到資料庫中。 樓主剛畢業菜鳥,沒做過批量插入操作。藉助baidu搜索得知SqlBulkCopy可以實 ...
  • 當你完成組件註冊,並將組件暴露為適當的服務後你就可以通過容器或者容器的子生命周期域來解析服務(After you have your components registered with appropriate services exposed, you can resolve services f ...
一周排行
    -Advertisement-
    Play Games
  • 示例項目結構 在 Visual Studio 中創建一個 WinForms 應用程式後,項目結構如下所示: MyWinFormsApp/ │ ├───Properties/ │ └───Settings.settings │ ├───bin/ │ ├───Debug/ │ └───Release/ ...
  • [STAThread] 特性用於需要與 COM 組件交互的應用程式,尤其是依賴單線程模型(如 Windows Forms 應用程式)的組件。在 STA 模式下,線程擁有自己的消息迴圈,這對於處理用戶界面和某些 COM 組件是必要的。 [STAThread] static void Main(stri ...
  • 在WinForm中使用全局異常捕獲處理 在WinForm應用程式中,全局異常捕獲是確保程式穩定性的關鍵。通過在Program類的Main方法中設置全局異常處理,可以有效地捕獲並處理未預見的異常,從而避免程式崩潰。 註冊全局異常事件 [STAThread] static void Main() { / ...
  • 前言 給大家推薦一款開源的 Winform 控制項庫,可以幫助我們開發更加美觀、漂亮的 WinForm 界面。 項目介紹 SunnyUI.NET 是一個基於 .NET Framework 4.0+、.NET 6、.NET 7 和 .NET 8 的 WinForm 開源控制項庫,同時也提供了工具類庫、擴展 ...
  • 說明 該文章是屬於OverallAuth2.0系列文章,每周更新一篇該系列文章(從0到1完成系統開發)。 該系統文章,我會儘量說的非常詳細,做到不管新手、老手都能看懂。 說明:OverallAuth2.0 是一個簡單、易懂、功能強大的許可權+可視化流程管理系統。 有興趣的朋友,請關註我吧(*^▽^*) ...
  • 一、下載安裝 1.下載git 必須先下載並安裝git,再TortoiseGit下載安裝 git安裝參考教程:https://blog.csdn.net/mukes/article/details/115693833 2.TortoiseGit下載與安裝 TortoiseGit,Git客戶端,32/6 ...
  • 前言 在項目開發過程中,理解數據結構和演算法如同掌握蓋房子的秘訣。演算法不僅能幫助我們編寫高效、優質的代碼,還能解決項目中遇到的各種難題。 給大家推薦一個支持C#的開源免費、新手友好的數據結構與演算法入門教程:Hello演算法。 項目介紹 《Hello Algo》是一本開源免費、新手友好的數據結構與演算法入門 ...
  • 1.生成單個Proto.bat內容 @rem Copyright 2016, Google Inc. @rem All rights reserved. @rem @rem Redistribution and use in source and binary forms, with or with ...
  • 一:背景 1. 講故事 前段時間有位朋友找到我,說他的窗體程式在客戶這邊出現了卡死,讓我幫忙看下怎麼回事?dump也生成了,既然有dump了那就上 windbg 分析吧。 二:WinDbg 分析 1. 為什麼會卡死 窗體程式的卡死,入口門檻很低,後續往下分析就不一定了,不管怎麼說先用 !clrsta ...
  • 前言 人工智慧時代,人臉識別技術已成為安全驗證、身份識別和用戶交互的關鍵工具。 給大家推薦一款.NET 開源提供了強大的人臉識別 API,工具不僅易於集成,還具備高效處理能力。 本文將介紹一款如何利用這些API,為我們的項目添加智能識別的亮點。 項目介紹 GitHub 上擁有 1.2k 星標的 C# ...