-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOptions.cpp
66 lines (50 loc) · 1.73 KB
/
Options.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
//---------------------------------------------------------------------------
#include <vcl.h>
#include <string>
#include <FileUtil.hpp>
#pragma hdrstop
#include "Options.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "ToolEdit"
#pragma link "Placemnt"
#pragma resource "*.dfm"
TfmOptions *fmOptions;
string MaglibPath;
string DecksPath;
string PicturesPath;
AnsiString PlayerName;
bool MaglibFmt = false;
bool DeepAnalysis = false;
bool StudyMode = false;
//int NetworkKind = 0;
//---------------------------------------------------------------------------
__fastcall TfmOptions::TfmOptions(TComponent* Owner)
: TForm(Owner)
{
}
void TfmOptions::SetOptions()
{
MaglibPath = NormalDir(edMaglibPath->Text).c_str();
DecksPath = NormalDir(edDecksPath->Text).c_str();
PicturesPath = NormalDir(edPicsPath->Text).c_str();
MaglibPath = LongToShortPath(MaglibPath.c_str()).c_str();
DecksPath = LongToShortPath(DecksPath.c_str()).c_str();
PicturesPath = LongToShortPath(PicturesPath.c_str()).c_str();
PlayerName = edName->Text;
MaglibFmt = cbMaglibFmt->Checked;
DeepAnalysis = cbDeepAnalysis->Checked;
StudyMode = cbStudyMode->Checked;
//NetworkKind = rgNetwork->ItemIndex;
}
//---------------------------------------------------------------------------
void __fastcall TfmOptions::Button1Click(TObject *Sender)
{
SetOptions();
}
//---------------------------------------------------------------------------
void __fastcall TfmOptions::FormCreate(TObject *Sender)
{
FormStorage1->RestoreProperties();
}
//---------------------------------------------------------------------------