mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-24 08:16:08 +00:00
AddFilePrompt - Changes namespace and changed 'Filetype' to be 'PckFile.FileData.FileType'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace PckStudio
|
||||
namespace PckStudio.Popups
|
||||
{
|
||||
partial class AddFilePrompt
|
||||
{
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using MetroFramework.Forms;
|
||||
using OMI.Formats.Pck;
|
||||
|
||||
namespace PckStudio
|
||||
namespace PckStudio.Popups
|
||||
{
|
||||
public partial class AddFilePrompt : MetroForm
|
||||
{
|
||||
@@ -11,7 +12,7 @@ namespace PckStudio
|
||||
/// otherwise <see cref="string.Empty"/>
|
||||
/// </summary>
|
||||
public string Filepath => DialogResult == DialogResult.OK ? InputTextBox.Text : string.Empty;
|
||||
public int Filetype => FileTypeComboBox.SelectedIndex;
|
||||
public PckFile.FileData.FileType Filetype => (PckFile.FileData.FileType)FileTypeComboBox.SelectedIndex;
|
||||
|
||||
public AddFilePrompt(string initialText) : this(initialText, -1)
|
||||
{ }
|
||||
|
||||
@@ -29,6 +29,7 @@ using PckStudio.Classes.IO.PCK;
|
||||
using PckStudio.Classes.IO._3DST;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Features;
|
||||
using PckStudio.Popups;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
@@ -2172,8 +2173,10 @@ namespace PckStudio
|
||||
using AddFilePrompt diag = new AddFilePrompt("res/" + Path.GetFileName(ofd.FileName));
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
PckFile.FileData file = currentPCK.CreateNewFile(diag.Filepath, (PckFile.FileData.FileType)diag.Filetype);
|
||||
file.SetData(File.ReadAllBytes(ofd.FileName));
|
||||
PckFile.FileData file = currentPCK.CreateNewFile(
|
||||
diag.Filepath,
|
||||
diag.Filetype,
|
||||
() => File.ReadAllBytes(ofd.FileName));
|
||||
|
||||
if (IsSubPCKNode(treeViewMain.SelectedNode.FullPath)) RebuildSubPCK(treeViewMain.SelectedNode);
|
||||
//else treeViewMain.Nodes.Add();
|
||||
|
||||
Reference in New Issue
Block a user