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(); } }
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(); } }
public void getFileName(IMethodResult oResult) { // implement this method in C# here }
public override void setPageSize(int pageSize, IMethodResult oResult) { // implement this method in C# here }
public override void currentTabIndex(IMethodResult oResult) { MainPage mp = getMainPage(); oResult.set(mp != null ? mp.tabbarGetCurrent() : 0); }
public override 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(); } }
public INumericalAbstractDomain<BoxedVariable<Variable>, BoxedExpression> Join(IMethodResult<Variable> mr, INumericalAbstractDomain<BoxedVariable<Variable>, BoxedExpression> astate1, INumericalAbstractDomain<BoxedVariable<Variable>, BoxedExpression> astate2) { BufferAnalysis an = mr as BufferAnalysis; if (an == null) return null; bool bWeaker; return an.Join(new Pair<APC, APC>(), astate1, astate2, out bWeaker, false); }
public override void getMinimumGap(IMethodResult oResult) { oResult.set(100); }
public void getProperties(IReadOnlyList <string> arrayofNames, IMethodResult oResult) { // implement this method in C# here }
public override void enumerate(IMethodResult oResult) { // implement this method in C# here }
public void stop(IMethodResult oResult) { // implement this method in C# here }
public void disable(IMethodResult oResult) { // implement this method in C# here }
public override void setSslVerifyPeer(bool sslVerifyPeer, IMethodResult oResult) { // implement this method in C# here }
public override void setShowStatusPopup(bool showStatusPopup, IMethodResult oResult) { // implement this method in C# here }
public override void setThreadedMode(bool threadedMode, IMethodResult oResult) { // implement this method in C# here }
public override void calcSumm(int a, int b, IMethodResult oResult) { // implement this method in C# here }
public void setProperty(string propertyName, string propertyValue, IMethodResult oResult) { // implement this method in C# here }
public override void joinStrings(string a, string b, IMethodResult oResult) { // implement this method in C# here }
public void setProperties(IReadOnlyDictionary <string, string> propertyMap, IMethodResult oResult) { // implement this method in C# here }
public SimpleArrayAbstractDomain <BoxedVariable <Variable>, BoxedExpression> Join(IMethodResult <Variable> mr, SimpleArrayAbstractDomain <BoxedVariable <Variable>, BoxedExpression> astate1, SimpleArrayAbstractDomain <BoxedVariable <Variable>, BoxedExpression> astate2) { ContainerAnalysis an = mr as ContainerAnalysis; if (an == null) { return(null); } bool bWeaker; return(an.Join(new Pair <APC, APC>(), astate1, astate2, out bWeaker, false)); }
public void clearAllProperties(IMethodResult oResult) { // implement this method in C# here }
public override void stop(IMethodResult oResult) { status = false; }
public override void init(string google_api_key, string google_app_id, string gcm_sender_id, string google_project_id, string google_storage_bucket, string dialogflow_client_access_token, string dialogflow_language, IMethodResult oResult) { // implement this method in C# here }
public override void setMinimumGap(int minimumGap, IMethodResult oResult) { }
public override void sendMessage(string query, IMethodResult oResult) { // implement this method in C# here }
public override void isCreated(IMethodResult oResult) { MainPage mp = getMainPage(); oResult.set(mp != null ? (mp.tabbarIsStarted() != 0) : false); }
public void getCompressionFormat(IMethodResult oResult) { // implement this method in C# here }
public INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> Join(IMethodResult <Variable> mr, INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> astate1, INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> astate2) { var an = mr as NumericalAnalysis <Options>; if (an == null) { return(null); } bool bWeaker; return(an.Join(new Pair <APC, APC>(), astate1, astate2, out bWeaker, false)); }
public override void getPlatformName(IMethodResult oResult) { // implement this method in C# here }
public override void setSimpleStringProperty(string simpleStringProperty, IMethodResult oResult) { // implement this method in C# here }
public override void setBulksyncState(int bulksyncState, IMethodResult oResult) { // implement this method in C# here }
public void enumerate(IMethodResult oResult) { // implement this method in C# here }
public void getEnablePageLoadingIndication(IMethodResult oResult) { // implement this method in C# here oResult.set(false); }
public void getActiveTab(IMethodResult oResult) { MainPage mp = getMainPage(); oResult.set(mp != null ? mp.tabbarGetCurrent() : 0); }
public void setEnableWebPlugins(bool enableWebPlugins, IMethodResult oResult) { // implement this method in C# here }
public void setNavigationTimeout(int navigationTimeout, IMethodResult oResult) { // implement this method in C# here }
public void active_tab(IMethodResult oResult) { getActiveTab(oResult); }
public void full_screen_mode(bool enable, IMethodResult oResult) { setFullScreen(enable, oResult); }
public void currentURL(int tabIndex, IMethodResult oResult) { MainPage mp = getMainPage(); oResult.set(mp != null ? mp.getCurrentURL(tabIndex) : ""); }
public void executeJavascript(string javascriptText, int tabIndex, IMethodResult oResult) { MainPage mp = getMainPage(); if (mp != null) mp.executeScript(javascriptText, tabIndex); }
public void navigateBack(int tabIndex, IMethodResult oResult) { MainPage mp = getMainPage(); if (mp != null) mp.GoBack(tabIndex); }
public void navigate(string url, int tabIndex, IMethodResult oResult) { MainPage mp = getMainPage(); if (mp != null) mp.navigate(CRhoRuntime.getInstance().canonicalizeRhoUrl(url), tabIndex); }
public void refresh(int tabIndex, IMethodResult oResult) { MainPage mp = getMainPage(); if (mp != null) mp.Refresh(tabIndex); }
public void setEnablePageLoadingIndication(bool enablePageLoadingIndication, IMethodResult oResult) { // implement this method in C# here }
public void setCookie(string url, string cookie, IMethodResult oResult) { MainPage mp = getMainPage(); if (mp != null) mp.setCookie(CRhoRuntime.getInstance().canonicalizeRhoUrl(url), cookie); }
public void getEnableWebPlugins(IMethodResult oResult) { // implement this method in C# here oResult.set(true); }
public void save(string format, string path, int tabIndex, IMethodResult oResult) { // implement this method in C# here }
public void getNavigationTimeout(IMethodResult oResult) { // implement this method in C# here oResult.set(0); }
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); }
public void getFullScreen(IMethodResult oResult) { MainPage mp = getMainPage(); oResult.set(mp != null ? mp.isFullscreen() : false); }
public void getProperties(IReadOnlyList<string> arrayofNames, IMethodResult oResult) { // implement this method in C# here }
public void setFullScreen(bool fullScreen, IMethodResult oResult) { MainPage mp = getMainPage(); if (mp != null) mp.fullscreenCommand(fullScreen ? 1 : 0); }
public void setProperties(IReadOnlyDictionary<string, string> propertyMap, IMethodResult oResult) { // implement this method in C# here }
public void setEnableZoom(bool enableZoom, IMethodResult oResult) { // implement this method in C# here }
public void setFileName(string fileName, IMethodResult oResult) { // implement this method in C# here }
/// common functionality public void connect(IMethodResult oResult) { Logger.Write("connect call"); IReadOnlyDictionary<string, string> options = new IReadOnlyDictionary<string, string>(); connectWithOptions(options, oResult); }