예제 #1
0
        public void Invoke(string func)
        {
            var result = string.Empty;

            if (func == "ShowDate")
            {
                result = DateTimeObject.GetDate();
            }

            if (func == "ShowTime")
            {
                result = DateTimeObject.GetTime();
            }

            Callback(result);
        }
예제 #2
0
        public void DidReceiveScriptMessage(WKUserContentController userContentController, WKScriptMessage message)
        {
            var func   = message.Body.ToString();
            var result = string.Empty;

            if (func == "ShowDate")
            {
                result = DateTimeObject.GetDate();
            }

            if (func == "ShowTime")
            {
                result = DateTimeObject.GetTime();
            }

            Callback(result);
        }