当前位置: 首页>>代码示例>>C#>>正文


C# Gtk.TreeIter类代码示例

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


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


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