示例#1
0
        /// <summary>
        /// Populate the start page.
        /// </summary>
        private void PopulateStartPageList()
        {
            listViewMain.Clear();
            listViewMain.Groups.Insert(0, new ListViewGroup("Standard", HorizontalAlignment.Left));
            PopulateStartPageArgs Args = new PopulateStartPageArgs();

            listViewMain.Items.Clear();
            PopulateStartPage(this, Args);
            foreach (PopulateStartPageArgs.Description Description in Args.Descriptions)
            {
                ListViewItem Item = new ListViewItem();
                Item.Text        = Description.Name;
                Item.Tag         = Description.OnClick;
                Item.ToolTipText = "Double click to open";

                // Load image
                int ImageIndex = ListViewImages.Images.IndexOfKey(Description.ResourceNameForImage);
                if (ImageIndex == -1)
                {
                    Stream s    = Assembly.GetExecutingAssembly().GetManifestResourceStream(Description.ResourceNameForImage);
                    Bitmap Icon = new Bitmap(s); // Properties.Resources.ResourceManager.GetObject(Description.ResourceNameForImage) as Bitmap;
                    if (Icon != null)
                    {
                        ListViewImages.Images.Add(Description.ResourceNameForImage, Icon);
                        ImageIndex = ListViewImages.Images.Count - 1;
                    }
                }
                Item.ImageIndex = ImageIndex;
                listViewMain.Items.Add(Item);
                Item.Group = listViewMain.Groups[0];
            }
        }
示例#2
0
        /// <summary>
        /// Populate the start page.
        /// </summary>
        private void PopulateStartPageList()
        {
            standardList.Clear();
            PopulateStartPageArgs Args = new PopulateStartPageArgs();

            PopulateStartPage(this, Args);
            foreach (PopulateStartPageArgs.Description Description in Args.Descriptions)
            {
                Gdk.Pixbuf itemPixbuf = new Gdk.Pixbuf(null, Description.ResourceNameForImage, 48, 48);
                standardList.AppendValues(itemPixbuf, Description.Name, "Double click to open", Description.OnClick);
            }
        }
示例#3
0
 /// <summary>
 /// Populate the start page.
 /// </summary>
 private void PopulateStartPageList()
 {
     standardList.Clear();
     PopulateStartPageArgs Args = new PopulateStartPageArgs();
     PopulateStartPage(this, Args);
     foreach (PopulateStartPageArgs.Description Description in Args.Descriptions)
     {
         Gdk.Pixbuf itemPixbuf = new Gdk.Pixbuf(null, Description.ResourceNameForImage, 48, 48);
         standardList.AppendValues(itemPixbuf, Description.Name, "Double click to open", Description.OnClick);
     }
 }