mirror of
https://github.com/fadden/6502bench.git
synced 2024-11-26 06:49:19 +00:00
Fix Edit Label tweak
The change in 779566 missed a step, so the TextChanged method wasn't getting called. (When you bind TextBox Text to a string property, the TextChanged events stop firing. You need to react to the property "set" call instead.) Also, enable UseKeepAliveHack. I have no reason to believe switching to WPF will make remoting less flaky.
This commit is contained in:
parent
0c5ae78eaf
commit
ed4fb0dd66
@ -174,6 +174,8 @@ namespace SourceGenWPF {
|
||||
|
||||
public MainController(MainWindow win) {
|
||||
mMainWin = win;
|
||||
|
||||
ScriptManager.UseKeepAliveHack = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -39,7 +39,7 @@ limitations under the License.
|
||||
<StackPanel Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<TextBlock Text="Enter label:"/>
|
||||
<TextBox Name="labelTextBox" Margin="0,2,0,0" FontFamily="{StaticResource GeneralMonoFont}"
|
||||
Text="{Binding LabelText}" TextChanged="LabelTextBox_TextChanged"/>
|
||||
Text="{Binding LabelText, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Name="maxLengthLabel" Text="• Must be 2-32 characters long (or blank to remove)"
|
||||
Margin="0,7,0,0"/>
|
||||
<TextBlock Name="firstLetterLabel" Text="• Must start with a letter or underscore"/>
|
||||
|
@ -63,6 +63,7 @@ namespace SourceGenWPF.WpfGui {
|
||||
get { return mLabelText; }
|
||||
set {
|
||||
mLabelText = value;
|
||||
LabelTextBox_TextChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
@ -116,7 +117,7 @@ namespace SourceGenWPF.WpfGui {
|
||||
labelTextBox.Focus();
|
||||
}
|
||||
|
||||
private void LabelTextBox_TextChanged(object sender, RoutedEventArgs e) {
|
||||
private void LabelTextBox_TextChanged() {
|
||||
string str = LabelText;
|
||||
bool valid = true;
|
||||
|
||||
|
@ -1003,7 +1003,7 @@ namespace SourceGenWPF.WpfGui {
|
||||
MenuItem recents = (MenuItem)sender;
|
||||
recents.Items.Clear();
|
||||
|
||||
Debug.WriteLine("COUNT is " + mMainCtrl.RecentProjectPaths.Count);
|
||||
//Debug.WriteLine("COUNT is " + mMainCtrl.RecentProjectPaths.Count);
|
||||
if (mMainCtrl.RecentProjectPaths.Count == 0) {
|
||||
MenuItem mi = new MenuItem();
|
||||
mi.Header = Res.Strings.PARENTHETICAL_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user