コード例 #1
0
ファイル: TabEditorCtrl.cs プロジェクト: thatformat/V2RayGCon
        public void Run(
            VgcApis.Models.IServices.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer)
        {
            this.api        = api;
            this.configMgr  = api.GetConfigMgrService();
            this.vgcServers = api.GetServersService();

            this.settings    = settings;
            this.luaServer   = luaServer;
            this.luaCoreCtrl = CreateLuaCoreCtrl(
                settings, api);

            InitControls();
            BindEvents();

            ReloadScriptName();
            if (cboxScriptName.Items.Count > 0)
            {
                cboxScriptName.SelectedIndex = 0;
            }

            repaintCtrl = new VgcApis.Libs.Views.RepaintCtrl(rtboxOutput);
            logUpdater.Run();
        }
コード例 #2
0
        public void Run(
            VgcApis.Models.IServices.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer)
        {
            this.api        = api;
            this.configMgr  = api.GetConfigMgrService();
            this.vgcServers = api.GetServersService();

            this.settings    = settings;
            this.luaServer   = luaServer;
            this.luaCoreCtrl = CreateLuaCoreCtrl(
                settings, api);

            InitControls();
            BindEvents();

            ReloadScriptName();
            if (cboxScriptName.Items.Count > 0)
            {
                cboxScriptName.SelectedIndex = 0;
            }

            updateOutputTimer.Tick += UpdateOutput;
            updateOutputTimer.Start();
        }
コード例 #3
0
 public void Run(VgcApis.IService api)
 {
     this.api      = api;
     this.settings = new Services.Settings();
     vgcServers    = api.GetVgcServersService();
     vgcSettings   = api.GetVgcSettingService();
     settings.Run(api);
 }
コード例 #4
0
 protected override void Start(VgcApis.IService api)
 {
     this.api      = api;
     this.settings = new Services.Settings();
     vgcServers    = api.GetVgcServersService();
     vgcSettings   = api.GetVgcSettingService();
     settings.Run(api);
 }
コード例 #5
0
 public void Run(
     Services.Settings settings,
     VgcApis.Models.IServices.IServersService vgcServers)
 {
     this.settings          = settings;
     this.vgcServers        = vgcServers;
     this.redirectLogWorker = settings.SendLog;
 }
コード例 #6
0
        protected override void Start(VgcApis.Models.IServices.IApiService api)
        {
            this.api   = api;
            vgcSetting = api.GetSettingService();
            vgcServers = api.GetServersService();

            settings = new Services.Settings();
            settings.Run(vgcSetting, vgcServers);
        }
コード例 #7
0
ファイル: LuaServer.cs プロジェクト: wscloudy/V2RayGCon
        public void Run(
            Settings settings,
            VgcApis.Models.IServices.IServersService vgcServers)
        {
            this.settings = settings;
            this.luaApis  = new Models.Apis.LuaApis();
            luaApis.Run(settings, vgcServers);

            luaCoreCtrls = InitLuaCores(settings, luaApis);
            WakeUpAutoRunScripts();
        }
コード例 #8
0
ファイル: ServerTracker.cs プロジェクト: wscloudy/V2RayGCon
        public void Run(
            PsSettings setting,
            PacServer pacServer,
            VgcApis.Models.IServices.IServersService servers)
        {
            this.setting   = setting;
            this.pacServer = pacServer;
            this.servers   = servers;

            Restart();
        }
コード例 #9
0
ファイル: LuaApis.cs プロジェクト: zxniuniu/V2RayGCon
 public LuaApis(
     Services.Settings settings,
     VgcApis.Models.IServices.IApiService api)
 {
     this.settings          = settings;
     this.vgcConfigMgr      = api.GetConfigMgrService();
     this.vgcServers        = api.GetServersService();
     this.vgcWeb            = api.GetWebService();
     this.vgcUtils          = api.GetUtilsService();
     this.redirectLogWorker = settings.SendLog;
 }
コード例 #10
0
 public FormMain(
     VgcApis.Models.IServices.IServersService vgcServers,
     Services.Settings settings,
     Services.LuaServer luaServer)
 {
     this.vgcServers = vgcServers;
     this.settings   = settings;
     this.luaServer  = luaServer;
     InitializeComponent();
     VgcApis.Libs.UI.AutoSetFormIcon(this);
     this.Text = Properties.Resources.Name + " v" + Properties.Resources.Version;
 }
コード例 #11
0
ファイル: FormMain.cs プロジェクト: ultranijia/V2RayGCon
        public FormMain(
            Services.Settings settings,
            VgcApis.Models.IServices.IServersService vgcServers)
        {
            this.settings   = settings;
            this.vgcServers = vgcServers;
            InitializeComponent();

            this.FormClosing += (s, a) => formMainCtrl?.Cleanup();
            VgcApis.Libs.UI.AutoSetFormIcon(this);
            formMainCtrl = InitFormMainCtrl();
        }
コード例 #12
0
ファイル: Settings.cs プロジェクト: thatformat/V2RayGCon
        public void Run(
            VgcApis.Models.IServices.ISettingsService vgcSetting,
            VgcApis.Models.IServices.IServersService vgcServers)
        {
            this.vgcSetting = vgcSetting;
            this.vgcServers = vgcServers;

            userSettins = LoadUserSetting();
            bookKeeper  = new VgcApis.Libs.Tasks.LazyGuy(
                SaveUserSetting, VgcApis.Models.Consts.Intervals.LazySaveStatisticsDatadelay);
            StartBgStatsDataUpdateTimer();
            vgcServers.OnCoreClosing += OnCoreClosingHandler;
        }
コード例 #13
0
ファイル: ServerTracker.cs プロジェクト: torgitor/vrGCon
        public void Run(
            PsSettings setting,
            PacServer pacServer,
            VgcApis.Models.IServices.IServersService servers,
            VgcApis.Models.IServices.INotifierService notifier)
        {
            this.setting   = setting;
            this.pacServer = pacServer;
            this.servers   = servers;
            this.notifier  = notifier;

            Restart();
        }
コード例 #14
0
ファイル: Settings.cs プロジェクト: wscloudy/V2RayGCon
        public void Run(
            VgcApis.Models.IServices.ISettingService vgcSetting,
            VgcApis.Models.IServices.IServersService vgcServers)
        {
            this.vgcSetting = vgcSetting;
            this.vgcServers = vgcServers;

            userSettins = LoadUserSetting();
            bookKeeper  = new VgcApis.Libs.Sys.LazyGuy(
                SaveUserSetting, 1000 * 60 * 5);
            StartBgStatsDataUpdateTimer();
            vgcServers.OnCoreClosing += OnCoreClosingHandler;
        }
コード例 #15
0
        protected override void Start(VgcApis.IService api)
        {
            this.api    = api;
            vgcServers  = api.GetVgcServersService();
            vgcSettings = api.GetVgcSettingService();

            settings  = new Services.Settings();
            luaServer = new Services.LuaServer();

            settings.Run(vgcSettings);
            luaServer.Run(settings, vgcServers);

            // debug
            // this.Popup();
            // formMain.Activate();
        }
コード例 #16
0
ファイル: Web.cs プロジェクト: torgitor/vrGCon
 public Web(VgcApis.Models.IServices.IApiService api)
 {
     vgcWeb      = api.GetWebService();
     vgcServers  = api.GetServersService();
     vgcSlinkMgr = api.GetShareLinkMgrService();
 }
コード例 #17
0
 public void Run(VgcApis.Models.IServices.IApiService vgcApi)
 {
     vgcServers   = vgcApi.GetServersService();
     vgcSetting   = vgcApi.GetSettingService();
     userSettings = LoadUserSettings();
 }
コード例 #18
0
 public Server(
     VgcApis.Models.IServices.IApiService api)
 {
     vgcServers   = api.GetServersService();
     vgcConfigMgr = api.GetConfigMgrService();
 }