Example #1
0
        public string get_underlyingInfo(string code, InfoType infoType)
        {
            try
            {
                Excel_marketDataSymbol e_mds = Excel_marketDataSymbol.getDefinedSymbol(code);

                Excel_underlyingInfoViewModel e_uivm = e_mds.underlyingInfoVM();

                string vba_desc = e_uivm.vba_desciption();

                return(this.infoParsing(vba_desc, infoType));
            }
            catch (Exception e)
            {
                return("add fail : " + e.Message);
            }
        }
Example #2
0
        public string get_symbol_info(string code, InfoType infoType)
        {
            try
            {
                Excel_marketDataSymbol e_mds = Excel_marketDataSymbol.getDefinedSymbol(code);

                string vba_desc = e_mds.vba_desciption();

                return(this.infoParsing(vba_desc, infoType));
            }
            catch (Exception e)
            {
                string errStr = "get schdule info fail: " + e.Message;

                return(errStr);
            }
        }
Example #3
0
        //public string underlyingList()
        //{
        //    try
        //    {
        //        return "set complete";
        //    }
        //    catch (Exception e)
        //    {
        //        return "add fail : " + e.Message;
        //    }
        //}

        //public string get_definedUnderlyingList()
        //{
        //    try
        //    {
        //        return "set complete";
        //    }
        //    catch (Exception e)
        //    {
        //        return "add fail : " + e.Message;
        //    }
        //}

        public string get_whole_underlying(InfoType infoType)
        {
            try
            {
                StringBuilder sb = new StringBuilder();

                List <Excel_marketDataSymbol> e_mdsList = Excel_marketDataSymbol.getDefinedSymbolALL();

                foreach (var item in e_mdsList)
                {
                    sb.Append(this.infoParsing(item.vba_desciption(), infoType) + "\n");
                }

                return(sb.ToString());
            }
            catch (Exception e)
            {
                return("whole underlying load fail : " + e.Message);
            }
        }
Example #4
0
        public string find_underlying(string filter, InfoType infoType)
        {
            try
            {
                StringBuilder sb = new StringBuilder();

                List <Excel_marketDataSymbol> e_mdsList = Excel_marketDataSymbol.getDefinedSymbolFiltering(filter);

                foreach (var item in e_mdsList)
                {
                    sb.Append(this.infoParsing(item.vba_desciption(), infoType) + ";");
                }

                //return "fild complete : " + e_mdsList.Count;
                return(sb.ToString());
            }
            catch (Exception e)
            {
                return("fild fail : " + e.Message);
            }
        }