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 Configer(Scintilla element, int serverIndex = -1) { cache = Service.Cache.Instance; setting = Service.Setting.Instance; ssServer = new SSServer(); ssClient = new SSClient(); streamSettings = new StreamSettings(); vmessCtrl = new VmessCtrl(); editor = new Editor(); vgc = new VGC(); import = new Import(element); separator = Model.Data.Table.sectionSeparator; sections = Model.Data.Table.configSections; preSection = 0; ClearOriginalConfig(); LoadConfig(serverIndex); editor.content = config.ToString(); UpdateData(); }