예제 #1
0
        private void RemoveV2RayCore()
        {
            if (!Misc.UI.Confirm(I18N.ConfirmRemoveV2RayCore))
            {
                return;
            }

            if (!Directory.Exists(Misc.Utils.GetSysAppDataFolder()))
            {
                MessageBox.Show(I18N.Done);
                return;
            }

            servers.StopAllServersThen(() =>
            {
                try
                {
                    Misc.Utils.DeleteAppDataFolder();
                }
                catch (System.IO.IOException)
                {
                    MessageBox.Show(I18N.FileInUse);
                    return;
                }
                MessageBox.Show(I18N.Done);
            });
        }
예제 #2
0
파일: ServerUI.cs 프로젝트: ghotm/V2RayGCon
        void StartThisServerOnlyThen(Action done = null)
        {
            var server = this.coreServCtrl;

            servers.StopAllServersThen(() => server.GetCoreCtrl().RestartCoreThen(done));
        }