public OptionViewModel(Option option) { _option = option; AddProxy = new RelayCommand(() => AddProxyExec(), () => { return true; }); RemoveProxy = new RelayCommand(() => RemoveProxyExec(), () => { return true; }); ImportProxys = new RelayCommand(() => ImportProxysExec(), () => { return true; }); ExportProxys = new RelayCommand(() => ExportProxysExec(), () => { return true; }); ClearProxys = new RelayCommand(() => ClearProxysExec(), () => { return true; }); RunSpider = new RelayCommand(() => ProxySpider.run(), () => { return true; }); PushIpToOption = new RelayCommand(() => PushIpToOptionExec(), () => { return true; }); CheckProxy = new RelayCommand(() => CheckProxyExec(), () => { return true; }); badCheckedProxys = new List<string>(); proxySpider = new ProxySpider(); }
public OptionWindow(Option option) { InitializeComponent(); DataContext = new OptionViewModel(option); }
private void initConfig() { TabItemsGroup = new ObservableCollection<TabItemsGroup> { }; TabItemsGroup.Add(new TabItemsGroup()); SelectedGroupIndex = 0; option = new Option(); logger = new Logger(); }
public Requester(TabItem _tabItem, Option _option, ParameterInterpreter _pi) { tabItem = _tabItem; option = _option; pi = _pi; }