private void NaviToDetailsView(object sender,EventArgs e)
        {
            // 更改top图标与相关内容
            BitmapImage image = new BitmapImage(new Uri("../Image/icon_Deep_cleanup.png", UriKind.Relative));
            m_iconImg.Source = image;
            m_tbFileName.Text = "Deep Cleanup";
            m_tbTips.Text = "Set the categories you want to scan and click Scan Now button to continue.";

            if(m_spUpDetialsPage == null)
            {
                //m_spUpDetialsPage = new SpeedUpDetialsPage();
                m_spUpDetialsPage = SpeedUpDetialsPage.CreateInstance();
                m_spUpDetialsPage.FinishScanHandler += ResponseFinishScan;
                Binding bind = new Binding();
                bind.Source = m_spUpDetialsPage;
                bind.Path = new PropertyPath("Tips");
                m_tbTips.SetBinding(TextBlock.TextProperty, bind);
            }
            m_mainWidget.Navigate(m_spUpDetialsPage);
            m_naviWidget = NaviWidget.SpUpDetailsPage;

            m_btnBack.Visibility = System.Windows.Visibility.Visible;
            m_btnScan.Visibility = System.Windows.Visibility.Visible;
            m_btnSelectAll.Visibility = System.Windows.Visibility.Visible;
            m_btnSelectAll.IsEnabled = true;
            m_btnUnSelectAll.IsEnabled = true;
            
        }
        //iphoneClean库连接的
        private void GetDeviceInfo()
        {
            m_deviceInfo = new iphoneInfo();
            m_IDeviceInfoEx = new IDeviceInfoEx(m_deviceID);

            m_deviceInfo.Name = m_IDeviceInfoEx.GetProperty("DeviceName");
            string type = m_IDeviceInfoEx.GetProperty("ProductType");
            if (!string.IsNullOrEmpty(type))
            {
                m_deviceInfo.DeviceClass = m_iphoneType[type];
            }
            m_deviceInfo.SystemVersion = m_IDeviceInfoEx.GetProperty("ProductVersion");
            m_deviceInfo.SerialNumber = m_IDeviceInfoEx.GetProperty("SerialNumber");

            string dataFreeSize = m_IDeviceInfoEx.GetProperty("TotalDataAvailable");
            Int64 dataAv;
            Int64.TryParse(dataFreeSize, out dataAv);
            m_deviceInfo.UsedStorage = ConvertSize(dataFreeSize);

            string dataSize = m_IDeviceInfoEx.GetProperty("TotalDataCapacity");
            Int64 dataCap;
            Int64.TryParse(dataSize, out dataCap);
            Console.WriteLine(dataCap.ToString() + "----------------cap");
            m_deviceInfo.TotalStorage = ConvertSize(dataSize);

            string totalDiskCapacity = m_IDeviceInfoEx.GetProperty("TotalDiskCapacity");
            Int64 DiskCap;
            Int64.TryParse(totalDiskCapacity, out DiskCap);
            totalDiskCapacity = ConvertSize(totalDiskCapacity);
            Console.WriteLine(totalDiskCapacity + "------------------Disksize");

            Int64 systemCap = DiskCap - dataCap;
            m_deviceInfo.SystemStorage = ConvertSize(systemCap);
            Console.WriteLine(m_deviceInfo.SystemStorage + "-----------------system");

            Int64 contentCap = dataCap - dataAv;
            m_deviceInfo.ContentStorage = ConvertSize(contentCap);
            Console.WriteLine(m_deviceInfo.SystemStorage + "-----------------content");


            string cleanXML = AppDomain.CurrentDomain.BaseDirectory;
            Console.WriteLine(cleanXML + "+++++++++++++++++++++++");
            cleanXML = cleanXML.Replace("\\", "/");
            cleanXML += "cleanDate.xml";
            m_cleanXML = cleanXML;
            if (File.Exists(cleanXML))
            {
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.Load(cleanXML);
                XmlNode rootNode = xmlDoc.SelectSingleNode("CleanDates");
                XmlNodeList nodeList = rootNode.ChildNodes;
                string time = nodeList[0].InnerText;
                //Console.WriteLine(time + "___________111111time");
                m_deviceInfo.CleanTime = time;

            }
            else
            {
                CreateRecordCleanDataXML(cleanXML);
                m_deviceInfo.CleanTime = "0";
            }


            Dispatcher.Invoke(DispatcherPriority.Normal, new Action(
                delegate()
                {
                    this.m_mainWidget.Navigate(m_iosInfoWidget);
                    m_showView = ShowWidget.InfoWidget;
                    m_iosInfoWidget.SetDeviceInfo(m_deviceInfo);
                    m_btnBack.Visibility = System.Windows.Visibility.Hidden;
                    m_btnScan.Visibility = System.Windows.Visibility.Visible;
                    m_btnSelectAll.Visibility = System.Windows.Visibility.Hidden;
                    m_btnBack.IsEnabled = false;
                    m_btnSelectAll.IsEnabled = false;

                    if(m_spUpWidget == null)
                    {
                        m_spUpWidget = SpeedupAndClean.SpeedUpDetialsPage.CreateInstance();
                    }
                    m_spUpWidget.SetDeviceSize(m_IDeviceInfoEx,m_deviceID);


                   
                }
            ));
        }
 public static SpeedUpDetialsPage CreateInstance()
 {
     if (m_instance == null)
     {
         m_instance = new SpeedUpDetialsPage();
     }
     return m_instance;
 }