Esempio n. 1
0
        public void Init(SmartQuant.DataObject dataObject, DateTime dateTime, string priceFormat, int instrumentId)
        {
            this.instrumentId = instrumentId;
            int decimalPlaces = 2;

            try
            {
                decimalPlaces = int.Parse(priceFormat[1].ToString());
            }
            catch
            {
            }
            if (dataObject == null)
            {
                this.dtpDateTime.Value = dateTime;
                this.Text = string.Format("New {0}", (object)this.ObjectName);
            }
            else
            {
                this.dtpDateTime.Value   = dateTime;
                this.dtpDateTime.Enabled = false;
                this.Text = string.Format("Edit {0}", (object)this.ObjectName);
            }
            this.OnInit(dataObject, decimalPlaces);
        }
Esempio n. 2
0
 protected override string[] GetCustomSubItems(int index)
 {
     SmartQuant.DataObject dataObject = this.dataSeries[(long)index];
     if (dataObject == null)
     {
         return new string[2]
                {
                    "-",
                    "-"
                }
     }
     ;
     return(new string[2]
     {
         dataObject.DateTime.ToString(this.dateTimeFormat),
         dataObject.ToString()
     });
 }
Esempio n. 3
0
 protected virtual void OnInit(SmartQuant.DataObject dataObject, int decimalPlaces)
 {
     throw new NotImplementedException();
 }