public void OnTestSuiteChanged(object sender, EventArgs e) { if (failuresTreeView.IsRealized) { failuresTreeView.ScrollToPoint(0, 0); } results.Clear(); error = null; errorMessage = null; failuresStore.Clear(); outputView.Buffer.Clear(); outIters.Clear(); progressBar.Fraction = 0; progressBar.Text = ""; testsRun = 0; resultSummary = new UnitTestResult(); UpdateCounters(); if (rootTest != null) { rootTest = testService.SearchTest(rootTest.FullName); if (rootTest == null) { buttonRun.Sensitive = false; } } }
async Task Update() { if (cts != null) { cts.Cancel(); } cts = new CancellationTokenSource(); var ct = cts.Token; if (editorTracker.Document.AnalysisDocument == null) { store.Clear(); lastSourceText = null; return; } var tree = await editorTracker.Document.AnalysisDocument.GetSyntaxTreeAsync(ct); var root = await tree.GetRootAsync(ct); var text = await editorTracker.Document.AnalysisDocument.GetTextAsync(ct); if (ct.IsCancellationRequested) { return; } store.Clear(); AddNode(store.AddNode(), root); lastSourceText = text; SelectBestMatchForCaret(); }
void UpdateCombos() { if (settingGlobalConfig) { return; } configurationMerger.Load(currentSolution); ignoreConfigurationChangedCount++; try { configurationStore.Clear(); if (!IdeApp.Workspace.IsOpen) { runtimeStore.Clear(); return; } var values = new HashSet <string> (); foreach (var conf in configurationMerger.SolutionConfigurations) { if (!values.Add(conf)) { continue; } values.Add(conf); configurationStore.AppendValues(conf.Replace("|", " | "), conf); } } finally { ignoreConfigurationChangedCount--; } FillRuntimes(); SelectActiveConfiguration(); }
public void OnTestSuiteChanged(object sender, EventArgs e) { results.Clear(); error = null; errorMessage = null; failuresStore.Clear(); outputView.Buffer.Clear(); outIters.Clear(); progressBar.Fraction = 0; progressBar.Text = ""; testsRun = 0; testsFailed = 0; testsIgnored = 0; UpdateCounters(); if (rootTest != null) { rootTest = testService.SearchTest(rootTest.FullName); if (rootTest == null) { buttonRun.Sensitive = false; } } }
void RemoveChildren(Gtk.TreeIter iter) { if (TreeIter.Zero.Equals(iter)) { treeStore.Clear(); return; } Gtk.TreeIter child; while (treeStore.IterChildren(out child, iter)) { treeStore.Remove(ref child); } }
/// <summary>Refreshes the entire tree from the specified descriptions.</summary> /// <param name="nodeDescriptions">The nodes descriptions.</param> private void Refresh(TreeViewNode nodeDescriptions) { // Record which rows are currently expanded. // We can't directly use a TreePath to an outdated TreeModel/TreeView, so we store the path as a string, and // then parse that into a new TreePath after the model is reassembled. This assumes that the structure of the // tree view/model does not change when RefreshNode() is called (e.g. it still has the same number of rows/columns). List <string> expandedRows = new List <string>(); treeview1.MapExpandedRows(new TreeViewMappingFunc((tree, path) => { expandedRows.Add(path.ToString()); })); treemodel.Clear(); TreeIter iter = treemodel.AppendNode(); RefreshNode(iter, nodeDescriptions); treeview1.ShowAll(); treeview1.ExpandRow(new TreePath("0"), false); // Expand all rows which were previously expanded by the user. try { expandedRows.ForEach(row => treeview1.ExpandRow(new TreePath(row), false)); } catch { } if (ContextMenu != null) { ContextMenu.AttachToWidget(treeview1); } }
public void FillInspectors(string filter) { categories.Clear(); treeStore.Clear(); var grouped = severities.Keys.OfType <CodeIssueProvider> () .Where(node => string.IsNullOrEmpty(filter) || node.Title.IndexOf(filter, StringComparison.OrdinalIgnoreCase) > 0) .GroupBy(node => node.Category) .OrderBy(g => g.Key, StringComparer.Ordinal); foreach (var g in grouped) { TreeIter categoryIter = treeStore.AppendValues("<b>" + g.Key + "</b>"); categories [g.Key] = categoryIter; foreach (var node in g.OrderBy(n => n.Title, StringComparer.Ordinal)) { var title = node.Title; MarkupSearchResult(filter, ref title); var nodeIter = treeStore.AppendValues(categoryIter, title, node); if (node.HasSubIssues) { foreach (var subIssue in node.SubIssues) { title = subIssue.Title; MarkupSearchResult(filter, ref title); treeStore.AppendValues(nodeIter, title, subIssue); } } } } treeviewInspections.ExpandAll(); }
void RefreshList() { treeStore.Clear(); for (int i = 0; i < array.Count; i++) { var item = array[i]; var str = item as PString; if (str == null) { continue; } string value = str.Value; if (!string.IsNullOrEmpty(ValuePrefix) && value.StartsWith(ValuePrefix)) { value = value.Substring(ValuePrefix.Length); } treeStore.AppendValues(value, item); } AppendCreateNewEntry(); }
void FillRemotes() { TreeViewState state = new TreeViewState(treeRemotes, 4); state.Save(); storeRemotes.Clear(); string currentRemote = repo.GetCurrentRemote(); foreach (RemoteSource remote in repo.GetRemotes()) { string text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name; string url; if (remote.FetchUrl == remote.PushUrl) { url = remote.FetchUrl; } else { url = remote.FetchUrl + " (fetch)\n" + remote.PushUrl + " (push)"; } TreeIter it = storeRemotes.AppendValues(remote, text, url, null, remote.Name); foreach (string branch in repo.GetRemoteBranches(remote.Name)) { storeRemotes.AppendValues(it, null, branch, null, branch, remote.Name + "/" + branch); } } state.Load(); }
async void FillRemotes() { try { var state = new TreeViewState(treeRemotes, 4); state.Save(); storeRemotes.Clear(); var token = destroyTokenSource.Token; string currentRemote = await repo.GetCurrentRemoteAsync(token); if (token.IsCancellationRequested) { return; } foreach (Remote remote in await repo.GetRemotesAsync(token)) { if (token.IsCancellationRequested) { return; } // Take into account fetch/push ref specs. string text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name; string url = remote.Url; TreeIter it = storeRemotes.AppendValues(remote, text, url, null, remote.Name); foreach (string branch in repo.GetRemoteBranches(remote.Name)) { storeRemotes.AppendValues(it, null, branch, null, branch, remote.Name + "/" + branch); } } state.Load(); } catch (Exception e) { LoggingService.LogInternalError(e); } }
public void UpdateDefinitions() { TreeIter iter; DefinitionStore.Clear(); foreach (var @var in Eval.Locals) { if (@var.Value is SysFunc) { iter = DefinitionStore.AppendValues(@var.Value.ToString(), "System Magic"); UpdateScope(@var.Value as Scope, iter); } else if (@var.Value is VarFunc) { iter = DefinitionStore.AppendValues(@var.Value.ToString(), (@var.Value as VarFunc).Definition.ToString()); UpdateScope(@var.Value as Scope, iter); } else if (@var.Value is Scope) { iter = DefinitionStore.AppendValues(@var.Key, @var.Value.ToString()); UpdateScope(@var.Value as Scope, iter); } else { DefinitionStore.AppendValues(@var.Key, @var.Value.ToString()); } } }
public void Fill() { state.Save(); store.Clear(); List <AddinDescription> deps = new List <AddinDescription> (); deps.Add(adesc); foreach (Dependency dep in adesc.MainModule.Dependencies) { AddinDependency adep = dep as AddinDependency; if (adep == null) { continue; } Addin ad = data.AddinRegistry.GetAddin(adep.FullAddinId); if (ad != null && ad.Description != null) { deps.Add(ad.Description); } } foreach (Extension ext in adesc.MainModule.Extensions) { AddExtension(ext, deps); } UpdateButtons(); state.Load(); }
public void Refresh() { schemaStore.Clear(); Gdk.Pixbuf dirIcon = Gdk.Pixbuf.LoadFromResource("x-directory-remote-server.png"); Gdk.Pixbuf folderIcon = Gdk.Pixbuf.LoadFromResource("x-directory-normal.png"); rootIter = schemaStore.AppendValues(dirIcon, "Servers"); TreePath path = schemaStore.GetPath(rootIter); foreach (string n in Global.Connections.ConnectionNames) { TreeIter iter = schemaStore.AppendValues(rootIter, dirIcon, n); TreeIter objIter; TreeIter attrIter; TreeIter matIter; TreeIter synIter; objIter = schemaStore.AppendValues(iter, folderIcon, "Object Classes"); schemaStore.AppendValues(objIter, null, ""); attrIter = schemaStore.AppendValues(iter, folderIcon, "Attribute Types"); schemaStore.AppendValues(attrIter, null, ""); matIter = schemaStore.AppendValues(iter, folderIcon, "Matching Rules"); schemaStore.AppendValues(matIter, null, ""); synIter = schemaStore.AppendValues(iter, folderIcon, "LDAP Syntaxes"); schemaStore.AppendValues(synIter, null, ""); } this.ExpandRow(path, false); }
private void UpdateHistoryTreeview() { string searchTerm = historySearchEntry.Text.Trim().ToLower(); HistoryListStore.Clear(); using (var db = new BizeeBirdDbContext()) { IQueryable set; if (searchTerm.Length > 0) { set = db.Appointments.Where( a => a.Customer.Name.ToLower().Contains(searchTerm) || a.Customer.Email.ToLower().Contains(searchTerm) || a.Customer.Notes.ToLower().Contains(searchTerm) || a.Customer.PhoneNumbers.Any(p => p.PhoneNumber.ToLower().Contains(searchTerm)) || a.AppointmentBirds.Any(b => b.Bird.Name.ToLower().Contains(searchTerm))).OrderByDescending(a => a.EndTime); } else { set = db.Appointments.OrderByDescending(a => a.EndTime); } foreach (Appointment row in set) { HistoryListStore.AppendValues(row.AppointmentId, row.Customer.Name, row.Customer.BoardingRate.ToString("C2"), row.AppointmentBirds.First().Bird.Name, row.StartTime.ToShortDateString() + " - " + row.EndTime.ToShortDateString(), row.Status.ToString(), row.AppointmentBirds.First().GroomingWings, row.AppointmentBirds.Exists(a => a.GroomingNails), row.AppointmentBirds.Exists(a => a.CageNeeded)); } } }
private void RepopulateTimeline(bool reset, double vadj) { ImLog log; if (!reset) { log = GetSelectedLog(); } else { log = initial_select; } tree_store.Clear(); AddCategory(timeline.Today, "Today", "HH:mm"); AddCategory(timeline.Yesterday, "Yesterday", "HH:mm"); AddCategory(timeline.ThisWeek, "This Week", "dddd"); AddCategory(timeline.LastWeek, "Last Week", "dddd"); AddCategory(timeline.ThisMonth, "This Month", "MMM d"); AddCategory(timeline.ThisYear, "This Year", "MMM d"); AddCategory(timeline.Older, "Older", "yyy MMM d"); timelinetree.ExpandAll(); ScrollToLog(log); RenderConversation(log); if (!reset) { SetConversationScroll(vadj); } }
private void UpdateUpcomingPickupsTreeview() { UpcomingPickupsListStore.Clear(); using (var db = new BizeeBirdDbContext()) { var appointments = from a in db.Appointments where a.EndTime >= DateTime.Today && a.Status == AppointmentStatus.CheckedIn orderby a.EndTime ascending select a; foreach (var row in appointments) { string birdsString = ""; string breedString = ""; if (row.AppointmentBirds.Count() == 1) { birdsString = row.AppointmentBirds.First().Bird.Name; breedString = row.AppointmentBirds.First().Bird.Breed; } TreeIter parent = UpcomingPickupsListStore.AppendValues(row.AppointmentId, row.EndTime.ToShortDateString(), row.Customer.Name, birdsString, breedString, row.AppointmentBirds.Exists(a => a.GroomingWings == true), row.AppointmentBirds.Exists(a => a.GroomingNails == true), row.Customer.BoardingRate.ToString("C2"), row.Notes); if (row.AppointmentBirds.Count() > 1) { foreach (var bird in row.AppointmentBirds) { UpcomingPickupsListStore.AppendValues(parent, null, null, null, bird.Bird.Name, bird.Bird.Breed, bird.GroomingWings, bird.GroomingNails, null, null); } } } } }
public void FillInspectors(string filter) { categories.Clear(); treeStore.Clear(); var grouped = severities.Keys .GroupBy(node => node.Item2.Category) .OrderBy(g => g.Key, StringComparer.Ordinal); foreach (var g in grouped) { foreach (var node in g.OrderBy(n => n.Item2.Title.ToString(), StringComparer.CurrentCulture)) { var title = GettextCatalog.GetString("{0} ({1})", node.Item2.Title, node.Item2.Id); if (!string.IsNullOrEmpty(filter) && title.IndexOf(filter, StringComparison.CurrentCultureIgnoreCase) < 0) { continue; } TreeIter categoryIter; if (!categories.TryGetValue(g.Key, out categoryIter)) { categoryIter = treeStore.AppendValues("<b>" + g.Key + "</b>", null, null, null); categories [g.Key] = categoryIter; } var desc = node.Item2.Description.ToString(); if (string.IsNullOrEmpty(desc)) { desc = title; } MarkupSearchResult(filter, ref title); var nodeIter = treeStore.AppendValues(categoryIter, title, node, Ambience.EscapeText(title), Ambience.EscapeText(desc)); } } treeviewInspections.ExpandAll(); }
private void UpdateTreeView() { treeview.Model = null; model.Clear(); AppendProperties(TreeIter.Zero, Viewing); treeview.Model = model; }
public void Fill() { TreeViewState s = new TreeViewState(treeView, 1); s.Save(); store.Clear(); if (checkShowCats.Active) { foreach (CounterCategory cat in App.Service.GetCategories()) { AppendCategory(cat); } } else { foreach (Counter c in App.Service.GetCounters()) { if (c is TimerCounter) { AppendCounter(TreeIter.Zero, (TimerCounter)c); } } } }
bool RefillOutlineStore() { DispatchService.AssertGuiThread(); Gdk.Threads.Enter(); refreshingOutline = false; if (outlineTreeStore == null || !outlineTreeView.IsRealized) { refillOutlineStoreId = 0; return(false); } outlineReady = false; outlineTreeStore.Clear(); if (lastCU != null) { BuildTreeChildren(outlineTreeStore, TreeIter.Zero, lastCU); TreeIter it; if (outlineTreeStore.GetIterFirst(out it)) { outlineTreeView.Selection.SelectIter(it); } outlineTreeView.ExpandAll(); } outlineReady = true; Gdk.Threads.Leave(); //stop timeout handler refillOutlineStoreId = 0; return(false); }
public void UpdateThemeList() { List <string> themes = new List <string> (); if (Directory.Exists(DockItem.ThemeFolder)) { foreach (DirectoryInfo p in new DirectoryInfo(DockItem.ThemeFolder).GetDirectories()) { themes.Add(p.Name); } } labelTreeStore.Clear(); themes.Sort(); int i = 0, selected = -1; foreach (string p in themes.Distinct()) { if (p == DockItem.CurrentTheme) { selected = i; } labelTreeStore.AppendValues(p); i++; } labelTreeView.Selection.SelectPath(new TreePath("" + selected)); labelTreeView.ScrollToCell(new TreePath("" + selected), null, false, 0, 0); }
void UpdatePreview(object sender, EventArgs args) { previewStore.Clear(); TreeIter iter; string rootNamespace = checkDefaultAsRoot.Active? GettextCatalog.GetString("Default.Namespace") : ""; Gdk.Pixbuf folderIcon = ImageService.GetPixbuf("md-open-folder", IconSize.Menu); Gdk.Pixbuf projectIcon = ImageService.GetPixbuf("md-project", IconSize.Menu); iter = previewStore.AppendValues(projectIcon, GettextCatalog.GetString("Project"), rootNamespace); if (rootNamespace.Length > 0) { rootNamespace += "."; } if (radioFlat.Active) { previewStore.AppendValues(iter, folderIcon, "A", rootNamespace + "A"); previewStore.AppendValues(iter, folderIcon, "A.B", rootNamespace + "A.B"); } else { iter = previewStore.AppendValues(iter, folderIcon, "A", rootNamespace + "A"); previewStore.AppendValues(iter, folderIcon, "B", rootNamespace + "A.B"); } previewTree.ExpandAll(); UpdatePolicyNameList(null, null); }
private void Update() { localDiff.diffRequested = false; remoteDiff.diffRequested = false; localDiff.difs = null; remoteDiff.difs = null; filestore.Clear(); diffRenderer.Reset(); if (statuses.Count > 0) { foreach (VersionInfo n in statuses) { if (FileVisible(n)) { if (firstLoad) { changeSet.AddFile(n); } AppendFileInfo(n); } } } UpdateControlStatus(); if (firstLoad) { TreeIter it; if (filestore.GetIterFirst(out it)) { filelist.Selection.SelectIter(it); } firstLoad = false; } }
void UpdatePreview(object sender, EventArgs args) { previewStore.Clear(); TreeIter iter; string rootNamespace = checkDefaultAsRoot.Active? GettextCatalog.GetString("Default.Namespace") : ""; string folderIcon = MonoDevelop.Ide.Gui.Stock.OpenFolder; string projectIcon = MonoDevelop.Ide.Gui.Stock.Project; iter = previewStore.AppendValues(projectIcon, GettextCatalog.GetString("Project"), rootNamespace); if (rootNamespace.Length > 0) { rootNamespace += "."; } if (radioFlat.Active) { previewStore.AppendValues(iter, folderIcon, "A", rootNamespace + "A"); previewStore.AppendValues(iter, folderIcon, "A.B", rootNamespace + "A.B"); } else { iter = previewStore.AppendValues(iter, folderIcon, "A", rootNamespace + "A"); previewStore.AppendValues(iter, folderIcon, "B", rootNamespace + "A.B"); } previewTree.ExpandAll(); UpdatePolicyNameList(null, null); }
void Update() { localDiff.diffRequested = false; localDiff.difs = null; filestore.Clear(); diffRenderer.Reset(); if (changeSet == null) { Sensitive = false; return; } Sensitive = true; foreach (ChangeSetItem n in changeSet.Items) { AppendFileInfo(n); } UpdateControlStatus(); if (firstLoad) { TreeIter it; if (filestore.GetIterFirst(out it)) { filelist.Selection.SelectIter(it); } firstLoad = false; } }
public void Populate() { tsPlaylist.Clear(); string[] aPlaylistPaths = _parent.oXbmc.Playlist.Get(GetCurrentPlaylistType(), false); if (aPlaylistPaths != null) { for (int j = 0; j < aPlaylistPaths.Length; j++) { int i = aPlaylistPaths[j].LastIndexOf("."); if (i > 1) { string extension = aPlaylistPaths[j].Substring(i, aPlaylistPaths[j].Length - i); aPlaylistPaths[j] = aPlaylistPaths[j].Replace("\\", "/"); string[] aPlaylistEntry = aPlaylistPaths[j].Split('/'); string playlistEntry = aPlaylistEntry[aPlaylistEntry.Length - 1].Replace(extension, ""); tsPlaylist.AppendValues(null, (j + 1).ToString(), playlistEntry, aPlaylistPaths[j]); } } _parent._tvPlaylist.Model = tsPlaylist; _parent._tvPlaylist.ShowAll(); } MarkNowPlayingEntry(); }
void FillServer(ServerInfo s) { if (s != null) { vpaned1.Sensitive = true; server = BugzillaService.LoadServer(s); Fill(); } else { server = null; bugsStore.Clear(); countLabel.Text = string.Empty; vpaned1.Sensitive = false; } }
protected void FetchPreviews(TreeIter iter) { if (guiTypes.ContainsKey(iter)) { // Removes the current "Fetch - Thread" if (_currentArtId > 0) { GLib.Source.Remove(_currentIdleFetch); Console.WriteLine("Idle Removed " + _currentIdleFetch); } // Clears All TreeIter try { _previewStore.Clear(); } catch (System.NullReferenceException e) {} // Creates and Run "Fetch - Thread" _currentIdleFetch = GLib.Idle.Add(_idleHandlerFetchGuiArt); _currentArtId = (ArtType)guiTypes [(TreeIter)iter]; } else { Console.Error.WriteLine("Error : Unknown Iter"); } }
public void FillInspectors(string filter) { categories.Clear(); treeStore.Clear(); var grouped = severities.Keys .Where(node => node.Item2 == null && (string.IsNullOrEmpty(filter) || node.Item1.Name.IndexOf(filter, StringComparison.OrdinalIgnoreCase) > 0)) .GroupBy(node => node.Item1.GetProvider().SupportedDiagnostics.First().Category) .OrderBy(g => g.Key, StringComparer.Ordinal); foreach (var g in grouped) { TreeIter categoryIter = treeStore.AppendValues("<b>" + g.Key + "</b>", null, null); categories [g.Key] = categoryIter; foreach (var node in g.OrderBy(n => n.Item1.Name, StringComparer.Ordinal)) { var title = node.Item1.Name; MarkupSearchResult(filter, ref title); var nodeIter = treeStore.AppendValues(categoryIter, title, node, Ambience.EscapeText(node.Item1.Name)); if (node.Item1.GetProvider().SupportedDiagnostics.Length > 1) { foreach (var subIssue in node.Item1.GetProvider().SupportedDiagnostics) { title = subIssue.Title.ToString(); MarkupSearchResult(filter, ref title); treeStore.AppendValues(nodeIter, title, new Tuple <CodeDiagnosticDescriptor, DiagnosticDescriptor>(node.Item1, subIssue), Ambience.EscapeText(node.Item1.Name)); } } } } treeviewInspections.ExpandAll(); }
public void Populate() { foreach (TreeViewColumn col in _parent._tvShareBrowser.Columns) { _parent._tvShareBrowser.RemoveColumn(col); } tsShares.Clear(); tvcIcons = _parent._tvShareBrowser.AppendColumn("", new CellRendererPixbuf(), "pixbuf", 0); tvcShares = _parent._tvShareBrowser.AppendColumn("", new CellRendererText(), "text", 1); tvcPaths = _parent._tvShareBrowser.AppendColumn("", new CellRendererText(), "text", 2); tvcType = _parent._tvShareBrowser.AppendColumn("", new CellRendererText(), "text", 3); tvcPaths.Visible = false; tvcType.Visible = false; tvcIcons.Sizing = TreeViewColumnSizing.Autosize; tvcShares.Sizing = TreeViewColumnSizing.Autosize; _parent._tvShareBrowser.HeadersVisible = false; _parent._tvShareBrowser.ColumnsAutosize(); //_parent._tvShareBrowser.EnableGridLines = TreeViewGridLines.Horizontal; this.GetShares(); }
public CodeIssuePadControl () { var buttonRow = new HBox(); runButton.Image = ImageService.GetIcon (Ide.Gui.Stock.Execute, IconSize.Menu); runButton.Clicked += StartAnalyzation; buttonRow.PackStart (runButton); cancelButton.Image = ImageService.GetIcon (Ide.Gui.Stock.Stop, IconSize.Menu); cancelButton.Clicked += StopAnalyzation; cancelButton.Sensitive = false; buttonRow.PackStart (cancelButton); var groupingProvider = new CategoryGroupingProvider { Next = new ProviderGroupingProvider() }; rootGroup = new IssueGroup (groupingProvider, "root group"); var groupingProviderControl = new GroupingProviderChainControl (rootGroup, groupingProviders); buttonRow.PackStart (groupingProviderControl); PackStart (buttonRow); store = new TreeStore (textField, nodeField); view.DataSource = store; view.HeadersVisible = false; view.Columns.Add ("Name", textField); view.SelectionMode = SelectionMode.Multiple; view.RowActivated += OnRowActivated; view.RowExpanding += OnRowExpanding; view.ButtonPressed += HandleButtonPressed; view.ButtonReleased += HandleButtonReleased; PackStart (view, true); IIssueTreeNode node = rootGroup; node.ChildrenInvalidated += (sender, group) => { Application.Invoke (delegate { ClearSiblingNodes (store.GetFirstNode ()); store.Clear (); foreach(var child in ((IIssueTreeNode)rootGroup).Children) { var navigator = store.AddNode (); SetNode (navigator, child); SyncNode (navigator); } }); }; node.ChildAdded += HandleRootChildAdded; IdeApp.Workspace.LastWorkspaceItemClosed += HandleLastWorkspaceItemClosed; }