private void MoveFileToFolder(string screenshotName)
    {
        if (string.IsNullOrEmpty(VideoCallPhotoManager.FolderDate))
        {
            VideoCallPhotoManager.FolderDate = System.DateTime.Now.Year.ToString() + "-"
                                               + System.DateTime.Now.Month.ToString() + "-"
                                               + System.DateTime.Now.Day.ToString() + "_"
                                               + System.DateTime.Now.Hour + "-" + System.DateTime.Now.Minute + "-" + System.DateTime.Now.Second;
        }

        string oldPathToFile = photoNames[photoNames.Count - 1];
        string newPathToFile = Path.Combine(Application.persistentDataPath, PhotoChecking.GetInstance.GetFolderName);

        if (!GlobalParameters.isSameSession)
        {
            Directory.CreateDirectory(newPathToFile);
        }
        SavePhotoSessionController.AddFile(FolderName, screenshotName);
        SavePhotoSessionController.Sawe();

        try {
            File.Move(oldPathToFile, Path.Combine(newPathToFile, screenshotName));
            Debug.Log("agora_: " + screenshotName + " move To: " + newPathToFile);
            photoNames[photoNames.Count - 1] = newPathToFile;
            photoSprites.Add(Path.Combine(newPathToFile, screenshotName), null);
        }catch (IOException e)
        {
            Debug.Log("File did not saved: " + e);
            Debug.Log(newPathToFile);
            return;
        }
        SpriteLoader.SaweSpriteMini(Path.Combine(newPathToFile, screenshotName));
    }
 private void Awake()
 {
     datapath = Application.persistentDataPath;
     if (instance == null)
     {
         instance = this;
         Load();
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 3
0
 public void onGoogleDrivaLoad()
 {
     SavePhotoSessionController.onGoogleDriveLoad();
 }
Ejemplo n.º 4
0
 public void RemoveSession()
 {
     SavePhotoSessionController.RemoveFolder(VideoCallPhotoManager.FolderName);
 }