Пример #1
0
		public static bool IsAllowedBackgroundInputForm()
		{
			if (disableRTC) return false;

			return VanguardCore.RTE_API.OverrideBackgroundInput || VanguardConnector.IsUIForm() ||
				(Form.ActiveForm is HexEditor && Global.ClassicConfig.HexEditorAllowBackgroundInput);

		}
Пример #2
0
        public static void StartClient()
        {
            try
            {
                ConsoleEx.WriteLine("Starting Vanguard Client");
                Thread.Sleep(500); //When starting in Multiple Startup Project, the first try will be uncessful since
                                   //the server takes a bit more time to start then the client.

                var spec = new NetCoreReceiver();
                spec.Attached         = VanguardCore.attached;
                spec.MessageReceived += OnMessageReceived;

                connector = new VanguardConnector(spec);
            }
            catch (Exception ex)
            {
                if (VanguardCore.ShowErrorDialog(ex, true) == DialogResult.Abort)
                {
                    throw new AbortEverythingException();
                }
            }
        }
Пример #3
0
 public static void RestartClient()
 {
     connector?.Kill();
     connector = null;
     StartClient();
 }