本文整理汇总了C#中ImageList类的典型用法代码示例。如果您正苦于以下问题:C# ImageList类的具体用法?C# ImageList怎么用?C# ImageList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ImageList类属于命名空间,在下文中一共展示了ImageList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Images
public void Images(IManosContext ctx, int index)
{
var images = new ImageList();
var image = images[index];
ctx.Response.End("Image: {0}, size {1} x {2}", image.Name, image.Width,
image.Height);
}
示例2: Clone
public ImageList Clone() {
ImageList n = new ImageList();
n.images = this.images;
n.transparentColor = this.transparentColor;
n.imageSize = this.imageSize;
return n;
}
示例3: Execute
public override bool Execute()
{
ActiveDisplay.Delete();
var images = new ImageList();
ActiveImage = images[images.Count - 1];
return true;
}
示例4: GetImageList
private ImageList GetImageList()
{
ImageList imageList = new ImageList();
imageList.Images.Add(new Bitmap(typeof(DcopBrowser), "Class.bmp"));
imageList.Images.Add(new Bitmap(typeof(DcopBrowser), "Method.bmp"));
return imageList;
}
示例5: BooProjectNode
static BooProjectNode()
{
imageList =
Utilities.GetImageList(
typeof(BooProjectNode).Assembly.GetManifestResourceStream(
"Boo.BooLangProject.Resources.BooProjectNode.bmp"));
ImageList booFileNodeImageList;
string booFileResourceString = "Boo.BooLangProject.Resources.BooFileNode.bmp";
try
{
booFileNodeImageList =
Utilities.GetImageList(
typeof(BooProjectNode).Assembly.GetManifestResourceStream(
booFileResourceString));
}
catch (Exception e)
{
throw;
}
if (booFileNodeImageList.Images.Count != 1)
throw new FileNotFoundException("Cannot find Boo FileNode Icon at: " + booFileResourceString);
else
imageList.Images.Add(booFileNodeImageList.Images[0]);
}
示例6: Character
public Character()
{
_passives = new List<Passive>();
_skills = new List<Ability>();
physiologies = new List<Physiology>();
images = new ImageList();
}
示例7: MForm4
public MForm4()
{
Size = new Size(250, 200);
Text = "Simple toolbar";
toolBar = new ToolBar();
toolBar.Parent = this;
toolBarIcons = new ImageList();
save = new ToolBarButton();
exit = new ToolBarButton();
save.ImageIndex = 0;
save.Tag = "Save";
exit.ImageIndex = 1;
exit.Tag = "Exit";
toolBar.ImageList = toolBarIcons;
toolBar.ShowToolTips = true;
toolBar.Buttons.AddRange(new ToolBarButton[] {save, exit});
toolBar.ButtonClick += new ToolBarButtonClickEventHandler(OnClicked);
toolBarIcons.Images.Add(Image.FromFile("new.png"));
toolBarIcons.Images.Add(Image.FromFile("exit.png"));
CenterToScreen();
}
示例8: CCSProjectNode
static CCSProjectNode()
{
imageList =
Utilities.GetImageList(
typeof(CCSProjectNode).Assembly.GetManifestResourceStream(
"CCS.Projects.Resources.CCSProjectNode.bmp"));
}
示例9: Clone
public ImageList Clone() {
ImageList n = new ImageList();
n.images = (ArrayList)this.images.Clone();
n.Images = new Images(n.images);
n.transparentColor = this.transparentColor;
n.imageSize = this.imageSize;
return n;
}
示例10: ImageHandler
/// <summary>
/// Builds an ImageHandler object from a Stream providing the bitmap that
/// stores the images for the image list.
/// </summary>
public ImageHandler(Stream resourceStream)
{
if (null == resourceStream)
{
throw new ArgumentNullException("resourceStream");
}
imageList = Utilities.GetImageList(resourceStream);
}
示例11: GenerateImage
protected void GenerateImage()
{
ImageList list = new ImageList();
list.Images.Add(new Icon("..\\..\\hd.ico"));
list.Images.Add(new Icon("..\\..\\folder.ico"));
ImageList = list;
}
示例12: MainForm
public MainForm ()
{
string dir = AppDomain.CurrentDomain.BaseDirectory;
//
// _components
//
_components = new Container ();
//
// _imageList
//
_imageList = new ImageList (_components);
_imageList.ImageSize = new Size (16, 8);
_imageList.Images.Add (new Icon (Path.Combine (dir, "Folder.ico")));
_imageList.Images.Add (new Icon (Path.Combine (dir, "Computer.ico")));
_imageList.Images.Add (new Icon (Path.Combine (dir, "Services.ico")));
_imageList.TransparentColor = Color.Transparent;
//
// _tabControl
//
_tabControl = new TabControl ();
_tabControl.Dock = DockStyle.Top;
_tabControl.Height = 50;
_tabControl.HotTrack = true;
_tabControl.ImageList = _imageList;
_tabControl.SelectedIndex = 1;
Controls.Add (_tabControl);
//
// _folderTab
//
_folderTab = new TabPage ();
_folderTab.Height = 100;
_folderTab.ImageIndex = 0;
_folderTab.Text = "Folder";
_tabControl.Controls.Add (_folderTab);
//
// _computerTab
//
_computerTab = new TabPage ();
_computerTab.ImageIndex = 1;
_computerTab.Text = "Computer";
_tabControl.Controls.Add (_computerTab);
//
// _servicesTab
//
_servicesTab = new TabPage ();
_servicesTab.ImageIndex = 2;
_servicesTab.Text = "Services";
_tabControl.Controls.Add (_servicesTab);
//
// MainForm
//
ClientSize = new Size (300, 50);
Location = new Point (250, 100);
StartPosition = FormStartPosition.Manual;
Text = "bug #81837";
Load += new EventHandler (MainForm_Load);
}
示例13: Main
static void Main ()
{
ResourceManager resMgr = new ResourceManager (typeof (MainForm));
ImageList imgList = new ImageList ();
imgList.ColorDepth = ColorDepth.Depth16Bit;
imgList.ImageSize = new Size (16, 16);
imgList.ImageStream = ((ImageListStreamer) (resMgr.GetObject ("Locs.ImageStream")));
imgList.TransparentColor = Color.Transparent;
}
示例14: ControlRequestHeaderSetting
public ControlRequestHeaderSetting()
{
InitializeComponent();
this.Dock = System.Windows.Forms.DockStyle.Fill;
ImageList ImgList = new ImageList();
ImgList.ImageSize = new Size(1, 25);
lv_header.SmallImageList = ImgList;
rightMenu_Header.Opening += rightMenu_Header_Opening;
lv_header.AfterEditSubItem += lv_header_AfterEditSubItem;
}
示例15: ConvertToXPM
/// <summary>
/// cicles an image list object to convert contained images into xpm
/// at the same time we add converted images into an arraylist that lets us to retrieve images later
/// </summary>
/// <param name="imageList">The image list to transform.</param>
/// <param name="transparentColor">The overriding transparent Color</param>
/// <returns></returns>
static public List<string> ConvertToXPM(ImageList imageList, string transparentColor)
{
List<string> xpmImages = new List<string>();
foreach (Image image in imageList.Images)
{
if (image is Bitmap)
{
xpmImages.Add(ConvertToXPM(image as Bitmap, transparentColor));
}
}
return xpmImages;
}