Ejemplo n.º 1
0
 private void fileViewObject_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (filelistview.SelectedObjects.Count == 1)
     {
         if (filelistview.SelectedObject is RPFLib.Common.ReturnDir)
         {
             var returndirectory = filelistview.SelectedObject as RPFLib.Common.ReturnDir;
             filelistview.ClearObjects();
             buildlist(returndirectory.Tag);
             removeBreadCrumb();
         }
         else if (filelistview.SelectedObject is RPFLib.Common.Directory)
         {
             var directory = filelistview.SelectedObject as RPFLib.Common.Directory;
             filelistview.ClearObjects();
             buildlist(directory);
             addBreadCrumb(directory);
         }
         else if (filelistview.SelectedObject is RPFLib.Common.File)
         {
             if (currentGame == "rdrXbox")
             {
                 var fileEntry = filelistview.SelectedObject as RPFLib.Common.File;
                 switch (fileEntry.resourcetype)
                 {
                     case 0:
                         {
                             Viewers.TextView TextViewer = new Viewers.TextView(fileEntry.GetData(true), fileEntry);
                             TextViewer.ShowDialog();
                             filelistview.RefreshObjects(masterlist);
                         }
                         break;
                     case 1:
                         {
                             //Viewers.StringsView StringViewer = new Viewers.StringsView(fileEntry.GetData());
                             //StringViewer.ShowDialog();
                         }
                         break;
                     case 2:
                         {
                             Viewers.xscView xscViewer = new Viewers.xscView(fileEntry.GetData(true));
                             xscViewer.ShowDialog();
                         }
                         break;
                     default:
                         break;
                 }
             }
             else if (currentGame == "gtaVXbox")
             {
                 var fileEntry = filelistview.SelectedObject as RPFLib.Common.File;
                 switch (Path.GetExtension(fileEntry.Name))
                 {
                     case "xsc":
                         {
                             Viewers.xscViewV7 xscViewer = new Viewers.xscViewV7(fileEntry.GetData(true));
                             xscViewer.ShowDialog();
                         }
                         break;
                     default:
                         Viewers.TextView TextViewer = new Viewers.TextView(fileEntry.GetData(true), fileEntry);
                         TextViewer.ShowDialog();
                         filelistview.RefreshObjects(masterlist);
                         break;
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
        private void fileViewObject_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (filelistview.SelectedObjects.Count == 1)
            {
                if (filelistview.SelectedObject is RPFLib.Common.ReturnDir)
                {
                    var returndirectory = filelistview.SelectedObject as RPFLib.Common.ReturnDir;
                    filelistview.ClearObjects();
                    buildlist(returndirectory.Tag);
                    removeBreadCrumb();
                }
                else if (filelistview.SelectedObject is RPFLib.Common.Directory)
                {
                    var directory = filelistview.SelectedObject as RPFLib.Common.Directory;
                    filelistview.ClearObjects();
                    buildlist(directory);
                    addBreadCrumb(directory);
                }
                else if (filelistview.SelectedObject is RPFLib.Common.File)
                {
                    if (currentGame == "rdrXbox")
                    {
                        var fileEntry = filelistview.SelectedObject as RPFLib.Common.File;
                        switch (fileEntry.resourcetype)
                        {
                        case 0:
                        {
                            Viewers.TextView TextViewer = new Viewers.TextView(fileEntry.GetData(true), fileEntry);
                            TextViewer.ShowDialog();
                            filelistview.RefreshObjects(masterlist);
                        }
                        break;

                        case 1:
                        {
                            //Viewers.StringsView StringViewer = new Viewers.StringsView(fileEntry.GetData());
                            //StringViewer.ShowDialog();
                        }
                        break;

                        case 2:
                        {
                            Viewers.xscView xscViewer = new Viewers.xscView(fileEntry.GetData(true));
                            xscViewer.ShowDialog();
                        }
                        break;

                        default:
                            break;
                        }
                    }
                    else if (currentGame == "gtaVXbox")
                    {
                        var fileEntry = filelistview.SelectedObject as RPFLib.Common.File;
                        switch (Path.GetExtension(fileEntry.Name))
                        {
                        case "xsc":
                        {
                            Viewers.xscViewV7 xscViewer = new Viewers.xscViewV7(fileEntry.GetData(true));
                            xscViewer.ShowDialog();
                        }
                        break;

                        default:
                            Viewers.TextView TextViewer = new Viewers.TextView(fileEntry.GetData(true), fileEntry);
                            TextViewer.ShowDialog();
                            filelistview.RefreshObjects(masterlist);
                            break;
                        }
                    }
                }
            }
        }