Exemplo n.º 1
0
 private void 存檔ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (isOpen)
     {
         tpsn.Save();
         tusr.Save();
         haveBeenEdited = false;
     }
 }
Exemplo n.º 2
0
        private void SaveFile()
        {
            if (isOpen)
            {
                if (listViewEx1.IsEditing)
                {
                    listViewEx1.EndEditing(true);
                }

                var profile = toolStripComboBox2.Text;
                if (profile != "Default Profile")
                {
                    byte[] account_id = Utility.GetAccountIdFromProfile(profile);
                    Utility.WriteAccountIdToParamSFO(pathTemp, account_id);
                    tpsn.account_id = account_id;
                    tusr.account_id = account_id;
                }

                tpsn.Save();
                tusr.Save();
                haveBeenEdited = false;
                string encPathTemp = Utility.GetTemporaryDirectory();
                try
                {
                    Utility.CopyTrophyData(pathTemp, encPathTemp, false);
                    Utility.encryptTrophy(encPathTemp);
                    Utility.CopyTrophyData(encPathTemp, path, true);
                }
                finally
                {
                    Utility.DeleteDirectory(encPathTemp);
                }
                RefreshComponents();
            }
        }