public PrintHexForm(CLKsFATXLib.Folder f) { InitializeComponent(); this.Text += " " + f.Name.ToString(); textBox1.Text = "Unable to Show Hex View of a Folder"; }
public Clone(CLKsFATXLib.Drive Drive1, CLKsFATXLib.Drive Drive2) { InitializeComponent(); this.Original = Drive1; this.Destination = Drive2; this.Load += new EventHandler(Clone_Load); }
public InjectDialog(CLKsFATXLib.Structs.WriteResult wr, int ItemCount) { InitializeComponent(); this.ItemCount = ItemCount; WR = wr; this.Load += new EventHandler(InjectDialog_Load); }
public InjectDialog(CLKsFATXLib.Structs.ExistingEntry exEntry, int ItemCount) { InitializeComponent(); this.ItemCount = ItemCount; this.exEntry = exEntry; this.Load += new EventHandler(InjectDialog_Load); }
public Drive_Properties(CLKsFATXLib.Drive FATXDrive) { InitializeComponent(); xDrive = FATXDrive; this.Load += new EventHandler(Drive_Properties_Load); this.FormClosing += new FormClosingEventHandler(Drive_Properties_FormClosing); }
public void AddToQueue(CLKsFATXLib.Structs.Queue Thingy) { ListViewItem li = new ListViewItem(Thingy.Folder.FullPath); li.SubItems.Add(Thingy.Path); if (Thingy.Writing) { listView1.Groups[0].Items.Add(li); } else { listView1.Groups[1].Items.Add(li); } }
public PrintHexForm(CLKsFATXLib.File f) { InitializeComponent(); strm = f.GetStream(); if (Data != null) Array.Clear(Data, 0, Data.Length); Data = new Byte[strm.Length]; strm.Read(Data, 0, (int)strm.Length); //strm.Close(); this.Text += " " + f.Name.ToString(); FillTextBox(); }
public EntryAction(CLKsFATXLib.Structs.Queue[] mi) { InitializeComponent(); if (Environment.OSVersion.Version.Build >= 7600) { Windows7 = true; } if (Environment.OSVersion.Version.Build >= 6000) { Aero = true; } if (Windows7) { tm = TaskbarManager.Instance; } this.HandleCreated += new EventHandler(EntryAction_HandleCreated); this.FormClosing += new FormClosingEventHandler(EntryAction_FormClosing); MultiInject = mi; }
void Main_OnEntryEvent(ref CLKsFATXLib.Structs.EntryEventArgs e) { CLKsFATXLib.Structs.EntryEventArgs eg = e; if (e.Deleting) { this.Invoke((MethodInvoker)delegate { if (!eg.ModifiedEntry.IsFolder) { if (eg.ParentFolder.FullPath == treeView1.SelectedNode.RealPath()) { for (int i = 0; i < listView1.Items.Count; i++) { if (listView1.Items[i].Name.ToLower() == eg.ModifiedEntry.Name.ToLower()) { listView1.Items[i].Remove(); break; } } } } else { try { TreeNode deletedNode = treeView1.NodeFromPath(eg.ModifiedEntry.FullPath); if (deletedNode.Parent == treeView1.SelectedNode) { listView1.Invoke((MethodInvoker)delegate { ListViewItem li = listView1.Items.Find(deletedNode.Name, false)[0]; li.Remove(); }); } else if (deletedNode == treeView1.SelectedNode) { treeView1.SelectedNode = deletedNode.Parent; } deletedNode.Remove(); } catch { } } }); return; } TreeNode n = null; try { n = treeView1.NodeFromPath(eg.FullParentPath); TreeNode[] nodes = n.Nodes.Find(e.ModifiedEntry.Name, false); foreach (TreeNode nodenigga in nodes) { if (((Folder)nodenigga.Tag).IsDeleted == eg.ModifiedEntry.IsDeleted) { return; } } } catch (Exception f) { AddNode(eg.ParentFolder, treeView1.NodeFromPath(((eg.FullParentPath.Contains('\\')) ? eg.FullParentPath.Remove(eg.FullParentPath.LastIndexOf('\\')) : eg.FullParentPath)), ListViewCreateItem.DecideForMeNigga); n = treeView1.NodeFromPath(eg.FullParentPath); } n.Tag = eg.ParentFolder; // If we're dealing with a folder... if (eg.ModifiedEntry.IsFolder) { AddNode((Folder)eg.ModifiedEntry, n, ListViewCreateItem.DecideForMeNigga); } // If we're dealing with a file else { this.Invoke((MethodInvoker)delegate { // If the parent folder to this file is the selected path if (((Folder)n.Tag).FullPath == treeView1.SelectedNode.RealPath()) { // Add all the listview shit ListViewItem li2 = null; bool ExistsAlready = false; if (listView1.Items.Find(((File)eg.ModifiedEntry).Name, false).Length != 0) { li2 = listView1.Items.Find(((File)eg.ModifiedEntry).Name, false)[0]; foreach (ListViewItem.ListViewSubItem subitem in li2.SubItems) { li2.SubItems.Remove(subitem); } ExistsAlready = true; } else { li2 = new ListViewItem(((File)eg.ModifiedEntry).Name); } li2.SubItems.Add(((File)eg.ModifiedEntry).EntryType); li2.SubItems.Add(VariousFunctions.ByteConversion(((File)eg.ModifiedEntry).Size)); li2.SubItems.Add(((File)eg.ModifiedEntry).ModifiedDate.ToString()); if (Properties.Settings.Default.loadSTFS) { if (((File)eg.ModifiedEntry).IsSTFSPackage()) { li2.SubItems.Add(((File)eg.ModifiedEntry).ContentName()); } else if (((File)eg.ModifiedEntry).Parent.FullPath == ((File)eg.ModifiedEntry).Drive.CacheFolderPath && CLKsFATXLib.Geometry.CacheFilePrefixes.CachePrefixes.Contains(((File)eg.ModifiedEntry).Name.Substring(0, 2))) { for (int i = 0; i < CLKsFATXLib.Geometry.CacheFilePrefixes.CachePrefixes.Length; i++) { if (CLKsFATXLib.Geometry.CacheFilePrefixes.CachePrefixes[i] == ((File)eg.ModifiedEntry).Name.Substring(0, 2)) { li2.SubItems.Add(CLKsFATXLib.Geometry.CacheFilePrefixes.PrefixNames[i]); break; } } } } li2.Tag = ((File)eg.ModifiedEntry); li2.Name = ((File)eg.ModifiedEntry).Name; if (Properties.Settings.Default.cacheContentIcons) { if (listView1.LargeImageList.Images.ContainsKey(((File)eg.ModifiedEntry).Name)) { li2.ImageKey = ((File)eg.ModifiedEntry).Name; } else { // Check if there's an icon for this guy cached if (Cache.GetIcon(((File)eg.ModifiedEntry).Name) != null) { Image Icon = Cache.GetIcon(((File)eg.ModifiedEntry).Name); treeView1.ImageList.Images.Add(((File)eg.ModifiedEntry).Name, Icon); listView1.Invoke((MethodInvoker)delegate { listView1.LargeImageList.Images.Add(((File)eg.ModifiedEntry).Name, Icon); listView1.SmallImageList.Images.Add(((File)eg.ModifiedEntry).Name, Icon); }); li2.ImageKey = ((File)eg.ModifiedEntry).Name; } // Check if the file is an STFS package, and if it is blahblahblah else if (((File)eg.ModifiedEntry).IsSTFSPackage()) { Image Icon = ((File)eg.ModifiedEntry).ContentIcon(); if (Icon != null) { Cache.AddIcon(Icon, ((File)eg.ModifiedEntry).Name); treeView1.ImageList.Images.Add(((File)eg.ModifiedEntry).Name, Icon); listView1.Invoke((MethodInvoker)delegate { listView1.LargeImageList.Images.Add(((File)eg.ModifiedEntry).Name, Icon); listView1.SmallImageList.Images.Add(((File)eg.ModifiedEntry).Name, Icon); }); li2.ImageKey = ((File)eg.ModifiedEntry).Name; } } } } if (li2.ImageKey == "") { li2.ImageIndex = 1; } if (!ExistsAlready) { listView1.Invoke((MethodInvoker)delegate { listView1.Items.Add(li2); }); } } /* Here we'll check to see if this is the first file added * to the folder. If it is, grab the icon/name */ if (((File)eg.ModifiedEntry).Parent.Files().Length == 1) { if (Cache.IsTitleIDFolder(n.Name) && VariousFunctions.Known.Contains(n.Name)) { n = n.Parent; } File f = ((File)eg.ModifiedEntry).Parent.Files()[0]; // It was the first file, do the name and icon stuff if (!n.Text.Contains(" | ") && ((File)eg.ModifiedEntry).Parent.Parent.IsTitleIDFolder && !((File)eg.ModifiedEntry).Parent.Parent.IsKnownFolder) { ((File)eg.ModifiedEntry).Parent.Parent.ForceGameName = true; string Name = ((File)eg.ModifiedEntry).Parent.Parent.GameName(); ((File)eg.ModifiedEntry).Parent.Parent.ForceGameName = false; if (Name != null && Name != "") { n.Text += " | " + ((File)eg.ModifiedEntry).Parent.Parent.GameName(); } // If there is no image assigned to the node if (n.ImageKey == "") { if (Properties.Settings.Default.SaveIcons) { Image Icon = ((File)eg.ModifiedEntry).Parent.Parent.GameIcon(); if (Icon != null) { treeView1.Invoke((MethodInvoker)delegate { siL.Images.Add(((File)eg.ModifiedEntry).Name.ToUpper(), Icon); liL.Images.Add(((File)eg.ModifiedEntry).Name.ToUpper(), Icon); n.ImageKey = ((File)eg.ModifiedEntry).Name.ToUpper(); n.SelectedImageKey = n.ImageKey; }); } } } // Now check to see if the parent folder is being displayed in the listview... if (n.Parent.RealPath() == ((File)eg.ModifiedEntry).Parent.Parent.Parent.Parent.FullPath) { // OH SHIT IT IS // Change the STFS name and imagekey ListViewItem li = listView1.Items.Find(n.Name, false)[0]; if (Name != null) { li.SubItems.Add(Name); } if (n.ImageKey != "" && li.ImageKey == "") { li.ImageKey = n.ImageKey; } } } // For profile folders... if (n.Name.ToLower() == "fffe07d1" && n.Parent.ImageKey == "" && Properties.Settings.Default.SaveIcons) { n = n.Parent; Folder ProfileFolder = ((File)eg.ModifiedEntry).Parent.Parent.Parent; // Treeview Handling Image I = Cache.GetIcon(ProfileFolder.Name); { if (I != null) { treeView1.Invoke((MethodInvoker)delegate { if (!siL.Images.ContainsKey(ProfileFolder.Name.ToUpper())) { siL.Images.Add(ProfileFolder.Name.ToUpper(), I); liL.Images.Add(ProfileFolder.Name.ToUpper(), I); } n.ImageKey = ProfileFolder.Name.ToUpper(); n.SelectedImageKey = n.ImageKey; }); } else { File FILE = ProfileFolder.IsProfileFolder(); if (FILE != null) { I = FILE.ContentIcon(); if (I != null) { Cache.AddIcon(I, ProfileFolder.Name); if (!siL.Images.ContainsKey(ProfileFolder.Name.ToUpper())) { siL.Images.Add(ProfileFolder.Name.ToUpper(), I); liL.Images.Add(ProfileFolder.Name.ToUpper(), I); } n.ImageKey = (ProfileFolder.Name.ToUpper()); n.SelectedImageKey = n.ImageKey; } } } } // Listview handling if (I != null && n.Parent.RealPath() == ProfileFolder.Parent.FullPath) { ListViewItem li = listView1.Items.Find(n.Name, false)[0]; if (n.ImageKey != "" && li.ImageKey == "") { li.ImageKey = n.ImageKey; } } } } }); } }
void EntryAction_FolderAction(ref CLKsFATXLib.Structs.FolderAction Progress) { try { int p = Progress.Progress; int m = Progress.MaxValue; string file = Progress.CurrentFile; string filepath = Progress.CurrentFilePath; if (p == 0 && m == 0 && file == null && filepath == null && Progress.Cancel != false) { Progress.Cancel = Cancel; return; } Progress.Cancel = Cancel; try { this.Invoke((MethodInvoker)delegate { this.Text = filepath; if (file != null) { label1.Text = file; } else if (filepath != null) { label1.Text = filepath.Remove(0, filepath.LastIndexOf('\\') + 1); } lPercent.Text = (p == 0 || (((decimal)p / (decimal)m) * 100).ToString("#") == "0") ? "" : (((decimal)p / (decimal)m) * 100).ToString("#") + "%"; progressBar1.Maximum = m; progressBar1.Value = p; if (Windows7) { tm.SetProgressValue(p, m); } }); } catch(Exception e) { } } catch(Exception e) { } }
void EntryAction_FileAction(ref CLKsFATXLib.Structs.FileAction Progress) { try { int p = Progress.Progress; int m = Progress.MaxValue; Progress.Cancel = Cancel; lPercent.Invoke((MethodInvoker)delegate { lPercent.Text = (p == 0 || (((decimal)p / (decimal)m) * 100).ToString("#") == "0") ? "" : (((decimal)p / (decimal)m) * 100).ToString("#") + "%"; }); progressBar1.Invoke((MethodInvoker)delegate { progressBar1.Maximum = m; progressBar1.Value = p; if (Windows7) { tm.SetProgressValue(p, m); } }); } catch { } }
/** * Title: Xbox 360 Forensic Toolkit. * Description: Xbox 360 Forensic Toolkit is built on top of the Party buffalo application. It allows users to read and * write to Xbox 360 devices, with support for reading Xbox 360 STFS package names. A number of Forensic Tools have * been added to extract/view sectors, extract partitions, view file details, examine files in HEX. It also incorporates the wxPIRS * Application so that we can sissamble STFS packages and see their contents. * * Original Author: Party Buffalo - [email protected], wxPIRS - gael360 * Another Author: [email protected] * License: http://www.gnu.org/licenses/gpl.html GNU GENERAL PUBLIC LICENSE * Link: https://code.google.com/p/party-buffalo/ * http://gael360.free.fr/ * Note: All Code that follows to the End point was added by [email protected] */ public MainForm(CLKsFATXLib.File f) { xFile = f; STFSFile = true; InitializeComponent(); }