我的应用程序中有一个弹出窗口,它由组合框的选定值的更改激活。当我在 VS 2010 中调试时它工作正常,但当我在同一台计算机上使用 .exe 时它不会触发。
在使用 .exe 时,我应该使用弹出窗口的其他属性来使其保持打开状态吗?
private void trigger_mode_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
MODE = trigger_mode.SelectedValue.ToString();
switch (Convert.ToString(trigger_mode.SelectedValue))
{
case "triggerModeData":
Popup_data.Placement = System.Windows.Controls.Primitives.PlacementMode.Mouse;
Popup_data.StaysOpen = false;
Popup_data.Height = 200;
Popup_data.Width = 250;
Popup_data.IsOpen = true;
break;
case "triggerModeRepeat":
Popup_repeat.Placement = System.Windows.Controls.Primitives.PlacementMode.Mouse;
Popup_repeat.StaysOpen = false;
Popup_repeat.Height = 200;
Popup_repeat.Width = 250;
Popup_repeat.IsOpen = true;
break;
}
}
XAML 代码
<Popup x:Name="Popup_repeat" AllowsTransparency="True">
<StackPanel Background="BurlyWood">
<TextBlock TextWrapping="Wrap" Name ="T1" Text="Please enter the time interval between triggers in milliseconds"/>
<TextBox Name="T2" Text="Enter value here" KeyDown="T2_KeyDown"/>
<TextBlock TextWrapping="Wrap">
<TextBlock.Text>
Detail - In the trigger repeat the camera is triggered periodically with a specific time interval.
Please enter the time between each triggers in the textbox above by first deletign the line 'Enter value here'
and put the time interval value in milliseconds.
</TextBlock.Text>
</TextBlock>
</StackPanel>
</Popup>
<Popup x:Name="Popup_data" AllowsTransparency="True">
<StackPanel Background="BurlyWood">
<TextBlock Name ="T3" TextWrapping="Wrap" Text="Please enter the time to wait after trigger in milliseconds."/>
<TextBox Name="T4" Text="Enter value here" KeyDown="T4_KeyDown"/>
<TextBlock TextWrapping="Wrap">
<TextBlock.Text>
Detail - In the data trigger mode the camera waits a certain time after a mechanical pre-trigger and
then sends a trigger to the camera to take a picture after that interval. If you are using this mode.
Enter the time the camera has to wait after the trigger in teh textbox by first deleting the text
'Enter value here' and thentype in the interval time in milliseconds"
</TextBlock.Text>
</TextBlock>
</StackPanel>
</Popup>