Welcome![Sign In][Sign Up]
Location:
Search - location

Search list

[Other resourcelLCD

Description: lcd128*64PROGRAM,采用51芯片,如何显示LCD相应的位置-lcd128 * 64PROGRAM using 51 chips, how to display the corresponding location LCD
Platform: | Size: 4816 | Author: wzy | Hits:

[Game Programvb考试

Description: 是一个拼数字的游戏!拼图游戏由中上部的游戏区和下边的答案显示区两个部分组成。游戏区的右边有一张被分割成好几块、已被打乱排序的大图案板。它占了整个游戏区约3/4左右。左上角则有一张小巧可爱的完整图片。其上方有一个粉色的[记分]键,玩家随时可以查看自己的得分情况。左下角则有[开始]和[结束]键。轻轻点击[开始]键,开始游戏。游戏时,这个位置就会出现[认输]的提示键。当然,点击[认输]键将会失分。-figure is a fight of the game! Puzzles and games from the upper zone and down the answers from the district two components. The right side of the game is a good chopped into several pieces, has been disrupted sort of pictorial boards. It accounts for the entire game zone about 3 / 4 around. The upper left corner, there are a small lovely complete picture. Its top is a pink [points] button, players can always check the score of their own. There were lower left-hand corner [started] and [end] keys. Clicking on the [Start] button to start the game. Game time, the location will appear [go] tips keys. Of course, it [go] key will lose points.
Platform: | Size: 36330 | Author: 弘扬 | Hits:

[Other001_GPS车辆定位监控

Description: 基于手机短信和gps、gis的车辆定位调度系统 使用了灵图的地图模块,长征卫导的定位系统-cell phone-based text messaging and a GPS, vehicle location and gis scheduling system uses a map of Hope map module, the long march Wei Positioning System Introduction
Platform: | Size: 9678147 | Author: 王浩 | Hits:

[Windows Develop模拟文件管理系统

Description: 1.在内存中开辟一个虚拟磁盘空间作为文件存储器,在其上实现一个简单的单用户文件系统。在退出这个简单的文件系统时,应将该虚拟文件系统保存到磁盘上,以便下次可以再将它恢复到内存的虚拟磁盘空间中。 2.文件存储空间的分配可采用显式链接分配或其他的办法。 3.空闲空间的管理可选择位示图或其他的办法。如果采用位示图来管理文件存储空间,并采用显示链接分配方式,那么可以将位示图合并到FAT表中。 4.文件目录结构采用多级目录结构。为了简单起见,可以不使用索引结点,其中的每个目录项应包含文件名、物理地址、长度等.-1.making a virtual diskete memory as file storyge,in this district it can implement a simple single user file system .when quit this simple file system ,it shoud save the virtual file system to diskete,then it can be resumed to virtual diskete district in the memory.3.we can choose location hint map to manage the idle space or orther means.if we choose locationhint map to manage file saving space,and adopt show linking distribution mode,we can combine location hint map into FAT table.4.file directory confiuration adopts multilevel directory confiuration.to simplify,it doesn t use index dot,evrery term shoud include file name,physical dress and lenght.
Platform: | Size: 55811 | Author: 雨金 | Hits:

[Internet-Networkmapxtreme 2004完整开发资料

Description: Welcome Developers to MapInfo Corporation’s entry into the world of .NET programming. In support of Microsoft’s .NET framework for Windows, we have re-architected our MapX and MapXtreme code base, to reflect a single object model for developing or extending mapping applications for the desktop, traditional client/server environments or the Web. Our first release in this venture is MapInfo MapXtreme 2004, an application development tool for organizations who recognize that data visualization and mapping can help you make better business decisions and manage assets and operations more effectively. MapXtreme 2004 is for organizations that need to incorporate location analysis or definition into desktop, client/server and web-based products. MapXtreme 2004 can be used as a powerful analysis toolkit to make critical business decisions such as optimal locations for sales offices, how to transport products most efficiently, and how to manage and protect assets. Developers can use MapXtreme 2004 to shorten their development time and improve performance, reliability, and security.
Platform: | Size: 2014701 | Author: asdpzhengyd@126.com | Hits:

[Internet-Network用D3D模拟地月系

Description:

 

 

 

  一、建立空窗体

  新建一个工程,添加引用,并导入名称空间。

  加入一个设备对象变量:

private Microsoft.DirectX.Direct3D.Device device = null;

  添加初始化图形函数,并在这里面对设备对象进行实例化:

public void InitializeGraphics()
{
 PresentParameters presentParams = new PresentParameters();
 presentParams.Windowed = true;
 presentParams.SwapEffect = SwapEffect.Flip;
 presentParams.AutoDepthStencilFormat = DepthFormat.D16;
 presentParams.EnableAutoDepthStencil = true;
 device = new Microsoft.DirectX.Direct3D.Device(0, Microsoft.DirectX.Direct3D.DeviceType.Hardware, this,  CreateFlags.HardwareVertexProcessing, presentParams);
}

  当程序执行时,需要绘制场景,代码在这个函数里:

public void Render()

{
 // 清空设备,并准备显示下一帧。
 device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black , 1.0f, 0);
 // 设置照相机的位置
 SetupCamera();
 //开始场景
 device.BeginScene();
 if(meshLoaded)
 {
  mesh.Render(meshLoc);
 }
 device.EndScene();
 //显示设备内容。
 device.Present();
}

  设置照相机的位置:

private void SetupCamera()
{
 device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4, this.Width / this.Height, 1.0f, 1000.00f);
 device.Transform.View = Matrix.LookAtLH(new Vector3(0.0f ,0.0f, 20.0f), new Vector3(0.0f,0.0f, 0.0f), new Vector3(0,1,0));
}

  现在改变主函数,调用我们写的初始化函数,并显示场景:

[STAThread]

static void Main()
{
 using (Form1 EarthForm = new Form1())
 {
  EarthForm.InitializeGraphics();
  EarthForm.Show();

  while(EarthForm.Created)
  {
   EarthForm.Render();
   Application.DoEvents();
  }
  EarthForm.Dispose();
}

  运行程序,会显示一个空的窗体。

  二、加入地球:

  在这一步里需创建一个3D网格对象,来作为要显示的地球,为此,在工程中新加入一个类Earth,此类可以包含所创建的网格对象的信息。

  加入一些相关变量,含义见注释:

public class Earth : BaseEarth
{
 private Material[] mMaterials; //保存材质
 private Texture[] mTextures; //保存纹理
 private Matrix locationOffset; //用来保存网格对象的相对位置
 private Mesh mMesh = null; //三角形网格对象
 private Device meshDevice; //需要显示在哪个设备上。
}

  在构造函数中,把Device设备拷贝到私有成员变量,这样就可以在这个类的其它方法内使用它,另外就是把位置变量进行赋值:

public Earth(ref Device device, Matrix location): base(ref device)
{
 meshDevice = device;
 locationOffset = location;
}

  下面这个函数是装入.X文件。

public bool LoadMesh(string meshfile)
{
 ExtendedMaterial[] mtrl;
 try
 {
  // 装载文件
  mMesh = Mesh.FromFile(meshfile, MeshFlags.Managed, meshDevice, out mtrl);
  // 如果有材质的话,装入它们
  if ((mtrl != null) && (mtrl.Length > 0))
  {
   mMaterials = new Material[mtrl.Length];
   mTextures = new Texture[mtrl.Length];

   // 得到材质和纹理

   for (int i = 0; i < mtrl.Length; i++)
   {
    mMaterials[i] = mtrl[i].Material3D;
    if ((mtrl[i].TextureFilename != null) && (mtrl[i].TextureFilename != string.Empty))

 

    {
     //前面得到的纹理的路径是相对路径,需要保存的是绝对路径,通过应用程序路径可以获得
     mTextures[i] = TextureLoader.FromFile(meshDevice, @"..\..\" + mtrl[i].TextureFilename);
    }
   }
  }
  return true;
 }
 catch
 {
  return false;
 }
}

  在这个方法内,使用Mesh.FromFile()这个方法,从给定的文件名中找到.X文件,并装入相关数据,一旦数据格式设置完成,可以从此文件中找到材质和贴图信息,并把它存放在数组中,并通过文件路径,得到纹理文件文件的路径,最后返回真值,如果整个过程出现错误,返回假值。

  下面这个Render()方法,是把此对象,即地球显示在设备对象上,此方法较简单,通过变形操作来得到网格对象的X,Y,Z坐标,接着设置网格对象的材质和纹理,最后,将每个材质和纹理应用到每个网格。

public void Render(Matrix worldTransform)
{
 /把位置变为世界坐标
 meshDevice.Transform.World = Matrix.Multiply(locationOffset, worldTransform);
 //绘制网格
 for (int i = 0; i < mMaterials.Length; i++)
 {
  meshDevice.Material = mMaterials[i];
  meshDevice.SetTexture(0, mTextures[i]);
  mMesh.DrawSubset(i);
 }
}

  现在回到窗体代码中,添加引用网格对象的相关变量:

private Earth mesh = null;
private Matrix meshLoc;
private bool meshLoaded = false;

  在图形初始化函数中,需要对网格对象进行初始化。加入下面的代码:

meshLoc = Matrix.Identity;
meshLoc.M41 = 2.0f;
mesh = new Earth(ref device, meshLoc);
if (mesh.LoadMesh(@"..\..\earth.x"))
{
 meshLoaded = true;
}

  代码第一句把网格对象的位置定为原点,接着偏移X轴2个单位,接下来从文件中得到此.X文件。如果成功设置,meshLoaded置为真。注意,这里有一个.X文件,在源代码中有此文件。

 


  在设置相机的函数中,加入一盏灯光:

device.Lights[0].Type = LightType.Directional;
device.Lights[0].Diffuse = Color.White;
device.Lights[0].Direction = new Vector3(0, -1, -1);
device.Lights[0].Update();
device.Lights[0].Enabled = true;


  此灯光较简单,仅为一个直射型白光灯。

最后,在Render()方法中,调用网格对象的Render()方法,以显示地球。

 

  三、使地球旋转

  前面用一个网格对象来建立地球,但此类没有平移,旋转及缩放等方法,下面就加入这些方法,因为这些方法具有通用性,因此可以新建一个类,把这些方法写在这些类中,使地球对象成为它的派生类。

  在工程中新添加一个类:BaseEarth;

  加入进行平移、旋转、缩放的变量:

 

private float xloc = 0.0f;
private float yloc = 0.0f;
private float zloc = 0.0f;
private float xrot = 0.0f;
private float yrot = 0.0f;
private float zrot = 0.0f;
private float xscale = 1.0f;
private float yscale = 1.0f;
private float zscale = 1.0f;


  加入相应的属性代码:

 

public float XLoc
{
 get
 {
  return xloc;
 }
 set
 {
  xloc = value;
 }
}
…………

 

  在Render()虚函数中,应用平移、旋转及缩放。
 

public virtual void Render()
{
 objdevice.MultiplyTransform(TransformType.World,Matrix.Translation(xloc, yloc, zloc));
 objdevice.MultiplyTransform(TransformType.World,Matrix.RotationAxis(new Vector3(1.0f, 0.0f, 0.0f), xrot));
 objdevice.MultiplyTransform(TransformType.World,Matrix.RotationAxis(new Vector3(0.0f, 1.0f, 0.0f), yrot));
 objdevice.MultiplyTransform(TransformType.World,Matrix.RotationAxis(new Vector3(0.0f, 0.0f, 1.0f), zrot));
 objdevice.MultiplyTransform(TransformType.World,Matrix.Scaling(xscale, yscale, zscale));
 return;
}

 

  现在回到地球类,需要将其改为新类的派生类,同时更改构造函数,另外,在Render()方法中,应先调用基类的Render()方法:


public override void Render()
{
 base.Render();
 //把位置变为世界坐标
 // meshDevice.Transform.World = Matrix.Multiply(locationOffset, worldTransform);
 //绘制网格
 。。。。。。
}

 


  现在,由于在基类中可以设置对象位置,因此,可以把与locationOffset相关,即与设置位置的变量及语句注释掉。

  四、加入月球

  在这一步加入月球,实际上是再创建一个网格对象新实例,只是把纹理进行更改即可,为了代码模块性更好,把两个对象放在一个新类CModel中,在工程中新添加一个类CModel,并声明对象实例。


public class cModel
{
 private cMeshObject mesh1 = null;
 private cMeshObject mesh2 = null;
 private bool modelloaded;
}


  把窗口代码中的Load()事件,放在CModel中,这次不仅生成了地球,而且生成了月球。

 


public void Load(ref Device device)
{
 mesh1 = new Earth(ref device);
 mesh2 = new Earth(ref device);
 if (mesh1.LoadMesh(@"..\..\earth2.x"))
 {
  modelloaded = true;
 }
 else
 {
  modelloaded = false;
 }
 if (mesh2.LoadMesh(@"..\..\moon.x"))
 {
  mesh2.XLoc += 20.0f;
  modelloaded = true;
 }
 else
 {
  modelloaded = false;
 }
}

 

  下面的Update()方法中,参数dir 用来判断是顺时针旋转还是逆时针旋转,另外,地球和月球绕Y轴增加的角度大小不同,也就决定了二者旋转的速度不同。


public void Update(int dir)
{
 if(dir > 0)
 {
  mesh1.YRot += 0.02f;
  mesh2.YRot += 0.05f;
 }
 else if(dir < 0)
 {
  mesh1.YRot -= 0.02f;
  mesh2.YRot -= 0.05f;
 }
}


  在下面的render()方法中,生成显示月球和地球:

 


public void Render(ref Device device)
{
 device.Transform.World = Matrix.Identity;
 if(modelloaded)
 {
  mesh1.Render();
  mesh2.Render();
 }
}


  把窗口代码中的加入灯光的方法,也放在此类中:


public void LoadLights(ref Device device)
{
 device.Lights[0].Type = LightType.Directional;
 device.Lights[0].Diffuse = Color.White;
 device.Lights[0].Position = new Vector3(0.0f, 0.0f, 25.0f);
 device.Lights[0].Direction = new Vector3(0, 0, -1);
}
public void Light(ref Device device)
{
 device.Lights[0].Update();
 device.Lights[0].Enabled = true;
}


  五、与鼠标交互操作

  为了实现与键盘、鼠标交互,新添加一个类:CMouse,添加引用Microsoft.DirectX.DirectInput,并添加命名空间。加入相关变量:


private Microsoft.DirectX.DirectInput.Device mouse = null;
public System.Threading.AutoResetEvent MouseUpdated;
private float x, y, z = 0.0f;
private byte[] buttons;

 

  在下面的构造函数代码中,首先创建鼠标设备,并初始化回调事件:


public CMouse(System.Windows.Forms.Control control)
{
 mouse = new Microsoft.DirectX.DirectInput.Device(SystemGuid.Mouse);
 mouse.SetCooperativeLevel(control, CooperativeLevelFlags.Background | CooperativeLevelFlags.NonExclusive);
 mouse.Properties.AxisModeAbsolute = false;
 MouseUpdated = new System.Threading.AutoResetEvent(false);
 mouse.SetEventNotification(MouseUpdated);
 mouse.Acquire();
 Update();

 


  下面的Update()方法中获得鼠标的坐标值,并赋给私有成员变量:

public void Update()
{
 MouseState state = mouse.CurrentMouseState;
 x = state.X;
 y = state.Y;
 z = state.Z;
 buttons = state.GetMouseButtons();
}


  还需要有一个函数来检测鼠标左键是否按下:

 


public bool LeftButtonDown
{
 get
 {
  bool a;
  return a = (buttons[0] != 0);
 }
}


  六、大结局

  现在已经做完了准备工作,返回到窗口代码中,需要对这里的代码重新进行一些调整:

  在图形初始化函数中创建一个CModel类及CMouse类:

 

private CModel model = null;
private CMouse mouse = null;
private bool leftbuttondown = false;
private float mousexloc;

 

  添加对鼠标初始化的方法:

 

网管联盟bitsCN@com


public void InitializeInput()
{
 mouse = new CMouse(this);
}


  添加UpdateInputState()方法,当按下鼠标左键时,将leftbuttondown值设置为真,当鼠标抬起时,将mousexloc置0:


private void UpdateInputState()
{
 mouse.Update();
 if (mouse.LeftButtonDown)
 {
  if(leftbuttondown == false)
  {
   mousexloc = 0.0f;
   leftbuttondown = true;
  }
  else
  {
   mousexloc = -mouse.X;
  }
 }
 else
 {
  leftbuttondown = false;
  mousexloc = 0.0f;
 }
}


  在此程序中,只对X值进行了操作,即只能左右转。

  Render()方法更新如下:

public void Render()
{
 UpdateInputState();
 device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.DarkGray, 1.0f, 0);
 SetupCamera();
 device.BeginScene();
 model.Update((int)mousexloc);
 model.Light(ref device);
 model.Render(ref device);
 device.EndScene();
 device.Present();
}

 

  最后更改Main()主函数:


static void Main()
{
 using (Form1 EarthForm = new Form1())
 {
  EarthForm.InitializeGraphics();
  EarthForm.InitializeInput();
  EarthForm.Show();
  while(EarthForm.Created)
  {
   EarthForm.Render();
   Application.DoEvents();
  }
  EarthForm.Dispose();
 }
 


Platform: | Size: 11817 | Author: mantoutou | Hits:

[Embeded Linuxsmp86xx_rootfs.tar.bz2

Description:

 sigma smp8634/8635 toolchain rootfs building source.

=================

Readme.txt

=================

 

This is the Sigma Designs customization of the root file system for the

SMP86xx family of chips.

 

This package is of course heavily depending on the toolchain and kernel

packages.

 

Quick HOW-TO

============

a) You need to have a working toolchain package. Once you have built your 

   toolchain, be sure to source toolchain-path.env. This is required for you to

   be able to build the rootfs package.

b) Untar the rootfs package.

c) First, configure your root file system: 'make menuconfig'. All the options 

   in the configuration menus have detailed help. Once you are satisfied with

   your choice of options, exit and save the configuration.

d) If you are using the toolchain composed of gcc 3.4.2, binutils 2.15.91.0.2,

   and uClibc 0.9.27 (defined in the toolchain package) then you must select

   Busybox 1.00 from the 'Package Selection for the target --->' menu.

   If on the other hand you are using the toolchain composed of gcc 4.0.4,

   binutils 2.17, and uClibc 0.9.28.3 then you must select Busybox 1.5 from

   the 'Package Selection for the target --->' menu.

e) If you chose to customize your root file system (option 'customize' in

   submenu 'Package Selection for the target'), be sure to prepare your custom

   files now.

f) Run 'make' to produce your root file system.

 

IMPORTANT NOTE: as of this release, the only supported option in the 'Target 

Options' menu is 'cramfs root filesystem for the target device' (with all its

suboptions). Any other option is currently unsupported and some are known to

not work.

 

Once you are through with step e), your root file system is available in the

main directory of the package as 'root_fs_mipsel.cramfs'.

 

Note about the integration with the toolchain and the kernel source packages

============================================================================

The rootfs package is now integrated with the toolchain package and the 

kernel source package and is able to interact with them in the following

ways:

 

 a) it can grab the necessary runtime libraries from the toolchain package.

 b) it can receive the kernel modules and support files from the kernel source

    package.

 c) the kernel source package can use the produced rootfs image for its initial

    RAM disk.

 

For interaction a) to take place, the SMP86XX_TOOLCHAIN_PATH environment 

variable must be defined and it must point to the main directory of the 

produced toolchain. The easiest way to achieve that is by sourcing the

'toolchain-path.env' environment file after it is produced at the end of the

toolchain production.

 

Note that defining SMP86XX_TOOLCHAIN_PATH is not optional. The build will not

go through unless the environment variable is defined and points to a correct

location. This is because, even if the build went through, the resulting root

file system would be unusable as it would not provide *any* run time library.

 

For interactions b) and c) to take place, the SMP86XX_ROOTFS_PATH environment

variable must be defined and must point to the main directory of the rootfs

package. The easiest way to achieve that is by sourcing the 'rootfs-path.env'

environment file after it is produced, right after your run 'make' or 

'make menuconfig' for the first time.

 

When SMP86XX_ROOTFS_PATH is defined and points to a valid location, the kernel

source package is able to:

 

 b) install its modules to the correct location under the customization 

    directory ('package/customize/source') in the rootfs package. In order to

    then make sure the modules end up in the produced rootfs image, you must

    select the 'customize' option under the 'Package Selection for the target'

    menu in 'make menuconfig'.

 c) grab the produced rootfs image (root_fs_mipsel.cramfs) and use it for its

    initial RAM disk.

 

Thus, in order to produce a rootfs holding the kernel modules and use it as the

kernel initial RAM disk, you need to go through the following steps in order

(note: this is convoluted):

 1) optionally build the toolchain (or use an existing one, more recent than

    2.6.90.0)

 2) source toolchain-path.env in the toolchain package directory

 3) configure the rootfs package with the 'customize' option on in the

    'Package Selection for the target' menu

 4) source 'rootfs-path.env' in the rootfs package directory

 5) configure the kernel, review what is configured as modules, 'make dep'

 6) 'make modules' in the kernel source directory

 7) the 'modules_install' target for the kernel needs that the system map be

    already produced. In order to achieve that, build a first version of the

    kernel: 'make vmlinux'

 8) 'make modules_install' in the kernel source directory. The modules are now

    installed in the rootfs package customization directory.

 9) 'make' in the rootfs package directory. You have now produced a rootfs 

    image holding the kernel modules.

10) 'make' in the kernel source directory. You have now produced a linux ZBF

    image with an initrd holding the kernel modules.

    

Coming features

===============

N/A

 

Troubleshooting

===============

a) when building the cramfs utility tool, the compiler complains that it can't

   find 'zlib.h' or '-lz'.

 

   You need to have the development version of zlib installed on your system.

   How to do that depends on your distribution.

 

 


Platform: | Size: 234248 | Author: mattli001 | Hits:

[GUI Developbrew window manager

Description:

 

Objective
This topic describes how to create a windowed application that will share the display with other applications.
Brew® MP windowed applications need to be written differently than traditional Brew MP applications. Traditional Brew MP applications, when running in the foreground, occupy full screen space and can modify the display at any time. In the windowing framework, multiple applications share the display at the same time and are not allowed to modify the display arbitrarily. A windowed application also needs to create one or more widgets to be used to create the windows.
A windowed application needs to:
·                  Create and initialize one or more widgets to be passed to IWindowMgr_CreateWindow().
The application can implement its own IWidget, or it can make use of an existing IWidget.
·                  Handle the EVT_APP_START_WINDOW event (and create a window).
·                  Implement handlers for visibility changes, focus changes, and extent changes. The implementation of these handlers is dependent on the details of the application.
·                  Draw in two stages:
·                                  Tell the container that drawing is necessary (ICONTAINER_Invalidate()).
·                                  Draw only when told to draw by the container (IWIDGET_Draw()).
Note: A windowed application should not call any functions that modify IDisplay directly. This includes explicit IDisplay function calls or implicit updates, such as calls to IIMAGE_Draw() or ICONTROL_Redraw(). Drawing should happen only on demand, for example, when IWIDGET_Draw() is called for the widget used to create the window. Existing Widget based applications follow these guidelines and, with minor modifications, can be ported to the windowing framework.
Event handling
A windowed application must respond to these events:
EVT_APP_START_WINDOW and EVT_APP_START
A window-based application receives EVT_APP_START_WINDOW first. If the application returns TRUE for this event, the application does not receive EVT_APP_START. If an application needs to support both the environments (window based and non-window based), it should handle both events.
When the application receives EVT_APP_START_WINDOW, it should create one or more windows.
If creation of IWindowMgr0 fails while handling EVT_APP_START_WINDOW, the application should assume that the platform does not support window-based applications. In this case, the application should return FALSE and continue the application logic in the code for EVT_APP_START.
EVT_APP_SUSPEND and EVT_APP_RESUME
After an application returns TRUE for EVT_APP_START_WINDOW, it will not receive EVT_APP_SUSPEND and EVT_APP_RESUME as non-windowed Brew MP applications do. Instead, the application must check for window status events that are sent to the widget through EVT_WDG_SETPROPERTY events. For EVT_WDG_SETPROPERTY events, wParam indicates which property was set, and dwParam specifies the value of the property. When the AEEWindowMgrExt_PROPEX_STATE property has a value of AEEWindowMgrExt_STATE_VISIBLE, the window is visible.
EVT_WDG_WINDOWSTATUS
The EVT_WDG_WINDOWSTATUS event is sent to a widget to notify it about various window related status messages. AEEWindowStatus.h contains information on the meaning of various status messages.
Sample code location

ZIP filename
Location
Run app
hellowindowapp
Brew MP Library
·                       Download and extract the ZIP file.
·                       Compile the app.
·                       Run it on the Brew MP Simulator.

Example of a windowed application
In the hellowindowapp sample, HelloWindowApp_HandleEvent handles the EVT_APP_START_WINDOW event and creates soft key and pop-up windows:
   case EVT_APP_START_WINDOW:   
      DBGPRINTF("EVT_APP_START_WINDOW");
 
      // Create the softkey and popup windows
      HelloWindowApp_CreateSoftkey(pMe);
      HelloWindowApp_CreateOrActivatePopup(pMe);
 
      // Handling this event tells Brew that we are a windowing
      // application.
      return TRUE;  
HelloWindowApp_CreateSoftkey() creates the soft key widget, sets the color text of the widget, then calls HelloWindowApp_CreateWindow() to create the window.
   WidgetWindow *pWindow = &pMe->softkeyWindow;
  
   if (pWindow->piWindowWidget != NULL) return;
   pWindow->pszDbgName = "Softkey";
   pWindow->pMe = pMe;
  
   (void) ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_SoftkeyWidget,
            (void **) &pWindow->piWindowWidget);
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WidgetExtent extent = {0, HWA_SOFTKEY_HEIGHT};
      IWidget_SetExtent(pWindow->piWindowWidget, &extent);
   }
  
   (void) IWidget_SetBGColor(pWindow->piWindowWidget, MAKE_RGBA(200,200,200,255));
  
   // Now set the softkeys text
   {
      IWidget *piTextWidget = NULL;
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY1, &piTextWidget);
     
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Hover", TRUE);
      }
      RELEASEIF(piTextWidget);
 
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY2, &piTextWidget);
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Close", TRUE);
      }
      RELEASEIF(piTextWidget);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Softkey);  
HelloWindowApp_CreateWindow() creates the soft key window, as follows:
   int result;
   uint32 winId;
   AEEWindowProp propList[1];
  
   // Set custom window handler
   HANDLERDESC_Init(&pWindow->hdHandler, HelloWindowApp_WindowHandler, pWindow, NULL);
   IWIDGET_SetHandler(pWindow->piWindowWidget, &pWindow->hdHandler);
        
   propList[0].id = AEEWindowMgrExtProp_CLASS;
   propList[0].pbyLen = sizeof(winClass);
   propList[0].pby = (void *) &winClass;
     
   result = IWindowMgr_CreateWindow(pMe->piWindowMgr, (IQI*) (void *) pWindow->piWindowWidget,
      propList, ARR_SIZE(propList), &winId);
 
   if (result != SUCCESS) {
      DBGPRINTF("Window creation failed for %s: %d", pWindow->pszDbgName, result);
      HelloWindowApp_DestroyWindow(pWindow);
   } else {
      DBGPRINTF("Window %s created: id=%d", pWindow->pszDbgName, winId);
   }
HelloWindowApp_CreateOrActivatePopup() creates the widget for the pop-up window, then calls HelloWindowApp_CreateWindow() to create the pop-up window.
   pWindow->piWindowWidget = HelloWindowApp_CreateAndInitImageWidget(
                                pMe,
                                "popups.main" // Image as defined in appinfo.ini
                             );
 
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WExtent extent = {HWA_POPUP_WIDTH, HWA_POPUP_HEIGHT};
      IWIDGET_SetExtent(pWindow->piWindowWidget, &extent);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Popup);
Related information
·                  See Brew MP Widgets Technology Guide: Creating a Widgets application
·                  See Brew MP API Reference

Base version:
Brew MP 1.0
Tested version:
Brew MP 1.0
Phone tested:
No

 

Platform: | Size: 439828 | Author: bluecrest | Hits:

[Graph programiris location 虹膜的定位

Description: 虹膜的定位
Platform: | Size: 3532991 | Author: zhangly829@163.com | Hits:

[DocumentsPCI BIOS SPECIFICATION

Description: 1. Introduction ............................................................................................................... 1 1.1. Purpose ....................................................................................................... 1 1.2. Scope .......................................................................................................... 1 1.3. Related Documents..................................................................................... 1 1.4. Terms and Abbreviations ........................................................................... 1 2. Functional Description .............................................................................................. 2 3. Assumptions and Constraints .................................................................................... 3 3.1. ROM BIOS Location.................................................................................. 3 3.2. Calling Conventions................................................................................... 3 3.3. BIOS32 Service Directory.......................................................................... 4 3.3.1. Determining the existence of BIOS32 Service Directory............ 4 3.3.2. Calling Interface for BIOS32 Service Directory ......................... 5 3.4. PCI BIOS 32-bit service............................................................................. 6 4. Host Interface ............................................................................................................ 7 4.1. Identifying PCI Resources.......................................................................... 7 4.1.1. PCI BIOS Present ........................................................................ 7 4.1.2. Find PCI Device .......................................................................... 9 4.1.3. Find PCI Class Code ................................................................... 10 4.2. PCI Support Functions ............................................................................... 11 4.2.1. Generate Special Cycle................................................................ 11 4.2.2. Get PCI Interrupt Routing Options.............................................. 12 4.2.3. Set PCI Hardware Interrupt ......................................................... 15 4.3. Accessing Configuration Space.................................................................. 17 4.3.1. Read Configuration Byte ............................................................. 17 4.3.2. Read Configuration Word ........................................................... 18 4.3.3. Read Configuration Dword ......................................................... 19 4.3.4. Write Configuration Byte ............................................................ 20 4.3.5. Write Configuration Word .......................................................... 21 4.3.6. Write Configuration Dword ........................................................ 22 APPENDIX A: Function List......................................................................................... 23 APPENDIX B: Return Code List ................................................................................... 24
Platform: | Size: 55157 | Author: zoufei_008@163.com | Hits:

[Other resourceGB2312点阵字库

Description: 包含GB2312各种字库 索引方法 汉字: qh=*s-0xa0; wh=*(s+1)-0xa0;location=(94*(qh-1)+(wh-1))*128; 英文: location=(*s)*64;
Platform: | Size: 7774868 | Author: wangqikun001@yahoo.com.cn | Hits:

[SourceCode運用基站號碼去google查詢相對應位置座標的程式

Description: 運用基站號碼去google查詢相對應位置座標的程式 如果你在你的手机装过Google Mobile Maps,你可以发现只要你的手机能连GPRS,即使没有GPS功能,也能定位到你手机所在位置,只是精度不是很精确。在探讨这个原理之前,先让我们了解一下一些移动知识,了解什么是MNC/MCC/LAC/Cell ID。 "Mobile Network Code (MNC) 移动网号码,中国联通CDMA系统的MNC为03,中国移动的应该为00。 "Mobile Country Code (MCC) 移动用户所属国家代号,中国是:460。 "Location Area Code (LAC) 地区区域码,用来划分区域,一般小地方就一个LAC,大地方就有多几个。 "Cell Tower ID (Cell ID) CellID代表一个移动基站,如果你有基站数据,查CellID你就可以知道这个基站在哪里,移动公司或者警察通过这个知道你是在哪个基站范围打的移动电话。 这些信息有什么用呢? 通过这些信息可以知道你的手机是从哪个国家,区域和哪个基站接入移动网络的。所以有些防盗手机丢失后,会发一些类似"MCC:460;MNC:01;LAC:7198:CELLID:24989"内容的短信到你指定号码就是这个用途,通过这些信息可以从移动查到你的被盗手机在哪里出现过。不过知道了也没用,中国人口这么密集,就是在你身边你也不知道谁是小偷:) 这些信息从哪里来呢,一般的手机系统都提供相应的API来获取这些信息(Tower Info),比如Window SmartPhone 或Mobile就是通过RIL.dll里的API来取得,每个手机操作系统不一样,相关的信息可以查相关资料。 得到了这些信息,如果没有基站信息表,得到了这些信息也不知道在哪,因为只有移动运营商有相关的信息,除非你是运营商或者警察才能得到这些信息。是不是我们就查不到相应的数据呢,当然不是,强大的Google就有,这里就要提到Google Mobile Maps API,里面囊括了比较全的基站信息,中国的也有,就是偏远地区的有没有就不知道了。Google Mobile Maps本身就是使用的这些信息,感兴趣可以试一试,没有GPS模块也能定位到你手机位置,但精度不大,取决于基站的位置离你多远。 同样我们自己也可以开发相应的手机应用来定位,只要调用Google现成的API(Secret AP
Platform: | Size: 552920 | Author: wjj88.tw@yahoo.com.tw | Hits:

[JSP/Javarapid代码生成器

Description: 现阶段内置模板可以生成的包括: 可以生成java的hibernat model+annotation,hibernate model+xml,dao,manager,struts+struts2 action类 生成jsp的增删改查. (生成的代码与rapid-framework绑定才比较有意义) 通常代码生成器存在的问题. * 二次开发困难 * 过于智能,自动插入我们的项目中,程序员还需考虑旧的代码会不会被覆盖的问题 * 没有将存放模板的目录名称及文件名称利用起来,导致还需配置每个模板文件生成的文件名,目录结构 具体请查看我写的文章:为何代码生成器都要这么智能呢? 本代码生成器的特性 * 基于FreeMarker模板语言 * 基于数据库,并支持多种数据库(mysql,sql server,oracle测试通过) * 半手工方式,生成的代码放在某个目录,再手工拷贝回来工作区 * 易于做二次开发,整个生成器本身就是java源代码,源代码核心十分精简,并且鼓励你做修改代码,也可以作为任何语言的代码生成器 * 配置简单,只有一个配置文件generator.properties * 以application方式运行生成器,生成不同的table直接修改相关java代码即可 * 将文件系统的目录名称及文件名称作为生成器的一部分,模板文件的的名称与目录名称可以直接引用相关变量,如 ${basepackage}/${className}.java (${className}=Blog,则会生成Blog.java) * 以@testExpression结尾的模板文件为有条件忽略,如果testExpression的值在数据模型为true则生成该文件,生成的文件不会包含@testExpression,反之则不生成该文件(应用场景:用于在是否要生成hibernate联合主建的文件中) * 支持文件插入操作,如模板输出生成的地方已经有该同名的文件存在,并且文件中有包含"webapp-generator-insert- location"标记,则模板生成的内容会插入在该标记之后.该特性对如生成的spring配置内容插入spring配置文件十分有用
Platform: | Size: 3083258 | Author: jeekchen | Hits:

[Mathimatics-Numerical algorithms旅行商问题

Description: % MTSPF_GA Fixed Multiple Traveling Salesmen Problem (M-TSP) Genetic Algorithm (GA) % Finds a (near) optimal solution to a variation of the M-TSP by setting % up a GA to search for the shortest route (least distance needed for % each salesman to travel from the start location to individual cities % and back to the original starting place)
Platform: | Size: 4058 | Author: 5501018333@qq.com | Hits:

[SourceCodeiris location

Description:
Platform: | Size: 8596679 | Author: 214072849@qq.com | Hits:

[OtherPseudolite Applications in Positioning and Navigation: Progress and Problems

Description: Global navigation satellite systems have been revolutionising surveying, geodesy, navigation and other position/location sensitive disciplines. However, there are two intrinsic shortcomings in such satellite-based positioning systems: signal attenuation and dependence on the geometric distribution of the satellites. Consequently, the system performance can decrease significantly under some harsh observing conditions. To tackle this problem, some new concepts of positioning with the use of pseudo-satellites have been developed and tested. Pseudo-satellites, also called pseudolites, are ground-based transmitters that can be easily installed wherever they are needed. They therefore offer great flexibility in positioning and navigation applications. Although some initial experimental results are encouraging, there are still some challenging issues that need to be addressed. This paper reviews the historical pseudolite hardware developments and recent progress in pseudolite-based positioning, and discusses the current technical issues.
Platform: | Size: 757629 | Author: angyangxiang | Hits:

[OAOA协同

Description: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="ctl00_Head1"><title> 协同办公系统 </title><link rel="Stylesheet" type="text/css" href="CSS/master.css" /> <link rel="Stylesheet" type="text/css" href="CSS/sitecooperateCss.css" /> <style type="text/css"> .Task_Default_Grid { border:0} .Task_Default_Grid tr td { height:25px; line-height:25px; color:#0173BC; border:0; color:#6E6F71} .Task_Default_Grid tr td a { color:#0073BC} .Task_Default_Title { height:25px; line-height:25px; border-bottom:1px solid #999; color:#333333; font-weight:bold } .Task_Default_Head { height:25px; line-height:25px; text-align:left; font-weight:lighter; } .Task_Default_Head th { text-align:left; border:0;} #Content_right tr td { vertical-align:top} .mobanul { list-style:none; list-style-type:none; margin:0; padding:0} .mobanul li { height:26px; line-height:26px;} .mobanul li a { color:#0073BC} </style> <script type="text/javascript"> var w1 = screen.width; var w2 = w1 - 30; var h1 = screen.height; var h2 = 650; var t1 = (h1 - h2) / 3; //var appearence = 'dependent:yes;menubar:no;resizable:no;status:no;toolbar:no;titlebar:no;left:5;top:50;dialogWidth:'+w2+'px; dialogHeight:602px'; var appearence = 'dependent:yes;menubar:no;resizable:no;status:no;toolbar:no;titlebar:no;dialogWidth:990px; dialogHeight:652px'; function openexamin(id) { var url = 'Task_Examin1.aspx?ID=' + id + '&dt=20111116110724'; window.showModalDialog(url, 'none', appearence); window.location.reload(); } function opengoexamin(id) { var url ='go_examin.aspx?ID=' + id + '&dt=20111116110724'; window.showModalDialog(url, "tasknew", appearence); window.location.reload(); } function openexaminview(id) { var url = 'Go_Examin1.aspx?ID=' + id; window.showModalDialog(url, "goexamin1", appearence); window.location.reload(); } function openexamindaiban(id) { var url = 'Task_Examin1.aspx?daiban=1&ID=' + id + '&dt=20111116110724'; window.showModalDialog(url, 'none', appearence); window.location.reload(); } function openexamindaiban1(id, tasktype,url) { if (tasktype == 'OA') { var url1 = 'Task_Examin1.aspx?daiban=1&ID=' + id + '&dt=20111116110724'; window.showModalDialog(url1, 'none', appearence); window.location.reload(); } else if (tasktype == 'HR') { window.open(url.replace('{', '=').replace('{', '=').replace('{', '=').replace('{', '=').replace('{', '=').replace('{', '=').replace('{', '=')); } else if (tasktype == 'ERP待办') { window.open("http://10.0.3.100:8000/"+url); } else { window.open(url.replace('{', '=').replace('{', '=').replace('{', '=').replace('{', '=').replace('{', '=').replace('{', '=').replace('{', '=').replace('}', '&').replace('}', '&').replace('|', '&').replace('|', '&').replace('|}', '&').replace('|', '&').replace('|', '&').replace('|', '&').replace('*', '/').replace('*', '/').replace('*', '/').replace('*', '/').replace('*', '/')); // window.open(url.replace(new RegExp('|', 'g'), '=')); } } function GetTasksWait() { document.getElementById('ajaxwait').innerHTML = "<img src='/_layouts/images/loading.gif' align=absmiddle style='margin:20px' /><span style='color:#666'>正在加载待办事项,请稍等</span>"; AjaxService.GetWaitTasks("panr", GetGetWaitTasks); } function GetGetWaitTasks(res) { document.getElementById('ajaxwait').innerHTML = res; //window.alert(res); } function TaskNew(templetid) { var url = "task_new1.aspx?templetid="+templetid; var w1 = screen.width; var w2 = w1 - 30; var h1 = screen.height; var h2 = 650; var t1 = (h1 - h2) / 3; var appearence = 'dependent=yes,menubar=no,resizable=no,status=no,toolbar=no,titlebar=no,left=5,top=50,width=965px,height=620px'; var openWindow = window.open(url, "tasknew", appearence); openWindow.focus(); } </script> </head> <body> <form name="aspnetForm" method="post" action="thinkanydefault.aspx" id="aspnetForm"> <div> <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /> <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMTk4NTM3MDU4D2QWAmYPZBYCAgMPZBYCAgEPZBYCAgEPPCsADQEADxYEHgtfIURhdGFCb3VuZGceC18hSXRlbUNvdW50ZmRkGAEFI2N0bDAwJENvbnRlbnRQbGFjZUhvbGRlcjEkZ3JpZFRyYWRlDzwrAAoBCGZkgVPWq+n+ib9NI98bYSPgOP6wYjA=" /> </div> <script type="text/javascript"> //<![CDATA[ var theForm = document.forms['aspnetForm']; if (!theForm) { theForm = document.aspnetForm; } function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } //]]> </script> <script src="/WebResource.axd?d=YUjlm6ycKfnreIke4GK3XQ2&amp;t=633802920069218315" type="text/javascript"></script> <script src="/ScriptResource.axd?d=z3KJcVLT9ijw1U1WP3pQFkrXumDsg6wUOC-1ek6Qo_XZeAuKvPuCDOgdKKFxxdmnnoXJFiMaKmNKva15-BdwOk_xeIPnLbrAuAMPt7xuJyY1&amp;t=ffffffffec2d9970" type="text/javascript"></script> <script src="/ScriptResource.axd?d=z3KJcVLT9ijw1U1WP3pQFkrXumDsg6wUOC-1ek6Qo_XZeAuKvPuCDOgdKKFxxdmnNTUAczOieuXP3zVeTLUjHd_cyvM_8TdB3KcMk-B-U6vUhv5N_CQBxFd9ZErk2oN20&amp;t=ffffffffec2d9970" type="text/javascript"></script> <script src="AjaxService.asmx/js" type="text/javascript"></script> <div id="Content_right" style="background-image:none; padding:5px; padding-left:0px; padding-right:0px"> <script type="text/javascript"> //<![CDATA[ Sys.WebForms.PageRequestManager._initialize('ctl00$ContentPlaceHolder1$ScriptManagerAjax', document.getElementById('aspnetForm')); Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); //]]> </script> <table style="width:100%"> <tr> <td style="padding-left:10px;"> <span style="float:left">&nbsp;待办事项</span><br /><hr style="height:0px; color:#fff; border-top:1px solid #EBEBEB;" /></td> <td style="padding-left:10px;"> <span style="float:left">&nbsp;跟踪事项</span><br /><hr style="height:0px; color:#fff; border-top:1px solid #EBEBEB;" /></td> </tr> <tr> <td style=" padding-top:0; width:49%; padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" rowspan="4" id="ajaxwait"> </td> <td style=" padding:10px; padding-top:0;height:145px;"> <div> </div> </td> </tr> <tr> <td style=" padding:10px; padding-top:0; text-align:right"> <a href="OATaskTrades.aspx" style='color:#0171BD'>[更多...]</a></td> </tr> <tr> <td style="padding-left:10px;"> &nbsp;我的模板<br /><hr style="height:0px; color:#fff; border-top:1px solid #EBEBEB;" /></td> </tr> <tr> <td style=" padding:10px; padding-top:0;"> <table cellpadding=0 cellspacing=0 style="width:100%;height:145px;"><tr><td style="width:50%"> <ul class="mobanul"></ul> </td><td> <ul class="mobanul"></ul> </td></tr></table> </td> </tr> <tr> <td style=" padding:10px; padding-top:0; width:49%; text-align:right"> <a href="Task_Wait.aspx" style='color:#0171BD'>[更多OA待办...]</a></td> <td style=" padding:10px; padding-top:0; text-align:right"> <a href='PersonalTempletsSetup.aspx' style='color:#0171BD'>[更多...]</a><a href='PersonalTempletsSetup.aspx' style='color:#0171BD'>[模板配置]</a></td> </tr> </table> <script type="text/javascript"> GetTasksWait(); </script> </div> <script type="text/javascript"> //<![CDATA[ Sys.Application.initialize(); //]]> </script> </form> </body> </html>
Platform: | Size: 8895 | Author: niyang2005@126.comni | Hits:

[Symbianlocation example

Description: symbian平台下获取用户位置信息
Platform: | Size: 120436 | Author: yellow_lemontree@163.com | Hits:

[OtherFloyd数据结构课程设计的选题

Description: 数据结构课程设计的选题-医院选址问题的解法,基于C/C++而设计的-Data structures course design topics- hospital location problem solution, based on C/C++ designed to
Platform: | Size: 132991 | Author: testsb | Hits:

[matlabwireles location system

Description: 无线定位算法,matlab 平台 chan算法及其加入角度信息后的比较 ChanAlgorithm——基本Chan算法 ChanAlgorithm_A——加入角度信息后的Chan算法,需要注意Chan算法的B矩阵 test——测试文件 CHANFUC——、 chan4是对CHANFUC的测试。
Platform: | Size: 25862 | Author: tudoua | Hits:
« 1 2 ... 45 46 47 48 49 50»

CodeBus www.codebus.net