new stuff
This commit is contained in:
@@ -10,6 +10,7 @@ using ShadowStream.ObjecktForJason;
|
||||
using ShadowStream.Views;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Management;
|
||||
using System.Net.Mime;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -82,11 +83,17 @@ public partial class MainWindow : Window
|
||||
|
||||
#endregion
|
||||
//code start
|
||||
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
|
||||
private async void MainWindow_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FirstCat?.Focus();
|
||||
await Task.Yield(); // ← this forces back to UI thread if needed
|
||||
|
||||
LoadSavedData(); // ← now runs on the UI thread
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
#region Init wpf
|
||||
@@ -123,6 +130,14 @@ public partial class MainWindow : Window
|
||||
#endregion
|
||||
|
||||
#region BlutuethLogic
|
||||
|
||||
bool bt = new bool();
|
||||
using (var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PnPEntity WHERE Caption LIKE '%Bluetooth%'"))
|
||||
{
|
||||
var collection = searcher.Get();
|
||||
bt = collection.Count > 0;
|
||||
}
|
||||
if(bt)
|
||||
InitBluetoothServer();
|
||||
#endregion
|
||||
|
||||
@@ -150,8 +165,6 @@ public partial class MainWindow : Window
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
LoadSavedData();
|
||||
|
||||
}
|
||||
//Quinn
|
||||
|
Reference in New Issue
Block a user