public AdbTabViewModel(Device device, IInfoModelContainer container) { if (device == null) { throw new ArgumentNullException(nameof(device)); } if (container == null) { throw new ArgumentNullException(nameof(device)); } this.Container = container; this.Device = device; }
/// <summary> /// 加入Adb节点显示; /// </summary> /// <param name="container"></param> public void AddAdbShowingFile(IInfoModelContainer container) { //if(this.fsTabServiceToken?.Value == null) { // EventLogger.Logger.WriteLine($"{nameof(AdbViewerModule)}->{nameof(AddAdbShowingFile)}:{nameof(AdbViewerModule.fsTabServiceToken)} is null!"); // return; //} //var browserItems = this.fsTabServiceToken.Value.CurrentTabs; //var preItem = browserItems.FirstOrDefault(p => (p as AdbTabModel)?.AdbTabViewModel.Container == container); //if (preItem != null) { // fsTabServiceToken.Value.SelectedTab = preItem; //} //else { // if (container is IDefaultPhoneInfoContainer) { // var adbTab = new AdbTabModel(new AdbTabViewModel((container as IDefaultPhoneInfoContainer).Parent.Device, container)); // //fsTabServiceToken.Value.AddTab() // //fsTabServiceToken.Value.AddTab(adbTab); // //fsTabServiceToken.Value.ChangeSelectedTab(adbTab); // } //} }