首页 \ 问答 \ Matlab GUI回调开始和完成(Matlab GUI Callback Start and Completion)

Matlab GUI回调开始和完成(Matlab GUI Callback Start and Completion)

是否有一种通用的方法来确定Matlab GUI回调函数何时开始然后又返回给调度程序?

我希望在回调运行完成时锁定用户交互,并在回调运行时显示忙状态。 在我可以插入此代码的地方是否可以访问调度程序,或者我是否必须将其放入每个回调函数中。

我知道模态等待栏但我想尽可能避免使用它。 (他们不能优雅地被杀死。)


Is there a general purpose way to determine when a Matlab GUI callback function begins and then has returned to the dispatcher?

I want to lock out user interaction while callbacks are running to completion and also show busy status while callbacks are running. Is there a dispatcher accessible where I can insert this code, or do I have to put it into every callback function.

I am aware of the modal waitbar but I want to avoid using that as much as possible. (They can't be killed gracefully.)


原文:https://stackoverflow.com/questions/38797930
更新时间:2022-06-26 18:06

最满意答案

我建议为此实现抽象基类控制器类:

public abstract class BaseController : Controller
{
    public ILog Log
    {
        get { return LogManager.GetLogger(GetType()); }
    }
}

I would suggest to implement abstract base controller class for this purpose:

public abstract class BaseController : Controller
{
    public ILog Log
    {
        get { return LogManager.GetLogger(GetType()); }
    }
}

相关问答

更多
  • 我建议为此实现抽象基类控制器类: public abstract class BaseController : Controller { public ILog Log { get { return LogManager.GetLogger(GetType()); } } } I would suggest to implement abstract base controller class for this purpose: public abstract cl ...
  • 我只是在猜测,但您指定的格式不是用于评论,而是用于内联文档。 您可以修改T4模板以获得您喜欢的编码风格。 I'm only guessing, but the format you specified is not for comments, but for inline documentation. You do have the ability to modify the T4 templates to get the coding style you prefer.
  • 我认为这取决于你的网站将会有多大。 为您的控制器提供逻辑名是最重要的部分,让您的源代码易于导航非常重要。 一般而言,如果您不确定,我认为最好从CRUD书中抽出一部分,特别是如果您正在处理支持它的数据模型。 对于某个特定的模块(比如产品),您将有一个负责创建,读取,更新和删除(以及查看索引)的控制器。 如果你的网站比较少CRUDDY(比如Stack Overflow),那么把控制器分成逻辑区域(比如“PostController”,“SearchController”等等)可能会更有用,但它确实取决于你的网站 ...
  • 您无法使用ViewData将变量从控制器发送到另一个控制器。 可以使用“成功验证”执行,请调用以下方法 return RedirectToAction("ActionName", "ControllerName", new {variable1 = value1, variable2 = value2/*...etc*/}); You cannot use ViewData for send a variable from a controller to another controller. Can b ...
  • 由于自定义用户路由具有所需的灵活性,因此当用户路由过于通用时,最终会出现路由冲突,这将使其与其他站点路由匹配并导致路由冲突。 在基于约定的路由之前检查属性路由,因此商店控制器将捕获所有请求。 如果您希望用户路由位于站点的根目录,则需要在此情况下使用基于约定的路由。 这是因为路由添加到路由表的顺序很重要,因为一般路由将在更专业/目标路由之前匹配。 考虑混合属性路由和基于约定的路由,其中自定义用户路由将使用基于约定的路由,而其他控制器将使用属性路由。 [RoutePrefix("Home")] public c ...
  • 使用MVC2,您现在可以直接在视图中呈现操作。 如果不是从同一个控制器渲染,则需要指定操作所在的控制器。 如果以这种方式包含部分视图,则部分视图可以位于控制器的视图文件夹中(而不是共享)。 请注意,它不会从当前操作获取ViewData - 只有您正在调用的操作设置的ViewData。 <% Html.RenderAction( "GetCategoriesPartial", "Category" ) %> 要么 <%= Html.Action( "GetCategoriesPartial", "Categ ...
  • 你可以发布你的控制器工厂吗? 我不明白为什么Castle会工作,因为我认为你也会为GetControllerInstance的Type参数传入null,而不管你在该方法中使用的DI框架。 MVC负责将URL中控制器的字符串名称与实际类型进行匹配(除非您也过度使用这些方法)。 所以我猜它不是DI框架,但MVC由于某种原因找不到你的控制器类。 Can you post your controller factory? I don't understand why Castle would work since ...
  • 好吧,我不知道发生了什么,但我从今天早上重新克隆了git存储库,它现在工作正常。 我可以添加扩展,或使其无扩展,它仍然有效。 不知何故,有些东西被搞砸了。 不管怎么说,还是要谢谢你。 我现在只需要将今天完成的所有工作移植到新版本。 Well, I don't know what happened, but I re-cloned the git repository from this morning and it now works fine. I can add the extension, or ma ...
  • 你为什么要那样做? 对我来说,控制器绑定到某个模型,而不是某种类型的输出格式。 public ActionResult Users() { var users = _repository.Find(); var viewModel = Mapper.Map(users); // automapper or similar return Request.IsAjax() ? Json(viewModel) : View(viewModel); } 要回答您的更新 最好创建一个Cu ...
  • 包含两个版本的jquery(1.5然后是1.7)是很尴尬的,你必须找到正确的顺序并且只有一个jquery包含。 也许用另一个替换1.5? It is awkward to include two versions of jquery (1.5 and then 1.7), you have to find the right order and have only one jquery include. Maybe replacing the 1.5 by another one ?

相关文章

更多

最新问答

更多
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • 电脑高中毕业学习去哪里培训
  • 电脑系统专业就业状况如何啊?
  • IEnumerable linq表达式(IEnumerable linq expressions)
  • 如何在Spring测试中连接依赖关系(How to wire dependencies in Spring tests)
  • Solr可以在没有Lucene的情况下运行吗?(Can Solr run without Lucene?)
  • 如何保证Task在当前线程上同步运行?(How to guarantee that a Task runs synchronously on the current thread?)
  • 在保持每列的类的同时向数据框添加行(Adding row to data frame while maintaining the class of each column)
  • 的?(The ? marks in emacs/haskell and ghc mode)
  • 一个线程可以调用SuspendThread传递自己的线程ID吗?(Can a thread call SuspendThread passing its own thread ID?)
  • 延迟socket.io响应,并“警告 - websocket连接无效”(Delayed socket.io response, and “warn - websocket connection invalid”)
  • 悬停时的图像转换(Image transition on hover)
  • IIS 7.5仅显示homecontroller(IIS 7.5 only shows homecontroller)
  • 没有JavaScript的复选框“关闭”值(Checkbox 'off' value without JavaScript)
  • java分布式框架有哪些
  • Python:填写表单并点击按钮确认[关闭](Python: fill out a form and confirm with a button click [closed])
  • PHP将文件链接到根文件目录(PHP Linking Files to Root File Directory)
  • 我如何删除ListView中的项目?(How I can remove a item in my ListView?)
  • 您是否必须为TFS(云)中的每个BUG创建一个TASK以跟踪时间?(Do you have to create a TASK for every BUG in TFS (Cloud) to track time?)
  • typoscript TMENU ATagParams小写(typoscript TMENU ATagParams lowercase)
  • 武陟会计培训类的学校哪个好点?
  • 从链接中删除文本修饰(Remove text decoration from links)