public Import( FlowLayoutPanel flyPanel, Button btnAdd) { this.setting = Service.Setting.Instance; this.flyPanel = flyPanel; this.btnAdd = btnAdd; InitPanel(); BindEvent(); }
public TabPlugin(FlowLayoutPanel flyPanel) { setting = Service.Setting.Instance; pluginServ = Service.PluginsServer.Instance; this.flyPanel = flyPanel; curPluginInfos = pluginServ.GetterAllPluginsInfo(); setting.SavePluginInfoItems(curPluginInfos); MarkdownCurOption(); InitPanel(); }
public void Run( Service.Cache cache, Service.Setting setting, Service.Servers servers) { this.cache = cache; this.servers = servers; this.setting = setting; server = new Service.Core(setting); server.OnLog += OnLogHandler; server.OnCoreStatusChanged += OnCoreStateChangedHandler; }
public Configer( Service.Setting setting, Service.Cache cache, Service.ConfigMgr configMgr, Service.Servers servers, VgcApis.Models.Datas.CoreInfo coreInfo) { this.configMgr = configMgr; this.setting = setting; this.cache = cache; this.servers = servers; this.coreInfo = coreInfo; }
FormMain() { setting = Service.Setting.Instance; servers = Service.Servers.Instance; InitializeComponent(); #if DEBUG this.Icon = Properties.Resources.icon_light; #endif this.Show(); }
FormMain() { setting = Service.Setting.Instance; servers = Service.Servers.Instance; InitializeComponent(); #if DEBUG this.Icon = Properties.Resources.icon_light; #endif Lib.UI.AutoScaleToolSripControls(this, 16); this.Show(); }
FormQRCode() { setting = Service.Setting.Instance; servIndex = 0; linkType = 0; InitializeComponent(); #if DEBUG this.Icon = Properties.Resources.icon_light; #endif this.Show(); }
public MenuItemsServer( // for invoke ui refresh MenuStrip menuContainer, // system proxy ToolStripMenuItem curSysProxySummary, ToolStripMenuItem copyCurPacUrl, ToolStripMenuItem visitCurPacDebuggerUrl, ToolStripMenuItem clearSysProxy, ToolStripMenuItem restartPACServer, ToolStripMenuItem stopPACServer, // misc ToolStripMenuItem refreshSummary, ToolStripMenuItem deleteAllServers, ToolStripMenuItem deleteSelected, // copy ToolStripMenuItem copyAsV2rayLinks, ToolStripMenuItem copyAsVmessLinks, ToolStripMenuItem copyAsSubscriptions, // batch op ToolStripMenuItem speedTestOnSelected, ToolStripMenuItem modifySelected, ToolStripMenuItem packSelected, ToolStripMenuItem stopSelected, ToolStripMenuItem restartSelected, // view ToolStripMenuItem moveToTop, ToolStripMenuItem moveToBottom, ToolStripMenuItem foldPanel, ToolStripMenuItem expansePanel, ToolStripMenuItem sortBySpeed, ToolStripMenuItem sortBySummary) { cache = Service.Cache.Instance; servers = Service.Servers.Instance; setting = Service.Setting.Instance; pacServer = Service.PacServer.Instance; this.menuContainer = menuContainer; // for invoke ui update InitCtrlSorting(sortBySpeed, sortBySummary); InitCtrlView(moveToTop, moveToBottom, foldPanel, expansePanel); InitCtrlCopyToClipboard(copyAsV2rayLinks, copyAsVmessLinks, copyAsSubscriptions); InitCtrlMisc(refreshSummary, deleteSelected, deleteAllServers); InitCtrlBatchOperation(stopSelected, restartSelected, speedTestOnSelected, modifySelected, packSelected); InitCtrlSysProxy(curSysProxySummary, copyCurPacUrl, visitCurPacDebuggerUrl, clearSysProxy, restartPACServer, stopPACServer); }
public Subscription( FlowLayoutPanel flyPanel, Button btnAdd, Button btnUpdate) { this.setting = Service.Setting.Instance; this.flyPanel = flyPanel; this.btnAdd = btnAdd; this.btnUpdate = btnUpdate; InitPanel(); BindEvent(); }
public FormConfiger() { InitializeComponent(); // I18N = Lib.Utils.I18N; // resData = Lib.Utils.resData; settings = Service.Setting.Instance; InitScintilla(); InitForm(); this.Show(); }
FormLog() { setting = Service.Setting.Instance; maxNumberLines = setting.maxLogLines; InitializeComponent(); this.FormClosed += (s, e) => setting.OnLog -= LogReceiver; Lib.UI.SetFormLocation <FormLog>(this, Model.Data.Enum.FormLocations.BottomLeft); this.Show(); setting.OnLog += LogReceiver; }
public Import( Panel container, CheckBox globalImport, Button expand, Button clearCache, Button copy) { this.setting = Service.Setting.Instance; this.editor = Lib.UI.CreateScintilla(container, true); this.cboxGlobalImport = globalImport; DataBinding(); AttachEvent(expand, clearCache, copy); }
public MenuItems( ToolStripMenuItem simVmessServer, ToolStripMenuItem importLinkFromClipboard, ToolStripMenuItem exportAllServer, ToolStripMenuItem importFromFile, ToolStripMenuItem checkUpdate, ToolStripMenuItem toolMenuItemAbout, ToolStripMenuItem toolMenuItemHelp, ToolStripMenuItem configEditor, ToolStripMenuItem QRCode, ToolStripMenuItem log, ToolStripMenuItem options, ToolStripMenuItem downloadV2rayCore, ToolStripMenuItem removeV2rayCore) { setting = Service.Setting.Instance; downloadV2rayCore.Click += (s, a) => Views.FormDownloadCore.GetForm(); removeV2rayCore.Click += (s, a) => RemoveV2RayCore(); simVmessServer.Click += (s, a) => Views.FormSimAddVmessClient.GetForm(); importLinkFromClipboard.Click += (s, a) => { string links = Lib.Utils.GetClipboardText(); setting.ImportLinks(links); }; exportAllServer.Click += (s, a) => ExportAllServersToTextFile(); importFromFile.Click += (s, a) => ImportServersFromTextFile(); checkUpdate.Click += (s, a) => CheckVGCUpdate(); toolMenuItemAbout.Click += (s, a) => Lib.UI.VisitUrl(I18N("VistPorjectPage"), Properties.Resources.ProjectLink); toolMenuItemHelp.Click += (s, a) => Lib.UI.VisitUrl(I18N("VistWikiPage"), Properties.Resources.WikiLink); configEditor.Click += (s, a) => new Views.FormConfiger(); QRCode.Click += (s, a) => Views.FormQRCode.GetForm(); log.Click += (s, a) => Views.FormLog.GetForm(); options.Click += (s, a) => Views.FormOption.GetForm(); }
public FormConfiger(string originalConfigString = null) { setting = Service.Setting.Instance; servers = Service.Servers.Instance; isShowPanel = setting.isShowConfigerToolsPanel; formSearch = null; InitializeComponent(); formTitle = this.Text; this.originalConfigString = originalConfigString; VgcApis.Libs.UI.AutoSetFormIcon(this); this.Show(); }
public FormConfiger(string originalConfigString = null) { setting = Service.Setting.Instance; formSearch = null; InitializeComponent(); formTitle = this.Text; this.originalConfigString = originalConfigString; #if DEBUG this.Icon = Properties.Resources.icon_light; #endif this.Show(); }
FormSimAddVmessClient() { InitializeComponent(); Fill(cboxKCP, Model.Data.Table.kcpTypes); setting = Service.Setting.Instance; #if DEBUG this.Icon = Properties.Resources.icon_light; #endif this.Show(); this.FormClosed += (s, a) => { setting.LazyGC(); }; }
FormSimAddVmessClient() { InitializeComponent(); Fill(cboxKCP, Model.Data.Table.kcpTypes); servers = Service.Servers.Instance; setting = Service.Setting.Instance; VgcApis.Libs.UI.AutoSetFormIcon(this); this.Show(); this.FormClosed += (s, a) => { setting.LazyGC(); }; }
public Import( Panel container, CheckBox globalImport, Button btnExpand, Button btnClearCache, Button btnCopy, Button btnSaveAs) { this.setting = Service.Setting.Instance; this.configMgr = Service.ConfigMgr.Instance; this.editor = Lib.UI.CreateScintilla(container, true); this.cboxGlobalImport = globalImport; DataBinding(); AttachEvent(btnExpand, btnClearCache, btnCopy, btnSaveAs); }
public TabPlugin( FlowLayoutPanel flyPanel, Button btnUpdate) { setting = Service.Setting.Instance; pluginServ = Service.PluginsServer.Instance; this.flyPanel = flyPanel; this.btnUpdate = btnUpdate; curPluginInfos = setting.GetPluginInfoItems(); MarkdownCurOption(); InitPanel(); BindEvent(); }
FormDownloadCore() { InitializeComponent(); InitUI(); setting = Service.Setting.Instance; core = Service.Core.Instance; this.FormClosed += (s, e) => { if (downloader != null) { downloader.Cancel(); } }; this.Show(); }
public Subscription( FlowLayoutPanel flyPanel, Button btnAdd, Button btnUpdate, CheckBox chkSubsIsUseProxy) { this.setting = Service.Setting.Instance; this.servers = Service.Servers.Instance; this.flyPanel = flyPanel; this.btnAdd = btnAdd; this.btnUpdate = btnUpdate; this.chkSubsIsUseProxy = chkSubsIsUseProxy; chkSubsIsUseProxy.Checked = setting.isUpdateUseProxy; InitPanel(); BindEvent(); }
FormDownloadCore() { setting = Service.Setting.Instance; servers = Service.Servers.Instance; InitializeComponent(); InitUI(); this.FormClosed += (s, e) => { downloader?.Cleanup(); setting.LazyGC(); }; VgcApis.Libs.UI.AutoSetFormIcon(this); this.Show(); }
public FormLog() { core = Service.Core.Instance; setting = Service.Setting.Instance; maxNumberLines = setting.maxLogLines; InitializeComponent(); core.OnLog += LogReceiver; this.FormClosed += (s, e) => { core.OnLog -= LogReceiver; }; this.Show(); }
public ServerUI(Controller.CoreServerCtrl serverItem) { setting = Service.Setting.Instance; servers = Service.Servers.Instance; this.serverItem = serverItem; InitializeComponent(); this.foldingButtonIcons = new Bitmap[] { Properties.Resources.StepBackArrow_16x, Properties.Resources.StepOverArrow_16x, }; this.formHeight = new int[] { this.Height, // collapseLevel= 0 this.cboxInbound.Top, }; }
public Configer(int serverIndex = -1) { setting = Service.Setting.Instance; ssServer = new SSServer(); ssClient = new SSClient(); streamSettings = new StreamSettings(); vmessClient = new VmessClient(); vmessServer = new VmessServer(); editor = new Editor(); vgc = new VGC(); separator = Model.Data.Table.sectionSeparator; sections = Model.Data.Table.configSections; preSection = 0; LoadConfig(serverIndex); editor.content = config.ToString(); UpdateData(); }
public FormLog() { setting = Service.Setting.Instance; InitializeComponent(); this.FormClosed += (s, e) => { if (updateLogTimer != null) { updateLogTimer.Stop(); updateLogTimer.Tick -= UpdateLog; updateLogTimer.Dispose(); } }; Lib.UI.SetFormLocation <FormLog>(this, Model.Data.Enum.FormLocations.BottomLeft); VgcApis.Libs.UI.AutoSetFormIcon(this); }
FormDownloadCore() { setting = Service.Setting.Instance; InitializeComponent(); InitUI(); this.FormClosed += (s, e) => { downloader?.Cleanup(); setting.LazyGC(); }; #if DEBUG this.Icon = Properties.Resources.icon_light; #endif this.Show(); }
public ServerUI( VgcApis.Models.Interfaces.ICoreServCtrl serverItem) { setting = Service.Setting.Instance; servers = Service.Servers.Instance; slinkMgr = Service.ShareLinkMgr.Instance; this.coreServCtrl = serverItem; InitializeComponent(); this.foldingButtonIcons = new Bitmap[] { Properties.Resources.StepBackArrow_16x, Properties.Resources.StepOverArrow_16x, }; this.formHeight = new int[] { this.Height, // collapseLevel= 0 this.cboxInbound.Top, }; }
public TabSetting( ComboBox cboxLanguage, ComboBox cboxPageSize, CheckBox chkServAutoTrack, CheckBox chkPortableMode) { this.setting = Service.Setting.Instance; // Do not put these lines of code into InitElement. this.cboxLanguage = cboxLanguage; this.cboxPageSize = cboxPageSize; this.chkServAutoTrack = chkServAutoTrack; this.chkPortableMode = chkPortableMode; InitElement( cboxLanguage, cboxPageSize, chkServAutoTrack, chkPortableMode); }
public EnvVar( ComboBox cboxImportAlias, TextBox tboxImportUrl, Button btnInsertImport, ComboBox cboxEnvName, TextBox tboxEnvValue, Button btnInsertEnv) { setting = Service.Setting.Instance; this.cboxEnvName = cboxEnvName; this.cboxImportAlias = cboxImportAlias; this.tboxEnvValue = tboxEnvValue; this.tboxImportUrl = tboxImportUrl; this.btnInsertImport = btnInsertImport; this.btnInsertEnv = btnInsertEnv; Init(); BindEvent(); }