本文整理汇总了C#中Gtk.ListStore类的典型用法代码示例。如果您正苦于以下问题:C# Gtk.ListStore类的具体用法?C# Gtk.ListStore怎么用?C# Gtk.ListStore使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Gtk.ListStore类属于命名空间,在下文中一共展示了Gtk.ListStore类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EventsSearch
public EventsSearch()
{
this.Build();
store= new Gtk.ListStore (typeof(string),typeof(string),typeof(OpenMetaverse.DirectoryManager.EventsSearchData));
treeview1.AppendColumn("Event Name",new Gtk.CellRendererText(),"text",0);
treeview1.AppendColumn("Time",new Gtk.CellRendererText(),"text",1);
store.SetSortColumnId(0,Gtk.SortType.Ascending);
treeview1.Model=store;
MainClass.onRegister += new MainClass.register(MainClass_onRegister);
MainClass.onDeregister += new MainClass.deregister(MainClass_onDeregister);
if(MainClass.client != null ) { MainClass_onRegister(); }
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Sports.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Pageants.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Nightlife.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Miscellaneous.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.LiveMusic.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Games.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Education.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Discussion.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Commercial.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Charity.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.Arts.ToString());
this.combobox_category.InsertText(0,OpenMetaverse.DirectoryManager.EventCategories.All.ToString());
this.combobox_category.Active=0;
this.button_notify.Sensitive=false;
this.button_teleport.Sensitive=false;
}
示例2: AttachToProcessDialog
public AttachToProcessDialog()
{
this.Build();
store = new Gtk.ListStore (typeof(ProcessInfo), typeof(string), typeof(string));
tree.Model = store;
tree.AppendColumn ("PID", new Gtk.CellRendererText (), "text", 1);
tree.AppendColumn (GettextCatalog.GetString ("Process Name"), new Gtk.CellRendererText (), "text", 2);
tree.RowActivated += OnRowActivated;
state = new TreeViewState (tree, 1);
Refresh ();
comboDebs.Sensitive = false;
buttonOk.Sensitive = false;
tree.Selection.UnselectAll ();
tree.Selection.Changed += OnSelectionChanged;
Gtk.TreeIter it;
if (store.GetIterFirst (out it))
tree.Selection.SelectIter (it);
timeoutHandler = GLib.Timeout.Add (3000, Refresh);
}
示例3: ComponentList
public ComponentList()
{
this.Build();
this.Name = "Component List";
Gtk.TreeViewColumn componentColumn = new TreeViewColumnLocalized() { Title = "Component", Sizing = Gtk.TreeViewColumnSizing.Fixed, FixedWidth = 200 };
Gtk.TreeViewColumn instanceCountColumn = new TreeViewColumnLocalized() { Title = "Instances", Sizing = Gtk.TreeViewColumnSizing.Fixed, FixedWidth = 50 };
Gtk.TreeViewColumn descriptionColumn = new TreeViewColumnLocalized() { Title = "Description", Sizing = Gtk.TreeViewColumnSizing.Fixed, FixedWidth = 300 };
// Add the columns to the TreeView
treeview1.AppendColumn(instanceCountColumn);
treeview1.AppendColumn(componentColumn);
treeview1.AppendColumn(descriptionColumn);
// Create the text cells that will display the content
Gtk.CellRendererText componentsCell = new Gtk.CellRendererText();
componentColumn.PackStart(componentsCell, true);
Gtk.CellRendererText instanceCountCell = new Gtk.CellRendererText();
instanceCountColumn.PackStart(instanceCountCell, true);
Gtk.CellRendererText descriptionCell = new Gtk.CellRendererText();
descriptionColumn.PackStart(descriptionCell, true);
componentColumn.AddAttribute(componentsCell, "text", TypenameIndex);
instanceCountColumn.AddAttribute(instanceCountCell, "text", InstanceCountIndex);
descriptionColumn.AddAttribute(descriptionCell, "text", DescriptionIndex);
// Create a model that will hold some value, assign the model to the TreeView
listStore = new Gtk.ListStore(typeof(ComponentFactoryInformation), typeof(int), typeof(string), typeof(string));
treeview1.Model = listStore;
treeview1.Selection.Changed += HandleCursorChanged; // do not use treeview1.CursorChanged - see http://ntswiki.nts.neusoft.local/wiki/Known_GTKSharp_Issues
}
示例4: NoteEditor
public NoteEditor()
{
this.Build();
var store = new Gtk.ListStore(typeof(string), typeof(string));
store.AppendValues("gtk-edit", "no, you are the fuel");
var column = new Gtk.TreeViewColumn();
var iconRenderer = new Gtk.CellRendererPixbuf();
column.PackStart(iconRenderer, false);
column.AddAttribute(iconRenderer, "stock-id", 0);
var textRenderer = new Gtk.CellRendererText();
column.PackStart(textRenderer, true);
column.AddAttribute(textRenderer, "text", 1);
NoteChildrenTreeView.Model = store;
NoteChildrenTreeView.AppendColumn(column);
// http://www.mono-project.com/GtkSharp_TreeView_Tutorial
// http://afaikblog.files.wordpress.com/2012/05/edit-item1.png
// http://james.newtonking.com/projects/json/help/
// http://mono.1490590.n4.nabble.com/NodeView-TreeView-Image-and-Text-into-the-same-column-td1546566.html
// OKAY, I NEED TO DECIDE HOW I AM GOING TO BIND THINGS
// I definitely want a ViewModel.
}
示例5: Load
public void Load (MoonlightProject project)
{
this.validateXamlCheck.Active = project.ValidateXaml;
this.throwXamlErrorsCheck.Active = project.ThrowErrorsInValidation;
//TODO: enable after implementing xaml validation
// this.throwXamlErrorsCheck.Sensitive = this.validateXamlCheck.Active;
this.xamlAlignment.Sensitive = false;
this.applicationOptionsBox.Visible = project.SilverlightApplication;
if (!project.SilverlightApplication)
return;
this.xapFilenameEntry.Text = project.XapFilename ?? "";
this.generateManifestCheck.Active = project.GenerateSilverlightManifest;
this.manifestTemplateFilenameEntry.Text = project.SilverlightManifestTemplate ?? "";
this.manifestTemplateFilenameEntry.Sensitive = this.generateManifestCheck.Active;
this.generateTestPageCheck.Active = project.CreateTestPage;
this.testPageFilenameEntry.Text = project.TestPageFileName ?? "";
this.testPageFilenameEntry.Sensitive = this.generateTestPageCheck.Active;
this.entryPointCombo.Entry.Text = project.SilverlightAppEntry;
classListStore = new Gtk.ListStore (typeof(string));
entryPointCombo.Model = classListStore;
entryPointCombo.TextColumn = 0;
FillClasses (project);
}
示例6: PlacesSearch
public PlacesSearch()
{
this.Build();
store= new Gtk.ListStore (typeof(string),typeof(string),typeof(string),typeof(string),typeof(Vector3),typeof(UUID));
MyTreeViewColumn mycol;
mycol = new MyTreeViewColumn("Name", new Gtk.CellRendererText(), "text", 0,true);
mycol.setmodel(store);
treeview1.AppendColumn(mycol);
mycol = new MyTreeViewColumn("Sim", new Gtk.CellRendererText(), "text", 1,false);
mycol.setmodel(store);
treeview1.AppendColumn(mycol);
mycol = new MyTreeViewColumn("Traffic", new Gtk.CellRendererText(), "text", 2,false);
mycol.setmodel(store);
treeview1.AppendColumn(mycol);
store.SetSortFunc(2,numericsort);
mycol = new MyTreeViewColumn("Location", new Gtk.CellRendererText(), "text", 3,false);
mycol.setmodel(store);
treeview1.AppendColumn(mycol);
treeview1.HeadersClickable = true;
treeview1.Model=store;
store.SetSortColumnId(0, Gtk.SortType.Ascending);
MainClass.onRegister += new MainClass.register(MainClass_onRegister);
MainClass.onDeregister += new MainClass.deregister(MainClass_onDeregister);
if(MainClass.client != null ) { MainClass_onRegister(); }
}
示例7: FlagsSelectorDialog
public FlagsSelectorDialog(Gtk.Window parent, EnumDescriptor enumDesc, uint flags, string title)
{
this.flags = flags;
this.parent = parent;
Glade.XML xml = new Glade.XML (null, "stetic.glade", "FlagsSelectorDialog", null);
xml.Autoconnect (this);
store = new Gtk.ListStore (typeof(bool), typeof(string), typeof(uint));
treeView.Model = store;
Gtk.TreeViewColumn col = new Gtk.TreeViewColumn ();
Gtk.CellRendererToggle tog = new Gtk.CellRendererToggle ();
tog.Toggled += new Gtk.ToggledHandler (OnToggled);
col.PackStart (tog, false);
col.AddAttribute (tog, "active", 0);
Gtk.CellRendererText crt = new Gtk.CellRendererText ();
col.PackStart (crt, true);
col.AddAttribute (crt, "text", 1);
treeView.AppendColumn (col);
foreach (Enum value in enumDesc.Values) {
EnumValue eval = enumDesc[value];
if (eval.Label == "")
continue;
uint val = (uint) (int) eval.Value;
store.AppendValues (((flags & val) != 0), eval.Label, val);
}
}
示例8: NotebookManager
static NotebookManager ()
{
notebooks = new Gtk.ListStore (typeof (Notebook));
sortedNotebooks = new Gtk.TreeModelSort (notebooks);
sortedNotebooks.SetSortFunc (0, new Gtk.TreeIterCompareFunc (CompareNotebooksSortFunc));
sortedNotebooks.SetSortColumnId (0, Gtk.SortType.Ascending);
filteredNotebooks = new Gtk.TreeModelFilter (sortedNotebooks, null);
filteredNotebooks.VisibleFunc = FilterNotebooks;
AllNotesNotebook allNotesNotebook = new AllNotesNotebook ();
Gtk.TreeIter iter = notebooks.Append ();
notebooks.SetValue (iter, 0, allNotesNotebook);
UnfiledNotesNotebook unfiledNotesNotebook = new UnfiledNotesNotebook ();
iter = notebooks.Append ();
notebooks.SetValue (iter, 0, unfiledNotesNotebook);
// <summary>
// The key for this dictionary is Notebook.Name.ToLower ().
// </summary>
notebookMap = new Dictionary<string, Gtk.TreeIter> ();
// Load the notebooks now if the notes have already been loaded
// or wait for the NotesLoaded event otherwise.
if (Tomboy.DefaultNoteManager.Initialized)
LoadNotebooks ();
else
Tomboy.DefaultNoteManager.NotesLoaded += OnNotesLoaded;
}
示例9: PoliciesListSummaryTree
public PoliciesListSummaryTree()
: base(new Gtk.ListStore (typeof (string)))
{
CanFocus = false;
HeadersVisible = false;
store = (Gtk.ListStore) Model;
this.AppendColumn ("", new Gtk.CellRendererText (), "text", 0);
}
示例10: BuildArray
public void BuildArray ()
{
Gtk.ListStore listStore = new Gtk.ListStore (typeof (string));
for (int i = min; i < (max + 1); i++) {
listStore.AppendValues(i.ToString());
}
combobox.Model = listStore;
}
示例11: ServerWidget
public ServerWidget()
{
Trace.Call();
f_NetworkListStore = new Gtk.ListStore(typeof(string));
Build();
Init();
}
示例12: FileList
public FileList()
{
Items = new ArrayList ();
store = new Gtk.ListStore (typeof (string), typeof (string), typeof(string), typeof(FileListItem), typeof (Gdk.Pixbuf));
Model = store;
HeadersVisible = true;
HeadersClickable = true;
Reorderable = true;
RulesHint = true;
Gtk.TreeViewColumn name_column = new Gtk.TreeViewColumn ();
name_column.Title = GettextCatalog.GetString ("Files");
Gtk.TreeViewColumn size_column = new Gtk.TreeViewColumn ();
size_column.Title = GettextCatalog.GetString ("Size");
Gtk.TreeViewColumn modi_column = new Gtk.TreeViewColumn ();
modi_column.Title = GettextCatalog.GetString ("Last modified");
Gtk.CellRendererPixbuf pix_render = new Gtk.CellRendererPixbuf ();
name_column.PackStart (pix_render, false);
name_column.AddAttribute (pix_render, "pixbuf", 4);
Gtk.CellRendererText render1 = new Gtk.CellRendererText ();
name_column.PackStart (render1, false);
name_column.AddAttribute (render1, "text", 0);
Gtk.CellRendererText render2 = new Gtk.CellRendererText ();
size_column.PackStart (render2, false);
size_column.AddAttribute (render2, "text", 1);
Gtk.CellRendererText render3 = new Gtk.CellRendererText ();
modi_column.PackStart (render3, false);
modi_column.AddAttribute (render3, "text", 2);
AppendColumn(name_column);
AppendColumn(size_column);
AppendColumn(modi_column);
this.PopupMenu += new Gtk.PopupMenuHandler (OnPopupMenu);
this.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler (OnButtonReleased);
this.Selection.Changed += new EventHandler (OnSelectionChanged);
watcher = new FileSystemWatcher ();
if(watcher != null) {
watcher.NotifyFilter = NotifyFilters.FileName;
watcher.EnableRaisingEvents = false;
watcher.Renamed += new RenamedEventHandler(fileRenamed);
watcher.Deleted += new FileSystemEventHandler(fileDeleted);
watcher.Created += new FileSystemEventHandler(fileCreated);
watcher.Changed += new FileSystemEventHandler(fileChanged);
}
}
示例13: ListServerConnection
/// <summary>
/// Constructor
/// </summary>
public ListServerConnection(Gtk.ListStore listStore)
{
this.serverWindow = ServerWindow.GetInstance();
this.listStore = listStore;
this.serverList = new TServerList();
this.errorWindow = ErrorWindow.GetInstance();
//this.errorWindow.ShowAll();
//this.errorWindow.Hide();
//this.ReceiveData();
}
示例14: getMessageList
public Gtk.ListStore getMessageList()
{
MessagesRepository messageRepo = DaoFactory.getDao (DaoFactory.MySql).getMessagesRepository ();
List<Message> messages = messageRepo.getAllMessages ();
Gtk.ListStore messageList = new Gtk.ListStore ( typeof(string), typeof(string), typeof(string) );
foreach (Message message in messages)
{
messageList.AppendValues (message.getNumberReceiver (), message.getMessageBody (), Convert.ToString (message.getSendAt ()));
}
return messageList;
}
示例15: Searches
public Searches()
{
this.Build();
store= new Gtk.ListStore (typeof(bool),typeof(string),typeof(UUID));
treeview1.AppendColumn("Online",new Gtk.CellRendererToggle(),"active",0);
treeview1.AppendColumn("Name",new Gtk.CellRendererText(),"text",1);
store.SetSortColumnId(1,Gtk.SortType.Ascending);
treeview1.Model=store;
MainClass.onRegister += new MainClass.register(MainClass_onRegister);
MainClass.onDeregister += new MainClass.deregister(MainClass_onDeregister);
if(MainClass.client != null ) { MainClass_onRegister(); }
}