コード例 #1
0
 //Start function
 void Start()
 {
     loadedFiles = GenerateFile.loadFiles();
     for (int i = 0; i < loadedFiles.Length; i++)
     {
         GameFile   temp         = JsonUtility.FromJson <GameFile>(loadedFiles[i]);
         GameObject analyzePanel = Instantiate(fileAnalyzeTemplate) as GameObject;
         analyzePanel.SetActive(true);
         analyzePanel.GetComponent <fileAnalyzeElement>().setText(temp.getGameFileName(), temp.getGameFilePath(), temp.getGameFileDate(), temp.getGameFileExtension(), temp.getGameFileSize(), temp.getGameFileID().ToString());
         analyzePanel.transform.SetParent(fileAnalyzeTemplate.transform.parent, false);
     }
 }
コード例 #2
0
    public void Start()
    {
        loadedFiles = GenerateFile.loadFiles();
        string formattedSize = "";

        for (int i = 0; i < loadedFiles.Length; i++)
        {
            GameFile   fileToPrint = JsonUtility.FromJson <GameFile>(loadedFiles[i]);
            GameObject filePanel   = Instantiate(fileSelectTemplate) as GameObject;
            filePanel.SetActive(true);
            formattedSize = formatSize(fileToPrint.getGameFileSize());
            filePanel.GetComponent <FileSelectElement>().setTMP(fileToPrint.getGameFileName() + fileToPrint.getGameFileExtension(), formattedSize, fileToPrint.getGameFileID().ToString());
            filePanel.transform.SetParent(fileSelectTemplate.transform.parent, false);
        }
    }
コード例 #3
0
    public void startHash()
    {
        int selectedFileId = Int32.Parse(PlayerPrefs.GetString("chosenFileId"));

        loadedFiles = GenerateFile.loadFiles();
        for (int i = 0; i < loadedFiles.Length; i++)
        {
            GameFile fileToPrint = JsonUtility.FromJson <GameFile>(loadedFiles[i]);
            if (fileToPrint.getGameFileID().ToString() == selectedFileId.ToString())
            {
                selectedFile = fileToPrint;
            }
        }
        if (md5Toggle.isOn)
        {
            md5OutputField.GetComponent <TMP_InputField>().text = md5Hash(selectedFile.ToString());
        }
        else
        {
            md5OutputField.GetComponent <TMP_InputField>().text = "";
        }
        if (sha1Toggle.isOn)
        {
            sha1OutputField.GetComponent <TMP_InputField>().text = sha1Hash(selectedFile.ToString());
        }
        else
        {
            sha1OutputField.GetComponent <TMP_InputField>().text = "";
        }
        if (sha256Toggle.isOn)
        {
            sha256OutputField.GetComponent <TMP_InputField>().text = sha256Hash(selectedFile.ToString());
        }
        else
        {
            sha256OutputField.GetComponent <TMP_InputField>().text = "";
        }
        if (sha512Toggle.isOn)
        {
            sha512OutputField.GetComponent <TMP_InputField>().text = sha512Hash(selectedFile.ToString());
        }
        else
        {
            sha512OutputField.GetComponent <TMP_InputField>().text = "";
        }
    }
コード例 #4
0
    public static void printFile()
    {
        string fileInfo       = PlayerPrefs.GetString("chosenFileId");
        int    selectedFileId = Int32.Parse(PlayerPrefs.GetString("chosenFileId"));

        string[] newLoadedFiles = GenerateFile.loadFiles();
        for (int i = 0; i < newLoadedFiles.Length; i++)
        {
            GameFile fileToPrint = JsonUtility.FromJson <GameFile>(newLoadedFiles[i]);
            if (fileToPrint.getGameFileID().ToString() == selectedFileId.ToString())
            {
                selectedFile = fileToPrint;
            }
        }
        filePrint.text      = selectedFile.getGameFileName() + selectedFile.getGameFileExtension();
        filePrint.color     = new Color32(0, 0, 0, 255);
        filePrint.fontStyle = FontStyles.Normal;
    }
コード例 #5
0
 void Start()
 {
     loadedFiles = GenerateFile.loadFiles();
     fileSelectDropdown.options.Clear();
     attackerDropdown.options.Clear();
     dateDropdown.options.Clear();
     for (int i = 0; i < loadedFiles.Length; i++)
     {
         GameFile fileToPrint = JsonUtility.FromJson <GameFile>(loadedFiles[i]);
         setFile(fileToPrint.getGameFileName() + fileToPrint.getGameFileExtension());
         if (!uniqueNames.Contains(fileToPrint.getGameFileOwner()))
         {
             uniqueNames.Add(fileToPrint.getGameFileOwner());
         }
     }
     parseOwners(uniqueNames);
     setDate();
     fileSelectDropdown.RefreshShownValue();
     attackerDropdown.RefreshShownValue();
     dateDropdown.RefreshShownValue();
 }
コード例 #6
0
 public void Start()
 {
     loadedFiles = GenerateFile.loadFiles();
     EventSystem.current.SetSelectedGameObject(inputField.gameObject, null);
 }