OSDN Git Service

Add EnableSaveRestore at some dialog.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / MergeDlg.cpp
1 // MergeDlg.cpp : implementation file\r
2 //\r
3 \r
4 #include "stdafx.h"\r
5 \r
6 #include "Git.h"\r
7 #include "TortoiseProc.h"\r
8 #include "MergeDlg.h"\r
9 \r
10 \r
11 #include "Messagebox.h"\r
12 // CMergeDlg dialog\r
13 \r
14 IMPLEMENT_DYNAMIC(CMergeDlg, CResizableStandAloneDialog)\r
15 \r
16 CMergeDlg::CMergeDlg(CWnd* pParent /*=NULL*/)\r
17         : CResizableStandAloneDialog(CMergeDlg::IDD, pParent),\r
18         CChooseVersion(this)\r
19 {\r
20 \r
21 }\r
22 \r
23 CMergeDlg::~CMergeDlg()\r
24 {\r
25 }\r
26 \r
27 void CMergeDlg::DoDataExchange(CDataExchange* pDX)\r
28 {\r
29         CDialog::DoDataExchange(pDX);\r
30 \r
31         CHOOSE_VERSION_DDX;\r
32 \r
33         DDX_Check(pDX,IDC_CHECK_NOFF,this->m_bNoFF);\r
34         DDX_Check(pDX,IDC_CHECK_SQUASH,this->m_bSquash);\r
35 }\r
36 \r
37 \r
38 BEGIN_MESSAGE_MAP(CMergeDlg, CResizableStandAloneDialog)\r
39         CHOOSE_VERSION_EVENT\r
40         ON_BN_CLICKED(IDOK, &CMergeDlg::OnBnClickedOk)\r
41 END_MESSAGE_MAP()\r
42 \r
43 \r
44 BOOL CMergeDlg::OnInitDialog()\r
45 {\r
46         CResizableStandAloneDialog::OnInitDialog();\r
47 \r
48 \r
49         CHOOSE_VERSION_ADDANCHOR;\r
50 \r
51         AddAnchor(IDC_GROUP_OPTION, TOP_LEFT, TOP_RIGHT);\r
52 \r
53         \r
54         AddAnchor(IDOK,BOTTOM_RIGHT);\r
55         AddAnchor(IDCANCEL,BOTTOM_RIGHT);\r
56 \r
57 \r
58         CheckRadioButton(IDC_RADIO_BRANCH,IDC_RADIO_VERSION,IDC_RADIO_BRANCH);\r
59 \r
60         Init();\r
61         \r
62         this->SetDefaultChoose(IDC_RADIO_BRANCH);\r
63         \r
64         EnableSaveRestore(_T("MergeDlg"));\r
65 \r
66         return TRUE;\r
67 }\r
68 \r
69 // CMergeDlg message handlers\r
70 \r
71 \r
72 void CMergeDlg::OnBnClickedOk()\r
73 {\r
74         // TODO: Add your control notification handler code here\r
75         this->UpdateData(TRUE);\r
76         \r
77         this->UpdateRevsionName();\r
78 \r
79         OnOK();\r
80 }\r