草庐IT

current_run

全部标签

c# - 可能到 "spin off"几个 GUI 线程? (不在 Application.Run 处停止系统)

我的目标我想要一个主处理线程(非GUI),并且能够根据需要在它们自己的后台线程中分离出GUI,并让我的主非GUI线程继续工作。换句话说,我希望我的主要非GUI线程成为GUI线程的所有者,而不是相反。我不确定使用Windows窗体是否可行(?)背景我有一个基于组件的系统,其中Controller动态加载程序集并实例化和运行实现通用IComponent接口(interface)的类,并使用单个方法DoStuff()。加载哪些组件是通过xml配置文件和添加包含IComponent不同实现的新程序集来配置的。这些组件向主应用程序提供实用功能。虽然主程序正在做它的事情,例如控制核电站时,组件可能

c# - 可能到 "spin off"几个 GUI 线程? (不在 Application.Run 处停止系统)

我的目标我想要一个主处理线程(非GUI),并且能够根据需要在它们自己的后台线程中分离出GUI,并让我的主非GUI线程继续工作。换句话说,我希望我的主要非GUI线程成为GUI线程的所有者,而不是相反。我不确定使用Windows窗体是否可行(?)背景我有一个基于组件的系统,其中Controller动态加载程序集并实例化和运行实现通用IComponent接口(interface)的类,并使用单个方法DoStuff()。加载哪些组件是通过xml配置文件和添加包含IComponent不同实现的新程序集来配置的。这些组件向主应用程序提供实用功能。虽然主程序正在做它的事情,例如控制核电站时,组件可能

c# - HttpContext.Current.User.Identity.Name 使用 IIS Express 但不是 Visual Studio Development Server 为空

这个问题在这里已经有了答案:AuthenticationissuewhendebugginginVS2013-iisexpress(9个回答)关闭4年前。HttpContext.Current.User.Identity.Name在VisualStudio设置为“使用本地IISWeb服务器”时为空,但在VisualStudio设置为“使用VisualStudio开发”时正常工作服务器”。希望您可以通过执行以下操作在VisualStudio2010或2012(我都尝试过)中重现此问题:创建一个新的“ASP.NET空Web应用程序”并选择“.NETFramework4”并将其命名为“Win

c# - HttpContext.Current.User.Identity.Name 使用 IIS Express 但不是 Visual Studio Development Server 为空

这个问题在这里已经有了答案:AuthenticationissuewhendebugginginVS2013-iisexpress(9个回答)关闭4年前。HttpContext.Current.User.Identity.Name在VisualStudio设置为“使用本地IISWeb服务器”时为空,但在VisualStudio设置为“使用VisualStudio开发”时正常工作服务器”。希望您可以通过执行以下操作在VisualStudio2010或2012(我都尝试过)中重现此问题:创建一个新的“ASP.NET空Web应用程序”并选择“.NETFramework4”并将其命名为“Win

c# - 为什么 Run.Text 默认绑定(bind)双向?

在.NET4.0中,Run.Text是可绑定(bind)的。所以我尝试绑定(bind)它:但是当我运行时,我得到了一个错误:“TwoWay或OneWayToSource绑定(bind)无法在类型为‘SomeNamespace.SomeClass’的只读属性‘DisplayText’上工作。”我的DisplayText属性确实是只读的,但运行也是如此——运行进入TextBlocks,您无法编辑。那么为什么我会收到这个错误呢?我用dotPeek深入研究了PresentationFramework果然:publicstaticreadonlyDependencyPropertyTextPro

c# - 为什么 Run.Text 默认绑定(bind)双向?

在.NET4.0中,Run.Text是可绑定(bind)的。所以我尝试绑定(bind)它:但是当我运行时,我得到了一个错误:“TwoWay或OneWayToSource绑定(bind)无法在类型为‘SomeNamespace.SomeClass’的只读属性‘DisplayText’上工作。”我的DisplayText属性确实是只读的,但运行也是如此——运行进入TextBlocks,您无法编辑。那么为什么我会收到这个错误呢?我用dotPeek深入研究了PresentationFramework果然:publicstaticreadonlyDependencyPropertyTextPro

c# - 如何在没有 Application.Run 的情况下从 VBE 加载项运行宏?

我正在为VBE编写COM加载项,其中一项核心功能涉及在单击命令栏按钮时执行现有的VBA代码。代码是用户编写的单元测试代码,在一个标准(.bas)模块中,如下所示:OptionExplicitOptionPrivateModule'@TestModulePrivateAssertAsNewRubberduck.AssertClass'@TestMethodPublicSubTestMethod1()'TODO:RenametestOnErrorGoToTestFail'Arrange:'Act:'Assert:Assert.InconclusiveTestExit:ExitSubTest

c# - 如何在没有 Application.Run 的情况下从 VBE 加载项运行宏?

我正在为VBE编写COM加载项,其中一项核心功能涉及在单击命令栏按钮时执行现有的VBA代码。代码是用户编写的单元测试代码,在一个标准(.bas)模块中,如下所示:OptionExplicitOptionPrivateModule'@TestModulePrivateAssertAsNewRubberduck.AssertClass'@TestMethodPublicSubTestMethod1()'TODO:RenametestOnErrorGoToTestFail'Arrange:'Act:'Assert:Assert.InconclusiveTestExit:ExitSubTest

c# - 错误 : The Out Parameter must be assigned before control leaves the current method

发送回参数时出现此错误Error:TheOutParametermustbeassignedbeforecontrolleavesthecurrentmethod代码是publicvoidGetPapers(stringweb,outintId1,outintId2){SqlConnectionconn=newSqlConnection(ConnectionString());conn.Open();SqlCommandcmd=newSqlCommand("GetPapers",conn);cmd.CommandType=CommandType.StoredProcedure;cmd.

c# - 错误 : The Out Parameter must be assigned before control leaves the current method

发送回参数时出现此错误Error:TheOutParametermustbeassignedbeforecontrolleavesthecurrentmethod代码是publicvoidGetPapers(stringweb,outintId1,outintId2){SqlConnectionconn=newSqlConnection(ConnectionString());conn.Open();SqlCommandcmd=newSqlCommand("GetPapers",conn);cmd.CommandType=CommandType.StoredProcedure;cmd.