public static List <SimInfo> getSIMInfo(Context context) { List <SimInfo> simInfoList = new List <SimInfo>(); Uri URI_TELEPHONY = Uri.Parse("content://telephony/siminfo/"); CursorWrapper c = (CursorWrapper)context.ContentResolver.Query(URI_TELEPHONY, null, null, null, null); string[] colnames = c.GetColumnNames(); if (c.MoveToFirst()) { do { SimInfo simInfo = new SimInfo(); simInfo.color = c.GetString(c.GetColumnIndex("icc_id")); simInfo.data_roaming = c.GetString(c.GetColumnIndex("icc_id")); simInfo.display_name = c.GetString(c.GetColumnIndex("icc_id")); simInfo.display_number_format = c.GetString(c.GetColumnIndex("icc_id")); simInfo.icc_id = c.GetString(c.GetColumnIndex("icc_id")); simInfo.mcc = c.GetString(c.GetColumnIndex("mcc")); simInfo.mnc = c.GetString(c.GetColumnIndex("mnc")); simInfo.name_source = c.GetString(c.GetColumnIndex("name_source")); simInfo.number = c.GetString(c.GetColumnIndex("number")); simInfo.sim_id = c.GetString(c.GetColumnIndex("sim_id")); simInfo._id = c.GetString(c.GetColumnIndex("_id")); simInfoList.Add(simInfo); } while (c.MoveToNext()); } c.Close(); return(simInfoList); }
// // Static methods // #region Static methods // Get current cursor position public static CursorPosition GetCurrentPosition() { var cursor_point = new WinPoint(); if (!CursorWrapper.GetCursorPosition(ref cursor_point)) { return(new CursorPosition()); } else { return(new CursorPosition(cursor_point)); } }
public InGameWrapper(UnityData unityData, IDeviceInput deviceInput) { instance = this; logger = new UnityLogger(); camera = GameObject.Find("Camera").GetComponent <Camera>(); clockWrapper = new ClockWrapper(); resetLogic = new ResetLogic(); playersWrapper = new PlayersWrapper(unityData.playerData, deviceInput); mapWrapper = new MapWrapper(unityData.mapData, playersWrapper.GetOnlyLocalPlayer()); spellsWrapper = new SpellWrapper(unityData.spellData); cursorWrapper = new CursorWrapper(unityData.cursorData); aimWrapper = new AimWrapper(unityData.aimData, deviceInput); currencyWrapper = new CurrencyWrapper(unityData.currencyWrapper); EverythingSetupEvent(); }
private void OnCursorTokenChanged(object sender, EventArgs e) { if (_tileController == null) { return; } if (_tileController.CursorToken == null) { this.Cursor = this.DefaultCursor; if (_currentCursorWrapper != null) { _currentCursorWrapper.Dispose(); _currentCursorWrapper = null; } } else { try { CursorWrapper oldCursorWrapper = _currentCursorWrapper; _currentCursorWrapper = CursorFactory.CreateCursor(_tileController.CursorToken); this.Cursor = _currentCursorWrapper.Cursor; if (oldCursorWrapper != null) { oldCursorWrapper.Dispose(); } } catch (Exception exception) { Platform.Log(LogLevel.Error, exception); this.Cursor = this.DefaultCursor; _currentCursorWrapper = null; } } }