久久久久久久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. 根據辦公產品的語言本地化 VSTO 插件

        localize VSTO addin according to the language of the office product(根據辦公產品的語言本地化 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>

                • 本文介紹了根據辦公產品的語言本地化 VSTO 插件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在開發一個 VSTO 插件,并希望根據辦公產品的語言版本對其進行本地化.理論上是這樣的:

                  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);
                  

                  為此,我當然需要初始化 Application.因此,我可以執行此代碼的最早點是在 Startup 事件處理程序中.然而,此時 CreateRibbonExtensibilityObject() 已經被調用,所以至少我的自定義功能區選項卡的標題將以 Windows 語言顯示,這可能會有所不同.在功能區類中,我有一個 onLoad 事件的處理程序,我在其中存儲 IRibbonUI 的一個實例以供以后使用.我可以將此實例交給插件類并讓它調用 IRibbonUI.Invalidate() .但這似乎有點奇怪 - 創建一個功能區只是為了在幾微秒后使其無效.所以我想知道 - 并在這里詢問 - 是否有更優雅的方式來根據辦公產品的語言版本本地化 vsto 插件的功能區.

                  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.

                  (我見過 這個類似的問題,但是那里提供的方法這個答案對我來說看起來更糟.)

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

                  推薦答案

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

                  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.

                  我之前重寫了 CreateRibbonExtensibilityObject 以確保在加載功能區之前運行初始化代碼.我注意到 CreateRibbonExtensibilityObjectStartup 事件是隨機觸發的.有時 Startup 先發生 - 有時 CreateRibbonExtensibilityObject 先觸發.我必須手動同步這兩個事件,以確保在創建功能區之前執行任何初始化代碼.如果 CreateRibbonExtensibilityObject 先觸發 - Application 對象尚未創建.

                  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);
                  

                  這將為您檢索對 Application 實例的引用 - 無論它是否已加載到 Initialize 中.

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

                  這篇關于根據辦公產品的語言本地化 VSTO 插件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

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

                  <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. 主站蜘蛛池模板: 羞羞视频免费在线观看 | 九九久久国产 | 国产精品国产成人国产三级 | 九九综合九九 | 亚洲福利视频一区二区 | 国产wwwcom | 九九国产| 久久国产欧美日韩精品 | 五月激情六月婷婷 | 美日韩免费视频 | 久久国产精品视频 | 中文字幕视频免费 | 最新国产视频 | 亚洲国产成人久久久 | 色一情一乱一伦一区二区三区 | 国产乡下妇女做爰 | 国产精品色| 999久久久久久久久6666 | av天天看| 亚洲精品一区二区三区在线 | 色视频免费 | 天天操狠狠操 | 欧美精品一区二区三区在线四季 | 欧美一区二区三区国产 | 激情小视频| 国产精品一区二区福利视频 | 久久亚洲一区二区 | 精品一区二区三区免费视频 | 伊人激情综合网 | 欧美视频精品 | 国产精品美女久久久久久久网站 | 久草成人 | 欧美一级片免费看 | 99re在线视频 | 久久在线看 | 天堂在线1 | 欧美视频免费在线观看 | 国产精品久久久久久久久久久久冷 | 最新91在线 | 色毛片 | 国产欧美日韩在线一区 |