本文整理汇总了C#中IMethodResult.hasCallback方法的典型用法代码示例。如果您正苦于以下问题:C# IMethodResult.hasCallback方法的具体用法?C# IMethodResult.hasCallback怎么用?C# IMethodResult.hasCallback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMethodResult
的用法示例。
在下文中一共展示了IMethodResult.hasCallback方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
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().getRootPath(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) + "; " +
charToBool(reload) + "; " + charToBool(use_current_view_for_tab));
mp.tabbarAddTab(label, icon, action,
charToBool(disabled), background_color, selected_color,
charToBool(reload), charToBool(use_current_view_for_tab), oResult.hasCallback(), oResult);
}
// TODO: on_change_tab_callback
mp.tabbarSwitch(0);
mp.tabbarShow();
}
}