資源簡(jiǎn)介
看盤軟件源碼及實(shí)例 帶K線圖、帶數(shù)據(jù)源實(shí)例 股票軟件
帶數(shù)據(jù)源文件一份、
帶編譯好的程序一份(有源碼)、
帶全部源碼一份、
帶數(shù)據(jù)源處理工具一份(有源碼)
代碼片段和文件信息
using?System;
using?System.Collections;
using?System.Text;
using?System.IO;
using?System.Windows.Forms;
using?Microsoft.Win32;
namespace?FinData
{
????public?class?FxjData
????{
????????public?int?Error
????????{
????????????get
????????????{
????????????????if?(msg?!=?““)?return?1;
????????????????else?return?0;
????????????}
????????}
????????public?enum?DataTypes?{dmzxhqhqminfpgbcwgdjjzbjjzhcqcw0fbcj};
????????public?FxjData()
????????{
????????????//從注冊(cè)表中讀取分析家數(shù)據(jù)目錄,如c:\fxj\data
????????????RegistryKey?keyFxj;
????????????RegistryKey?keySoftware?=?Registry.LocalMachine.OpenSubKey(“Software“);
????????????keyFxj?=?keySoftware.OpenSubKey(“FXJ“);
????????????if?(keyFxj?==?null)
????????????{
????????????????keyFxj?=?keySoftware.OpenSubKey(“Huitianqi“);
????????????????if?(keyFxj?==?null)
????????????????{
????????????????????fxjDataPath?=?““;
????????????????????return;
????????????????}
????????????}
????????????RegistryKey?keySuperstk?=?keyFxj.OpenSubKey(“SUPERSTK“);
????????????if?(keySuperstk?!=?null)
????????????{
????????????????fxjDataPath?=?(string)keySuperstk.GetValue(“InstPath“);
????????????????if?(fxjDataPath?!=?““)
????????????????{
????????????????????fxjDataPath?+=?@“\DATA\“;
????????????????????fxjDataPath?=?fxjDataPath.ToUpper();
????????????????????return;
????????????????}
????????????}
????????}
????????public?string?Version
????????{
????????????get
????????????{
????????????????return?(“0.5“);
????????????}
????????}
????????public?void?ShowAbout()
????????{
????????????MessageBox.Show(“FinDataTools—分析家數(shù)據(jù)讀取組件?V“?+?Version+“\n\n????????www.zhangwenzhang.com““關(guān)于“MessageBoxButtons.OK);
????????}
????????struct?fileStruct
????????{
????????????public?string?fileName;//文件名
????????????public?int?startAddressblockSizerecordSize;//起始地址,每塊長(zhǎng)度,記錄長(zhǎng)度
????????????public?bool?codeIsLong?isIndexDataStruct;???//codeIsLong索引中的代碼包含有市場(chǎng)代碼SH、SZ等;isIndexDataStruct象Day.Dat那樣的結(jié)構(gòu)即由索引+數(shù)據(jù)組成;?
????????????public?string[]?fields;//字段
????????????public?fileStruct(DataTypes?fileType)
????????????{
????????????????fileName?=?““;
????????????????startAddress?=?0;
????????????????blockSize?=?0;
????????????????recordSize?=?0;
????????????????codeIsLong?=?false;
????????????????isIndexDataStruct?=?true;
????????????????string?fieldString?=?““;?//字段名,字段標(biāo)簽,類型,長(zhǎng)度字段,存儲(chǔ)順序,偏移量
????????????????switch?(fileType)
????????????????{
????????????????????#region?代碼表stkinfo51.dat
????????????????????case?DataTypes.dm:
????????????????????????fileName?=?“STKINFO51.DAT“;
????????????????????????startAddress?=?0x845898;
????????????????????????blockSize?=?0;
????????????????????????recordSize?=?248;
????????????????????????codeIsLong?=?false;
????????????????????????isIndexDataStruct?=?false;
????????????????????????fieldString?=
“dm代碼code1000;“?+
“jc簡(jiǎn)稱string32110;“?+
“py拼音string10242“;
????????????????????????break;
????????????????????#endregion
評(píng)論
共有 條評(píng)論