internal void Run() { WPDevice emulator = new DeviceRetriever().GetDevice(m_deviceType, m_xap.PlatformVersion); emulator.Connect(); Guid appGUID = new Guid(m_xap.ProductId); if (emulator.IsApplicationInstalled(appGUID)) { emulator.LaunchApplication(appGUID); } else { MessageBox.Show("Application was not found!", "Error"); } }
private List<MonitorEntry> GetLogEntriesFromFile() { var logEntries = new List<MonitorEntry>(); var device = new DeviceRetriever().GetDevice(deviceType, platformVersion); device.Connect(); if (device.IsApplicationInstalled(appID)) { string targetFileName = String.Format("{0}.txt", appID.ToString()); device.ReceiveFile(appID, "Tangerine_log.txt", targetFileName); using (var stream = File.OpenText(targetFileName)) { while (!stream.EndOfStream) { logEntries.Add(new MonitorEntry(stream.ReadLine())); } } } device.Disconnect(); return logEntries; }