AppendValues() public method

public AppendValues ( ) : Gtk.TreeIter
return Gtk.TreeIter
Beispiel #1
0
        TreeIter AddNode(TreeIter parent, ReferenceNode node)
        {
            if (entryFilter.Text.Length > 0 && node.TypeName.IndexOf(entryFilter.Text) == -1)
            {
                return(TreeIter.Zero);
            }

            TreeIter iter;

            if (parent.Equals(TreeIter.Zero))
            {
                iter = store.AppendValues(node, "class", node.TypeName, !node.HasReferences, node.TotalMemory.ToString("n0"), node.AverageSize.ToString("n0"), node.RefCount.ToString("n0"), "", "", "");
            }
            else
            {
                string refs     = (InverseReferences ? node.RefsToParent.ToString("n0") : "");
                string rootRefs = (InverseReferences ? node.RefsToRoot.ToString("n0") : "");
                string rootMem  = (InverseReferences ? node.RootMemory.ToString("n0") : "");
                iter = store.AppendValues(parent, node, "class", node.TypeName, !node.HasReferences, node.TotalMemory.ToString("n0"), node.AverageSize.ToString("n0"), node.RefCount.ToString("n0"), refs, rootRefs, rootMem);
            }

            if (node.HasReferences)
            {
                // Add a dummy element to make the expansion icon visible
                store.AppendValues(iter, null, "", "", true, "", "", "", "", "", "");
            }
            return(iter);
        }
        private void OnProjectLoaded(
			object sender,
			ProjectEventArgs e)
        {
            // Remove the child, if we have one.
            if (Child != null)
            {
                Remove(Child);
            }

            // Create a tree model for this project.
            var store = new TreeStore(typeof (string));

            TreeIter iter = store.AppendValues("Project");
            store.AppendValues(iter, "Chapter");

            // Create the view for the tree.
            var treeView = new TreeView
            {
                Model = store,
                HeadersVisible = false,
            };

            treeView.AppendColumn("Name", new CellRendererText(), "text", 0);

            // We need to wrap this in a scroll bar since the list might become
            // too larger.
            var scrolledWindow = new ScrolledWindow();
            scrolledWindow.Add(treeView);
            Add(scrolledWindow);

            // Show our components to the user.
            ShowAll();
        }
    void PopulateTreeFromComparison(ComparisonNode root)
    {
        Gtk.TreeIter iter =
            treeStore.AppendValues(root.Name,
                                   TypePixbufFromComparisonNode(root),
                                   StatusPixbufFromComparisonNode(root),
                                   root.Missing == 0 ? null : missingPixbuf,
                                   root.Missing == 0 ? null : String.Format(":{0}", root.Missing),
                                   root.Extra == 0 ? null : extraPixbuf,
                                   root.Extra == 0 ? null : String.Format(":{0}", root.Extra),
                                   root.Warning == 0 ? null : errorPixbuf,
                                   root.Warning == 0 ? null : String.Format(":{0}", root.Warning),
                                   root.Todo == 0 ? null : todoPixbuf,
                                   root.Todo == 0 ? null : String.Format(":{0}", root.Todo),
                                   root.Niex == 0 ? null : niexPixbuf,
                                   root.Niex == 0 ? null : String.Format(":{0}", root.Niex),
                                   root,
                                   StatusForegroundFromComparisonNode(root));

        Gtk.TreePath path = treeStore.GetPath(iter);

        foreach (ComparisonNode n in root.Children)
        {
            PopulateTreeFromComparison(iter, n);
        }

        tree.ExpandRow(path, false);
    }
Beispiel #4
0
    public RepositoryView(Driver driver)
    {
        this.driver = driver;
            HeadersVisible = false;

            AppendColumn ("", new Gtk.CellRendererText (), "text", 0);
            TreeViewColumn fullPath = AppendColumn ("", new Gtk.CellRendererText (), "text", 0);
            fullPath.Visible = false;

            itemStore = new Gtk.TreeStore (typeof (string), typeof (string));
            Gtk.TreeIter root = itemStore.AppendValues(VersionControlPath.RootFolder, VersionControlPath.RootFolder);

            Microsoft.TeamFoundation.VersionControl.Client.Item[] items = ItemsForPath(VersionControlPath.RootFolder);
            foreach (Microsoft.TeamFoundation.VersionControl.Client.Item item in items)
            {
                if (item.ServerItem == VersionControlPath.RootFolder) continue;

                string shortPath = item.ServerItem.Substring(item.ServerItem.LastIndexOf('/') + 1) + "/";
                Gtk.TreeIter iter = itemStore.AppendValues (root, shortPath, item.ServerItem);

                itemStore.AppendValues(iter, "");
            }

            Model = itemStore;

            ExpandRow(TreePath.NewFirst(), false);
            RowExpanded += MyRowExpandedHandler;
            KeyReleaseEvent += MyKeyReleaseEventHandler;
    }
        void Fill()
        {
            if (destroyed)
            {
                return;
            }

            stackStore.Clear();
            valueView.ClearValues();

            labelType.Markup  = GettextCatalog.GetString("A <b>{0}</b> was thrown.", exception.Type);
            labelMessage.Text = string.IsNullOrEmpty(exception.Message) ?
                                string.Empty :
                                exception.Message;

            ShowStackTrace(exception, false);

            if (!exception.IsEvaluating && exception.Instance != null)
            {
                valueView.AddValue(exception.Instance);
                valueView.ExpandRow(new TreePath("0"), false);
            }

            if (exception.StackIsEvaluating)
            {
                stackStore.AppendValues(GettextCatalog.GetString("Loading..."), "", 0, 0);
            }
        }
        public void LoadRepositories(Repository r, Gtk.TreeIter parent)
        {
            if (r.VersionControlSystem == null)
            {
                return;
            }

            TreeIter it;

            if (!parent.Equals(TreeIter.Zero))
            {
                it = store.AppendValues(parent, r, r.Name, r.VersionControlSystem.Name, false, "vcs-repository");
            }
            else
            {
                it = store.AppendValues(r, r.Name, r.VersionControlSystem.Name, false, "vcs-repository");
            }

            try {
                if (r.HasChildRepositories)
                {
                    store.AppendValues(it, null, "", "", true, null);
                }
            }
            catch (Exception ex) {
                LoggingService.LogError(ex.ToString());
            }
        }
Beispiel #7
0
    public RepositoryView(Driver driver)
    {
        this.driver    = driver;
        HeadersVisible = false;

        AppendColumn("", new Gtk.CellRendererText(), "text", 0);
        TreeViewColumn fullPath = AppendColumn("", new Gtk.CellRendererText(), "text", 0);

        fullPath.Visible = false;

        itemStore = new Gtk.TreeStore(typeof(string), typeof(string));
        Gtk.TreeIter root = itemStore.AppendValues(VersionControlPath.RootFolder, VersionControlPath.RootFolder);

        Microsoft.TeamFoundation.VersionControl.Client.Item[] items = ItemsForPath(VersionControlPath.RootFolder);
        foreach (Microsoft.TeamFoundation.VersionControl.Client.Item item in items)
        {
            if (item.ServerItem == VersionControlPath.RootFolder)
            {
                continue;
            }

            string       shortPath = item.ServerItem.Substring(item.ServerItem.LastIndexOf('/') + 1) + "/";
            Gtk.TreeIter iter      = itemStore.AppendValues(root, shortPath, item.ServerItem);

            itemStore.AppendValues(iter, "");
        }

        Model = itemStore;

        ExpandRow(TreePath.NewFirst(), false);
        RowExpanded     += MyRowExpandedHandler;
        KeyReleaseEvent += MyKeyReleaseEventHandler;
    }
Beispiel #8
0
        void AppendCategory(Gtk.TreeStore store, TreeIter iter, CodeFormatCategory category)
        {
            TreeIter categoryIter = iter.Equals(TreeIter.Zero)
                                ? store.AppendValues(GettextCatalog.GetString(category.DisplayName), null, null, category)
                                : store.AppendValues(iter, GettextCatalog.GetString(category.DisplayName), null, null, category);

            foreach (CodeFormatOption option in category.Options)
            {
                CodeFormatType type = description.GetCodeFormatType(settings, option);
                KeyValuePair <string, string> val = description.GetValue(settings, option);
                bool isBool  = type.Name == "Bool";
                bool boolVal = isBool && val.Value == "True";
                store.AppendValues(categoryIter,
                                   GettextCatalog.GetString(option.DisplayName),
                                   val.Key,
                                   GettextCatalog.GetString(val.Value),
                                   option,
                                   null,
                                   boolVal,
                                   isBool,
                                   !isBool);
            }
            foreach (CodeFormatCategory s in category.SubCategories)
            {
                AppendCategory(store, categoryIter, s);
            }
        }
        public AddinLoadErrorDialog(AddinError[] errors)
        {
            XML glade = new XML (null, "MonoDevelop.Startup.glade", "addinLoadErrorDialog", null);
            glade.Autoconnect (this);

            TreeStore store = new TreeStore (typeof(string));
            errorTree.AppendColumn ("Addin", new CellRendererText (), "text", 0);
            errorTree.Model = store;

            bool fatal = false;

            foreach (AddinError err in errors) {
                string name = Path.GetFileNameWithoutExtension (err.AddinFile);
                if (err.Fatal) name += " (Fatal error)";
                TreeIter it = store.AppendValues (name);
                store.AppendValues (it, "Full Path: " + err.AddinFile);
                store.AppendValues (it, "Error: " + err.Exception.Message);
                it = store.AppendValues (it, "Exception: " + err.Exception.GetType ());
                store.AppendValues (it, err.Exception.StackTrace.ToString ());
                if (err.Fatal) fatal = true;
            }

            //			addinLoadErrorDialog.ShowAll ();

            if (fatal) {
                noButton.Hide ();
                yesButton.Hide ();
                labelContinue.Hide ();
                closeButton.Show ();
                labelFatal.Show ();
            }
        }
Beispiel #10
0
    public DocsTreeView(Gtk.TextView rtv, OurParserTask r)
    {
        tv = rtv;
        AppendColumn("Name", new Gtk.CellRendererText());
        AppendColumn("Result", new Gtk.CellRendererPixbuf());

        RulesHint = true;

        Columns[0].SetCellDataFunc(Columns[0].CellRenderers[0],
                new Gtk.TreeCellDataFunc(RenderName));
        Columns[1].SetCellDataFunc(Columns[1].CellRenderers[0],
                new Gtk.TreeCellDataFunc(RenderIcon));

        Columns[0].Expand = true;

        Gtk.TreeStore mres_store = new Gtk.TreeStore(
                typeof(IParsed));
        Model = mres_store;

        Selection.Changed += new EventHandler(OnSelection);

        Gtk.TreeIter iter = new Gtk.TreeIter();
        foreach (ParsedDocument doc in r.Docs) {
            iter = mres_store.AppendValues(doc);
            foreach (IParsed m in doc.Results)
                if (m.Result > 0)
                    mres_store.AppendValues(iter, m);
        }
    }
Beispiel #11
0
        TreeIter FindCategory(string namePath)
        {
            TreeIter iter = TreeIter.Zero;

            string[] paths = namePath.Split('/');
            foreach (string name in paths)
            {
                TreeIter child;
                if (!FindCategory(iter, name, out child))
                {
                    if (iter.Equals(TreeIter.Zero))
                    {
                        iter = treeStore.AppendValues(null, null, name, "", false, false, null, false);
                    }
                    else
                    {
                        iter = treeStore.AppendValues(iter, null, null, name, "", false, false, null, false);
                    }
                }
                else
                {
                    iter = child;
                }
            }
            return(iter);
        }
        private TreeStore GetModel(LMProject project)
        {
            Gtk.TreeIter  iter;
            Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(object));

            itersDic.Clear();

            foreach (EventType evType in project.EventTypes)
            {
                iter = dataFileListStore.AppendValues(evType);
                itersDic.Add(evType, iter);
            }

            var queryPlaysByCategory = project.EventsGroupedByEventType;

            foreach (var playsGroup in queryPlaysByCategory)
            {
                EventType cat = playsGroup.Key;
                if (!itersDic.ContainsKey(cat))
                {
                    continue;
                }
                foreach (TimelineEvent play in playsGroup)
                {
                    dataFileListStore.AppendValues(itersDic [cat], play);
                }
            }
            return(dataFileListStore);
        }
Beispiel #13
0
        void ShowStackTrace(ExceptionInfo exc, bool showExceptionNode)
        {
            TreeIter it = TreeIter.Zero;

            if (showExceptionNode)
            {
                treeStack.ShowExpanders = true;
                string tn = exc.Type + ": " + exc.Message;
                it = stackStore.AppendValues(tn, null, 0, 0);
            }

            foreach (ExceptionStackFrame frame in exc.StackTrace)
            {
                if (!it.Equals(TreeIter.Zero))
                {
                    stackStore.AppendValues(it, frame.DisplayText, frame.File, frame.Line, frame.Column);
                }
                else
                {
                    stackStore.AppendValues(frame.DisplayText, frame.File, frame.Line, frame.Column);
                }
            }

            ExceptionInfo inner = exc.InnerException;

            if (inner != null)
            {
                ShowStackTrace(inner, true);
            }
        }
Beispiel #14
0
 public ServiceScpdInfo (ServiceController service)
 {
     this.Build ();
     
     this.service = service;
     
     actionModel = new TreeStore (typeof (string));
     stateVariableModel = new TreeStore (typeof (string));
     
     foreach (var action in service.Actions) {
         var iter = actionModel.AppendValues (action.Key);
         
         foreach (var argument in action.Value.Arguments) {
             var argument_iter = actionModel.AppendValues (iter, argument.Key);
             
             actionModel.AppendValues (argument_iter, Catalog.GetString ("Direction: ") +
                 (argument.Value.Direction == ArgumentDirection.In ? "In" : "Out"));
             actionModel.AppendValues (argument_iter, Catalog.GetString ("Is Return Value: ") + argument.Value.IsReturnValue);
             actionModel.AppendValues (argument_iter, Catalog.GetString ("Related State Variable: ") + argument.Value.RelatedStateVariable);
         }
     }
     
     foreach (var stateVariable in service.StateVariables) {
         var iter = stateVariableModel.AppendValues (stateVariable.Key);
         
         stateVariableModel.AppendValues (iter, Catalog.GetString ("Data Type: ") + stateVariable.Value.DataType);
         stateVariableModel.AppendValues (iter, Catalog.GetString ("Sends Events: ") + stateVariable.Value.SendsEvents);
         stateVariableModel.AppendValues (iter, Catalog.GetString ("Is Multicast: ") + stateVariable.Value.IsMulticast);
         
         if (stateVariable.Value.DefaultValue != null) {
             stateVariableModel.AppendValues (iter, Catalog.GetString ("Default Value: ") + stateVariable.Value.DefaultValue);
         }
         
         if (stateVariable.Value.AllowedValues != null) {
             var allowed_values_iter = stateVariableModel.AppendValues (iter, Catalog.GetString ("Allowed Values"));
             foreach (var value in stateVariable.Value.AllowedValues) {
                 stateVariableModel.AppendValues (allowed_values_iter, value);
             }
         }
         
         if (stateVariable.Value.AllowedValueRange != null) {
             var allowed_value_range_iter = stateVariableModel.AppendValues (iter, Catalog.GetString ("Allowed Value Range"));
             stateVariableModel.AppendValues (allowed_value_range_iter,
                 "Minimum: " + stateVariable.Value.AllowedValueRange.Minimum);
             stateVariableModel.AppendValues (allowed_value_range_iter,
                 "Maximum: " + stateVariable.Value.AllowedValueRange.Maximum);
             if (stateVariable.Value.AllowedValueRange.Step != null) {
                 stateVariableModel.AppendValues (allowed_value_range_iter,
                     "Step: " + stateVariable.Value.AllowedValueRange.Step);
             }
         }
     }
     
     actions.AppendColumn (Catalog.GetString ("Actions"), new CellRendererText (), "text", 0);
     actions.Model = actionModel;
     actions.Selection.Changed += ActionsSelectionChanged;
     
     stateVariables.AppendColumn (Catalog.GetString ("State Variables"), new CellRendererText (), "text", 0);
     stateVariables.Model = stateVariableModel;
 }
        public void AddGroup(ItemGroup igroup, object instance, string targetGtkVersion)
        {
            ArrayList props = new ArrayList();

            foreach (ItemDescriptor item in igroup)
            {
                if (item.IsInternal)
                {
                    continue;
                }
                if (item is PropertyDescriptor && item.SupportsGtkVersion(targetGtkVersion))
                {
                    props.Add(item);
                }
            }

            if (props.Count == 0)
            {
                return;
            }

            InstanceData idata = new InstanceData(instance);
            TreeIter     iter  = store.AppendValues(igroup.Label, null, true, idata);

            foreach (PropertyDescriptor item in props)
            {
                AppendProperty(iter, (PropertyDescriptor)item, idata);
            }
        }
        public ContentDirectoryInfo (RemoteContentDirectory contentDirectory)
        {
            if (contentDirectory == null) {
                throw new ArgumentNullException ("contentDirectory");
            }

            this.content_directry = contentDirectory;
            this.store = new TreeStore (typeof (ObjectRow));
            var objects = new TreeView ();
            var column = new TreeViewColumn ();
            var cell = new CellRendererText ();
            column.PackStart (cell, true);
            column.SetCellDataFunc (cell, RenderObject);
            column.Title = "Objects";
            objects.AppendColumn (column);
            objects.Selection.Changed += HandleObjectsSelectionChanged;
            objects.RowExpanded += HandleObjectsRowExpanded;
            objects.Model = store;

            var root = contentDirectory.GetRootObject ();
            store.AppendValues (new ObjectRow (root));
            TreeIter iter;
            store.GetIterFirst (out iter);
            store.AppendValues (iter, loading);

            Add (objects);
        }
Beispiel #17
0
        /// <summary>
        /// Returns a <see cref="Gtk.TreeStore"/> in which project categories are
        /// root nodes and their respectives plays child nodes
        /// </summary>
        /// <returns>
        /// A <see cref="TreeStore"/>
        /// </returns>
        public TreeStore GetModel()
        {
            Dictionary <Category, TreeIter> itersDic = new Dictionary <Category, TreeIter>();

            Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(Play));

            foreach (Category cat in Categories)
            {
                Gtk.TreeIter iter = dataFileListStore.AppendValues(cat);
                itersDic.Add(cat, iter);
            }

            var queryPlaysByCategory =
                timeline.GroupBy(play => play.Category);

            foreach (var playsGroup in queryPlaysByCategory)
            {
                Category cat = playsGroup.Key;
                if (!itersDic.ContainsKey(cat))
                {
                    continue;
                }
                foreach (Play play in playsGroup)
                {
                    dataFileListStore.AppendValues(itersDic[cat], play);
                }
            }
            return(dataFileListStore);
        }
Beispiel #18
0
 public void FillInspectors(string filter)
 {
     categories.Clear();
     treeStore.Clear();
     foreach (var node in RefactoringService.GetInspectors(mimeType))
     {
         if (!string.IsNullOrEmpty(filter) && node.Title.IndexOf(filter, StringComparison.OrdinalIgnoreCase) < 0)
         {
             continue;
         }
         Gtk.TreeIter iter;
         if (!categories.TryGetValue(node.Category, out iter))
         {
             iter = treeStore.AppendValues("<b>" + node.Category + "</b>");
             categories [node.Category] = iter;
         }
         var title = node.Title;
         if (!string.IsNullOrEmpty(filter))
         {
             var idx = title.IndexOf(filter, StringComparison.OrdinalIgnoreCase);
             title = title.Substring(0, idx) + "<span bgcolor=\"yellow\">" + title.Substring(idx, filter.Length) + "</span>" + title.Substring(idx + filter.Length);
         }
         treeStore.AppendValues(iter, title, node.GetSeverity(), node);
     }
     treeviewInspections.ExpandAll();
 }
Beispiel #19
0
        private void RecursiveAdd(TreeIter parent, List <string> parts, TorrentFile file)
        {
            if (parts.Count == 0)
            {
                store.SetValue(parent, 2, file);
                return;
            }

            TreeIter siblings;

            if (!store.IterChildren(out siblings, parent))
            {
                siblings = store.AppendValues(parent, parts[0], true);
                parts.RemoveAt(0);
                RecursiveAdd(siblings, parts, file);
                return;
            }

            do
            {
                if (store.GetValue(siblings, 0).Equals(parts[0]))
                {
                    parts.RemoveAt(0);
                    RecursiveAdd(siblings, parts, file);
                    return;
                }
            } while (store.IterNext(ref siblings));

            siblings = store.AppendValues(parent, parts[0], true);
            parts.RemoveAt(0);
            RecursiveAdd(siblings, parts, file);
        }
        public void UpdateDisplay()
        {
            treeViewState.Save();

            store.Clear();

            if (DebuggingService.DebuggerSession == null || DebuggingService.DebuggerSession.IsRunning)
            {
                return;
            }

            try {
                ProcessInfo[] currentProcesses = DebuggingService.DebuggerSession.GetProcesses();

                if (currentProcesses.Length == 1)
                {
                    AppendThreads(TreeIter.Zero, currentProcesses [0]);
                }
                else
                {
                    foreach (ProcessInfo p in currentProcesses)
                    {
                        TreeIter it = store.AppendValues(null, p.Id.ToString(), p.Name, p, (int)Pango.Weight.Normal, "");
                        AppendThreads(it, p);
                    }
                }
            } catch (Exception ex) {
                MessageService.ShowException(ex);
            }

            tree.ExpandAll();

            treeViewState.Load();
        }
Beispiel #21
0
        public void Content(bool success, string title, string content)
        {
            Gtk.TreeIter iter;

            // Controller:
            iter = model.AppendValues(GetSuccessIcon(success), title);
            model.AppendValues(iter, null, content);

            treeView.Model = model;
        }
Beispiel #22
0
        private void loadServers()
        {
            InterfaceServer[] list = krnGateway.GetServerList(); //gets a vector with all the servers in server.met

            foreach (InterfaceServer server in list)             //display the servers IP in the treeview
            {
                stServers.AppendValues(server.Name, server.IP + " : " + server.Port, server.FailedConnections.ToString(),
                                       server.Files.ToString(), server.Users.ToString(),
                                       server.Priority.ToString());
            }
        }
		public TreeItem (TreeStore store, TreeItem parent, CoverageItem model, string title) {
			this.store = store;
			this.parent = parent;
			this.model = model;

			if (parent == null)
				iter = store.AppendValues (title);
			else
				iter = store.AppendValues (parent.Iter, title);
			FillColumns ();
		}
Beispiel #24
0
 /// <summary>
 /// Fills the values into the emulator browser tree
 /// </summary>
 public void UpdateTree()
 {
     TreeStore listStore = new TreeStore (typeof(Emulator), typeof(Game));
     foreach (Emulator emu in EmulatorController.emulators.OrderBy(o=>o.name))
     {
         TreeIter iter = listStore.AppendValues (emu);
         foreach (Game game in emu.games)
             listStore.AppendValues (iter, game);
     }
     LibraryTreeView.Model = listStore;
 }
Beispiel #25
0
        public void UpdateDisplay()
        {
            if (tree.IsRealized)
            {
                tree.ScrollToPoint(0, 0);
            }

            treeState.Save();

            store.Clear();
            if (breakpoints != null)
            {
                lock (breakpoints) {
                    foreach (Breakpoint bp in breakpoints.GetBreakpoints())
                    {
                        string hitCount = bp.HitCountMode != HitCountMode.None ? bp.CurrentHitCount.ToString() : "";
                        string traceExp = bp.HitAction == HitAction.PrintExpression ? bp.TraceExpression : "";
                        string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : "";
                        string name;

                        if (bp is FunctionBreakpoint)
                        {
                            FunctionBreakpoint fb = (FunctionBreakpoint)bp;

                            if (fb.ParamTypes != null)
                            {
                                name = fb.FunctionName + "(" + string.Join(", ", fb.ParamTypes) + ")";
                            }
                            else
                            {
                                name = fb.FunctionName;
                            }
                        }
                        else
                        {
                            name = string.Format("{0}:{1},{2}", ((Breakpoint)bp).FileName, bp.Line, bp.Column);
                        }

                        if (bp.Enabled)
                        {
                            store.AppendValues("md-breakpoint", true, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
                        }
                        else
                        {
                            store.AppendValues("md-breakpoint-disabled", false, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
                        }
                    }
                }
            }

            treeState.Load();
        }
Beispiel #26
0
 private void PopulateAutoConnectList()
 {
     autoConnectTreeStore.Clear();
     foreach (object[] row in networksListStore)
     {
         NetworkInfo networkInfo = (NetworkInfo)row[0];
         TreeIter    networkIter = autoConnectTreeStore.AppendValues(networkInfo);
         foreach (TrustedNodeInfo nodeInfo in networkInfo.TrustedNodes.Values)
         {
             autoConnectTreeStore.AppendValues(networkIter, nodeInfo);
         }
     }
 }
Beispiel #27
0
 void PopulatePeopleCategories(TreeStore treeStore ,Tag parent,TreeIter parentIter,int level)
 {
     foreach (Tag tag in (parent as Category).Children) {
         if (tag is Category) {
             //Log.Debug("Append  : "+tag.Name + " to "+parent.Name);
             TreeIter iter =
                 (parentIter.Equals(TreeIter.Zero) ?
                 treeStore.AppendValues(tag.Name,/*parent,*/tag):
                     treeStore.AppendValues(parentIter,tag.Name,/*parent,*/tag)) ;
             PopulatePeopleCategories (treeStore,tag,iter,level+1);
         }
     }
 }
		public AddinLoadErrorDialog (AddinError[] errors, bool warning)
		{
			Build ();
			Title = BrandingService.ApplicationName;
			
			TreeStore store = new TreeStore (typeof(string));
			errorTree.AppendColumn ("Addin", new CellRendererText (), "text", 0);
			errorTree.Model = store;
			
			bool fatal = false;
			
			foreach (AddinError err in errors) {
				string msg = err.Message;
				if (string.IsNullOrEmpty (msg) && err.Exception != null)
					msg = err.Exception.Message;
				string name = System.IO.Path.GetFileNameWithoutExtension (err.AddinFile);
				if (err.Fatal) name += " (Fatal error)";
				TreeIter it = store.AppendValues (name);
				store.AppendValues (it, "Full Path: " + err.AddinFile);
				store.AppendValues (it, "Error: " + msg);
				if (err.Exception != null) {
					it = store.AppendValues (it, "Exception: " + err.Exception.GetType () + ": " + err.Exception.Message);
					store.AppendValues (it, err.Exception.StackTrace.ToString ());
				}
				if (err.Fatal) fatal = true;
			}

			if (fatal) {
				noButton.Hide ();
				yesButton.Hide ();
				closeButton.Show ();
				messageLabel.Text = GettextCatalog.GetString (
					"{0} cannot start because a fatal error has been detected.",
					BrandingService.ApplicationName
				);
			} else if (warning) {
				noButton.Hide ();
				yesButton.Hide ();
				closeButton.Show ();
				messageLabel.Text = GettextCatalog.GetString (
					"{0} can run without these add-ins, but the functionality they provide will be missing.",
					BrandingService.ApplicationName
				);
			} else {
				messageLabel.Text = GettextCatalog.GetString (
					"You can start {0} without these add-ins, but the functionality they " +
					"provide will be missing. Do you wish to continue?",
					BrandingService.ApplicationName
				);
			}
		}
Beispiel #29
0
        public void FillInspectors(string filter)
        {
            categories.Clear();
            treeStore.Clear();
            foreach (var k in severities.Keys)
            {
                var node = k as CodeIssueProvider;
                if (node == null)
                {
                    continue;
                }
                if (!string.IsNullOrEmpty(filter) && node.Title.IndexOf(filter, StringComparison.OrdinalIgnoreCase) < 0)
                {
                    continue;
                }
                Gtk.TreeIter iter;
                if (!categories.TryGetValue(node.Category, out iter))
                {
                    iter = treeStore.AppendValues("<b>" + node.Category + "</b>");
                    categories [node.Category] = iter;
                }
                var title = node.Title;
                if (!string.IsNullOrEmpty(filter))
                {
                    var idx = title.IndexOf(filter, StringComparison.OrdinalIgnoreCase);
                    if (idx >= 0)
                    {
                        title = title.Substring(0, idx) + "<span bgcolor=\"yellow\">" + title.Substring(idx, filter.Length) + "</span>" + title.Substring(idx + filter.Length);
                    }
                }
                var nodeIter = treeStore.AppendValues(iter, title, node);

                if (node.HasSubIssues)
                {
                    foreach (var subIssue in node.SubIssues)
                    {
                        title = subIssue.Title;
                        if (!string.IsNullOrEmpty(filter))
                        {
                            var idx = title.IndexOf(filter, StringComparison.OrdinalIgnoreCase);
                            if (idx >= 0)
                            {
                                title = title.Substring(0, idx) + "<span bgcolor=\"yellow\">" + title.Substring(idx, filter.Length) + "</span>" + title.Substring(idx + filter.Length);
                            }
                        }
                        treeStore.AppendValues(nodeIter, title, subIssue);
                    }
                }
            }
            treeviewInspections.ExpandAll();
        }
        // ============================================
        // PUBLIC Constructors
        // ============================================
        /// Create New "Add Peer" Dialog
        public AccountsDialog()
            : base("dialog", new XML(null, "AccountsDialog.glade", "dialog", null))
        {
            TreeStore store = new TreeStore(typeof(string), typeof(bool));

            store.AppendValues("Demo 0", true);
            store.AppendValues("Demo 1", false);
            store.AppendValues("Demo 1", false);

            treeView.Model = store;

            treeView.AppendColumn("Demo", new CellRendererText(), "text", 0);
            treeView.AppendColumn("Data", new CellRendererToggle(), "active", 1);
        }
Beispiel #31
0
        private void on_btnAddSharedFolder_clicked(object sender, EventArgs args)
        {
            SelectFolder dlgSelectFolder = new SelectFolder();
            ResponseType result          = (ResponseType)dlgSelectFolder.dlgSelectFolder.Run();

            if (result == ResponseType.Ok)
            {
                string folder      = dlgSelectFolder.dlgSelectFolder.SelectionText.Text;
                int    delimitador = folder.IndexOf(":") + 2;
                folder = folder.Substring(delimitador);
                stSharedFolders.AppendValues(folder);
            }
            dlgSelectFolder.dlgSelectFolder.Destroy();
        }
    public void BindProviderTree()
    {
        accountStore = new TreeStore (typeof(string), typeof(Int64));

        foreach (var provider in Providers) {
            TreeIter iter = accountStore.AppendValues (provider.Name);
            var accounts = accountService.GetByProvider (provider.Id);
            foreach (var account in accounts) {
                accountStore.AppendValues (iter, account.Name, account.Id);
            }
        }

        TreeviewAccounts.Model = accountStore;
        TreeviewAccounts.ButtonPressEvent += new ButtonPressEventHandler (OnItemButtonPressed);
    }
        private void AddChildrenToView(NodeKey key, TreeStore store, TreeIter iter)
        {
            if (key.ChildValues != null)
                foreach (ValueKey val in key.ChildValues)
                    store.AppendValues(iter, val.Name, val);

            if (key.ChildNodes != null)
            {
                foreach (NodeKey node in key.ChildNodes)
                {
                    TreeIter child = store.AppendValues(iter, node.Name, node);
                    AddChildrenToView(node, store, child);
                }
            }
        }
Beispiel #34
0
        void CreateSettingsTreeNodes()
        {
            Gtk.TreeStore trsSettingsTreeStore = trvSettingsTree.Model as Gtk.TreeStore;

            Gdk.Pixbuf icnGeneral            = IconFactory.LookupDefault("scada").RenderIcon(new Style(), TextDirection.None, StateType.Active, IconSize.Menu, null, null);
            Gdk.Pixbuf icnGeneralIdeasServer = IconFactory.LookupDefault("folder").RenderIcon(new Style(), TextDirection.None, StateType.Active, IconSize.Menu, null, null);

            Gtk.TreeIter iterGeneral =
                trsSettingsTreeStore.AppendValues(
                    new object[] { null, "General" });

            trsSettingsTreeStore.AppendValues(
                iterGeneral,
                new object[] { icnGeneralIdeasServer, "Ideas Server" });
        }
Beispiel #35
0
        void AddToTree(Gtk.TreeStore treeStore, Gtk.TreeIter iter, PDictionary dict)
        {
            iterTable[dict] = iter;
            foreach (var item in dict)
            {
                var key     = item.Key.ToString();
                var subIter = iter.Equals(TreeIter.Zero) ? treeStore.AppendValues(key, item.Value) : treeStore.AppendValues(iter, key, item.Value);
                if (item.Value is PArray)
                {
                    AddToTree(treeStore, subIter, (PArray)item.Value);
                }
                if (item.Value is PDictionary)
                {
                    AddToTree(treeStore, subIter, (PDictionary)item.Value);
                }
                if (expandedObjects.Contains(item.Value))
                {
                    treeview.ExpandRow(treeStore.GetPath(subIter), true);
                }
            }
            AddCreateNewEntry(iter);

            if (!rebuildArrays.Contains(dict))
            {
                rebuildArrays.Add(dict);
                dict.Changed += HandleDictRebuild;
            }
        }
		public HelpTree () : base (GettextCatalog.GetString ("Help"), Gtk.Stock.Help)
		{
			tree_view = new MonoDevelop.Ide.Gui.Components.PadTreeView ();

			tree_view.AppendColumn ("name_col", tree_view.TextRenderer, "text", 0);
			tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded);
			tree_view.Selection.Changed += new EventHandler (RowActivated);
			
			store = new TreeStore (typeof (string), typeof (Node));
			tree_view.Model = store;
			tree_view.HeadersVisible = false;
			
			scroller = new MonoDevelop.Components.CompactScrolledWindow ();
			scroller.ShadowType = Gtk.ShadowType.None;
			scroller.Add (tree_view);
			
			if (HelpService.HelpTree != null) {
				root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), HelpService.HelpTree);
				PopulateNode (root_iter);
	
				tree_view.ExpandRow (new TreePath ("0"), false);
				TreeIter child_iter;
			start:
				if (store.IterChildren (out child_iter, root_iter)) {
					do {
						if (!store.IterHasChild (child_iter)) {
							store.Remove (ref child_iter);
							goto start;
						}
					} while (store.IterNext (ref child_iter));
				}
			}
			Control.ShowAll ();
		}
		public CombineEntryConfigurationsPanelWidget (MultiConfigItemOptionsDialog dlg)
		{
			Build ();
			
			configData = dlg.ConfigurationData;
			
			store = new TreeStore (typeof(object), typeof(string));
			configsList.Model = store;
			configsList.HeadersVisible = true;
			store.SetSortColumnId (1, SortType.Ascending);
			
			TreeViewColumn col = new TreeViewColumn ();
			CellRendererText sr = new CellRendererText ();
			col.PackStart (sr, true);
			col.AddAttribute (sr, "text", 1);
			col.Title = GettextCatalog.GetString ("Configuration");
			col.SortColumnId = 1;
			configsList.AppendColumn (col);

			foreach (ItemConfiguration cc in configData.Configurations)
				store.AppendValues (cc, cc.Id);

			addButton.Clicked += new EventHandler (OnAddConfiguration);
			removeButton.Clicked += new EventHandler (OnRemoveConfiguration);
			renameButton.Clicked += new EventHandler (OnRenameConfiguration);
			copyButton.Clicked += new EventHandler (OnCopyConfiguration);
		}
        public NewTemplateDialog (IEnumerator<ContentItemTemplate> enums)
        {
            Build();

            Title = "New Item";
            var column = new TreeViewColumn ();

            var iconCell = new CellRendererPixbuf ();
            var textCell = new CellRendererText ();
            var textCell2 = new CellRendererText ();

            column.PackStart (iconCell, false);
            column.PackStart (textCell, false);
            column.PackStart (textCell2, false);

            treeview1.AppendColumn (column);

            column.AddAttribute (iconCell,  "pixbuf", 0);
            column.AddAttribute (textCell, "text", 1);
            column.AddAttribute (textCell, "text", 2);

            listStore = new TreeStore (typeof (Gdk.Pixbuf), typeof (string), typeof (string));
            treeview1.Model = listStore;

            items = new List<ContentItemTemplate> ();
            int i = 0;

            while (enums.MoveNext ()) {
                listStore.AppendValues (new Gdk.Pixbuf (System.IO.Path.GetDirectoryName (enums.Current.TemplateFile) + "/" + enums.Current.Icon), enums.Current.Label, i.ToString());
                items.Add (enums.Current);
                i++;
            }
        }
            public CombineConfigurationPanelWidget(IProperties CustomizationObject)
                : base("Base.glade", "CombineConfigurationsPanel")
            {
                configuration = (CombineConfiguration)((IProperties)CustomizationObject).GetProperty("Config");

                store = new TreeStore (typeof(object), typeof(string), typeof(bool), typeof(string));
                configsList.Model = store;
                configsList.HeadersVisible = true;

                TreeViewColumn col = new TreeViewColumn ();
                CellRendererText sr = new CellRendererText ();
                col.PackStart (sr, true);
                col.Expand = true;
                col.AddAttribute (sr, "text", 1);
                col.Title = "Solution Item";
                configsList.AppendColumn (col);

                CellRendererToggle tt = new CellRendererToggle ();
                tt.Activatable = true;
                tt.Toggled += new ToggledHandler (OnBuildToggled);
                configsList.AppendColumn ("Build", tt, "active", 2);
                configsList.AppendColumn ("Configuration", new CellRendererText (), "text", 3);

                foreach (CombineConfigurationEntry ce in configuration.Entries)
                    store.AppendValues (ce, ce.Entry.Name, ce.Build, ce.ConfigurationName);
            }
Beispiel #40
0
        void AddToTree(Gtk.TreeStore treeStore, Gtk.TreeIter iter, PArray arr)
        {
            iterTable[arr] = iter;

            for (int i = 0; i < arr.Count; i++)
            {
                var item = arr[i];

                var txt     = string.Format(GettextCatalog.GetString("Item {0}"), i);
                var subIter = iter.Equals(TreeIter.Zero) ? treeStore.AppendValues(txt, item) : treeStore.AppendValues(iter, txt, item);

                if (item is PArray)
                {
                    AddToTree(treeStore, subIter, (PArray)item);
                }
                if (item is PDictionary)
                {
                    AddToTree(treeStore, subIter, (PDictionary)item);
                }
                if (expandedObjects.Contains(item))
                {
                    treeview.ExpandRow(treeStore.GetPath(subIter), true);
                }
            }

            AddCreateNewEntry(iter);

            if (!rebuildArrays.Contains(arr))
            {
                rebuildArrays.Add(arr);
                arr.Changed += HandleArrRebuild;
            }
        }
Beispiel #41
0
        public void SetSheme(ColorScheme style)
        {
            if (style == null)
            {
                throw new ArgumentNullException("style");
            }
            this.fileName                     = Mono.TextEditor.Highlighting.SyntaxModeService.GetFileNameForStyle(style);
            this.colorSheme                   = style;
            this.entryName.Text               = style.Name;
            this.entryDescription.Text        = style.Description;
            this.textEditor.Document.MimeType = "text/x-csharp";
            this.textEditor.GetTextEditorData().ColorStyle = style;
            this.textEditor.Text = @"using System;

// This is an example
class Example
{
	public static void Main (string[] args)
	{
		Console.WriteLine (""Hello World"");
	}
}";
            foreach (var data in metaData)
            {
                colorStore.AppendValues(data.Description, style.GetChunkStyle(data.Name), data);
            }
            Stylechanged(null, null);
        }
        public HelpTree()
            : base(GettextCatalog.GetString ("Help"), Gtk.Stock.Help)
        {
            tree_view = new TreeView ();

            tree_view.AppendColumn ("name_col", new CellRendererText (), "text", 0);
            tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded);
            tree_view.Selection.Changed += new EventHandler (RowActivated);

            store = new TreeStore (typeof (string), typeof (Node));
            root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), Runtime.Documentation.HelpTree);

            PopulateNode (root_iter);

            tree_view.Model = store;
            tree_view.HeadersVisible = false;

            scroller = new ScrolledWindow ();
            scroller.ShadowType = Gtk.ShadowType.In;
            scroller.Add (tree_view);

            tree_view.ExpandRow (new TreePath ("0"), false);
            TreeIter child_iter;
            start:
            store.IterChildren (out child_iter, root_iter);
            do {
                if (!store.IterHasChild (child_iter)) {
                    store.Remove (ref child_iter);
                    goto start;
                }
            } while (store.IterNext (ref child_iter));

            Control.ShowAll ();
        }
Beispiel #43
0
        public Dialog(Drawable drawable, VariableSet variables = null)
            : base("CountTool", variables)
        {
            var hbox = new HBox(false, 12) {BorderWidth = 12};
              VBox.PackStart(hbox, true, true, 0);

              var preview = new Preview(drawable, _coordinates);
              hbox.PackStart(preview, true, true, 0);

              var sw = new ScrolledWindow();
              hbox.Add(sw);

              var store = new TreeStore(typeof(Coordinate<int>));
              for (int i = 0; i < 10; i++)
            {
              var coordinate = new Coordinate<int>(10 * i, 10 * i);
              _coordinates.Add(coordinate);
              store.AppendValues(coordinate);
            }

              var view = new TreeView(store);
              sw.Add(view);

              var textRenderer = new CellRendererText();
              view.AppendColumn("X", textRenderer, new TreeCellDataFunc(RenderX));
              view.AppendColumn("Y", textRenderer, new TreeCellDataFunc(RenderY));
        }
Beispiel #44
0
    private Gtk.TreeIter SetRowValue(Gtk.TreeIter parent, int childIndx,
                                     string cell1, string cell2)
    {
        Gtk.TreeIter child;
        if (itemStore.IterNthChild(out child, parent, childIndx))
        {
            itemStore.SetValue(child, 0, cell1);
            itemStore.SetValue(child, 1, cell2);
        }
        else
        {
            child = itemStore.AppendValues(parent, cell1, cell2);
        }

        return(child);
    }
Beispiel #45
0
        public void Populate()
        {
            this.Clear();
            CellRendererText cell = new CellRendererText();

            this.PackStart(cell, false);
            this.AddAttribute(cell, "text", 0);
            //TreeStore store = new Gtk.TreeStore(typeof (string), typeof (string), typeof (string[]));
            TreeStore store = new Gtk.TreeStore(typeof(string), typeof(string), typeof(AppInfo[]));

            this.Model = store;

            foreach (string mime in type_fetcher())
            {
                System.Console.WriteLine("Populating open with menu for {0}", mime);
            }

            Widget [] dead_pool = Children;
            for (int i = 0; i < dead_pool.Length; i++)
            {
                dead_pool [i].Destroy();
            }



//System.Console.WriteLine ("Type: {0} ", type_fetcher.getType().ToString());
            //store.AppendValues("", "", type_fetcher());
            foreach (AppInfo app in ApplicationsFor(type_fetcher()))
            {
                System.Console.WriteLine("Adding app {0} to open with combo box (binary name = {1}, Id = {2})", app.Name.ToString(), app.Executable.ToString(), app.Id.ToString());
                //store.AppendValues(app.Name.ToString(), app.Executable.ToString(), type_fetcher);
                store.AppendValues(app.Name.ToString(), app.Executable.ToString(), app);
            }
        }
        TreeIter GetGroup(string groupName)
        {
            TreeIter iter;

            if (templateStore.GetIterFirst(out iter))
            {
                do
                {
                    string name = (string)templateStore.GetValue(iter, 1);
                    if (name == groupName)
                    {
                        return(iter);
                    }
                }while (templateStore.IterNext(ref iter));
            }
            return(templateStore.AppendValues(null, groupName, "<b>" + groupName + "</b>"));
        }
Beispiel #47
0
		private void NewTreeStore() 
		{
			// objectDisplayName, status, ObjectOwner, ObjectName, ObjectSubName
			_treeStore = new TreeStore (typeof (string), typeof(string), typeof(string), typeof(string), typeof(string));
			if (_treeView != null)
				_treeView.Model = _treeStore;
			_rootIter = _treeStore.AppendValues ("Connections", "");
		}
Beispiel #48
0
 private void m_OnNewSearched(InterfaceSearchedFile file, int searchID)
 {
     progressbar.Visible = true;
     stSearch.AppendValues(file.Name, file.Size.ToString(), file.Avaibility.ToString(),
                           file.Codec, file.Length.ToString(), file.BitRate.ToString(),
                           file.ResultState.ToString());
     /* Añadir cantidad de resultados */
 }
Beispiel #49
0
        void DoFind()
        {
            List <Guid> guids = searchTransactions.Find(bankAccountCombo.GetSelectedBankAccount(),
                                                        GetDateEntry(startDate.Text), GetDateEntry(endDate.Text),
                                                        descriptionLabel.Text);
            uint row = 0;



            transactionsStore = new Gtk.TreeStore(typeof(Guid), typeof(bool), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string));

            foreach (Guid guid in guids)
            {
                object o = searchTransactions.managerFile.GetObject(guid);
                if (o.GetType() == typeof(Payment))
                {
                    Payment payment     = (Payment)o;
                    string  accountName = searchTransactions.managerFile.GetAccountName(payment.CreditAccount);
                    decimal amount      = (from l in payment.Lines
                                           select l.Amount).Sum();
                    transactionsStore.AppendValues(guid, false,
                                                   String.Format("{0:yyyy-MM-dd}", payment.Date),
                                                   String.Format("{0:0000000000000.0000}", amount),
                                                   payment.Description, accountName, String.Format("{0:C}", amount)
                                                   );
                }
                else if (o.GetType() == typeof(Receipt))
                {
                    Receipt payment     = (Receipt)o;
                    string  accountName = searchTransactions.managerFile.GetAccountName(payment.DebitAccount);
                    decimal amount      = (from l in payment.Lines
                                           select l.Amount).Sum();
                    transactionsStore.AppendValues(guid, false,
                                                   String.Format("{0:yyyy-MM-dd}", payment.Date),
                                                   String.Format("{0:0000000000000.0000}", amount),
                                                   payment.Description, accountName, String.Format("{0:C}", amount)
                                                   );
                }

                ++row;
            }


            transactionsTreeView.Model = transactionsStore;
            transactionsTreeView.ShowAll();
        }
Beispiel #50
0
        public FDArchiveBrowser(FDDataStore ds)
            : base(Gtk.WindowType.Toplevel)
        {
            this.Build ();
            DataStore = ds;
            TreeModel = new Gtk.TreeStore(
                typeof(string),	//file or dirname, 0
                typeof(string),	//time modified, 1
                typeof(string),	//time uploaded, 2
                typeof(int),	//versions, 3
                typeof(string),	//checksum, 4
                typeof(string),	//archiveid, 5
                typeof(Int64),	//id 6
                typeof(Int64),	//parent 7
                typeof(bool)	//if expanded 8
            );

            //Create the tree view columns and misc
            TreeViewColumn filename = new TreeViewColumn();
            TreeViewColumn modified = new TreeViewColumn();
            TreeViewColumn uploaded = new TreeViewColumn();
            filename.Title = "Filename";
            modified.Title = "Modified";
            uploaded.Title = "Uploaded";
            Gtk.CellRendererText filenameCell = new Gtk.CellRendererText();
            Gtk.CellRendererText modifiedCell = new Gtk.CellRendererText();
            Gtk.CellRendererText uploadedCell = new Gtk.CellRendererText();
            filename.PackStart(filenameCell, true);
            modified.PackStart(modifiedCell, false);
            uploaded.PackStart(uploadedCell, false);
            filename.AddAttribute(filenameCell, "text", 0);
            modified.AddAttribute(modifiedCell, "text", 1);
            uploaded.AddAttribute(uploadedCell, "text", 2);
            treeview1.AppendColumn(filename);
            treeview1.AppendColumn(modified);
            treeview1.AppendColumn(uploaded);
            treeview1.Model = this.TreeModel;
            Gtk.TreeSelection selection = treeview1.Selection;
            selection.Mode = Gtk.SelectionMode.Multiple;
            treeview1.Selection.Changed += OnTreeview1RowSelected;

            //insert root node, and populate the first set of directories/files
            TreeIter rootIter = TreeModel.AppendValues ("(root)");
            TreeModel.AppendValues (rootIter, "(loading…)");
        }
Beispiel #51
0
        public Gtk.TreeStore GetTextContentFor(int veranstaltungs_id, string categorie, int tabIndex)
        {
            if (cached_CategorieQuery == null ||
                cached_veranstaltungs_id != veranstaltungs_id ||
                cached_categorie == null || !cached_categorie.Equals(categorie))
            {
                CacheCategorieContent(veranstaltungs_id, categorie);
            }

            CategorieQuery[][] titleList = cached_CategorieQuery[tabIndex];

            // Rang, Text, Typ
            TreeStore treeStore = new Gtk.TreeStore(typeof(string), typeof(string), typeof(string));
            TreeIter  currIter  = TreeIter.Zero;

            foreach (CategorieQuery[] titles in titleList)
            {
                if (titles.Length == 0)                 // No childs
                {
                    continue;
                }

                CategorieQuery currElem = titles[0];
                currIter = treeStore.AppendValues(
                    "" + currElem.TitelRang,
                    "" + API_Contract.CategorieTextParentTypHR[currElem.TitelTyp],
                    "" + currElem.Titel);
                try {
                    if (currElem.Text != null)
                    {
                        foreach (var text in titles)
                        {
                            treeStore.AppendValues(currIter,
                                                   "" + text.TextRang,
                                                   "" + API_Contract.CategorieTextChildTypHR[currElem.TextTyp],
                                                   "" + text.Text);
                        }
                    }
                } catch (Exception e) {
                    Console.WriteLine(e.ToString());
                    return(new Gtk.TreeStore(typeof(string), typeof(string), typeof(string)));
                }
            }
            return(treeStore);
        }
		public InstrumentationViewerDialog (): base ("Instrumentation Monitor")
		{
			Build ();
			
			store = new TreeStore (typeof(string), typeof(ChartView));
			treeCounters.Model = store;
			treeCounters.AppendColumn ("", new CellRendererText (), "text", 0);
			
			//iterStart = store.AppendValues ("Start");
			iterTimers = store.AppendValues ("Timers Events");
			iterTimerStats = store.AppendValues ("Timer Statistics");
			iterViews = store.AppendValues ("Views");
			LoadViews ();
			
			treeCounters.ExpandAll ();
			treeCounters.Selection.Changed += HandleTreeCountersSelectionChanged;
			ShowAll ();
		}
 void BuildModel(TreeStore treeStore)
 {
     foreach (IPackage package in PackageManager.Instance)
     {
         PackageReferenceNode node = new PackageReferenceNode(package);
         //foreach(IPackageFile file in package.Files)
         //    file.Path
         treeStore.AppendValues(node);
     }
 }
    private void OnTilesetChanged(Level level)
    {
        Tileset tileset = level.Tileset;

        TreeStore store = new TreeStore(typeof(Tilegroup));
        foreach(Tilegroup group in tileset.Tilegroups.Values) {
            store.AppendValues(group);
        }
        Model = store;
    }
Beispiel #55
0
        private void BuildModuleList ()
        {
            store = new TreeStore (typeof (string), typeof (Type));

            foreach (Type type in Assembly.GetExecutingAssembly ().GetTypes ()) {
                foreach (TestModuleAttribute attr in type.GetCustomAttributes (typeof (TestModuleAttribute), false)) {
                    store.AppendValues (attr.Name, type);
                }
            }
        }
        public AssemblyTreeControl()
        {
            //ClassBrowserIconsService classBrowserIconService = (ClassBrowserIconsService) ServiceManager.GetService (typeof (ClassBrowserIconsService));
            assembliesStore = new TreeStore (typeof (string), typeof (ArrayList));
            //assemblyTreeView.ImageList = classBrowserIconService.ImageList;

            assembliesStore.AppendValues ("AssembliesNode");
            this.Model = assembliesStore;
            this.Selection.Changed += AssemblyTreeViewSelectionChanged;
            this.Show ();
        }
        /// <summary>
        /// Add new tab to Notebook object and fill it with 
        /// scan result of multimedia file
        /// </summary>
        private void FillListView(List<string[]> video, List<string[]> audio, string filePath)
        {
            TreeStore store = null;

            ScrolledWindow sw = new ScrolledWindow();

            Label lblIndex =
                new Label(Path.GetFileName(filePath).PadRight(25).Substring(0,25).Trim());
            lblIndex.TooltipText = Path.GetFileName(filePath);

            tabContainer.AppendPage(sw, lblIndex);

            TreeView tv = new TreeView();
            tv.HeadersVisible = true;

            tv.AppendColumn ("", new CellRendererPixbuf(), "pixbuf", 0);
            tv.AppendColumn ("Description", new CellRendererText(), "text", 1);
            tv.AppendColumn ("Value", new CellRendererText(), "text", 2);

            sw.Add(tv);

            store = new TreeStore (typeof (Gdk.Pixbuf), typeof (string), typeof (string));
            TreeIter iter = store.AppendValues (Gdk.Pixbuf.LoadFromResource("video.png"),
                                                "Video", "");

            for (int k=0; k<video.Count; k++)
            {
                store.AppendValues(iter, null, video[k][0], video[k][1]);
            }

            iter = store.AppendValues (Gdk.Pixbuf.LoadFromResource("sound.png"),
                                       "Audio", "");

            for (int k=0; k<audio.Count; k++)
            {
                store.AppendValues(iter, null, audio[k][0], audio[k][1]);
            }

            tv.Model = store;
            tv.ExpandAll();
        }
Beispiel #58
0
        public OriginView(Battle.Core.BattleSession session, Battle.Core.OriginDefinition orig)
            : base(5, 2, false)
        {
            this.SizeRequested += HandleSizeRequested;
            this.SizeAllocated += HandleSizeAllocated;
            //this.session = session;
            //this.orig = orig;

            Label label1 = new Label("Name: ");
            Label label2 = new Label("Description: ");
            Entry entry1 = new Entry();
            Entry entry2 = new Entry();

            entry1.IsEditable = false;
            entry1.Text = orig.Name;

            entry2.IsEditable = false;
            entry2.Text = orig.Description;

            Gtk.TreeStore store1 = new Gtk.TreeStore(typeof(string));
            foreach (string prov in orig.Provides())
            {
                //string[] vs = new string[1];
                //vs[0] = prov;
                //store1.AppendValues(vs);
                TreeIter i =  store1.AppendNode();
                store1.SetValue(i, 0, prov);
            }
            TreeView treeview1 = new TreeView(store1);
            treeview1.AppendColumn("Provides", new CellRendererText(), "text", 0);

            Gtk.TreeStore store2 = new Gtk.TreeStore(typeof(string));
            foreach (string req in orig.Requires())
            {
                string[] vs = new string[1];
                vs[0] = req;
                store1.AppendValues(vs);
            }
            TreeView treeview2 = new TreeView(store2);
            treeview2.AppendColumn("Requires", new CellRendererText(), "text", 0);

            this.Attach(new Label("Origin"), 0, 2, 0, 1, AttachOptions.Expand, AttachOptions.Fill, 0, 0);

            this.Attach(label1, 0, 1, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            this.Attach(entry1, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, 0, 0);

            this.Attach(label2, 0, 1, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            this.Attach(entry2, 1, 2, 2, 3, AttachOptions.Fill, AttachOptions.Fill, 0, 0);

            this.Attach(treeview1, 0, 2, 3, 4, AttachOptions.Fill, AttachOptions.Fill, 1, 1);

            this.Attach(treeview2, 0, 2, 4, 5, AttachOptions.Fill, AttachOptions.Fill, 1, 1);
        }
Beispiel #59
0
        public BadOptionsDialog(Gtk.Window parent, ArrayList badOptions)
            : base(parent, "BadOptionsDialog")
        {
            badOptionsTreeStore = new TreeStore (typeof (string));
            badOptionsTree.Model = badOptionsTreeStore;
            badOptionsTree.AppendColumn ("Name", new CellRendererText (), "text", 0);

            badOptionsTree.Selection.SelectFunction = new TreeSelectionFunc (SelectFunc);

            for (int x = 0; x < badOptions.Count; x++)
                badOptionsTreeStore.AppendValues (new string[] {badOptions[x].ToString()});
        }
		public AddinLoadErrorDialog (AddinError[] errors, bool warning)
		{
			Build ();
			
			TreeStore store = new TreeStore (typeof(string));
			errorTree.AppendColumn ("Addin", new CellRendererText (), "text", 0);
			errorTree.Model = store;
			
			bool fatal = false;
			
			foreach (AddinError err in errors) {
				string msg = err.Message;
				if (string.IsNullOrEmpty (msg) && err.Exception != null)
					msg = err.Exception.Message;
				string name = System.IO.Path.GetFileNameWithoutExtension (err.AddinFile);
				if (err.Fatal) name += " (Fatal error)";
				TreeIter it = store.AppendValues (name);
				store.AppendValues (it, "Full Path: " + err.AddinFile);
				store.AppendValues (it, "Error: " + msg);
				if (err.Exception != null) {
					it = store.AppendValues (it, "Exception: " + err.Exception.GetType () + ": " + err.Exception.Message);
					store.AppendValues (it, err.Exception.StackTrace.ToString ());
				}
				if (err.Fatal) fatal = true;
			}
			
			if (fatal) {
				noButton.Hide ();
				yesButton.Hide ();
				labelContinue.Hide ();
				closeButton.Show ();
				labelFatal.Show ();
			} else if (warning) {
				noButton.Hide ();
				yesButton.Hide ();
				labelContinue.Hide ();
				labelWarning.Show ();
				closeButton.Show ();
			}
		}