private void getOperators(doJsonNode _dictParas, doIScriptEngine _scriptEngine, doInvokeResult _invokeResult) { ConnectionProfile conf = NetworkInformation.GetInternetConnectionProfile(); var guid = conf.ServiceProviderGuid; if (guid == null) { _invokeResult.SetResultText("没有手机卡"); } _invokeResult.SetResultText(guid.ToString()); }
private void getStatus(doJsonNode _dictParas, doIScriptEngine _scriptEngine, doInvokeResult _invokeResult) { var hostn = NetworkInformation.GetHostNames(); var hostname = hostn.Where(t => t.Type == Windows.Networking.HostNameType.Ipv4).FirstOrDefault(); _invokeResult.SetResultText(hostname.DisplayName); }
void con_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e) { doInvokeResult _invokeResult = new doInvokeResult(this.model.UniqueKey); _invokeResult.SetResultText((sender as FrameworkElement).Tag.ToString()); this.model.EventCenter.FireEvent("touch", _invokeResult); }
private void fireevent(string id) { doInvokeResult _invokeResult = new doInvokeResult(this.model.UniqueKey); _invokeResult.SetResultText(id); this.model.EventCenter.FireEvent("viewChanged", _invokeResult); }
private void getInfo(doJsonNode _dictParas, doIScriptEngine _scriptEngine, doInvokeResult _invokeResult) { try { doJsonNode jn = new doJsonNode(); JsonObject jo = doMyTools.lsSync["resolution"].FuncDo(null) as JsonObject; var bounds = Window.Current.Bounds; //设备ID(IMEI)(GSM手机的 IMEI 和 CDMA手机的 MEID,ios的uuid,phone8 根据开发者获取唯一id). jn.SetOneText("deviceId", doMyTools.getdeviceid()); //deviceName:设备名称 jn.SetOneText("deviceName", doMyTools.getdevicename()); //OS:操作系统版本 jn.SetOneText("OS", doMyTools.EnvironmentOs); //OSVersion:操作系统版本号 jn.SetOneText("OS", "8.1"); //resolutionH:水平分辨率 jn.SetOneText("resolutionH", jo.GetNamedString("resolutionH")); //resolutionV:垂直分辨率 jn.SetOneText("resolutionV", jo.GetNamedString("resolutionV")); //dpiH:水平像素密度 jn.SetOneText("dpiH", DisplayInformation.GetForCurrentView().RawDpiX.ToString()); //dpiV:垂直像素密度 jn.SetOneText("dpiV", DisplayInformation.GetForCurrentView().RawDpiY.ToString()); //screenH:水平屏幕宽度(dip) jn.SetOneText("screenH", bounds.Width.ToString()); //screenV:垂直屏幕宽度(dip) jn.SetOneText("screenV", bounds.Height.ToString()); //phoneType:手机机型(GT-15908) jn.SetOneText("phoneType", getdevicetype()); //phoneNumber:手机号码 //jn.SetOneText("phoneNumber", ""); //communicationType:运营商类型 //simSerialNumber:SIM卡的序列号 //jn.SetOneText("simSerialNumber", ""); //IMSI:IMSI(国际移动用户识别码) //jn.SetOneText("IMSI", ""); //sdkVersion:获取手机内存大小 //jn.SetOneText("sdkVersion", "8"); if (_dictParas.GetOneText("name", "") == "all" || string.IsNullOrEmpty(_dictParas.GetOneText("name", ""))) { _invokeResult.SetResultNode(jn); } else { string data = jn.GetOneText(_dictParas.GetOneText("name", ""), ""); _invokeResult.SetResultText(data); } } catch (Exception _err) { doServiceContainer.LogEngine.WriteError("doDevice getInfo \n", _err); } }
private void getIP(doJsonNode _dictParas, doIScriptEngine _scriptEngine, doInvokeResult _invokeResult) { ConnectionProfile conf = NetworkInformation.GetInternetConnectionProfile(); if (conf == null) { _invokeResult.SetResultText("none"); } else { if (conf.IsWlanConnectionProfile) { _invokeResult.SetResultText("wifi"); } else if (conf.IsWwanConnectionProfile) { _invokeResult.SetResultText("2g/3g"); } else { _invokeResult.SetResultText("unknow"); } } }