本文整理汇总了C#中function_info类的典型用法代码示例。如果您正苦于以下问题:C# function_info类的具体用法?C# function_info怎么用?C# function_info使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
function_info类属于命名空间,在下文中一共展示了function_info类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NOPH_Canvas_get
public static int NOPH_Canvas_get()
{
function_info fi = new function_info("NOPH_Canvas_get");
fis.Add(fi.setFinishTime());
return Syscalls.canvasHandle;
}
示例2: NOPH_Font_getAdvance
public static int NOPH_Font_getAdvance(int __font, int __text)
{
function_info fi = new function_info("NOPH_Font_getAdvance");
int charwidth;
switch (__font)
{
case 7:
case 8:
charwidth = 5;
break;
case 9:
case 10:
charwidth = 6;
break;
case 11:
charwidth = 7;
break;
case 12:
case 13:
charwidth = 8;
break;
case 14:
charwidth = 9;
break;
case 15:
case 16:
charwidth = 10;
break;
case 17:
charwidth = 11;
break;
case 18:
case 19:
charwidth = 12;
break;
case 20:
charwidth = 13;
break;
case 21:
case 22:
charwidth = 14;
break;
case 23:
case 24:
charwidth = 15;
break;
case 25:
charwidth = 16;
break;
case 26:
case 27:
charwidth = 17;
break;
case 28:
charwidth = 18;
break;
case 29:
case 30:
charwidth = 19;
break;
case 31:
case 32:
charwidth = 20;
break;
case 33:
charwidth = 21;
break;
case 34:
charwidth = 22;
break;
case 35:
charwidth = 23;
break;
default:
charwidth = 5;
break;
}
String text = CRunTime.charPtrToString(__text);
int ret = (int)((__font * 0.56) * text.Length);
fis.Add(fi.setFinishTime());
return ret;
}
示例3: NOPH_Font_getDefault
public static int NOPH_Font_getDefault()
{
function_info fi = new function_info("NOPH_Font_getDefault");
object ret = new object();
//todomt Font ret = (Font)new Font("FreeSans",8,FontStyle.Regular);// todomt. .getDefault();
int registeredHandle = CRunTime.registerObject(ret);
fis.Add(fi.setFinishTime());
return registeredHandle;
}
示例4: NOPH_FileConnection_openInputStream
public static int NOPH_FileConnection_openInputStream(int __fc)
{
function_info fi = new function_info("NOPH_FileConnection_openInputStream");
FileConnection fc = (FileConnection)CRunTime.objectRepository[__fc];
if (File.Exists(fc.filename))
{
FileStream ret = new FileStream(fc.filename, FileMode.Open, FileAccess.Read);
fc.stream = ret;
int registeredHandle = CRunTime.registerObject(ret);
fis.Add(fi.setFinishTime());
return registeredHandle;
}
else
{
fis.Add(fi.setFinishTime());
return 0;
}
}
示例5: NOPH_FileConnection_truncate
public static void NOPH_FileConnection_truncate(int __fc, int byteOffest)
{
function_info fi = new function_info("NOPH_FileConnection_truncate");
FileConnection fc = (FileConnection)CRunTime.objectRepository[__fc];
if (fc.filename.ToLower().StartsWith("userstore://"))
{
var store = IsolatedStorageFile.GetUserStoreForApplication();
store.DeleteFile(fc.filename.Substring(12));
}
else
{
fis.Add(fi.setFinishTime());
return;
}
fis.Add(fi.setFinishTime());
}
示例6: NOPH_FileConnection_delete
public static void NOPH_FileConnection_delete(int __fc)
{
function_info fi = new function_info("NOPH_FileConnection_delete");
NOPH_FileConnection_truncate(__fc, 0);
fis.Add(fi.setFinishTime());
}
示例7: NOPH_FileConnection_fileSize
public static int NOPH_FileConnection_fileSize(int __fc)
{
function_info fi = new function_info("NOPH_FileConnection_fileSize");
string name;
FileType file_type;
FileConnection fc = (FileConnection)CRunTime.objectRepository[__fc];
GetFileTypeAndName(fc.filename, out file_type, out name);
if (file_type == FileType.USER_STORE)
{
var store = IsolatedStorageFile.GetUserStoreForApplication();
fis.Add(fi.setFinishTime());
return store.FileExists(name) ? 1 : 0;
}
else
{
fis.Add(fi.setFinishTime());
return (int)GetFileStream(fc.filename, FileMode.Open).Length;
}
}
示例8: NOPH_DeviceInfo_getBatteryLevel
public static int NOPH_DeviceInfo_getBatteryLevel()
{
function_info fi = new function_info("NOPH_DeviceInfo_getBatteryLevel");
fis.Add(fi.setFinishTime());
return 100;
}
示例9: NOPH_DeviceSpecific_getPlatform
public static void NOPH_DeviceSpecific_getPlatform(int addr, int size)
{
function_info fi = new function_info("NOPH_DeviceSpecific_getPlatform");
//todomt
String p = "WindowsPhone";
byte[] bytes = StringToAscii(p);
size--;
if (size > bytes.Length) size = bytes.Length;
CRunTime.memcpy(addr, bytes, 0, size);
CRunTime.memoryWriteByte(addr + size, 0);
fis.Add(fi.setFinishTime());
}
示例10: NOPH_Connector_openFileConnection_mode
public static int NOPH_Connector_openFileConnection_mode(int __name, int mode)
{
function_info fi = new function_info("NOPH_Connector_openFileConnection_mode");
String name = CRunTime.charPtrToString(__name);
FileConnection ret = new FileConnection(name, mode);
int registeredHandle = CRunTime.registerObject(ret);
fis.Add(fi.setFinishTime());
return registeredHandle;
}
示例11: NOPH_delete
public static void NOPH_delete(int a0)
{
function_info fi = new function_info("NOPH_delete");
// todomt2 - avoid begininvoke still not running and noph_delete already called
if (CRunTime.objectRepository[a0] is BitmapImage)
{
fis.Add(fi.setFinishTime());
return;
}
// todomt2 when i will handle the above this will keep memory stable
if (CRunTime.objectRepository[a0] is BitmapImage)
bitmaps_info.Remove(a0);
CRunTime.deRegisterObject(a0);
fis.Add(fi.setFinishTime());
}
示例12: NOPH_Connector_openDataOutputStream
public static int NOPH_Connector_openDataOutputStream(int __name)
{
function_info fi = new function_info("NOPH_Connector_openDataOutputStream");
/* String name = CRunTime.charPtrToString(__name);
DataOutputStream ret = (DataOutputStream)Connector.openDataOutputStream(name);
int registeredHandle = CRunTime.registerObject(ret);
return registeredHandle;*/
fis.Add(fi.setFinishTime());
return 1;
}
示例13: NOPH_ConfirmDialog_CreateDialog
public static void NOPH_ConfirmDialog_CreateDialog(int __title, int __text, int defaultYes, int __textYes, int __textNo, int seconds, int yesCallback, int noCallback, int context)
{
function_info fi = new function_info("NOPH_ConfirmDialog_CreateDialog");
String title = CRunTime.charPtrToString(__title);
String text = CRunTime.charPtrToString(__text);
String textYes = CRunTime.charPtrToString(__textYes);
String textNo = CRunTime.charPtrToString(__textNo);
mre.Reset();
System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBoxResult res = MessageBox.Show(text, title, MessageBoxButton.OKCancel);
if (res == MessageBoxResult.OK || res == MessageBoxResult.Yes)
{
UIWorker.addUIEvent(yesCallback, context, 0, 0, 0, true);
}
else
{
UIWorker.addUIEvent(noCallback, context, 0, 0, 0, true);
}
mre.Set();
});
mre.WaitOne();
fis.Add(fi.setFinishTime());
}
示例14: NOPH_Class_getResourceAsStream
public static int NOPH_Class_getResourceAsStream(int __obj, int __name)
{
function_info fi = new function_info("NOPH_Class_getResourceAsStream");
Type obj = (Type)CRunTime.objectRepository[__obj];
String name = CRunTime.charPtrToString(__name);
Stream ret = GetFileStream(name, FileMode.Open);
if (ret == null)
{
ret = GetFileStream("userstore://" + name, FileMode.Open);
if (ret == null)
{
fis.Add(fi.setFinishTime());
return 0;
}
}
int registeredHandle = CRunTime.registerObject(ret);
fis.Add(fi.setFinishTime());
return registeredHandle;
}
示例15: NOPH_FileConnection_close
public static void NOPH_FileConnection_close(int __fc)
{
function_info fi = new function_info("NOPH_FileConnection_close");
FileConnection fc = (FileConnection)CRunTime.objectRepository[__fc];
fc.stream.Close();
fis.Add(fi.setFinishTime());
}