Пример #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
        void StartThisServerOnlyThen(Action done = null)
        {
            var server = this.coreServCtrl;

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