예제 #1
0
        internal static bool CloseTarget(bool updateDomains = true)
        {
            if (UnityWatch.currentFileInfo.targetInterface != null)
            {
                UnityWatch.KillProcess();
                if (!UnityWatch.RestoreTarget())
                {
                    MessageBox.Show("Unable to restore the backup. Aborting!");
                    return(false);
                }

                UnityWatch.currentFileInfo.targetInterface.CloseStream();
                UnityWatch.currentFileInfo.targetInterface = null;
            }

            if (updateDomains)
            {
                UpdateDomains();
            }
            return(true);
        }
예제 #2
0
 private void BtnRestoreBackup_Click(object sender, EventArgs e)
 {
     UnityWatch.KillProcess();
     UnityWatch.currentFileInfo.targetInterface?.CloseStream();
     UnityWatch.currentFileInfo.targetInterface?.RestoreBackup();
 }