diff --git a/ERR/ERR2025-07-24.txt b/ERR/ERR2025-07-24.txt new file mode 100644 index 0000000..64da27d --- /dev/null +++ b/ERR/ERR2025-07-24.txt @@ -0,0 +1,20 @@ +[2025-07-24 21:48:12];[Error] || + +[2025-07-24 21:48:12];[Error source] ||.Net SqlClient Data Provider + +[2025-07-24 21:48:12];[Error message] ||在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - 无法打开到 SQL Server 的连接) + +[2025-07-24 21:48:12];[Error area] || 在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) + 在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) + 在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) + 在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) + 在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) + 在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) + 在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) + 在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) + 在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + 在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + 在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) + 在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) + 在 System.Data.SqlClient.SqlConnection.Open() + 在 SunlightCentralizedControlManagement_SCCM_.ViewModel.ManualDyelotModel..ctor() 位置 C:\Users\Administrator\source\repos\SunlightCentralizedControlManagement(SCCM)\ViewModel\ManualDyelotModel.cs:行号 35 diff --git a/SunlightCentralizedControlManagement_SCCM_.csproj b/SunlightCentralizedControlManagement_SCCM_.csproj index aebe678..0e83eae 100644 --- a/SunlightCentralizedControlManagement_SCCM_.csproj +++ b/SunlightCentralizedControlManagement_SCCM_.csproj @@ -140,6 +140,9 @@ DispenseMacInfo.xaml + + UserInformation.xaml + @@ -268,6 +271,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/View/MonitorView.xaml.cs b/View/MonitorView.xaml.cs index 8de2d10..906b9e7 100644 --- a/View/MonitorView.xaml.cs +++ b/View/MonitorView.xaml.cs @@ -69,6 +69,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.View IsInteractive = false; DATA_view(); + UserInformation userInformation = new UserInformation(); + userInformation.Show(); } private string machine; diff --git a/ViewModel/MainWindowViewModel.cs b/ViewModel/MainWindowViewModel.cs index d0196d8..eb4a54d 100644 --- a/ViewModel/MainWindowViewModel.cs +++ b/ViewModel/MainWindowViewModel.cs @@ -76,7 +76,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel public static UserControls.info[] inf = new UserControls.info[999]; //定义总览信息卡 public static int ERR_c = 0;//错误计数器 public static bool[] USER_Capacity { set; get; } = new bool[99]; - private SpeechSynthesizer synth = new SpeechSynthesizer();//语音 + // private SpeechSynthesizer synth = new SpeechSynthesizer();//语音 public MainWindowViewModel() { @@ -91,8 +91,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel SN_KEY = Configini.IniReadvalue("SN", "SN1"); DyelotsDispenser = Convert.ToBoolean(Configini.IniReadvalue("SYS", "DyelotsDispenser")); - synth.Rate = int.Parse( Configini.IniReadvalue("VOICE", "V1")); - synth.Volume = int.Parse( Configini.IniReadvalue("VOICE", "V2")); + // synth.Rate = int.Parse( Configini.IniReadvalue("VOICE", "V1")); + // synth.Volume = int.Parse( Configini.IniReadvalue("VOICE", "V2")); + } catch (Exception ex) { LogGing.ERRDATA(ex); } @@ -108,6 +109,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel CountDown(); TcpClientNEW(); SQL_LINK(); + } public static void USERCapacity(string user) //权限 { diff --git a/WindowsView/UserInformation.xaml b/WindowsView/UserInformation.xaml new file mode 100644 index 0000000..7edf53a --- /dev/null +++ b/WindowsView/UserInformation.xaml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + +