1

Windows フォームのラベルのテキスト プロパティを変更します。VS 2010 フォーム デザイナーでフォームを表示すると、正しい新しいラベルが表示されます。フォントの色も変えています。

プログラムを実行すると、ウィンドウに新しいテキスト値ではなく古いテキスト値が表示されます。フォームのラベルに新しいフォントの色が表示されます。

ソース コードに古いテキスト値が出現していないようです。古いテキスト値はまだどこに隠れていますか?

ソリューションをクリーンアップして再構築しましたが、何も変わりません。

4

2 に答える 2

0

Epilog:

"Brian" and "Blogbeard" both had the right direction in suggesting a hidden resource file.

Early in the execution of the code lay a method call to an obscure subsystem that no one knew anything about. That subsystem turned out to be a defunct language translation module which was supposed to translate all of the labels in a form from a native language to a target language.

It was configured to keep the original labels and their translations in a file outside the scope of the IDE. Changes in the form itself were completely ignored if the translator found the label name in its file.

Moving the form contents to another package effectively disabled the translator.

The elegant solution turned out to a three-line change that removed the method call to the translator. (it was no longer required in the application)

于 2013-08-15T01:17:23.867 に答える
0

ある同僚は、これがプロジェクトを VS2005 から vs2008 から VS2010 に変換する際のアーティファクトであることを観察し、「ブルート フォース」の是正措置を提案しました。

それは実際に働いた。

1) プロジェクトに新しい空白のフォームを作成します。

2) 元のフォームで、フォーム デザイナーの [編集] メニューを使用して、[すべて選択] および [コピー] アクションを使用します。これにより、すべてのフォーム オブジェクトがクリップボードにコピーされます。

3) クリップボードを空白のフォームに貼り付けます。

4) フォーム デザイナーによって生成されたものを除いて、古いフォームから新しいフォームにプログラム コード (ほとんど) をコピーします。

5) プロジェクトから古いフォームを削除します。新しいフォームを使用するために、必要に応じて変更を加えます

あまりエレガントではありませんが、締め切りに間に合わせるには適しています。

JHありがとう!

于 2013-08-09T21:35:09.353 に答える