コード例 #1
0
        public void Run(
            VgcApis.Interfaces.Services.IApiService api,
            Services.Settings settings,
            Services.FormMgrSvc formMgr,
            Services.LuaServer luaServer)
        {
            this.formMgr   = formMgr;
            this.settings  = settings;
            this.luaServer = luaServer;

            this.luaCoreCtrl = CreateLuaCoreCtrl(settings, api);


            isLoadClrLib = false;

            BindEvents();
            ReloadScriptName();

            rtboxFreezer = new VgcApis.UserControls.RepaintController(rtboxOutput);
            logUpdater.Run();

            /*
             #if DEBUG
             *          if (cboxScriptName.Items.Count > 0)
             *          {
             *              cboxScriptName.SelectedIndex = 0;
             *          }
             #endif
             */
        }
コード例 #2
0
 public void Cleanup()
 {
     ReleaseEvent(this.luaCoreCtrl);
     lazyUpdater?.Dispose();
     this.formMgrSvc   = null;
     this.luaServerSvc = null;
 }
コード例 #3
0
ファイル: LuaUI.cs プロジェクト: jiahua90/V2RayGCon-1
 public LuaUI(
     Services.LuaServer luaServer,
     Services.FormMgrSvc formMgrSvc,
     Controllers.LuaCoreCtrl luaCoreCtrl)
 {
     this.luaCoreCtrl = luaCoreCtrl;
     this.luaServer   = luaServer;
     this.formMgrSvc  = formMgrSvc;
     InitializeComponent();
 }
コード例 #4
0
 public Misc(
     VgcApis.Interfaces.Services.IApiService api,
     Services.Settings settings,
     Services.FormMgrSvc formMgr)
 {
     this.settings = settings;
     this.formMgr  = formMgr;
     vgcNotifier   = api.GetNotifierService();
     vgcUtils      = api.GetUtilsService();
     vgcSlinkMgr   = api.GetShareLinkMgrService();
     vgcServer     = api.GetServersService();
     vgcSettings   = api.GetSettingService();
 }
コード例 #5
0
ファイル: TabGeneralCtrl.cs プロジェクト: vrnobody/V2RayGCon
        public void Run(
            Services.LuaServer luaServer,
            Services.FormMgrSvc formMgrSvc)
        {
            this.luaServer  = luaServer;
            this.formMgrSvc = formMgrSvc;

            BindControlsEvent(luaServer);
            BindFlyPanelDragDropEvent();

            RefreshFlyPanel();
            luaServer.OnRequireFlyPanelUpdate += OnLuaCoreCtrlListChangeHandler;
        }
コード例 #6
0
ファイル: FormMain.cs プロジェクト: jiahua90/V2RayGCon-1
        FormMain(
            Services.Settings settings,
            Services.LuaServer luaServer,
            Services.FormMgrSvc formMgr)
        {
            this.settings  = settings;
            this.luaServer = luaServer;
            this.formMgr   = formMgr;

            InitializeComponent();
            VgcApis.Misc.UI.AutoSetFormIcon(this);
            this.Text = string.Format(I18N.LunaScrMgr, Properties.Resources.Version);
        }
コード例 #7
0
ファイル: FormMain.cs プロジェクト: jiahua90/V2RayGCon-1
        public static FormMain CreateForm(
            Services.Settings settings,
            Services.LuaServer luaServer,
            Services.FormMgrSvc formMgr)
        {
            FormMain r = null;

            VgcApis.Misc.UI.Invoke(() =>
            {
                r = new FormMain(settings, luaServer, formMgr);
            });
            return(r);
        }
コード例 #8
0
        public void Reload(
            Services.LuaServer luaServerSvc,
            Services.FormMgrSvc formMgrSvc,

            Controllers.LuaCoreCtrl luaCoreCtrl)
        {
            this.luaServerSvc = luaServerSvc;
            this.formMgrSvc   = formMgrSvc;

            var org = this.luaCoreCtrl;

            this.luaCoreCtrl = luaCoreCtrl;
            ReleaseEvent(org);
            BindEvent(luaCoreCtrl);
            UpdateUiLater();
        }
コード例 #9
0
        public static FormEditor CreateForm(
            VgcApis.Interfaces.Services.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer,
            Services.FormMgrSvc formMgr,

            Models.Data.LuaCoreSetting initialCoreSettings)
        {
            FormEditor r = null;

            VgcApis.Misc.UI.Invoke(() =>
            {
                r = new FormEditor(
                    api, settings, luaServer, formMgr,

                    initialCoreSettings);
            });
            return(r);
        }
コード例 #10
0
ファイル: MenuCtrl.cs プロジェクト: jiahua90/V2RayGCon-1
        public void Run(
            Services.FormMgrSvc formMgrService,
            Models.Data.LuaCoreSetting initialCoreSettings)
        {
            InitControls();
            BindEvents(formMgrService);

            if (initialCoreSettings != null)
            {
                var name = initialCoreSettings.name;
                if (!string.IsNullOrEmpty(name))
                {
                    editorCtrl.LoadScript(name);
                }

                var enabled = initialCoreSettings.isLoadClr;
                UpdateClrControlsEanbledState(enabled);
                editorCtrl.isLoadClrLib = enabled;
            }
        }
コード例 #11
0
        FormEditor(
            VgcApis.Interfaces.Services.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer,
            Services.FormMgrSvc formMgr,

            Models.Data.LuaCoreSetting initialCoreSettings)
        {
            this.api                 = api;
            this.formMgr             = formMgr;
            this.initialCoreSettings = initialCoreSettings;

            this.settings  = settings;
            this.luaServer = luaServer;

            InitializeComponent();
            VgcApis.Misc.UI.AutoSetFormIcon(this);
            title = string.Format(I18N.LunaScrEditor, Properties.Resources.Version);

            editor    = Misc.UI.CreateLuaEditor(pnlScriptEditor);
            this.Text = title;
        }