private Profiler(WindowsPhoneDevice device) { _device = device; GetInternalDevice(); GetConmanServer(); _fileDeployer = _internalDevice.GetFileDeployer(); }
public MainWindow() { InitializeComponent(); RestoreWindowSizeAndPos(); Current = this; Device = new WindowsPhoneDevice(); this.DataContext = this; Analytics.Instance.Track(Analytics.Categories.PowerTools, "Run Power Tools", Analytics.Instance.UniqueId); LoadPreviousXaps(); // show the connect dialog dialogConnect.Open(); SetDefaultDevice(); }
private void AcquirePushChannel() { CurrentChannel = HttpNotificationChannel.Find("MyPushChannel"); if (CurrentChannel == null) { CurrentChannel = new HttpNotificationChannel("MyPushChannel"); CurrentChannel.Open(); CurrentChannel.BindToShellTile(); } IMobileServiceTable <WindowsPhoneDevice> deviceTable = App.MobileService.GetTable <WindowsPhoneDevice>(); if (CurrentChannel.ChannelUri != null) { var device = new WindowsPhoneDevice { DeviceToken = CurrentChannel.ChannelUri.ToString() }; deviceTable.InsertAsync(device); } }
private static bool Connect(string target) { bool wantEmulator = false; bool isEmulator = false; //foreach (Device if (target == "xde" || target == "emulator") { wantEmulator = true; } else if (target == "phone" || target == "device") { wantEmulator = false; } else { throw new ConsoleMessageException("Invalid device target (" + target + ")"); } var devices = WindowsPhoneDevice.GetDevices(); foreach (ConnectableDevice d in devices) { isEmulator = d.IsEmulator(); if ((wantEmulator && isEmulator) || (!wantEmulator && !isEmulator)) { _device = new WindowsPhoneDevice(); _device.CurrentConnectableDevice = d; break; } } _device.Connect(); return true; }