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); }
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() }); }
protected virtual void OnInit(SmartQuant.DataObject dataObject, int decimalPlaces) { throw new NotImplementedException(); }