Example #1
0
        private void Ok_Click(object sender, RoutedEventArgs e)
        {
            var secId = new SecurityId();

            //{
            //	SecurityCode = SecCode.Text,
            //};

            if (!BoardName.Text.IsEmpty())
            {
                secId.BoardCode = BoardName.Text;
            }

            if (!ContractId.Text.IsEmpty())
            {
                secId.Native = ContractId.Text.To <int>();
            }

            MainWindow.Instance.Trader.LookupSecurities(new SecurityLookupMessage
            {
                SecurityId    = secId,
                Name          = SecCode.Text,
                Currency      = CurrencyTypes.USD,
                SecurityType  = SecType.GetSelectedValue <SecurityTypes>() ?? default(SecurityTypes),
                TransactionId = MainWindow.Instance.Trader.TransactionIdGenerator.GetNextId(),
            });
            DialogResult = true;
        }
Example #2
0
        public FindSecurityWindow()
        {
            InitializeComponent();
            SecType.SetDataSource <SecurityTypes>();

            SecCode.Text = "AAPL";
            //SecType.SelectedValue = SecurityTypes.Stock;
            BoardName.Text = "SMART";
        }
Example #3
0
 public WebSecSystem(Server servername, string name, int level, string status, float timer, float cooldown, SecType type)
 {
     ServerName = servername;
     Name       = name;
     Level      = level;
     Status     = status;
     Timer      = timer;
     Cooldown   = cooldown;
     Type       = type;
 }
Example #4
0
        public override bool Equals(object obj)
        {
            var other = obj as ExecutionCondition;

            if (other == null)
            {
                return(false);
            }

            return(base.Equals(obj) &&
                   Exchange.Equals(other.Exchange) &&
                   SecType.Equals(other.SecType) &&
                   Symbol.Equals(other.Symbol));
        }
Example #5
0
    public override bool Equals(object?obj)
    {
        ExecutionCondition?other = obj as ExecutionCondition;

        if (other == null)
        {
            return(false);
        }

        return(base.Equals(obj) &&
               Exchange.Equals(other.Exchange, System.StringComparison.Ordinal) &&
               SecType.Equals(other.SecType, System.StringComparison.Ordinal) &&
               Symbol.Equals(other.Symbol, System.StringComparison.Ordinal));
    }
Example #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ClientId;
         hashCode = (hashCode * 397) ^ (AcctCode != null ? AcctCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Time != null ? Time.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Symbol != null ? Symbol.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SecType != null ? SecType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Exchange != null ? Exchange.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Side != null ? Side.GetHashCode() : 0);
         return(hashCode);
     }
 }
Example #7
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Market != 0)
            {
                hash ^= Market.GetHashCode();
            }
            if (SecType != 0)
            {
                hash ^= SecType.GetHashCode();
            }
            hash ^= securityList_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #8
0
 public override int GetHashCode()
 {
     return(base.GetHashCode() + Exchange.GetHashCode() + SecType.GetHashCode() + Symbol.GetHashCode());
 }