예제 #1
0
        private void CompleteDeviceWithStorageInfo(AppleMobileDevice iDevice)
        {
            XmlDocument XmlContainer = new XmlDocument();

            XmlContainer.Load(".\\Devices\\" + iDevice.InternalCodeName + ".xml");

            XmlNodeList SystemNodeList = XmlContainer.SelectNodes("/Device/System");

            foreach (XmlNode SystemNode in SystemNodeList)
            {
                if (SystemNode.ChildNodes[0].InnerText == Convert.ToString(iDevice.NandTotalCapacity))
                {
                    iDevice.PartitionTableType = SystemNode.ChildNodes[1].InnerText;
                    iDevice.UseLwVM            = Convert.ToBoolean(SystemNode.ChildNodes[2].InnerText);

                    int SystemPartitionCapacity = Convert.ToInt16(SystemNode.ChildNodes[3].InnerText);
                    int DataPartitionCapacity   = Convert.ToInt16(SystemNode.ChildNodes[4].InnerText);

                    Partition SystemPartition = new Partition("System", SystemPartitionCapacity);
                    Partition DataPartition   = new Partition("Data", DataPartitionCapacity);

                    iDevice.SystemPartition = SystemPartition;
                    iDevice.DataPartition   = DataPartition;

                    iDevice.PartitionList.Add(SystemPartition);
                    iDevice.PartitionList.Add(DataPartition);
                }
            }
            iDevice.SystemPartition.Number = "0";
            iDevice.DataPartition.Number   = "1";
        }
예제 #2
0
 public frmPartitionManager(AppleMobileDevice pDevice, iMultiBootController pController)
 {
     InitializeComponent();
     Device     = pDevice;
     Controller = pController;
     if (pDevice != null)
     {
         lbPartitionTable.Items.Add(Device.SystemPartition.Name);
         lbPartitionTable.Items.Add(Device.DataPartition.Name);
     }
     txtDeviceAvailableStorage.Text = Convert.ToString(DeviceAvailableStorage);
 }
예제 #3
0
        private void btnSaveSettings_Click(object sender, EventArgs e)
        {
            string InternalCodeName  = "";
            int    NandTotalCapacity = 32000;
            int    NandBlockSize     = 0;

            switch (Convert.ToString(cmbDeviceSelection.SelectedItem))
            {
            case "iPad 2nd (K94AP)":
                InternalCodeName = "k94ap";
                NandBlockSize    = 8192;
                break;

            case "iPod Touch 4th (N81AP)":
                InternalCodeName = "n81ap";
                NandBlockSize    = 8192;
                break;

            case "iPhone 3Gs (N88AP)":
                InternalCodeName = "n88ap";
                NandBlockSize    = 8192;
                break;

            case "iPhone 4 (N90AP)":
                InternalCodeName = "n90ap";
                NandBlockSize    = 8192;
                break;
            }

            switch (Convert.ToString(cmbCapacitySelection.SelectedItem))
            {
            case "8 GB":
                NandTotalCapacity = 8000;
                break;

            case "16 GB":
                NandTotalCapacity = 16000;
                break;

            case "32 GB":
                NandTotalCapacity = 32000;
                break;

            case "64 GB":
                NandTotalCapacity = 64000;
                break;

            case "128 GB":
                NandTotalCapacity = 128000;
                break;
            }

            iDevice = new AppleMobileDevice(InternalCodeName);

            iDevice.NandTotalCapacity = NandTotalCapacity;
            iDevice.NandBlockSize     = NandBlockSize;

            Controller.setAppleMobileDevice(iDevice);

            Close();
        }
예제 #4
0
 public void setAppleMobileDevice(AppleMobileDevice iDeviceParam)
 {
     iDevice = iDeviceParam;
     CompleteDeviceWithStorageInfo(iDevice);
 }
예제 #5
0
 public frmSelectionOS(iMultiBootController pController)
 {
     InitializeComponent();
     Controller = pController;
     iDevice    = Controller.getAppleMobileDevice();
 }