欢迎光临

木子屋

标题: Android.UI.Controls

作者: dnawo

日期: 2011-01-18 06:07 PM

分类: Android编程

内容: 复制内容到剪贴板 程序代码using System;
using System.Collections.Generic;
using System.Text;
/*
* Description: The controls class of Android.
* Author: dnawo
* E-Mail: dnawo@mzwu.com
* Date: 2011-01-18
*/
namespace Android.UI.Controls
{
#region parent class
/// <summary>
/// class control
/// </summary>
public class AndroidControl
{
private string _name;
private string _relpath;
private string _abspath;
private int _width;
private int _height;
public AndroidControl()
: this("", "", 0, 0)
{ }
public AndroidControl(string name, string relpath, int width, int height)
{
this._name = name;
this._relpath = relpath;
this._abspath = "";
this._width = width;
this._height = height;
}
/// <summary>
/// 名称,只读
/// </summary>
public string Name { get { return this._name; } }
/// <summary>
/// 相对路径,只读
/// </summary>
public string RelPath { get { return this._relpath; } }
/// <summary>
/// 本地路径
/// </summary>
public string AbsPath { get { return this._abspath; } set { _abspath = value; } }
/// <summary>
/// 宽度,只读
/// </summary>
public int Width { get { return this._width; } }
/// <summary>
/// 高度,只读
/// </summary>
public int Height { get { return this._height; } }
/// <summary>
/// ToString
/// </summary>
/// <returns></returns>
public override string ToString()
{
return this.Name;
}
}
struct Path
{
public static readonly string drawable = "drawable";
public static readonly string drawableport = "drawable-port";
public static readonly string drawableland = "drawable-land";
}
#endregion
#region menu controls(6)
/// <summary>
/// Add
/// </summary>
public class Add : AndroidControl
{
public Add()
: base("Add", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Search
/// </summary>
public class Search : AndroidControl
{
public Search()
: base("Search", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Notifications
/// </summary>
public class Notifications : AndroidControl
{
public Notifications()
: base("Notifications", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Settings2
/// </summary>
public class Settings2 : AndroidControl
{
public Settings2()
: base("Settings2", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Theme
/// </summary>
public class Theme : AndroidControl
{
public Theme()
: base("Theme", Path.drawable, 48, 48)
{ }
}
#endregion
#region main controls(5+3+3+2+1)
#region search controls(4+1)
/// <summary>
/// Search_floater_port
/// </summary>
public class Search_floater_port : AndroidControl
{
public Search_floater_port()
: base("search_floater", Path.drawableport, 320, 62)
{ }
}
/// <summary>
/// Textfield_searchwidget_default_port
/// </summary>
public class Textfield_searchwidget_default_port : AndroidControl
{
public Textfield_searchwidget_default_port()
: base("textfield_searchwidget_default", Path.drawableport, 296, 42)
{ }
}
/// <summary>
/// Textfield_searchwidget_pressed_port
/// </summary>
public class Textfield_searchwidget_pressed_port : AndroidControl
{
public Textfield_searchwidget_pressed_port()
: base("textfield_searchwidget_pressed", Path.drawableport, 296, 42)
{ }
}
/// <summary>
/// Textfield_searchwidget_selected_port
/// </summary>
public class Textfield_searchwidget_selected_port : AndroidControl
{
public Textfield_searchwidget_selected_port()
: base("textfield_searchwidget_selected", Path.drawableport, 296, 42)
{ }
}
/// <summary>
/// Search_floater_land
/// </summary>
public class Search_floater_land : AndroidControl
{
public Search_floater_land()
: base("search_floater", Path.drawableland, 424, 62)
{ }
}
/// <summary>
/// Textfield_searchwidget_default_land
/// </summary>
public class Textfield_searchwidget_default_land : AndroidControl
{
public Textfield_searchwidget_default_land()
: base("textfield_searchwidget_default", Path.drawableland, 400, 42)
{ }
}
/// <summary>
/// Textfield_searchwidget_pressed_land
/// </summary>
public class Textfield_searchwidget_pressed_land : AndroidControl
{
public Textfield_searchwidget_pressed_land()
: base("textfield_searchwidget_pressed", Path.drawableland, 400, 42)
{ }
}
/// <summary>
/// Textfield_searchwidget_selected_land
/// </summary>
public class Textfield_searchwidget_selected_land : AndroidControl
{
public Textfield_searchwidget_selected_land()
: base("textfield_searchwidget_selected", Path.drawableland, 400, 42)
{ }
}
/// <summary>
/// Placeholder_google
/// </summary>
public class Placeholder_google : AndroidControl
{
public Placeholder_google()
: base("placeholder_google", Path.drawable, 61, 24)
{ }
}
#endregion
#region clock controls(3)
/// <summary>
/// Clock_dial
/// </summary>
public class Clock_dial : AndroidControl
{
public Clock_dial()
: base("clock_dial", Path.drawable, 146, 146)
{ }
}
/// <summary>
/// Clock_hour
/// </summary>
public class Clock_hour : AndroidControl
{
public Clock_hour()
: base("clock_hour", Path.drawable, 14, 146)
{ }
}
/// <summary>
/// Clock_minute
/// </summary>
public class Clock_minute : AndroidControl
{
public Clock_minute()
: base("clock_minute", Path.drawable, 18, 146)
{ }
}
#endregion
#region tray_handle controls(3)
/// <summary>
/// Tray_handle_normal_port
/// </summary>
public class Tray_handle_normal_port : AndroidControl
{
public Tray_handle_normal_port()
: base("tray_handle_normal", Path.drawableport, 320, 56)
{ }
}
/// <summary>
/// Tray_handle_pressed_port
/// </summary>
public class Tray_handle_pressed_port : AndroidControl
{
public Tray_handle_pressed_port()
: base("tray_handle_pressed", Path.drawableport, 320, 56)
{ }
}
/// <summary>
/// Tray_handle_selected_port
/// </summary>
public class Tray_handle_selected_port : AndroidControl
{
public Tray_handle_selected_port()
: base("tray_handle_selected", Path.drawableport, 320, 56)
{ }
}
/// <summary>
/// Tray_handle_normal_land
/// </summary>
public class Tray_handle_normal_land : AndroidControl
{
public Tray_handle_normal_land()
: base("tray_handle_normal", Path.drawableland, 56, 320)
{ }
}
/// <summary>
/// Tray_handle_pressed_land
/// </summary>
public class Tray_handle_pressed_land : AndroidControl
{
public Tray_handle_pressed_land()
: base("tray_handle_pressed", Path.drawableland, 56, 320)
{ }
}
/// <summary>
/// Tray_handle_selected_land
/// </summary>
public class Tray_handle_selected_land : AndroidControl
{
public Tray_handle_selected_land()
: base("tray_handle_selected", Path.drawableland, 56, 320)
{ }
}
#endregion
#region delete controls(2)
/// <summary>
/// Delete_handle_port
/// </summary>
public class Delete_handle_port : AndroidControl
{
public Delete_handle_port()
: base("delete_handle", Path.drawableport, 110, 49)
{ }
}
/// <summary>
/// Delete_handle_normal_port
/// </summary>
public class Delete_handle_normal_port : AndroidControl
{
public Delete_handle_normal_port()
: base("delete_handle_normal", Path.drawableport, 110, 49)
{ }
}
/// <summary>
/// Delete_handle_land
/// </summary>
public class Delete_handle_land : AndroidControl
{
public Delete_handle_land()
: base("delete_handle", Path.drawableland, 49, 110)
{ }
}
/// <summary>
/// Delete_handle_normal_land
/// </summary>
public class Delete_handle_normal_land : AndroidControl
{
public Delete_handle_normal_land()
: base("delete_handle_normal", Path.drawableland, 49, 110)
{ }
}
#endregion
/// <summary>
/// Wallpaper
/// </summary>
public class Wallpaper : AndroidControl
{
public Wallpaper()
: base("wallpaper", Path.drawable, 48, 48)
{ }
}
#endregion
#region app controls(22+1)
/// <summary>
/// Folder
/// </summary>
public class Folder : AndroidControl
{
public Folder()
: base("folder", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Folder_open
/// </summary>
public class Folder_open : AndroidControl
{
public Folder_open()
: base("folder_open", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Ic_launcher_folder
/// </summary>
public class Ic_launcher_folder : AndroidControl
{
public Ic_launcher_folder()
: base("ic_launcher_folder", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Ic_launcher_folder_open
/// </summary>
public class Ic_launcher_folder_open : AndroidControl
{
public Ic_launcher_folder_open()
: base("ic_launcher_folder_open", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Widget_clock
/// </summary>
public class Widget_clock : AndroidControl
{
public Widget_clock()
: base("widget_clock", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Widget_search
/// </summary>
public class Widget_search : AndroidControl
{
public Widget_search()
: base("widget_search", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Internet
/// </summary>
public class Internet : AndroidControl
{
public Internet()
: base("Internet", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Calculator
/// </summary>
public class Calculator : AndroidControl
{
public Calculator()
: base("Calculator", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Camera
/// </summary>
public class Camera : AndroidControl
{
public Camera()
: base("Camera", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Market
/// </summary>
public class Market : AndroidControl
{
public Market()
: base("Market", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Maps
/// </summary>
public class Maps : AndroidControl
{
public Maps()
: base("Maps", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Messages
/// </summary>
public class Messages : AndroidControl
{
public Messages()
: base("Messages", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Settings
/// </summary>
public class Settings : AndroidControl
{
public Settings()
: base("Settings", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Clock
/// </summary>
public class Clock : AndroidControl
{
public Clock()
: base("Clock", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Music
/// </summary>
public class Music : AndroidControl
{
public Music()
: base("Music", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Email
/// </summary>
public class Email : AndroidControl
{
public Email()
: base("Email", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Phone
/// </summary>
public class Phone : AndroidControl
{
public Phone()
: base("Phone", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// People
/// </summary>
public class People : AndroidControl
{
public People()
: base("People", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Gallerypicker
/// </summary>
public class Gallerypicker : AndroidControl
{
public Gallerypicker()
: base("Gallerypicker", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Videocamera
/// </summary>
public class Videocamera : AndroidControl
{
public Videocamera()
: base("Videocamera", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Voicedialeractivity
/// </summary>
public class Voicedialeractivity : AndroidControl
{
public Voicedialeractivity()
: base("Voicedialeractivity", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Recognitionactivity
/// </summary>
public class Recognitionactivity : AndroidControl
{
public Recognitionactivity()
: base("Recognitionactivity", Path.drawable, 48, 48)
{ }
}
/// <summary>
/// Icon_default
/// </summary>
public class Icon_default : AndroidControl
{
public Icon_default()
: base("icon_default", Path.drawable, 48, 48)
{ }
}
#endregion
#region other controls(2+7)
#region ic controls(2)
/// <summary>
/// Ic_tray_collapse_port
/// </summary>
public class Ic_tray_collapse_port : AndroidControl
{
public Ic_tray_collapse_port()
: base("ic_tray_collapse", Path.drawableport, 1, 1)
{ }
}
/// <summary>
/// Ic_tray_expand_port
/// </summary>
public class Ic_tray_expand_port : AndroidControl
{
public Ic_tray_expand_port()
: base("ic_tray_expand", Path.drawableport, 1, 1)
{ }
}
/// <summary>
/// Ic_tray_collapse_land
/// </summary>
public class Ic_tray_collapse_land : AndroidControl
{
public Ic_tray_collapse_land()
: base("ic_tray_collapse", Path.drawableland, 1, 1)
{ }
}
/// <summary>
/// Ic_tray_expand_land
/// </summary>
public class Ic_tray_expand_land : AndroidControl
{
public Ic_tray_expand_land()
: base("ic_tray_expand", Path.drawableland, 1, 1)
{ }
}
#endregion
/// <summary>
/// Focused_application_background
/// </summary>
public class Focused_application_background : AndroidControl
{
public Focused_application_background()
: base("focused_application_background", Path.drawable, 78, 65)
{ }
}
/// <summary>
/// Pressed_application_background
/// </summary>
public class Pressed_application_background : AndroidControl
{
public Pressed_application_background()
: base("pressed_application_background", Path.drawable, 78, 65)
{ }
}
/// <summary>
/// Pattern_carbon_fiber_dark
/// </summary>
public class Pattern_carbon_fiber_dark : AndroidControl
{
public Pattern_carbon_fiber_dark()
: base("pattern_carbon_fiber_dark", Path.drawable, 320, 480)
{ }
}
/// <summary>
/// Drawer
/// </summary>
public class Drawer : AndroidControl
{
public Drawer()
: base("drawer", Path.drawable, 320, 480)
{ }
}
/// <summary>
/// Ic_btn_search
/// </summary>
public class Ic_btn_search : AndroidControl
{
public Ic_btn_search()
: base("ic_btn_search", Path.drawable, 1, 1)
{ }
}
/// <summary>
/// Ic_btn_speak_now
/// </summary>
public class Ic_btn_speak_now : AndroidControl
{
public Ic_btn_speak_now()
: base("ic_btn_speak_now", Path.drawable, 26, 30)
{ }
}
/// <summary>
/// Theme_icon
/// </summary>
public class Theme_icon : AndroidControl
{
public Theme_icon()
: base("theme_icon", Path.drawable, 48, 48)
{ }
}
#endregion
}

+ 查看当前日志评论 (0)

登录

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 1.980 ms

返回

标题: Android.UI.Controls

你没有权限发表评论

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 1.980 ms

返回

暂无评论

返回

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 2.027 ms

返回