久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='lzCQo'></bdo><ul id='lzCQo'></ul>
<i id='lzCQo'><tr id='lzCQo'><dt id='lzCQo'><q id='lzCQo'><span id='lzCQo'><b id='lzCQo'><form id='lzCQo'><ins id='lzCQo'></ins><ul id='lzCQo'></ul><sub id='lzCQo'></sub></form><legend id='lzCQo'></legend><bdo id='lzCQo'><pre id='lzCQo'><center id='lzCQo'></center></pre></bdo></b><th id='lzCQo'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lzCQo'><tfoot id='lzCQo'></tfoot><dl id='lzCQo'><fieldset id='lzCQo'></fieldset></dl></div>

      <small id='lzCQo'></small><noframes id='lzCQo'>

    1. <legend id='lzCQo'><style id='lzCQo'><dir id='lzCQo'><q id='lzCQo'></q></dir></style></legend>

        <tfoot id='lzCQo'></tfoot>
      1. 根據(jù)辦公產(chǎn)品的語(yǔ)言本地化 VSTO 插件

        localize VSTO addin according to the language of the office product(根據(jù)辦公產(chǎn)品的語(yǔ)言本地化 VSTO 插件)

        1. <i id='oo0yZ'><tr id='oo0yZ'><dt id='oo0yZ'><q id='oo0yZ'><span id='oo0yZ'><b id='oo0yZ'><form id='oo0yZ'><ins id='oo0yZ'></ins><ul id='oo0yZ'></ul><sub id='oo0yZ'></sub></form><legend id='oo0yZ'></legend><bdo id='oo0yZ'><pre id='oo0yZ'><center id='oo0yZ'></center></pre></bdo></b><th id='oo0yZ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='oo0yZ'><tfoot id='oo0yZ'></tfoot><dl id='oo0yZ'><fieldset id='oo0yZ'></fieldset></dl></div>
          • <bdo id='oo0yZ'></bdo><ul id='oo0yZ'></ul>

            <small id='oo0yZ'></small><noframes id='oo0yZ'>

            <legend id='oo0yZ'><style id='oo0yZ'><dir id='oo0yZ'><q id='oo0yZ'></q></dir></style></legend>
                  <tbody id='oo0yZ'></tbody>
                <tfoot id='oo0yZ'></tfoot>

                • 本文介紹了根據(jù)辦公產(chǎn)品的語(yǔ)言本地化 VSTO 插件的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我正在開(kāi)發(fā)一個(gè) VSTO 插件,并希望根據(jù)辦公產(chǎn)品的語(yǔ)言版本對(duì)其進(jìn)行本地化.理論上是這樣的:

                  I'm developing a VSTO addin and want it to be localized according to the language version of the office product. In theory, that's how to do it:

                  int lcid = Application.LanguageSettings.get_LanguageID(Office.MsoAppLanguageID.msoLanguageIDUI);
                  System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lcid);
                  

                  為此,我當(dāng)然需要初始化 Application.因此,我可以執(zhí)行此代碼的最早點(diǎn)是在 Startup 事件處理程序中.然而,此時(shí) CreateRibbonExtensibilityObject() 已經(jīng)被調(diào)用,所以至少我的自定義功能區(qū)選項(xiàng)卡的標(biāo)題將以 Windows 語(yǔ)言顯示,這可能會(huì)有所不同.在功能區(qū)類中,我有一個(gè) onLoad 事件的處理程序,我在其中存儲(chǔ) IRibbonUI 的一個(gè)實(shí)例以供以后使用.我可以將此實(shí)例交給插件類并讓它調(diào)用 IRibbonUI.Invalidate() .但這似乎有點(diǎn)奇怪 - 創(chuàng)建一個(gè)功能區(qū)只是為了在幾微秒后使其無(wú)效.所以我想知道 - 并在這里詢問(wèn) - 是否有更優(yōu)雅的方式來(lái)根據(jù)辦公產(chǎn)品的語(yǔ)言版本本地化 vsto 插件的功能區(qū).

                  For this to work I need Application to be initialized, of course. So the earliest point where I can execute this code is in the Startup event handler. At this point, however, CreateRibbonExtensibilityObject() already has been called, so at least the title of my custom ribbon tab is going to be displayed in the Windows language, which might be different. In the ribbon class I have a handler for the onLoad event, where I store an instance of IRibbonUI for later use. I could hand over this instance to the addin class and let it call IRibbonUI.Invalidate() on it. But this seems to be a bit strange - creating a ribbon just to invalidate it a couple of microseconds later. So I wonder - and ask here - whether there is a more elegant way to localize the ribbon of a vsto addin according to the language version of the office product.

                  (我見(jiàn)過(guò) 這個(gè)類似的問(wèn)題,但是那里提供的方法這個(gè)答案對(duì)我來(lái)說(shuō)看起來(lái)更糟.)

                  (I've seen this similar question, but the approach offered there by this answer looks even worse to me.)

                  推薦答案

                  您始終可以覆蓋 CreateRibbonExtensibilityObject 方法或可能覆蓋其他一些 AddInBase 方法(BeginInit、Initialize 等)掛鉤到加載項(xiàng)加載中的正確位置生命周期.

                  You can always override the CreateRibbonExtensibilityObject method or possibly override some of the other AddInBase methods (BeginInit, Initialize, etc.) to hook into the proper location in the AddIn load lifecycle.

                  我之前重寫(xiě)了 CreateRibbonExtensibilityObject 以確保在加載功能區(qū)之前運(yùn)行初始化代碼.我注意到 CreateRibbonExtensibilityObjectStartup 事件是隨機(jī)觸發(fā)的.有時(shí) Startup 先發(fā)生 - 有時(shí) CreateRibbonExtensibilityObject 先觸發(fā).我必須手動(dòng)同步這兩個(gè)事件,以確保在創(chuàng)建功能區(qū)之前執(zhí)行任何初始化代碼.如果 CreateRibbonExtensibilityObject 先觸發(fā) - Application 對(duì)象尚未創(chuàng)建.

                  I have overridden the CreateRibbonExtensibilityObject before to ensure that initialization code is run before the Ribbon is loaded. I have noticed that CreateRibbonExtensibilityObject and Startup events are triggered at random times. Sometimes Startup happens first - sometimes CreateRibbonExtensibilityObject fires first. I had to manually synchronize the two events to ensure any initialization code is executed prior to Ribbon creation. If CreateRibbonExtensibilityObject fires first - the Application object has not yet been created.

                   Outlook.Application app = this.GetHostItem<Outlook.Application>(typeof(Outlook.Application), "Application");
                   int lcid = app.LanguageSettings.get_LanguageID(Office.MsoAppLanguageID.msoLanguageIDUI);
                   Thread.CurrentThread.CurrentUICulture = new CultureInfo(lcid);
                  

                  這將為您檢索對(duì) Application 實(shí)例的引用 - 無(wú)論它是否已加載到 Initialize 中.

                  This will retrieve a reference to the Application instance for you - regardless if it has been loaded in the Initialize yet.

                  這篇關(guān)于根據(jù)辦公產(chǎn)品的語(yǔ)言本地化 VSTO 插件的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Ignore whitespace while reading XML(讀取 XML 時(shí)忽略空格)
                  extracting just page text using HTMLAgilityPack(使用 HTMLAgilityPack 僅提取頁(yè)面文本)
                  C# extracting data from XML(C# 從 XML 中提取數(shù)據(jù))
                  Read a XML (from a string) and get some fields - Problems reading XML(讀取 XML(從字符串)并獲取一些字段 - 讀取 XML 時(shí)出現(xiàn)問(wèn)題)
                  Reading large XML documents in .net(在 .net 中讀取大型 XML 文檔)
                  How to create folder in Google Drive using .NET API?(如何使用 .NET API 在 Google Drive 中創(chuàng)建文件夾?)

                  <small id='c5wMG'></small><noframes id='c5wMG'>

                    • <bdo id='c5wMG'></bdo><ul id='c5wMG'></ul>

                          <tfoot id='c5wMG'></tfoot>
                          <i id='c5wMG'><tr id='c5wMG'><dt id='c5wMG'><q id='c5wMG'><span id='c5wMG'><b id='c5wMG'><form id='c5wMG'><ins id='c5wMG'></ins><ul id='c5wMG'></ul><sub id='c5wMG'></sub></form><legend id='c5wMG'></legend><bdo id='c5wMG'><pre id='c5wMG'><center id='c5wMG'></center></pre></bdo></b><th id='c5wMG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='c5wMG'><tfoot id='c5wMG'></tfoot><dl id='c5wMG'><fieldset id='c5wMG'></fieldset></dl></div>

                            <legend id='c5wMG'><style id='c5wMG'><dir id='c5wMG'><q id='c5wMG'></q></dir></style></legend>
                              <tbody id='c5wMG'></tbody>
                          1. 主站蜘蛛池模板: www.九色| 色播综合 | 在线成人免费视频 | 国产精品一区二区三区免费 | 国产黄色精品视频 | 四虎影视大全 | 韩国精品一区二区 | 亚洲一区二区三区免费视频 | 欧产日产国产69 | 日韩视频二区 | 欧美精品第一页 | av网站在线免费观看 | 在线观看日韩欧美 | 日韩一级免费视频 | 亚洲欧美中文字幕 | 国v精品久久久网 | 欧美精品久久久久 | www.四虎影视 | 国产三级精品视频 | 日韩视频免费观看 | 日韩欧美一区在线 | 亚洲网站在线 | 日韩一级在线观看 | 男女激情视频网站 | 成人在线免费观看网站 | 色涩av| av永久免费| 久久久久成人网 | 国产视频一 | 久久免费视频网站 | 欧美视频一区二区三区 | 国产在线成人 | 天天色天天 | 欧美日韩第一页 | 国产日韩欧美综合 | 日韩aaaa| 四川一级毛毛片 | 五月天毛片| 欧美精品在线观看 | 日本少妇高潮达到高潮 | 久久久久久毛片 |