Subversion Repositories spk

Rev

Rev 1 | Rev 121 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 39
Line 5... Line 5...
5
using namespace System::Drawing;
5
using namespace System::Drawing;
6
 
6
 
7
#define CONNECTERROR_UNKNOWN	-1
7
#define CONNECTERROR_UNKNOWN	-1
8
enum {CONNECTERROR_NONE, CONNECTERROR_TIMEOUT, CONNECTERROR_NOFILE, CONNECTERROR_FAILED};
8
enum {CONNECTERROR_NONE, CONNECTERROR_TIMEOUT, CONNECTERROR_NOFILE, CONNECTERROR_FAILED};
9
 
9
 
-
 
10
inline Utils::String _S(System::String ^str)
-
 
11
{
-
 
12
	if ( !str || !str->Length )
-
 
13
		return "";
-
 
14
	const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(str)).ToPointer();
-
 
15
	std::string s = chars;
-
 
16
	Marshal::FreeHGlobal(IntPtr((void*)chars));
-
 
17
	return s;
-
 
18
}
10
inline CyString CyStringFromSystemString( System::String ^str)
19
inline CyString CyStringFromSystemString( System::String ^str)
11
{
20
{
12
	if ( !str || !str->Length )
21
	if ( !str || !str->Length )
13
		return NullString;
22
		return NullString;
14
	const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(str)).ToPointer();
23
	const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(str)).ToPointer();
Line 87... Line 96...
87
inline System::String ^SystemStringFromCyString ( CyString str )
96
inline System::String ^SystemStringFromCyString ( CyString str )
88
{
97
{
89
	System::String ^Str = gcnew System::String(str.c_str());
98
	System::String ^Str = gcnew System::String(str.c_str());
90
	return Str;
99
	return Str;
91
}
100
}
-
 
101
inline System::String ^_US(const Utils::String &str)
-
 
102
{
-
 
103
	System::String ^Str = gcnew System::String(str.c_str());
-
 
104
	return Str;
-
 
105
}
92
 
106
 
93
inline System::Drawing::Bitmap ^LoadIcon(CBaseFile *p)
107
inline System::Drawing::Bitmap ^LoadIcon(CBaseFile *p)
94
{
108
{
95
	CyString file = p->GetIcon()->GetFilePointer();
109
	CyString file = p->GetIcon()->GetFilePointer();
96
	if ( !file.Empty() )
110
	if ( !file.Empty() )