public static void ShowForm(Controllers.LuaCoreCtrl luaCoreCtrl)
        {
            FormLuaCoreSettings f = null;

            if (_instant == null || _instant.IsDisposed)
            {
                VgcApis.Misc.UI.Invoke(() =>
                {
                    f = new FormLuaCoreSettings();
                });
            }

            lock (formInstanLocker)
            {
                if (_instant == null || _instant.IsDisposed)
                {
                    _instant = f;
                    f        = null;
                }
            }

            VgcApis.Misc.UI.Invoke(() =>
            {
                f?.Close();
                var inst = _instant;
                if (inst != null)
                {
                    inst.InitControls(luaCoreCtrl);
                    inst.Show();
                    inst.Activate();
                }
            });
        }
Beispiel #2
0
        public static void ShowForm(Controllers.LuaCoreCtrl luaCoreCtrl)
        {
            lock (formInstanLocker)
            {
                if (_instant == null || _instant.IsDisposed)
                {
                    VgcApis.Misc.UI.Invoke(() =>
                    {
                        _instant = new FormLuaCoreSettings();
                    });
                }

                VgcApis.Misc.UI.Invoke(() =>
                {
                    _instant.InitControls(luaCoreCtrl);
                    _instant.Show();
                    _instant.Activate();
                });
            }
        }