-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathUnit3.h
executable file
·300 lines (272 loc) · 11 KB
/
Unit3.h
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
//===========================================================================
/*
アタッシェケース(AttachéCase)
Copyright (c) 2002-2018, Mitsuhiro Hibara ( http://hibara.org )
All rights reserved.
Redistribution and use in source and binary forms,
with or without modification, are permitted provided that the following
conditions are met:
・Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
・Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
・Neither the name of the "HIBARA.ORG" nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//===========================================================================
#ifndef Unit3H
#define Unit3H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include <ValEdit.hpp>
#include <Graphics.hpp>
#include <ImgList.hpp>
#include <Dialogs.hpp>
#include <Menus.hpp>
#include <Buttons.hpp>
#include <FileCtrl.hpp>
#include "Unit4.h"
#include "help.h"
#include "Windowsx.h"
#include "MsgUnit3.hpp"
#include "TDragAndDrop.h"
#include "TAttacheCaseOptionHandle.h"
#define FILE_ICON_NUM 4
//---------------------------------------------------------------------------
class TForm3 : public TForm
{
__published: // IDE 管理のコンポーネント
TPanel *Panel1;
TButton *cmdOK;
TButton *cmdCancel;
TStatusBar *StatusBar1;
TImage *imgBat;
TImage *imgReg;
TImage *imgIni;
TPageControl *PageControl1;
TTabSheet *TabBasic;
TTabSheet *TabSave;
TTabSheet *TabDelete;
TTabSheet *TabMovement;
TTabSheet *TabSystem;
TTabSheet *TabAdvanced;
TPanel *PanelBasicCaption;
TPanel *PanelSaveCaption;
TPanel *PanelDeleteCaption;
TPanel *PanelMovementCaption;
TPanel *PanelSystemCaption;
TPanel *PanelAdvancedCaption;
TCheckBox *chkNoMultipleInstance;
TCheckBox *chkMyEncPasswordKeep;
TButtonedEdit *btneditMyEncPassword;
TCheckBox *chkMyDecPasswordKeep;
TButtonedEdit *btneditMyDecPassword;
TCheckBox *chkMyPasswordExe;
TCheckBox *chkOpenFolder;
TCheckBox *chkOpenFile;
TCheckBox *chkEndToExit;
TCheckBox *chkWindowForeground;
TCheckBox *chkNoHidePassword;
TCheckBox *chkSaveToExeout;
TCheckBox *chkShowExeoutChkBox;
TCheckBox *chkAskEncDecode;
TCheckBox *chkSaveToSameFldr;
TButtonedEdit *btneditSaveToSameFldrPath;
TImageList *ImageList1;
TCheckBox *chkDecodeToSameFldr;
TButtonedEdit *btneditDecodeToSameFldrPath;
TCheckBox *chkConfirmOverwirte;
TRadioGroup *radiogrpMultipleFiles;
TCheckBox *chkNoParentFldr;
TCheckBox *chkKeepTimeStamp;
TCheckBox *chkSameTimeStamp;
TCheckBox *chkExtInAtcFileName;
TCheckBox *chkAutoName;
TButtonedEdit *btneditAutoNameFormatText;
TLabel *lblAutoFormatExample;
TCheckBox *chkDelOrgFile;
TCheckBox *chkDelEncFile;
TCheckBox *chkShowDeleteChkBox;
TGroupBox *gbDeleteOption;
TRadioButton *optNormalDelete;
TRadioButton *optGoToTrash;
TRadioButton *optCompleteDelete;
TLabeledEdit *txtDelRandNum;
TUpDown *UpDownDelRand;
TImage *imgArrowEnabled;
TImage *imgArrowDiabled;
TLabeledEdit *txtDelZeroNum;
TUpDown *UpDownDelZero;
TGroupBox *gbCompressRate;
TCheckBox *chkCompress;
TTrackBar *TrackBar1;
TLabel *lblCompressRateDetail;
TLabel *lblCompressRate;
TGroupBox *gbCompare;
TCheckBox *chkCompareFile;
TGroupBox *gbWindowsSystemOption;
TButton *cmdAssociateAtcFile;
TButton *cmdUnAssociateAtcFile;
TButton *cmdShortCutToSendToFileDir;
TGroupBox *gbChangeFileIcon;
TButton *cmdAddFileIcon;
TGroupBox *gbOutputOptionData;
TButton *cmdOutputOptionData;
TButton *cmdChangeTempOptionData;
TGroupBox *gbPasswordFile;
TCheckBox *chkAllowPassFile;
TCheckBox *chkCheckPassFile;
TButtonedEdit *btneditPassFilePath;
TCheckBox *chkCheckPassFileDecrypt;
TButtonedEdit *btneditPassFilePathDecrypt;
TCheckBox *chkNoErrMsgOnPassFile;
TGroupBox *gbCamoExt;
TCheckBox *chkAddCamoExt;
TEdit *txtCamoExt;
TLabel *lblCamoExtDetail;
TGroupBox *gbTypeLimit;
TComboBox *cmbMissTypeLimitsNum;
TLabel *lblMissTypeLimitsNum;
TCheckBox *chkBroken;
TLabel *lblTypeLimitAlertMsg;
TLabel *lblAdvancedOptionAlertMsg;
TTabSheet *TabDebug;
TValueListEditor *ValueListEditor1;
TPanel *PanelDebugCaption;
TComboBoxEx *comboDataIcon;
TOpenDialog *OpenDialog1;
TImage *Image1;
TImage *Image2;
TPopupMenu *PopupMenu1;
TImageList *ImageList3;
TMenuItem *pmnuInsertFileName;
TMenuItem *pmnuInsertFileExt;
TMenuItem *pmnuSeparator;
TMenuItem *pmnuInsertDatetime;
TMenuItem *pmnuInsertSerialNum;
TMenuItem *pmnuInsertRandomText;
TMenuItem *pmnuInsertFileNameHead;
TMenuItem *pmnuInsertFileNameEnd;
TMemo *Memo1;
TBalloonHint *BalloonHint1;
TButton *cmdHelp;
TSaveDialog *SaveDialog1;
TPaintBox *PaintBoxMenu;
TImageList *imlSideMenuIconOff;
TImageList *imlSideMenuIconOn;
TImage *imgMenuBackground;
TImageList *imlAssociateFilesIcon;
TCheckBox *chkWindowMinimize;
TCheckBox *chkTaskBarHide;
TCheckBox *chkTaskTrayIcon;
void __fastcall FormCreate(TObject *Sender);
void __fastcall FormDestroy(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall FormResize(TObject *Sender);
void __fastcall cmdCancelClick(TObject *Sender);
void __fastcall cmdOKClick(TObject *Sender);
void __fastcall TrackBar1Change(TObject *Sender);
void __fastcall optNormalDeleteClick(TObject *Sender);
void __fastcall optGoToTrashClick(TObject *Sender);
void __fastcall optCompleteDeleteClick(TObject *Sender);
void __fastcall btneditMyEncPasswordLeftButtonClick(TObject *Sender);
void __fastcall btneditMyDecPasswordLeftButtonClick(TObject *Sender);
void __fastcall btneditSaveToSameFldrPathLeftButtonClick(TObject *Sender);
void __fastcall btneditDecodeToSameFldrPathLeftButtonClick(TObject *Sender);
void __fastcall btneditPassFilePathLeftButtonClick(TObject *Sender);
void __fastcall btneditPassFilePathDecryptLeftButtonClick(TObject *Sender);
void __fastcall chkAllowPassFileClick(TObject *Sender);
void __fastcall chkCheckPassFileClick(TObject *Sender);
void __fastcall chkCheckPassFileDecryptClick(TObject *Sender);
void __fastcall chkAddCamoExtClick(TObject *Sender);
void __fastcall pmnuInsertFileNameClick(TObject *Sender);
void __fastcall pmnuInsertFileExtClick(TObject *Sender);
void __fastcall pmnuInsertDatetimeClick(TObject *Sender);
void __fastcall pmnuInsertSerialNumClick(TObject *Sender);
void __fastcall pmnuInsertRandomTextClick(TObject *Sender);
void __fastcall pmnuInsertFileNameHeadClick(TObject *Sender);
void __fastcall pmnuInsertFileNameEndClick(TObject *Sender);
void __fastcall chkMyEncPasswordKeepClick(TObject *Sender);
void __fastcall chkMyDecPasswordKeepClick(TObject *Sender);
void __fastcall chkSaveToSameFldrClick(TObject *Sender);
void __fastcall chkDecodeToSameFldrClick(TObject *Sender);
void __fastcall cmdAssociateAtcFileClick(TObject *Sender);
void __fastcall cmdUnAssociateAtcFileClick(TObject *Sender);
void __fastcall cmdShortCutToSendToFileDirClick(TObject *Sender);
void __fastcall chkAutoNameClick(TObject *Sender);
void __fastcall chkDelOrgFileClick(TObject *Sender);
void __fastcall cmdHelpClick(TObject *Sender);
void __fastcall btneditAutoNameFormatTextChange(TObject *Sender);
void __fastcall cmdOutputOptionDataClick(TObject *Sender);
void __fastcall cmdChangeTempOptionDataClick(TObject *Sender);
void __fastcall PaintBoxMenuMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
int X, int Y);
void __fastcall PaintBoxMenuDblClick(TObject *Sender);
void __fastcall PaintBoxMenuPaint(TObject *Sender);
void __fastcall PaintBoxMenuMouseMove(TObject *Sender, TShiftState Shift, int X,
int Y);
void __fastcall txtDelRandNumKeyPress(TObject *Sender, wchar_t &Key);
void __fastcall txtDelZeroNumKeyPress(TObject *Sender, wchar_t &Key);
void __fastcall txtDelRandNumChange(TObject *Sender);
void __fastcall txtDelZeroNumChange(TObject *Sender);
void __fastcall txtDelRandNumExit(TObject *Sender);
void __fastcall txtDelZeroNumExit(TObject *Sender);
void __fastcall comboDataIconChange(TObject *Sender);
void __fastcall chkTaskBarHideClick(TObject *Sender);
void __fastcall chkTaskTrayIconClick(TObject *Sender);
private: // ユーザー宣言
//サイドメニューグラフィック
Graphics::TBitmap *bmpSideMenu;
TPoint ptSideMenu[7];
String SideMenuLabelCaption[7];
int SideMenuLabelCaptionPosX[7];
int optSelectedMenu;
//関連付けアイコンなどレジストリに絡む変更を行ったか
bool fChangeRegData;
//ユーザー指定のアイコンファイルパス(OKボタンが押されるまでのテンポラリ)
String TempUserRegIconFilePath;
//設定値を動作設定フォームに反映表示する
void __fastcall FormShowOptionData(void);
//動作設定フォームから設定値に反映する(各メディアへ保存も行う)
void __fastcall FormSaveOptionData(void);
//ファイルアイコンをコンボボックスへ登録する
void __fastcall RegIconFileToComboBox(void);
//UACエレベーションを要求して関連付けプログラムを実行
bool __fastcall RunAsAdmin(int Option);
// サイドメニューを描画する
void __fastcall PaintSideMenu(void);
public: // ユーザー宣言
__fastcall TForm3(TComponent* Owner, TAttacheCaseOptionHandle *opt);
TAttacheCaseOptionHandle *pOpt;
//記憶パスワードが変更されたときに格納する
AnsiString TempMyEncodePassword;
AnsiString TempMyDecodePassword;
//OLEドラッグ&ドロップのコールバック関数
void __fastcall FilesDragOver(POINTL ptl);
void __fastcall FilesDragLeave(void);
void __fastcall FilesDragEnd(POINTL ptl, String FileListText);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm3 *Form3;
//---------------------------------------------------------------------------
#endif