Exemplo n.º 1
0
        private void GetInstrument(SienItem si, bool isFirst)
        {
            InstrumentAtValSound iavs = new InstrumentAtValSound();
            iavs.isFirst = isFirst;
            string[] param = new string[6];
            string[] val = si.content.Split(',');
            for (int i = 0; i < param.Length; i++)
            {
                param[i] = val[i].Trim().Trim('\'');
            }

            if (!instCache.ContainsKey(si.content))
            {
                iavs.Start(
                    parent
                    , si
                    , param[0]
                    , param[1]
                    , Encoding.GetEncoding(param[2])
                    , param[3]
                    , param[4]
                    , param[5]
                    , GetInstrumentComp);
            }
            else
            {
                GetInstrumentComp(si, instCache[si.content]);
            }
        }
Exemplo n.º 2
0
        private void GetInstrument(SienItem si, TreeNode tns, bool isFirst)
        {
            if (setting.OfflineMode)
            {
                return;
            }

            InstrumentAtValSound iavs = new InstrumentAtValSound();

            iavs.isFirst  = isFirst;
            iavs.treenode = tns;
            string[] param = new string[6];
            string[] val   = si.content.Split(',');
            for (int i = 0; i < param.Length; i++)
            {
                param[i] = val[i].Trim().Trim('\'');
            }

            if (!instCache.ContainsKey(si.content))
            {
                iavs.Start(
                    parent
                    , si
                    , param[0]
                    , param[1]
                    , Encoding.GetEncoding(param[2])
                    , param[3]
                    , param[4]
                    , param[5]
                    , GetInstrumentCompTN);
            }
            else
            {
                GetInstrumentCompTN(si, tns, instCache[si.content]);
                update();//キャッシュがある場合はここでupdateして大丈夫
            }
        }