-
Notifications
You must be signed in to change notification settings - Fork 0
/
DetailDialog.cpp
100 lines (91 loc) · 2.67 KB
/
DetailDialog.cpp
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
100
// DetailDialog.cpp : 实现文件
//
#include "stdafx.h"
#include "radio.h"
#include "DetailDialog.h"
#include "afxdialogex.h"
#include <fstream>
#include "iostream"
using namespace std;
// CDetailDialog 对话框
IMPLEMENT_DYNAMIC(CDetailDialog, CDialogEx)
CDetailDialog::CDetailDialog(CWnd* pParent /*=NULL*/)
: CDialogEx(CDetailDialog::IDD, pParent)
, Longitude(73.1611)
, Latitude(51.7756)
, AntennaHeight(5.0)
, Power(0.05)
, Frequentcy(10)
, BandWidth(1000)
, DataRate(250000)
{
}
CDetailDialog::~CDetailDialog()
{
}
BEGIN_MESSAGE_MAP(CDetailDialog, CDialogEx)
ON_BN_CLICKED(IDOK, &CDetailDialog::OnBnClickedOk)
ON_BN_CLICKED(IDCANCEL, &CDetailDialog::OnBnClickedCancel)
END_MESSAGE_MAP()
void CDetailDialog::OnBnClickedOk()
{
// ::MessageBox(NULL,getContent(&m_bound),_T("带宽"),MB_OK);
// ::MessageBox(NULL,getContent(&m_freq),_T("频率"),MB_OK);
// ::MessageBox(NULL,getContent(&m_height),_T("高度"),MB_OK);
// ::MessageBox(NULL,getContent(&m_ratio),_T("比特率"),MB_OK);
// ::MessageBox(NULL,getContent(&longitude),_T("经度"),MB_OK);
// ::MessageBox(NULL,getContent(&latitude),_T("纬度"),MB_OK);
// ::MessageBox(NULL,getContent(&m_power),_T("功率"),MB_OK);
// // TODO: 在此添加控件通知处理程序代码
UpdateData(true);
FindBoundary(Longitude,Latitude,AntennaHeight,Power,Frequentcy,BandWidth,DataRate);
CDialogEx::OnOK();
}
void CDetailDialog::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
/*DDX_Control(pDX, IDC_EDIT3, m_bound);
DDX_Control(pDX, IDC_EDIT6, m_freq);
DDX_Control(pDX, IDC_EDIT2, m_height);
DDX_Control(pDX, IDC_EDIT4, m_ratio);
DDX_Control(pDX, IDC_EDIT5, longitude);
DDX_Control(pDX, IDC_EDIT1, latitude);
DDX_Control(pDX, IDC_EDIT7, m_power);*/
DDX_Text(pDX, IDC_EDIT5, Longitude);
DDX_Text(pDX, IDC_EDIT1, Latitude);
DDX_Text(pDX, IDC_EDIT2, AntennaHeight);
DDX_Text(pDX, IDC_EDIT7, Power);
DDX_Text(pDX, IDC_EDIT6, Frequentcy);
DDX_Text(pDX, IDC_EDIT3, BandWidth);
DDX_Text(pDX, IDC_EDIT4, DataRate);
}
/*void CDetailDialog::getValueFromEdit() {
longitude.GetWindowText(Strlongitude);
latitude.GetWindowText(Strlatitude);
m_height.GetWindowText(Strm_height);
m_power.GetWindowText(Strm_power);
m_bound.GetWindowText(Strm_bound);
m_freq.GetWindowText(Strm_freq);
m_ratio.GetWindowText(Strm_ratio);
lo=_wtof(Strlongitude);
la=_wtof(Strlatitude);
h=_wtof(Strm_height);
p=_wtof(Strm_power);
b=_wtof(Strm_bound);
f=_wtof(Strm_freq);
r=_wtof(Strm_ratio);
cout<<lo<<la<<h<<p<<b<<f<<r<<endl;
}
*/
/*CString CDetailDialog::getContent(CEdit* pEdit) {
CString str;
pEdit->GetWindowText(str);
return str;
}
*/
// CDetailDialog 消息处理程序
void CDetailDialog::OnBnClickedCancel()
{
// TODO: 在此添加控件通知处理程序代码
CDialogEx::OnCancel();
}