Example #1
0
        public void displayAppRequests()
        {
            if (_webView == null)
            {
                return;
            }
            Utils.sendUiCommand(_webView, "clearAppRequests");
            var app_pages = Node.customAppManager.getAppPages();

            lock (app_pages)
            {
                foreach (CustomAppPage page in app_pages.Values)
                {
                    if (page.accepted)
                    {
                        continue;
                    }
                    Friend    f    = FriendList.getFriend(page.hostUserAddress);
                    CustomApp app  = Node.customAppManager.getApp(page.appId);
                    string    text = f.nickname + " wants to use " + app.name + " with you.";
                    Utils.sendUiCommand(_webView, "addAppRequest", Crypto.hashToString(page.sessionId), text);
                }
                if (VoIPManager.isInitiated() && !VoIPManager.currentCallAccepted)
                {
                    Friend f    = VoIPManager.currentCallContact;
                    string text = f.nickname + " is calling you.";
                    Utils.sendUiCommand(_webView, "addAppRequest", Crypto.hashToString(VoIPManager.currentCallSessionId), text);
                }
            }
        }
Example #2
0
 void SetupGL()
 {
     EAGLContext.SetCurrentContext(context);
     _customApp = new CustomApp();
     _max       = Math.Max(_view_width * 2, _view_height * 2);
     _customApp.Setup(_view_width * 2, _view_height * 2);
 }
Example #3
0
        private void onLoad()
        {
            CustomApp app = Node.customAppManager.getApp(appId);

            string icon = Node.customAppManager.getAppIconPath(appId);

            if (icon == null)
            {
                icon = "";
            }

            Utils.sendUiCommand(webView, "init", app.name, icon, app.publisher, app.version);

            // Execute timer-related functionality immediately
            updateScreen();
        }
Example #4
0
        public void displayAppRequests()
        {
            if (_webView == null)
            {
                return;
            }
            Utils.sendUiCommand(_webView, "clearAppRequests");
            var app_pages = Node.customAppManager.getAppPages();

            lock (app_pages)
            {
                foreach (CustomAppPage page in app_pages.Values)
                {
                    if (page.accepted)
                    {
                        continue;
                    }
                    Friend    f    = FriendList.getFriend(page.hostUserAddress);
                    CustomApp app  = Node.customAppManager.getApp(page.appId);
                    string    text = string.Format(SpixiLocalization._SL("global-app-wants-to-use"), f.nickname, app.name);
                    Utils.sendUiCommand(_webView, "addAppRequest", Crypto.hashToString(page.sessionId), text, SpixiLocalization._SL("global-app-accept"), SpixiLocalization._SL("global-app-reject"));
                }
                if (VoIPManager.isInitiated())
                {
                    if (VoIPManager.currentCallAccepted)
                    {
                        if (VoIPManager.currentCallCalleeAccepted)
                        {
                            displayCallBar(VoIPManager.currentCallSessionId, SpixiLocalization._SL("global-call-in-call") + " - " + VoIPManager.currentCallContact.nickname, VoIPManager.currentCallStartedTime);
                        }
                        else
                        {
                            displayCallBar(VoIPManager.currentCallSessionId, SpixiLocalization._SL("global-call-dialing") + " " + VoIPManager.currentCallContact.nickname + "...", 0);
                        }
                    }
                    else
                    {
                        Friend f           = VoIPManager.currentCallContact;
                        string text        = SpixiLocalization._SL("global-call-incoming") + " - " + f.nickname;
                        string accept_html = "<div style='background:#2fd63b;border-radius:16px;width:64px;height:64px;display:table-cell;vertical-align:middle;text-align:center;'><i class='fas fa-phone'></i></div>";
                        string reject_html = "<div style='background:#de0a61;border-radius:16px;width:64px;height:64px;display:table-cell;vertical-align:middle;text-align:center;'><i class='fas fa-phone-slash'></i></div>";
                        Utils.sendUiCommand(_webView, "addAppRequest", Crypto.hashToString(VoIPManager.currentCallSessionId), text, accept_html, reject_html);
                    }
                }
            }
        }
Example #5
0
        private void loadApps()
        {
            Utils.sendUiCommand(webView, "clearApps");

            var apps = Node.customAppManager.getInstalledApps();

            lock (apps)
            {
                foreach (var app_arr in apps)
                {
                    CustomApp app  = app_arr.Value;
                    string    icon = Node.customAppManager.getAppIconPath(app.id);
                    if (icon == null)
                    {
                        icon = "";
                    }
                    Utils.sendUiCommand(webView, "addApp", app.id, app.name, icon);
                }
            }
        }
 protected ConfigBase(string type, string ct, CustomApp cct)
 {
     this.app        = ct;
     this.custom_app = cct;
     this.Type       = type;
 }
 public Command(string ct, CustomApp cct)
 {
     this.app        = ct;
     this.custom_app = cct;
 }
Example #8
0
 public CustomConfig(string type, string ct, CustomApp cct) : base(type, ct, cct) { }
 public BicycleController(IOptions <CustomApp> _configuration)
 {
     Configuration = _configuration.Value;
 }
 public Package(string ct, CustomApp cct)
 {
     this.app        = ct;
     this.custom_app = cct;
 }