mirror of
https://github.com/StockSharp/StockSharp.git
synced 2026-12-06 17:42:13 +00:00
41 lines
707 B
C#
41 lines
707 B
C#
namespace SampleFix
|
|
{
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
using Ecng.Common;
|
|
|
|
using StockSharp.BusinessEntities;
|
|
|
|
public partial class FindSecurityWindow
|
|
{
|
|
public FindSecurityWindow()
|
|
{
|
|
InitializeComponent();
|
|
|
|
SecCode.Text = "RI";
|
|
}
|
|
|
|
private void Ok_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var criteria = new Security
|
|
{
|
|
Code = SecCode.Text,
|
|
Type = SecType.SelectedType
|
|
};
|
|
|
|
MainWindow.Instance.Trader.LookupSecurities(criteria);
|
|
DialogResult = true;
|
|
}
|
|
|
|
private void SecCode_TextChanged(object sender, TextChangedEventArgs e)
|
|
{
|
|
TryEnableOk();
|
|
}
|
|
|
|
private void TryEnableOk()
|
|
{
|
|
Ok.IsEnabled = !SecCode.Text.IsEmpty();
|
|
}
|
|
}
|
|
} |