久久久久久久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. 主站蜘蛛池模板: 一区二区福利视频 | 91色站 | 日韩中文字幕在线 | 国产日韩欧美另类 | 一色桃子av一区二区 | 国产精品久久久久一区二区三区 | 天天视频一区二区三区 | 综合久久一区 | 亚洲精品久久 | 日韩欧美三级 | 一级大片免费 | 国产精品成人一区二区三区夜夜夜 | 亚洲国产一区视频 | 操操日| 日韩欧美精品一区 | 91精品国产美女在线观看 | 亚洲欧美激情网 | 久久久无码精品亚洲日韩按摩 | 日韩精品专区在线影院重磅 | 国产女人第一次做爰毛片 | 97在线观视频免费观看 | 中文字幕一区二区三区精彩视频 | 户外露出一区二区三区 | 午夜精品一区二区三区在线播放 | 天天爽综合网 | 国家aaa的一级看片 h片在线看 | 在线播放精品视频 | av入口 | 亚洲一区二区三区在线视频 | 亚洲国产小视频 | 欧美日韩福利视频 | 亚洲第一av | 亚洲国产精品人人爽夜夜爽 | 日本不卡一区二区三区 | 欧美电影免费网站 | h片在线观看免费 | 中文字幕高清在线 | 国产成人99| 久久大| 99精品在线观看 | 国产一级视频在线观看 |