資源簡介
看盤軟件源碼及實例 帶K線圖、帶數據源實例 股票軟件
帶數據源文件一份、
帶編譯好的程序一份(有源碼)、
帶全部源碼一份、
帶數據源處理工具一份(有源碼)
代碼片段和文件信息
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:\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—分析家數據讀取組件?V“?+?Version+“\n\n????????www.zhangwenzhang.com““關于“MessageBoxButtons.OK);
????????}
????????struct?fileStruct
????????{
????????????public?string?fileName;//文件名
????????????public?int?startAddressblockSizerecordSize;//起始地址,每塊長度,記錄長度
????????????public?bool?codeIsLong?isIndexDataStruct;???//codeIsLong索引中的代碼包含有市場代碼SH、SZ等;isIndexDataStruct象Day.Dat那樣的結構即由索引+數據組成;?
????????????public?string[]?fields;//字段
????????????public?fileStruct(DataTypes?fileType)
????????????{
????????????????fileName?=?““;
????????????????startAddress?=?0;
????????????????blockSize?=?0;
????????????????recordSize?=?0;
????????????????codeIsLong?=?false;
????????????????isIndexDataStruct?=?true;
????????????????string?fieldString?=?““;?//字段名,字段標簽,類型,長度字段,存儲順序,偏移量
????????????????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簡稱string32110;“?+
“py拼音string10242“;
????????????????????????break;
????????????????????#endregion
評論
共有 條評論