コード例 #1
0
        internal static bool CloseTarget(bool updateDomains = true)
        {
            if (FileWatch.currentFileInfo.targetInterface != null)
            {
                if (!FileWatch.RestoreTarget())
                {
                    MessageBox.Show("Unable to restore the backup. Aborting!");
                    return(false);
                }
                FileWatch.currentFileInfo.targetInterface.CloseStream();
                FileWatch.currentFileInfo.targetInterface = null;
            }

            if (updateDomains)
            {
                UpdateDomains();
            }
            return(true);
        }
コード例 #2
0
        internal static bool CloseActiveTargets(bool updateDomains = true, bool restoreTarget = true)
        {
            if (FileWatch.currentSession.fileInterface != null)
            {
                if (restoreTarget)
                {
                    FileWatch.RestoreTarget();
                }

                FileWatch.currentSession.fileInterface?.CloseStream();
                FileWatch.currentSession.fileInterface = null;
            }

            if (updateDomains && VanguardCore.vanguardConnected)
            {
                UpdateDomains();
            }
            return(true);
        }