Skip to content

Commit 43f5457

Browse files
committed
Make TabId public...
1 parent b238fa9 commit 43f5457

10 files changed

Lines changed: 24 additions & 26 deletions

Source/NETworkManager/ViewModels/DNSLookupViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class DNSLookupViewModel : ViewModelBase
2727
#region Variables
2828
private readonly IDialogCoordinator _dialogCoordinator;
2929

30-
private readonly int _tabId;
30+
public readonly int TabId;
3131
private bool _firstLoad = true;
3232

3333
private readonly DispatcherTimer _dispatcherTimer = new DispatcherTimer();
@@ -257,7 +257,7 @@ public DNSLookupViewModel(IDialogCoordinator instance, int tabId, string host)
257257

258258
_dialogCoordinator = instance;
259259

260-
_tabId = tabId;
260+
TabId = tabId;
261261
Host = host;
262262

263263
HostHistoryView = CollectionViewSource.GetDefaultView(SettingsManager.Current.DNSLookup_HostHistory);
@@ -423,7 +423,7 @@ private void StartLookup()
423423
{
424424
foreach (var tabablzControl in VisualTreeHelper.FindVisualChildren<TabablzControl>(window))
425425
{
426-
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == _tabId).Header = Host;
426+
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == TabId).Header = Host;
427427
}
428428
}
429429

Source/NETworkManager/ViewModels/HTTPHeadersViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class HTTPHeadersViewModel : ViewModelBase
2424
#region Variables
2525
private readonly IDialogCoordinator _dialogCoordinator;
2626

27-
private readonly int _tabId;
27+
public readonly int TabId;
2828
private bool _firstLoad = true;
2929

3030
private readonly DispatcherTimer _dispatcherTimer = new DispatcherTimer();
@@ -188,7 +188,7 @@ public HTTPHeadersViewModel(IDialogCoordinator instance ,int tabId, string websi
188188

189189
_dialogCoordinator = instance;
190190

191-
_tabId = tabId;
191+
TabId = tabId;
192192
WebsiteUri = websiteUri;
193193

194194
// Set collection view
@@ -294,7 +294,7 @@ private async void Check()
294294
{
295295
foreach (var tabablzControl in VisualTreeHelper.FindVisualChildren<TabablzControl>(window))
296296
{
297-
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == _tabId).Header = WebsiteUri;
297+
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == TabId).Header = WebsiteUri;
298298
}
299299
}
300300

Source/NETworkManager/ViewModels/IPScannerViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class IPScannerViewModel : ViewModelBase
3333

3434
private CancellationTokenSource _cancellationTokenSource;
3535

36-
private readonly int _tabId;
36+
public readonly int TabId;
3737
private bool _firstLoad = true;
3838

3939
private readonly DispatcherTimer _dispatcherTimer = new DispatcherTimer();
@@ -302,7 +302,7 @@ public IPScannerViewModel(IDialogCoordinator instance, int tabId, string hostOrI
302302

303303
_dialogCoordinator = instance;
304304

305-
_tabId = tabId;
305+
TabId = tabId;
306306
Host = hostOrIPRange;
307307

308308
// Host history
@@ -527,7 +527,7 @@ private async void StartScan()
527527
{
528528
foreach (var tabablzControl in VisualTreeHelper.FindVisualChildren<TabablzControl>(window))
529529
{
530-
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == _tabId).Header = Host;
530+
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == TabId).Header = Host;
531531
}
532532
}
533533

Source/NETworkManager/ViewModels/PingViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class PingViewModel : ViewModelBase
3131

3232
private CancellationTokenSource _cancellationTokenSource;
3333

34-
private readonly int _tabId;
34+
public readonly int TabId;
3535
private bool _firstLoad = true;
3636

3737
private readonly DispatcherTimer _dispatcherTimer = new DispatcherTimer();
@@ -309,7 +309,7 @@ public PingViewModel(IDialogCoordinator instance, int tabId, string host)
309309

310310
_dialogCoordinator = instance;
311311

312-
_tabId = tabId;
312+
TabId = tabId;
313313
Host = host;
314314

315315
// Set collection view
@@ -443,7 +443,7 @@ private async void StartPing()
443443
{
444444
foreach (var tabablzControl in VisualTreeHelper.FindVisualChildren<TabablzControl>(window))
445445
{
446-
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == _tabId).Header = Host;
446+
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == TabId).Header = Host;
447447
}
448448
}
449449

Source/NETworkManager/ViewModels/PortScannerViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class PortScannerViewModel : ViewModelBase
3030

3131
private CancellationTokenSource _cancellationTokenSource;
3232

33-
private readonly int _tabId;
33+
public readonly int TabId;
3434
private bool _firstLoad = true;
3535

3636
private readonly DispatcherTimer _dispatcherTimer = new DispatcherTimer();
@@ -300,7 +300,7 @@ public PortScannerViewModel(IDialogCoordinator instance, int tabId, string host,
300300

301301
_dialogCoordinator = instance;
302302

303-
_tabId = tabId;
303+
TabId = tabId;
304304
Host = host;
305305
Port = port;
306306

@@ -444,7 +444,7 @@ private async void StartScan()
444444
{
445445
foreach (var tabablzControl in VisualTreeHelper.FindVisualChildren<TabablzControl>(window))
446446
{
447-
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == _tabId).Header = Host;
447+
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == TabId).Header = Host;
448448
}
449449
}
450450

Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
using System.Windows;
1616
using NETworkManager.Models.PowerShell;
1717
using NETworkManager.Models.EventSystem;
18-
using MahApps.Metro.Controls;
1918

2019
namespace NETworkManager.ViewModels
2120
{

Source/NETworkManager/ViewModels/SNMPViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class SNMPViewModel : ViewModelBase
3232
private readonly DispatcherTimer _dispatcherTimer = new DispatcherTimer();
3333
private readonly Stopwatch _stopwatch = new Stopwatch();
3434

35-
private readonly int _tabId;
35+
public readonly int TabId;
3636

3737
private readonly bool _isLoading;
3838

@@ -403,7 +403,7 @@ public SNMPViewModel(IDialogCoordinator instance, int tabId, string host)
403403

404404
_dialogCoordinator = instance;
405405

406-
_tabId = tabId;
406+
TabId = tabId;
407407
Host = host;
408408

409409
// Set collection view
@@ -532,7 +532,7 @@ private async void Work()
532532
{
533533
foreach (var tabablzControl in VisualTreeHelper.FindVisualChildren<TabablzControl>(window))
534534
{
535-
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == _tabId).Header = Host;
535+
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == TabId).Header = Host;
536536
}
537537
}
538538

Source/NETworkManager/ViewModels/TracerouteViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class TracerouteViewModel : ViewModelBase
3232

3333
private CancellationTokenSource _cancellationTokenSource;
3434

35-
private readonly int _tabId;
35+
public readonly int TabId;
3636
private bool _firstLoad = true;
3737

3838
private readonly DispatcherTimer _dispatcherTimer = new DispatcherTimer();
@@ -241,7 +241,7 @@ public TracerouteViewModel(IDialogCoordinator instance, int tabId, string host)
241241

242242
_dialogCoordinator = instance;
243243

244-
_tabId = tabId;
244+
TabId = tabId;
245245
Host = host;
246246

247247
// Set collection view
@@ -397,7 +397,7 @@ private async void StartTrace()
397397
{
398398
foreach (var tabablzControl in VisualTreeHelper.FindVisualChildren<TabablzControl>(window))
399399
{
400-
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == _tabId).Header = Host;
400+
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == TabId).Header = Host;
401401
}
402402
}
403403

Source/NETworkManager/ViewModels/WhoisViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class WhoisViewModel : ViewModelBase
2424
#region Variables
2525
private readonly IDialogCoordinator _dialogCoordinator;
2626

27-
private readonly int _tabId;
27+
public readonly int TabId;
2828
private bool _firstLoad = true;
2929

3030
private readonly DispatcherTimer _dispatcherTimer = new DispatcherTimer();
@@ -188,7 +188,7 @@ public WhoisViewModel(IDialogCoordinator instance ,int tabId, string domain)
188188

189189
_dialogCoordinator = instance;
190190

191-
_tabId = tabId;
191+
TabId = tabId;
192192
Domain = domain;
193193

194194
// Set collection view
@@ -291,7 +291,7 @@ private async void Query()
291291
{
292292
foreach (var tabablzControl in VisualTreeHelper.FindVisualChildren<TabablzControl>(window))
293293
{
294-
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == _tabId).Header = Domain;
294+
tabablzControl.Items.OfType<DragablzTabItem>().First(x => x.Id == TabId).Header = Domain;
295295
}
296296
}
297297

Source/NETworkManager/Views/PowerShellHostView.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ public partial class PowerShellHostView
1212

1313
private bool _loaded;
1414

15-
1615
public PowerShellHostView()
1716
{
1817
InitializeComponent();

0 commit comments

Comments
 (0)