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();
            }
        }
Example #2
0
 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();
     }
 }
Example #3
0
 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
 }
Example #5
0
            public override void currentTabIndex(IMethodResult oResult)
            {
                MainPage mp = getMainPage();

                oResult.set(mp != null ? mp.tabbarGetCurrent() : 0);
            }
Example #6
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);
        }
Example #8
0
 public override void getMinimumGap(IMethodResult oResult)
 {
     oResult.set(100);
 }
Example #9
0
 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
 }
Example #11
0
 public void stop(IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #12
0
 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
 }
Example #17
0
 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
 }
Example #19
0
 public void setProperties(IReadOnlyDictionary <string, string> propertyMap, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #20
0
                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));
                }
Example #21
0
 public void clearAllProperties(IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #22
0
 public override void stop(IMethodResult oResult)
 {
     status = false;
 }
Example #23
0
 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
 }
Example #24
0
 public override void setMinimumGap(int minimumGap, IMethodResult oResult)
 {
 }
Example #25
0
 public override void sendMessage(string query, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #26
0
            public override void isCreated(IMethodResult oResult)
            {
                MainPage mp = getMainPage();

                oResult.set(mp != null ? (mp.tabbarIsStarted() != 0) : false);
            }
Example #27
0
 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
 }
Example #32
0
 public void enumerate(IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #33
0
 public void getEnablePageLoadingIndication(IMethodResult oResult)
 {
     // implement this method in C# here
     oResult.set(false);
 }
Example #34
0
 public void clearAllProperties(IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #35
0
 public void getActiveTab(IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     oResult.set(mp != null ? mp.tabbarGetCurrent() : 0);
 }
Example #36
0
 public void disable(IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #37
0
 public void setProperty(string propertyName, string propertyValue, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #38
0
 public void setEnableWebPlugins(bool enableWebPlugins, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #39
0
 public void setNavigationTimeout(int navigationTimeout, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #40
0
 public void active_tab(IMethodResult oResult)
 {
     getActiveTab(oResult);
 }
Example #41
0
 public void full_screen_mode(bool enable, IMethodResult oResult)
 {
     setFullScreen(enable, oResult);
 }
Example #42
0
 public void currentURL(int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     oResult.set(mp != null ? mp.getCurrentURL(tabIndex) : "");
 }
Example #43
0
 public void executeJavascript(string javascriptText, int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.executeScript(javascriptText, tabIndex);
 }
Example #44
0
 public void navigateBack(int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.GoBack(tabIndex);
 }
Example #45
0
 public void navigate(string url, int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.navigate(CRhoRuntime.getInstance().canonicalizeRhoUrl(url), tabIndex);
 }
Example #46
0
 public void refresh(int tabIndex, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.Refresh(tabIndex);
 }
Example #47
0
 public void setEnablePageLoadingIndication(bool enablePageLoadingIndication, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #48
0
 public void setCookie(string url, string cookie, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.setCookie(CRhoRuntime.getInstance().canonicalizeRhoUrl(url), cookie);
 }
Example #49
0
 public void getEnableWebPlugins(IMethodResult oResult)
 {
     // implement this method in C# here
     oResult.set(true);
 }
Example #50
0
 public void save(string format, string path, int tabIndex, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #51
0
 public void getNavigationTimeout(IMethodResult oResult)
 {
     // implement this method in C# here
     oResult.set(0);
 }
Example #52
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);
 }
Example #53
0
 public void stop(IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #54
0
 public void getFullScreen(IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     oResult.set(mp != null ? mp.isFullscreen() : false);
 }
Example #55
0
 public void getProperties(IReadOnlyList<string> arrayofNames, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #56
0
 public void setFullScreen(bool fullScreen, IMethodResult oResult)
 {
     MainPage mp = getMainPage();
     if (mp != null)
         mp.fullscreenCommand(fullScreen ? 1 : 0);
 }
Example #57
0
 public void setProperties(IReadOnlyDictionary<string, string> propertyMap, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #58
0
 public void setEnableZoom(bool enableZoom, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #59
0
 public void setFileName(string fileName, IMethodResult oResult)
 {
     // implement this method in C# here
 }
Example #60
-1
        /// common functionality 
        public void connect(IMethodResult oResult)
        {
            Logger.Write("connect call");

            IReadOnlyDictionary<string, string> options = new IReadOnlyDictionary<string, string>();
            connectWithOptions(options, oResult);
        }