protected void OnNodeviewTableChange(object o, System.EventArgs args) { Gtk.NodeSelection selection = (Gtk.NodeSelection)o; CampaignTreeNode node = (CampaignTreeNode)selection.SelectedNode; lblState.Text = "Selected campaign " + node.Name; //label.Text = "Current Selection: \"" + node.SongTitle + "\" by " + node.Artist; }
void NvInfos_NodeSelection_Changed(object sender, EventArgs e) { Gtk.NodeSelection selection = (Gtk.NodeSelection)sender; GameInfoNode node = selection.SelectedNode as GameInfoNode; if (node != null) { SelectedGameInfo = node.GameInfo; previewWidget.GameInfo = SelectedGameInfo; } }
void OnSelectionChanged(object o, System.EventArgs args) { try { Gtk.NodeSelection selection = (Gtk.NodeSelection)o; NoteNode node = (NoteNode)selection.SelectedNode; loadNoteToBuffer(node); } catch (Exception e) { Console.WriteLine("selection changed ERROR: " + e.Message); } }
void OnSelectionChanged(object o, System.EventArgs args) { Gtk.NodeSelection selection = (Gtk.NodeSelection)o; HeapSnapshotExplorer.StatisticsNode node = (HeapSnapshotExplorer.StatisticsNode)selection.SelectedNode; if (node != null) { currentSelection = node.Statistics; } else { currentSelection = null; } }
private void SelectionHandleChanged(object sender, EventArgs e) { Gtk.NodeSelection selection = (Gtk.NodeSelection)sender; ExperimentHelper.ClearHighlightIOInExperiment(m_experimentOwner); //selected node maybe null if the moust moved out from the tree view, and selection change to nothing if (selection.SelectedNode != null) { IOItemNode item = (IOItemNode)selection.SelectedNode; ExperimentHelper.HighlightIOInExperiment(m_experimentOwner, item.MappedTo); } }
public EpisodesEditorGui(iMetaLibrary.Metadata.TvFileMeta Meta) { this.Build(); this.Meta = Meta; this.buttonOk.Clicked += HandleButtonOkhandleClicked; string tbnFile = Meta.Filename.Substring(0, Meta.Filename.LastIndexOf(".") + 1) + "tbn"; if (System.IO.File.Exists(tbnFile)) { using (System.Drawing.Image image = System.Drawing.Image.FromFile(tbnFile)) { imgThumbnail.Pixbuf = GuiHelper.ImageToPixbufIcon(image, 320, 240); } //UsingTbnFile = true; } else { //picThumbnail.Image = Resources.noposter; } store = new NodeStore(typeof(TvEpisodeNode)); //List<iMetaLibrary.Metadata.TvEpisodeMeta> episodes = new List<iMetaLibrary.Metadata.TvEpisodeMeta>(); bool first = true; foreach (iMetaLibrary.Metadata.TvEpisodeMeta episode in Meta.Episodes) { //episodes.Add(episode.Clone()); iMetaLibrary.Metadata.TvEpisodeMeta epmeta = episode.Clone(); if (first) { episodeEditor.Initialize(epmeta); first = false; } store.AddNode(new TvEpisodeNode(epmeta)); } nvEpisodeList.NodeStore = store; nvEpisodeList.AppendColumn("Episode", new Gtk.CellRendererText(), "text", 0); nvEpisodeList.NodeSelection.Changed += delegate(object o, System.EventArgs args) { Gtk.NodeSelection selection = (Gtk.NodeSelection)o; TvEpisodeNode node = (TvEpisodeNode)selection.SelectedNode; // check selection hasnt changed if (node == SelectedEpisodeNode) { return; } // check if current data in episode editor is valid if (!episodeEditor.IsValid()) { nvEpisodeList.NodeSelection.SelectNode(SelectedEpisodeNode); return; } else // if valid saved the data to the meta object { episodeEditor.Save(); // this reassignment to itself forces the listbox to revalidate it and updates the text in the listbox if change, otherwise it doesnt update //lstEpisodes.Items[SelectedEpisodeIndex] = lstEpisodes.Items[SelectedEpisodeIndex]; } // update selected epsiode index SelectedEpisodeNode = node; // initialize the newly selected episode data episodeEditor.Initialize(node.Meta); }; }