• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IMethodResult类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IMethodResult的典型用法代码示例。如果您正苦于以下问题:C# IMethodResult类的具体用法?C# IMethodResult怎么用?C# IMethodResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IMethodResult类属于命名空间,在下文中一共展示了IMethodResult类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: create

        public void create(IReadOnlyList<string> tabElements, IReadOnlyDictionary<string, string> tabBarProperties, IMethodResult oResult)
        {
            MainPage mp = getMainPage();
            if (mp != null)
            {
                mp.tabbarHide();
                mp.toolbarRemoveAllButtons();
                string tab_background_color = null;
                if (tabBarProperties.ContainsKey("backgroundColor"))
                    tab_background_color = tabBarProperties["backgroundColor"];
                for (int i = 0; i < tabElements.Count; ++i)
                {
                    string tb = tabElements[i];
                    CJSONEntryProxy oEntry = new CJSONEntryProxy(tb);

                    string label = null;
                    string action = null;
                    string icon = null;
                    string reload = null;
    	            string selected_color = null;
                    string disabled = null;
                    string background_color = null;
                    string use_current_view_for_tab = null;

                    if (oEntry.hasName("label"))
                        label = oEntry.getString("label");
                    if (oEntry.hasName("action"))
                        action = oEntry.getString("action");
                    if (oEntry.hasName("icon"))
                        icon = oEntry.getString("icon");
                    if (oEntry.hasName("reload"))
                        reload = oEntry.getString("reload");
                    if (oEntry.hasName("selectedColor"))
                        selected_color = oEntry.getString("selectedColor");
                    if (oEntry.hasName("disabled"))
                        disabled = oEntry.getString("disabled");
                    if (oEntry.hasName("backgroundColor"))
                        background_color = oEntry.getString("backgroundColor");
                    if (oEntry.hasName("useCurrentViewForTab"))
                        use_current_view_for_tab = oEntry.getString("useCurrentViewForTab");

                    if ((icon != null) && (icon.Length > 0))
                        icon = CRhoRuntime.getInstance().getAppRootPath(icon);

                    CRhoRuntime.getInstance().logEvent("AddTab: " + (label==null?"(null)":label) + "; " +
                        (icon==null?"(null)":icon) + "; " + (action==null?"(null)":action) + "; " +
                        charToBool(disabled) + "; " + (background_color==null?"(null)":background_color) + "; " +
                        (selected_color==null?"(null)":selected_color) + "; " +
                        (tab_background_color==null?"(null)":tab_background_color) + "; " +
                        charToBool(reload) + "; " + charToBool(use_current_view_for_tab));
                    mp.tabbarAddTab(label, icon, action, charToBool(disabled),
                        background_color, selected_color, tab_background_color,
                        charToBool(reload), charToBool(use_current_view_for_tab), oResult.hasCallback(), oResult);                    
                }
                mp.tabbarSwitch(0);
                mp.tabbarShow();
            }
        }
开发者ID:javiermolina1234,项目名称:rhodes,代码行数:58,代码来源:NativeTabbar_impl.cs


示例2: create

 public void create(IReadOnlyList<string> toolbarElements, IReadOnlyDictionary<string, string> toolBarProperties, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
     {
         mp.toolbarRemoveAllButtons();
         string bgCr = "";
         string mask = "";
         if (toolBarProperties.ContainsKey("backgroundColor"))
             bgCr = toolBarProperties["backgroundColor"];
         if (toolBarProperties.ContainsKey("maskColor"))
             mask = toolBarProperties["maskColor"];
         mp.setToolbarStyle(false, bgCr, mask);
         for (int i = 0; i < toolbarElements.Count; ++i)
         {
             string tb = toolbarElements[i];
             CJSONEntryProxy oEntry = new CJSONEntryProxy(tb);
             string label = null;
             string action = null;
             string icon = null;
             if (oEntry.hasName("label"))
                 label = oEntry.getString("label");
             if (oEntry.hasName("action"))
                 action = oEntry.getString("action");
             if (oEntry.hasName("icon"))
                 icon = oEntry.getString("icon");
             CRhoRuntime.getInstance().logEvent("addToolbarButton: Label: '" + (label==null?"":label) + "';Action: '" + (action==null?"":action) + "'");
             if ((action != null) && !action.Equals("separator", StringComparison.InvariantCultureIgnoreCase))
             {
                 if ((icon != null) && (icon.Length > 0))
                 {
                     icon = "apps"+icon;
                     icon = CRhoRuntime.getInstance().getRootPath(icon);
                 }
                 else
                 {
                     if (action.Equals("options", StringComparison.InvariantCultureIgnoreCase))
                         icon = "res/options_btn.png";
                     else if (action.Equals("home", StringComparison.InvariantCultureIgnoreCase))
                         icon = "res/home_btn.png";
                     else if (action.Equals("refresh", StringComparison.InvariantCultureIgnoreCase))
                         icon = "res/refresh_btn.png";
                     else if (action.Equals("back", StringComparison.InvariantCultureIgnoreCase))
                         icon = "res/back_btn.png";
                     else if (action.Equals("forward", StringComparison.InvariantCultureIgnoreCase))
                         icon = "res/forward_btn.png";
                     if (icon != null)
                         icon = CRhoRuntime.getInstance().getRERuntimePath("lib/" + icon);
                 }
                 mp.toolbarAddAction(icon, label, action);
             }
         }
         mp.toolbarShow();
     }
 }
开发者ID:hanazuki,项目名称:rhodes,代码行数:55,代码来源:NativeToolbar_impl.cs


示例3: getFramework

 public void getFramework(IMethodResult oResult)
 {
     string DeviceManufacturer = (string)Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceManufacturer");
     string DeviceName = (string)Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceName");
     oResult.set(System.Environment.OSVersion.ToString() + " / " + DeviceName + ", " + DeviceManufacturer);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:6,代码来源:WebView_impl.cs


示例4: save

 public void save(string format, string path, int tabIndex, IMethodResult oResult)
 {
     // implement this method in C# here
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:4,代码来源:WebView_impl.cs


示例5: setCookie

 public void setCookie(string url, string cookie, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.setCookie(CRhoRuntime.getInstance().canonicalizeRhoUrl(url), cookie);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:6,代码来源:WebView_impl.cs


示例6: full_screen_mode

 public void full_screen_mode(bool enable, IMethodResult oResult)
 {
     setFullScreen(enable, oResult);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:4,代码来源:WebView_impl.cs


示例7: active_tab

 public void active_tab(IMethodResult oResult)
 {
     getActiveTab(oResult);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:4,代码来源:WebView_impl.cs


示例8: executeJavascript

 public void executeJavascript(string javascriptText, int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.executeScript(javascriptText, tabIndex);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:6,代码来源:WebView_impl.cs


示例9: currentURL

 public void currentURL(int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     oResult.set(mp != null ? mp.getCurrentURL(tabIndex) : "");
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:5,代码来源:WebView_impl.cs


示例10: navigateBack

 public void navigateBack(int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.GoBack(tabIndex);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:6,代码来源:WebView_impl.cs


示例11: navigate

 public void navigate(string url, int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.navigate(CRhoRuntime.getInstance().canonicalizeRhoUrl(url), tabIndex);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:6,代码来源:WebView_impl.cs


示例12: refresh

 public void refresh(int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.Refresh(tabIndex);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:6,代码来源:WebView_impl.cs


示例13: getActiveTab

 public void getActiveTab(IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     oResult.set(mp != null ? mp.tabbarGetCurrent() : 0);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:5,代码来源:WebView_impl.cs


示例14: getFullScreen

 public void getFullScreen(IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     oResult.set(mp != null ? mp.isFullscreen() : false);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:5,代码来源:WebView_impl.cs


示例15: enumerate

 public void enumerate(IMethodResult oResult)
 {
     // implement this method in C# here
 }
开发者ID:pfmaggi,项目名称:REHC,代码行数:4,代码来源:Externalstorage_impl.cs


示例16: clearAllProperties

 public void clearAllProperties(IMethodResult oResult)
 {
     // implement this method in C# here
 }
开发者ID:pfmaggi,项目名称:REHC,代码行数:4,代码来源:Externalstorage_impl.cs


示例17: setFullScreen

 public void setFullScreen(bool fullScreen, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.fullscreenCommand(fullScreen ? 1 : 0);
 }
开发者ID:jcarlosgarcia,项目名称:rhodes,代码行数:6,代码来源:WebView_impl.cs


示例18: setProperty

 public void setProperty(string propertyName, string propertyValue, IMethodResult oResult)
 {
     // implement this method in C# here
 }
开发者ID:pfmaggi,项目名称:REHC,代码行数:4,代码来源:Externalstorage_impl.cs


示例19: setProperties

 public void setProperties(IReadOnlyDictionary<string, string> propertyMap, IMethodResult oResult)
 {
     // implement this method in C# here
 }
开发者ID:pfmaggi,项目名称:REHC,代码行数:4,代码来源:Externalstorage_impl.cs


示例20: disable

 public void disable(IMethodResult oResult)
 {
     // implement this method in C# here
 }
开发者ID:pfmaggi,项目名称:REHC,代码行数:4,代码来源:Externalstorage_impl.cs



注:本文中的IMethodResult类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IMethodSignature类代码示例发布时间:2022-05-24
下一篇:
C# IMethodRemover类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap