admin
2025-07-17 6cd92a169cbc0db35042f243a09d976fd3e1445c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#pragma once
#include "../common/CMyListCtrl.h"
#include <list>
#include <string>
#include "SellManager.h"
#include "DataStruct.h"
using namespace std;
#define COLOR_RED 2
#define COLOR_DEFAULT 0
 
 
 
// SellRuleDlg 对话框
 
class SellRuleDlg : public CDialogEx
{
    DECLARE_DYNAMIC(SellRuleDlg)
 
public:
    SellRuleDlg(CString code, CString volume, CWnd* pParent = nullptr);   // 标准构造函数
    virtual ~SellRuleDlg();
 
// 对话框数据
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_DIALOG_SELL_RULE };
#endif
 
 
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
 
    DECLARE_MESSAGE_MAP()
 
 
 
private:
    
    CString initCode;
    CString initVolume;
    list<SellRule> ruleList;
    map<string, string> codePriceMap;
    void showDetail(SellRule rule);
    void initView();
    static void requestListRules(SellRuleDlg *app);
    void initEndTime3();
    CodePosition getCodePosition(string code);
    // 显示买1的金额
    void showBuy1Money(string code);
 
 
 
public:
    CStatic labelID;
    CEdit editCode;
    CEdit editBuy1Volume;
    CEdit editSellVolume;
    CEdit editEndTime;
    CButton btnClear;
    CButton btnDel;
    CButton btnAdd;
    afx_msg void OnBnClickedButtonClear();
    afx_msg void OnBnClickedButtonDelete();
    afx_msg void OnBnClickedButtonAdd();
    virtual BOOL OnInitDialog();
    CMyListCtrl listRules;
    afx_msg void OnLvnItemchangedListRules(NMHDR* pNMHDR, LRESULT* pResult);
    afx_msg void OnNMCustomdrawListRules(NMHDR* pNMHDR, LRESULT* pResult);
    CComboBox comboSellPriceType;
    static std::list<string> get_price_types();
 
    CEdit editCode1;
    CEdit editBuy1Price1;
    CEdit editSellVolume1;
    CComboBox comboSellPriceType1;
    CEdit editEndTime1;
    CStatic labelId1;
    afx_msg void OnBnClickedButtonClear2();
    afx_msg void OnBnClickedButtonDelete2();
    afx_msg void OnBnClickedButtonAdd2();
    afx_msg void OnClose();
    afx_msg void OnBnClickedButtonUpdate();
    afx_msg void OnBnClickedButtonUpdate2();
    afx_msg void OnBnClickedButtonFillVolume();
    CStatic labelID3;
    CEdit editCode3;
    CEdit editBuy1Volume3;
    CEdit editEndTime3;
    afx_msg void OnBnClickedButtonClear3();
    afx_msg void OnBnClickedButtonDelete4();
    afx_msg void OnBnClickedButtonUpdate3();
    afx_msg void OnBnClickedButtonAdd3();
    afx_msg void OnBnClickedButtonFillVolume2();
    CStatic labelPosition;
    CStatic labelPosition1;
    afx_msg void OnBnClickedButtonGetPosition();
    afx_msg void OnBnClickedButtonGetPosition2();
    CStatic labelBuy1Money;
    virtual BOOL PreTranslateMessage(MSG* pMsg);
};