设置访问者不设置值 [英] Set accessor not setting value

查看:71
本文介绍了设置访问者不设置值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个状态栏并创建了一个文本框来对此进行双重测试,但是当我执行MessageBox.Show(value)时,正在发送该值;它显示传递的值但尚未设置。有谁能解释为什么?这是我的代码。 MainGUI是一个部分类:Form。这有什么不同吗?


MainGUI类

I have a statusbar and created a textbox to double test this however the value is being sent as I did a MessageBox.Show(value); and it shows the value being passed yet it is not being set. Can anyone explain why? Here is my code. The MainGUI is a partial class with : Form. Does that make a difference?

MainGUI Class

展开 | 选择 | Wrap | 行号

推荐答案

你这样做多快?有时你需要在对象上调用.Update()以确保它被重新绘制?
How fast are you doing this? sometimes you need to call .Update() on the object to make sure it gets re-drawn?

在Database.cs中的


我现在有了
in Database.cs I now have
展开 < span class =codeDivider> | 选择 | Wrap | Line数字


哈哈哈我觉得我有它。

您正在该数据库调用中创建一个新的maingui类实例,而不是更改一个已经显示。
Hahaha I think I have it.
You are creating a NEW instance of your maingui class in that database call, not changing the one that is already shown.


这篇关于设置访问者不设置值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆