public UploadControlInfo()
 {
     Id = Guid.NewGuid().ToString().Substring(0, 8);
     UploadControlId = string.Empty;
     BrowserType     = FileBrowserType.Image;
     FileUrl         = string.Empty;
 }
Beispiel #2
0
 public void Initialise(string selectPattern, string title, FileBrowserType type, IFileReceiver fileReceiver)
 {
     m_selectPattern = selectPattern;
     m_fileReceiver  = fileReceiver;
     m_type          = type;
     windowTitle     = title;
     uiManager       = UIManager.instance;
 }
Beispiel #3
0
 // Browsers need at least a rect, name and callback
 public FileBrowser(Rect screenRect, string name, FinishedCallback callback)
 {
     m_name        = name;
     m_screenRect  = screenRect;
     m_browserType = FileBrowserType.File;
     m_callback    = callback;
     SetNewDirectory(Directory.GetCurrentDirectory());
     SwitchDirectoryNow();
 }
Beispiel #4
0
 // Browsers need at least a rect, name and callback
 public FileBrowser(Rect _screenRect, FileBrowserType browserType, string name, Action <string> callback)
 {
     m_name        = name;
     m_screenRect  = _screenRect;
     m_browserType = browserType;
     m_callback    = callback;
     SetNewDirectory(Directory.GetCurrentDirectory());
     SwitchDirectoryNow();
 }
 public FileBrowserEditor(EditorWindow window, FileBrowserType browserType, string name, Action <string> callback)
 {
     m_window      = window;
     m_name        = name;
     m_browserType = browserType;
     m_callback    = callback;
     SetNewDirectory(Directory.GetCurrentDirectory());
     SwitchDirectoryNow();
 }
Beispiel #6
0
 // Browsers need at least a rect, name and callback
 public FileBrowser(Rect screenRect, string name, FinishedCallback callback)
 {
     m_name = name;
     m_screenRect = screenRect;
     m_browserType = FileBrowserType.File;
     m_callback = callback;
     SetNewDirectory(Directory.GetCurrentDirectory());
     SwitchDirectoryNow();
 }
Beispiel #7
0
 // Browsers need at least a rect, name and callback
 public FileBrowser(Rect screenRect, string name, FinishedCallback callback)
 {
     m_name        = name;
     m_screenRect  = screenRect;
     m_browserType = FileBrowserType.File;
     m_callback    = callback;
     UIManager.instance.windowOpen = true;
     SetNewDirectory(Directory.GetCurrentDirectory());
     SwitchDirectoryNow();
 }
 //Alex Tek modif
 public ImprovedFileBrowser(Rect screenRect, string name, FinishedCallback callback, string startingPath)
 {
     m_name        = name;
     m_screenRect  = screenRect;
     buttonWidth   = (int)m_screenRect.width / 3;
     m_browserType = FileBrowserType.File;
     m_callback    = callback;
     SetNewDirectory(startingPath);
     SwitchDirectoryNow();
 }
Beispiel #9
0
 // Browsers need at least a rect, name and callback
 public FileBrowser(Rect screenRect, string name, FinishedCallback callback)
 {
     m_name        = name;
     m_screenRect  = screenRect;
     m_browserType = FileBrowserType.File;
     m_callback    = callback;
     //SetNewDirectory(Application.dataPath+"/Music");
     Debug.Log(Directory.GetCurrentDirectory() + "\\Assets\\resources\\");
     //SetNewDirectory(Directory.GetCurrentDirectory()+ "\\Assets\\resources\\"); // unity환경에서의 디렉토리 정하기
     SetNewDirectory(Directory.GetCurrentDirectory() + "\\Harmony_Data\\resources\\"); // build환경에서의 디렉토리 정하기  >>player settings에서 product name >> Harmony
     SwitchDirectoryNow();
 }
Beispiel #10
0
    // Browsers need at least a rect, name and callback
    public FileBrowser(/*Rect screenRect, */ string name, FinishedCallback callback)
    {
        m_name = name;
//        m_screenRect = screenRect;
        m_browserType = FileBrowserType.File;
        m_callback    = callback;
        SetNewDirectory(Directory.GetCurrentDirectory());
        SwitchDirectoryNow();

        m_fileImage            = Resources.Load("GUI/FileBrowser/FileImage", typeof(Texture2D)) as Texture2D;
        m_fileImageNonMatching = Resources.Load("GUI/FileBrowser/FileImageNonMatching", typeof(Texture2D)) as Texture2D;
        m_directoryImage       = Resources.Load("GUI/FileBrowser/DirectoryImage", typeof(Texture2D)) as Texture2D;
    }
Beispiel #11
0
    // Browsers need at least a rect, name and callback
    public FileBrowser(Rect screenRect, string name, FinishedCallback callback, string directory = "")
    {
        if (directory == string.Empty)
        {
            directory = Directory.GetCurrentDirectory();
        }

        m_name        = name;
        m_screenRect  = screenRect;
        m_browserType = FileBrowserType.File;
        m_callback    = callback;
        SetNewDirectory(directory);
        SwitchDirectoryNow();
    }
    // Browsers need at least a rect, name and callback
    public FileBrowser(Rect screenRect, string name, FinishedCallback callback, string lastUsedDirectory)
    {
        m_name = name;
        m_screenRect = screenRect;
        m_browserType = FileBrowserType.File;
        m_callback = callback;

        if(lastUsedDirectory == null)
            SetNewDirectory(Directory.GetCurrentDirectory());
        else
            SetNewDirectory(lastUsedDirectory);

        SwitchDirectoryNow();
    }
Beispiel #13
0
 public FileBrowser(Rect screenRect, string name, FileBrowserType type, FinishedCallback callback, string dirpath)
 {
     m_name        = name;
     m_screenRect  = screenRect;
     m_browserType = type;
     m_callback    = callback;
     UIManager.instance.windowOpen = true;
     if (Directory.Exists(dirpath))
     {
         SetNewDirectory(dirpath);
     }
     else
     {
         SetNewDirectory(Directory.GetCurrentDirectory());
     }
     SwitchDirectoryNow();
 }
Beispiel #14
0
    // Browsers need at least a rect, name and callback
    public FileBrowser(Rect screenRect, string name, FinishedCallback callback, string lastUsedDirectory)
    {
        m_name        = name;
        m_screenRect  = screenRect;
        m_browserType = FileBrowserType.File;
        m_callback    = callback;

        if (lastUsedDirectory == null)
        {
            SetNewDirectory(Directory.GetCurrentDirectory());
        }
        else
        {
            SetNewDirectory(lastUsedDirectory);
        }

        SwitchDirectoryNow();
    }
 public FileBrowser(Rect screenRect, string name, FinishedCallback callback)
 {
     #if UNITY_ANDROID
     pathDir = "/storage/";   // write here images path for your android device.
     #endif
     #if UNITY_EDITOR || UNITY_WEBPLAYER
     pathDir = Directory.GetCurrentDirectory();
     #endif
     #if UNITY_IPHONE
     pathDir = Application.dataPath;  // write here images path for your iOS device.For e.g "/private/var/" etc.
     #endif
     #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
     pathDir = Directory.GetCurrentDirectory();
     #endif
     m_name = name;
     m_screenRect = screenRect;
     m_browserType = FileBrowserType.File;
     m_callback = callback;
     SetNewDirectory(pathDir);
     SwitchDirectoryNow();
 }
    // Browsers need at least a rect, name and callback
    public FileBrowser(Rect screenRect, string name, FinishedCallback callback)
    {
        m_name        = name;
        m_screenRect  = screenRect;
        m_browserType = FileBrowserType.File;
        m_callback    = (s) =>
        {
            if (callback != null)
            {
                callback(s);
            }
            m_path = s;
        };

        DirectoryImage = m_directoryImage ?? Resources.Load <Texture2D>("Icons/folder"); //No estoy seguro de si esto funcionará
        FileImage      = m_fileImage ?? Resources.Load <Texture2D>("Icons/file");

        m_skin = Resources.Load <GUISkin>("Skins/File Browser");

        SetNewDirectory(Directory.GetCurrentDirectory());
        SwitchDirectoryNow();
    }
Beispiel #17
0
    public FileBrowser(Rect screenRect, string name, FinishedCallback callback, string filePattern)
    {
        m_name       = name;
        m_screenRect = screenRect;

        m_browserType = FileBrowserType.File;
        m_callback    = callback;
        m_filePattern = filePattern;

        string lastD = LoadLastD();

        if (lastD != null && lastD != "" && Directory.Exists(lastD))
        {
            SetNewDirectory(lastD);
        }
        else
        {
            selectDrive = true;
            SetNewDirectory("/");
        }
        drives = Directory.GetLogicalDrives();
        SwitchDirectoryNow();
    }
 // Token: 0x06000055 RID: 85 RVA: 0x00007070 File Offset: 0x00005270
 protected void FileClickCallback(int i)
 {
     FileBrowserType fileBrowserType = this.BrowserType;
 }