• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gtk.TreeIter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Gtk.TreeIter的典型用法代码示例。如果您正苦于以下问题:C# TreeIter类的具体用法?C# TreeIter怎么用?C# TreeIter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TreeIter类属于Gtk命名空间,在下文中一共展示了TreeIter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ApplicationWidget

        public ApplicationWidget(Project project,Gtk.Window parent)
        {
            parentWindow =parent;
            this.Build();
            this.project = project;

            cbType = new ComboBox();

            ListStore projectModel = new ListStore(typeof(string), typeof(string));
            CellRendererText textRenderer = new CellRendererText();
            cbType.PackStart(textRenderer, true);
            cbType.AddAttribute(textRenderer, "text", 0);

            cbType.Model= projectModel;

            TreeIter ti = new TreeIter();
            foreach(SettingValue ds in MainClass.Settings.ApplicationType){// MainClass.Settings.InstallLocations){
                if(ds.Value == this.project.ApplicationType){
                    ti = projectModel.AppendValues(ds.Display,ds.Value);
                    cbType.SetActiveIter(ti);
                } else  projectModel.AppendValues(ds.Display,ds.Value);
            }
            if(cbType.Active <0)
                cbType.Active =0;

            tblGlobal.Attach(cbType, 1, 2, 0,1, AttachOptions.Fill|AttachOptions.Expand, AttachOptions.Fill|AttachOptions.Expand, 0, 0);

            afc = new ApplicationFileControl(project.AppFile,ApplicationFileControl.Mode.EditNoSaveButton,parentWindow);
            vbox2.PackEnd(afc, true, true, 0);
        }
开发者ID:moscrif,项目名称:ide,代码行数:30,代码来源:ApplicationPanel.cs


示例2: GtkTreeModelResult

		public GtkTreeModelResult (Widget parent, TreeModel treeModel, int column, TreeIter iter) : base (parent)
		{
			ParentWidget = parent;
			TModel = treeModel;
			Column = column;
			resultIter = iter;
		}
开发者ID:nerzhulart,项目名称:monodevelop,代码行数:7,代码来源:GtkTreeModelResult.cs


示例3: MonoRuntimePanelWidget

		public MonoRuntimePanelWidget()
		{
			this.Build();
			
			labelRunning.Markup = GettextCatalog.GetString ("MonoDevelop is currently running on <b>{0}</b>.", Runtime.SystemAssemblyService.CurrentRuntime.DisplayName);
			store = new ListStore (typeof(string), typeof(object));
			tree.Model = store;
			
			CellRendererText crt = new CellRendererText ();
			tree.AppendColumn ("Runtime", crt, "markup", 0);
			TargetRuntime defRuntime = IdeApp.Preferences.DefaultTargetRuntime;
			
			foreach (TargetRuntime tr in Runtime.SystemAssemblyService.GetTargetRuntimes ()) {
				string name = tr.DisplayName;
				TreeIter it;
				if (tr == defRuntime) {
					name = "<b>" + name + " (Default)</b>";
					defaultIter = it = store.AppendValues (name, tr);
				} else
					it = store.AppendValues (name, tr);
				if (tr.IsRunning)
					runningIter = it;
			}
			
			tree.Selection.Changed += HandleChanged;
			UpdateButtons ();
		}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:27,代码来源:MonoRuntimePanel.cs


示例4: GetUriByIter

        public Uri GetUriByIter(TreeIter iter)
        {
            if ( ! IterIsValid (iter))
                return null;

            return (Uri) GetValue (iter, 2);
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:7,代码来源:FolderTreeModel.cs


示例5: OnMatchSelected

		protected override bool OnMatchSelected (TreeModel filter, TreeIter iter){
			Location.Item = (Model.Item)filter.GetValue(iter,0);
			Entry entry = (Entry)Entry;
			entry.FinishEditing();
			entry.RemoveWidget();
			return true;
		}
开发者ID:konne88,项目名称:MyInventory,代码行数:7,代码来源:LocationsBox.cs


示例6: ProcessType

		private static void ProcessType (TreeIter parent, System.Type t)
		{
			foreach (MemberInfo mi in t.GetMembers ()) {
 				store.AppendValues (parent, mi.Name, mi.ToString ());
				count++;
			}
		}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:7,代码来源:TreeViewDemo.cs


示例7: GetFolderNameByIter

        public string GetFolderNameByIter(TreeIter iter)
        {
            if ( ! IterIsValid (iter))
                return null;

            return (string) GetValue (iter, 0);
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:7,代码来源:FolderTreeModel.cs


示例8: OnMatchSelected

		protected override bool OnMatchSelected (TreeModel filter, TreeIter iter){
			Entry entry = (Entry)Entry;
			entry.Text = ((ItemTag)filter.GetValue(iter,0)).Name;
			entry.FinishEditing();
			entry.RemoveWidget();
			return true;
		}
开发者ID:konne88,项目名称:MyInventory,代码行数:7,代码来源:ItemEditBox.cs


示例9: LoadData

 public void LoadData(TreeViewBackend treeBackend, TreeModel treeModel, TreeIter iter)
 {
     this.treeModel = treeModel;
     this.iter = iter;
     cellView.Initialize (this);
     Visible = cellView.Visible;
 }
开发者ID:nite2006,项目名称:xwt,代码行数:7,代码来源:CustomCellRenderer.cs


示例10: Eventos

        public Eventos()
            : base(Gtk.WindowType.Toplevel)
        {
            this.Build ();
            for (int h = 0; h < 65; h++)
                cmdHoraInicio.AppendText (DateTime.Parse("08:00").AddMinutes(15.0*(double)h).ToString("HH:mm"));

            for (int h = 1; h < 20; h++)
                cmbDuracion.AppendText (DateTime.Parse("00:00").AddMinutes(15.0*(double)h).ToString("HH:mm"));

            Gtk.TreeIter iter = new Gtk.TreeIter();
            cmdHoraInicio.Model.GetIterFirst(out iter);
            cmdHoraInicio.SetActiveIter(iter);

            cmbDuracion.Model.GetIterFirst(out iter);
            cmbDuracion.SetActiveIter(iter);

            txtinfoContacto.Changed += (sender, e) => ValidarEvento();
            txtNombreEvento.Changed += (sender, e) => ValidarEvento();
            txtPatrocinadoPor.Changed += (sender, e) => ValidarEvento();
            txtPrecioEvento.Changed += (sender, e) => ValidarEvento();
            calFechaEvento.DaySelected += (sender, e) => ValidarEvento();
            cmdHoraInicio.Changed += (sender, e) => ValidarEvento();
            cmbDuracion.Changed += (sender, e) => ValidarEvento();

            ValidarEvento();
        }
开发者ID:vlad88sv,项目名称:RIFT,代码行数:27,代码来源:Eventos.cs


示例11: InitGrub

 public void InitGrub()
 {
     if(!MainClass.boRoot)
     {
         BTN_RemoveEntry.Visible = false;
         BTN_AddEntry.Visible = false;
         BTN_Save.Visible = false;
         BTN_Apply.Visible = false;
         BTN_Modify.Visible=false;
         SAI_Hdd.Visible = false;
         LIB_Root.Visible=true;
     }
     else
     {
         LIB_Root.Visible=false;
     }
     model.Clear();
     CBO_Entry.Model=model;
     int i = 0;
     TreeIter iter =new TreeIter();
     foreach (GrubEntry entry in MainClass.grub.Entrys)
     {
         string titre=entry.title;
         iter=model.AppendValues(titre,i);
         if(i==0)
             CBO_Entry.SetActiveIter(iter);
         i++;
     }
     SAI_Default.Text=MainClass.grub.GetDefault().ToString();
     SAI_TimeOut.Text=MainClass.grub.GetTimeout().ToString();
     SAI_Gfx.Text=MainClass.grub.GetGfx();
 }
开发者ID:frugalware,项目名称:frugal-tweak,代码行数:32,代码来源:WID_Grub.cs


示例12: pases

        public pases()
        {
            this.Build ();

            cmbPerfilPase.PackStart(crt1,false);
            cmbPerfilPase.PackStart(crt2,false);
            cmbPerfilPase.AddAttribute(crt1, "text", 1);
            cmbPerfilPase.Model = lsPerfilPase;

            string c = "SELECT `ID_perfil`, `nombre_perfil`, `cantidad_pases`, `dias_validos`, `precio_individual`, `fecha_expiracion`, `razon`, `disponibles`, `ilimitado`, `utilizados` FROM `perfil_pases` WHERE deshabilitado=0";
            MySQL.consultar(c);

            while (MySQL.Reader.Read())
            {
                lsPerfilPase.AppendValues(
                    MySQL.Reader["ID_perfil"].ToString(),			//0
                    MySQL.Reader["nombre_perfil"].ToString(),		//1
                    MySQL.Reader["cantidad_pases"].ToString(),		//2
                    MySQL.Reader["dias_validos"].ToString(), 		//3
                    MySQL.Reader["precio_individual"].ToString(), 	//4
                    MySQL.Reader["fecha_expiracion"].ToString(), 	//5
                    MySQL.Reader["razon"].ToString(), 				//6
                    MySQL.Reader["disponibles"].ToString(), 		//7
                    MySQL.Reader["ilimitado"].ToString(), 			//8
                    MySQL.Reader["utilizados"].ToString()			//9
                    );
            }

            Gtk.TreeIter iter = new Gtk.TreeIter();
            lsPerfilPase.GetIterFirst(out iter);
            cmbPerfilPase.SetActiveIter(iter);
        }
开发者ID:vlad88sv,项目名称:RIFT,代码行数:32,代码来源:pases.cs


示例13: OnCmdGrabarClicked

        protected virtual void OnCmdGrabarClicked(object sender, System.EventArgs e)
        {
            TreeIter iter = new TreeIter();

            if (tvLista.Model.GetIterFirst(out iter)) {
            do {
                if (tvLista.Model.GetValue(iter,cafeteria.tvLista_Col_Cantidad).ToString() != "0")
                {
                    MySQL.consultar("INSERT INTO `cafeteria_stock` (`ID_articulo`, `stock`, `fecha`, `ingresado_por`) " +
                    "VALUES(" +
                            "'" + tvLista.Model.GetValue(iter,cafeteria.tvLista_Col_ID_articulo).ToString() + "'," +
                            "'" + tvLista.Model.GetValue(iter,cafeteria.tvLista_Col_Cantidad).ToString() + "'," +
                            "NOW()," +
                            auth.ID_usuario +
                            ")");
                }
            } while(tvLista.Model.IterNext(ref iter));
            }
            MySQL.consultar("INSERT INTO `cafeteria_ingresos` (`ID_ingreso`, `descripcion`, `comprador`, `ingresado_por`, `fechatiempo`, `total_compra`) " +
            "VALUES(" +
            "0, " +
            "'"+txtDetalle.Buffer.Text+"'," +
            "'"+txtComprador.Text+"'," +
            ""+auth.ID_usuario+"," +
            "NOW()," +
            "'"+txtTotalCompra.Text+"'" +
            ")");

            Gtk.MessageDialog Mensaje = new MessageDialog(this, DialogFlags.Modal, MessageType.Info, ButtonsType.Close, "Ingreso realizado.\nEsta ventana se cerrará");
            Mensaje.Title="Éxito";
            Mensaje.Run();
            Mensaje.Destroy();
            this.Destroy();
            return;
        }
开发者ID:vlad88sv,项目名称:RIFT,代码行数:35,代码来源:compras.cs


示例14: DocsTreeView

    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);
        }
    }
开发者ID:j-rivero,项目名称:repodoc,代码行数:29,代码来源:docs_tree_view.cs


示例15: SaveArticulo

        protected void SaveArticulo(object sender, EventArgs e)
        {
            String nombreArticulo = entryNombre.Text;
            int indiceCatArticulo = comboBoxCategoria.Active;
            TreeIter treeIter = new TreeIter ();

            comboBoxCategoria.Model.GetIterFirst (out treeIter);

            for (int j =0; j<indiceCatArticulo; j++) {

                comboBoxCategoria.Model.IterNext(ref treeIter);

            }
            IList categoriaModel = (IList) comboBoxCategoria.Model.GetValue (treeIter, 0);

            int categoriaId = int.Parse(categoriaModel [0].ToString());
            decimal precio = Convert.ToDecimal(spinButtonPrecio.Value);
            IList nuevaRow = new List<object>();
            nuevaRow.Add (nombreArticulo);
            nuevaRow.Add (categoriaId);
            nuevaRow.Add (precio);
            PersisterHelper.Save ("Articulo", nuevaRow);

            this.Destroy();
        }
开发者ID:c-trives,项目名称:ad,代码行数:25,代码来源:ArticuloView.cs


示例16: iFolderViewItem

 public iFolderViewItem(iFolderHolder holder, iFolderViewGroup group, TreeIter iter, int maxWidth)
 {
     this.holder = holder;
        this.group = group;
        this.iter = iter;
        this.maxWidth = maxWidth;
        this.CanFocus = true;
        this.bSelected = false;
        this.bMouseIsHovering = false;
        this.ModifyBg(StateType.Normal, this.Style.Base(StateType.Normal));
        this.ModifyBase(StateType.Normal, this.Style.Base(StateType.Normal));
        currentName = "";
        currentLocation = "";
        currentStatus = "";
        LoadImages();
        SetPixbufs();
        this.Add(CreateWidgets());
        this.WidthRequest = this.maxWidth;
        this.Realized +=
     new EventHandler(OnWidgetRealized);
        TargetEntry[] targets =
     new TargetEntry[]
     {
      new TargetEntry ("text/ifolder-id", 0, (uint)iFolderWindow.DragTargetType.iFolderID)
     };
        this.DragDataGet += new DragDataGetHandler(HandleDragDataGet);
        Drag.SourceSet(this, Gdk.ModifierType.Button1Mask, targets, Gdk.DragAction.Move);
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:28,代码来源:iFolderViewItem.cs


示例17: AddEntry

		void AddEntry (TreeIter iter, SolutionItem entry)
		{
			string icon;
			if (entry.ParentFolder == null)
				icon = MonoDevelop.Ide.Gui.Stock.Solution;
			else if (entry is SolutionFolder)
				icon = MonoDevelop.Ide.Gui.Stock.SolutionFolderClosed;
			else if (entry is Project)
				icon = ((Project)entry).StockIcon;
			else
				icon = MonoDevelop.Ide.Gui.Stock.Project;
			
			bool visible = builder.CanBuild (entry);
			bool selected = selectedEntries.ContainsKey (entry);
			
			if (!(entry is SolutionFolder) && !visible)
				return;
			
			if (!iter.Equals (TreeIter.Zero))
				iter = store.AppendValues (iter, icon, entry.Name, entry, selected && visible, visible);
			else
				iter = store.AppendValues (icon, entry.Name, entry, selected && visible, visible);
			
			if (selected)
				tree.ExpandToPath (store.GetPath (iter));
			
			if (entry is SolutionFolder) {
				foreach (SolutionItem ce in ((SolutionFolder)entry).Items) {
					AddEntry (iter, ce);
				}
			}
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:32,代码来源:EntrySelectionTree.cs


示例18: OnButtonDeleteClicked

 protected void OnButtonDeleteClicked(object sender, EventArgs e)
 {
     TreeIter iter = new TreeIter ();
     if (!treeParameters.Selection.GetSelected (out iter))
         return;
     parametersListStore.Remove (ref iter);
 }
开发者ID:QualitySolution,项目名称:QSProjects,代码行数:7,代码来源:ApplicationConfigDialog.cs


示例19: SetNodeContent

        public void SetNodeContent(TreeIter iter, Table2D table2D)
        {
            store.SetValue (iter, (int)ColumnNr2D.Obj, table2D);

            store.SetValue (iter, (int)ColumnNr2D.Category, table2D.Category);
            store.SetValue (iter, (int)ColumnNr2D.Toggle, false);
            store.SetValue (iter, (int)ColumnNr2D.Title, table2D.Title);
            store.SetValue (iter, (int)ColumnNr2D.UnitY, table2D.UnitY);

            store.SetValue (iter, (int)ColumnNr2D.NameX, table2D.NameX);
            store.SetValue (iter, (int)ColumnNr2D.UnitX, table2D.UnitX);

            store.SetValue (iter, (int)ColumnNr2D.CountX, table2D.CountX);

            store.SetValue (iter, (int)ColumnNr2D.Xmin, table2D.Xmin);
            store.SetValue (iter, (int)ColumnNr2D.Xmax, table2D.Xmax);

            store.SetValue (iter, (int)ColumnNr2D.Multiplier, table2D.Multiplier);
            store.SetValue (iter, (int)ColumnNr2D.Offset, table2D.Offset);

            store.SetValue (iter, (int)ColumnNr2D.Location, table2D.Location);
            store.SetValue (iter, (int)ColumnNr2D.XPos, table2D.RangeX.Pos);
            store.SetValue (iter, (int)ColumnNr2D.YPos, table2D.RangeY.Pos);
            store.SetValue (iter, (int)ColumnNr2D.Description, table2D.Description);
            Toggle (iter, table2D.Selected);

            SetNodeContentTypeChanged (iter, table2D);
        }
开发者ID:SubaruDieselCrew,项目名称:ScoobyRom,代码行数:28,代码来源:DataView2DModelGtk.cs


示例20: OnButtonOkClicked

 protected void OnButtonOkClicked(object sender, EventArgs e)
 {
     //Получаем из листа новые значения
     parameters = new Dictionary<string, string> ();
     TreeIter iter = new TreeIter ();
     if (!parametersListStore.GetIterFirst (out iter))
         return;
     do {
         string key = (string)parametersListStore.GetValue (iter, 0);
         string value = (string)parametersListStore.GetValue (iter, 1);
         parameters.Add (key, value);
     } while (parametersListStore.IterNext (ref iter));
     //Добавляем или обновляем.
     foreach (var pair in parameters) {
         string value = String.Empty;
         if (MainSupport.BaseParameters.All.TryGetValue (pair.Key, out value)) {
             if (value == pair.Value)
                 continue;
         }
         MainSupport.BaseParameters.UpdateParameter (QSMain.ConnectionDB, pair.Key, pair.Value);
     }
     //Удаляем
     foreach (var pair in MainSupport.BaseParameters.All.ToList()) {
         if (!parameters.ContainsKey (pair.Key))
             MainSupport.BaseParameters.RemoveParameter (QSMain.ConnectionDB, pair.Key);
     }
 }
开发者ID:QualitySolution,项目名称:QSProjects,代码行数:27,代码来源:ApplicationConfigDialog.cs



注:本文中的Gtk.TreeIter类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gtk.TreePath类代码示例发布时间:2022-05-26
下一篇:
C# Gtk.Toolbar类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap