示例#1
0
        /// <summary>
        /// Speichert Wertpapierdaten in eine Datei
        /// </summary>
        /// <param name="strPathAndName">Dateiname der zu schreibenden Datei</param>
        public void Save(string strPathAndName)
        {
            EasyStoreWriter easystore = new EasyStoreWriter();

            easystore.Open(strPathAndName);
            easystore.BeginSection("META");
            easystore.WriteKeyValue("NAME", this.Name);
            easystore.WriteKeyValue("SHORTNAME", this.ShortName);
            easystore.WriteKeyValue("ISIN", this.ISIN);
            easystore.WriteKeyValue("WKN", this.WKN);
            easystore.WriteKeyValue("SYMBOL", this.Symbol);
            easystore.WriteKeyValue("BONUSLEVEL", this.BonusLevel.ToString());
            easystore.WriteKeyValue("CAP", this.Cap.ToString());
            easystore.WriteKeyValue("KNOCKOUT", this.KnockOut.ToString());
            easystore.WriteKeyValue("EXPIRE", this.Expire.ToString());
            easystore.WriteKeyValue("RATIO", this.Ratio.ToString());
            easystore.EndSection();

            easystore.BeginSection("CLOSE");
            SaveQuotes(easystore, m_QuotesClose);
            easystore.EndSection();

            easystore.BeginSection("LOW");
            SaveQuotes(easystore, m_QuotesLow);
            easystore.EndSection();

            easystore.Close();
        }
示例#2
0
 /// <summary>
 /// Speichert Kursdaten aus der Datei
 /// </summary>
 private void SaveQuotes(EasyStoreWriter easystore, DataContainer quotes)
 {
     foreach (WorkDate workdate in quotes.Dates)
     {
         double dValue = Math.Round(quotes[workdate], 2);
         easystore.WriteKeyValue(workdate.ToString(), dValue.ToString());
     }
 }