#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);
|
};
|