예제 #1
0
        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");
            }
        }
예제 #2
0
        private void InstallApplication(string newFileName)
        {
            m_addText.Invoke(String.Format("Connecting to {0}...", m_deviceType.ToString().ToLower()));

            Guid appGUID = new Guid(m_xap.ProductId);

            WPDevice device = new DeviceRetriever().GetDevice(m_deviceType, m_xap.PlatformVersion);

            device.Connect();
            UninstallApplication(device, appGUID);
            m_addText.Invoke("(Done)");

            m_addText.Invoke("Deploying application...");

            device.InstallApplication(appGUID, appGUID, NormalAppGenre, m_xap.IconPath, newFileName);
            device.Disconnect();

            m_addText.Invoke("(Done)");
        }
예제 #3
0
        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);
        }