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


C# ComboBox.Destroy方法代码示例

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


在下文中一共展示了ComboBox.Destroy方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PayAccrual

        public PayAccrual()
        {
            this.Build ();

            ComboBox IncomeCombo = new ComboBox();
            ComboWorks.ComboFillReference(IncomeCombo,"income_items", ComboWorks.ListMode.OnlyItems);
            IncomeNameList = IncomeCombo.Model;
            IncomeCombo.Destroy ();

            //Создаем таблицу "Услуги"
            ServiceListStore = new Gtk.ListStore (typeof (bool),
                                                  typeof (int),
                                                  typeof (string),
                                                  typeof (int),
                                                  typeof (string),
                                                  typeof (int),
                                                  typeof (string),
                                                  typeof (decimal),
                                                  typeof(long));

            CellRendererToggle CellPay = new CellRendererToggle();
            CellPay.Activatable = true;
            CellPay.Toggled += onCellPayToggled;

            Gtk.TreeViewColumn IncomeItemsColumn = new Gtk.TreeViewColumn ();
            IncomeItemsColumn.Title = "Статья дохода";
            IncomeItemsColumn.MinWidth = 130;
            Gtk.CellRendererCombo CellIncomeItems = new CellRendererCombo();
            CellIncomeItems.TextColumn = 0;
            CellIncomeItems.Editable = true;
            CellIncomeItems.Model = IncomeNameList;
            CellIncomeItems.HasEntry = false;
            CellIncomeItems.Edited += OnIncomeItemComboEdited;
            IncomeItemsColumn.PackStart (CellIncomeItems, true);

            Gtk.TreeViewColumn SumColumn = new Gtk.TreeViewColumn ();
            SumColumn.Title = "Сумма";
            SumColumn.MinWidth = 90;
            Gtk.CellRendererText CellSum = new CellRendererText();
            CellSum.Editable = true;
            CellSum.Edited += OnSumTextEdited;
            SumColumn.PackStart (CellSum, true);

            treeviewServices.AppendColumn("Оплатить", CellPay, "active", (int)ServiceCol.pay);
            treeviewServices.AppendColumn ("Услуга", new Gtk.CellRendererText (), "text", (int)ServiceCol.service);
            treeviewServices.AppendColumn ("Касса", new Gtk.CellRendererText (), "text", (int)ServiceCol.cash);
            treeviewServices.AppendColumn (IncomeItemsColumn);
            IncomeItemsColumn.AddAttribute (CellIncomeItems, "text", (int)ServiceCol.income);
            treeviewServices.AppendColumn (SumColumn);
            SumColumn.SetCellDataFunc (CellSum, RenderSumColumn);

            treeviewServices.Model = ServiceListStore;
            treeviewServices.ShowAll();
        }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:54,代码来源:PayAccrual.cs

示例2: MeterType

        public MeterType( bool New)
        {
            this.Build ();

            ComboBox ServiceCombo = new ComboBox();
            ComboWorks.ComboFillReference(ServiceCombo,"services", ComboWorks.ListMode.WithNo);
            ServiceNameList = ServiceCombo.Model;
            ServiceCombo.Destroy ();

            TariffListStore = new Gtk.ListStore (typeof (int), 	// 0 - tariff id
                                                  typeof (string),	// 1 - Name
                                                  typeof (int),		// 2 - Service id
                                                 typeof (string)	// 3 - Service name
                                                  );

            Gtk.CellRendererCombo CellService = new CellRendererCombo();
            CellService.TextColumn = 0;
            CellService.Editable = true;
            CellService.Model = ServiceNameList;
            CellService.HasEntry = false;
            CellService.Edited += OnServiceComboEdited;
            CellService.EditingStarted += OnServiceComboStartEdited;

            Gtk.CellRendererText CellName = new CellRendererText();
            CellName.Editable = true;
            CellName.Edited += OnCellNameEdited;

            //treeviewTariff.AppendColumn ("Код", new Gtk.CellRendererText (), "text", 0);
            treeviewTariff.AppendColumn ("Название", CellName, "text", 1);
            treeviewTariff.AppendColumn ("Услуга для оплаты", CellService, "text", 3);

            treeviewTariff.Model = TariffListStore;
            treeviewTariff.ShowAll();

            if(New)
            {
                NewItem = New;
                TariffListStore.AppendValues (-1,
                                              "Основной",
                                              -1,
                                              "нет");
            }
        }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:43,代码来源:MeterType.cs

示例3: Contract

        public Contract()
        {
            this.Build ();

            ComboWorks.ComboFillReference(comboOrg, "organizations", ComboWorks.ListMode.WithNo);
            ComboWorks.ComboFillReference(comboPlaceT,"place_types", ComboWorks.ListMode.WithNo);

            ComboBox ServiceCombo = new ComboBox();
            ComboWorks.ComboFillReference(ServiceCombo,"services", ComboWorks.ListMode.OnlyItems);
            ServiceNameList = ServiceCombo.Model;
            ServiceCombo.Destroy ();

            ComboBox CashCombo = new ComboBox();
            string sqlSelect = "SELECT name, id, color FROM cash";
            ComboWorks.ComboFillUniversal(CashCombo, sqlSelect, "{0}", null, 1, ComboWorks.ListMode.OnlyItems, true);
            CashNameList = CashCombo.Model;
            CashCombo.Destroy ();

            MainClass.FillServiceListStore(out ServiceRefListStore);

            //Создаем таблицу "Услуги"
            ServiceListStore = new Gtk.ListStore (typeof(int), 	// 0 - idServiceColumn
                                                  typeof(string),	// 1 - Наименование
                                                  typeof(int),		// 2 - idКасса
                                                  typeof(string),	// 3 - Касса
                                                  typeof(string), 	// 5 - Ед. изм.
                                                  typeof(decimal), 	// 6 - Количество
                                                  typeof(decimal),	// 7 - Цена
                                                  typeof(decimal),	// 8 - Сумма
                                                  typeof(int), 	// 9 - id
                                                  typeof(bool),	// 10 - Есть ли расчет по метражу
                                                  typeof(decimal),	// 11 - Минимальный платеж.
                                                  typeof(string) 	// 12 - Цвет строки
            );

            Gtk.TreeViewColumn ServiceColumn = new Gtk.TreeViewColumn ();
            ServiceColumn.Title = "Наименование";
            ServiceColumn.MinWidth = 180;
            Gtk.CellRendererCombo CellService = new CellRendererCombo();
            CellService.TextColumn = 0;
            CellService.Editable = true;
            CellService.Model = ServiceNameList;
            CellService.HasEntry = false;
            CellService.Edited += OnServiceComboEdited;
            ServiceColumn.PackStart (CellService, true);

            Gtk.TreeViewColumn CashColumn = new Gtk.TreeViewColumn ();
            CashColumn.Title = "Касса";
            CashColumn.MinWidth = 130;
            Gtk.CellRendererCombo CellCash = new CellRendererCombo();
            CellCash.TextColumn = 0;
            CellCash.Editable = true;
            CellCash.Model = CashNameList;
            CellCash.HasEntry = false;
            CellCash.Edited += OnCashComboEdited;
            CashColumn.PackStart (CellCash, true);

            Gtk.TreeViewColumn CountColumn = new Gtk.TreeViewColumn ();
            CountColumn.Title = "Количество";
            Gtk.CellRendererText CellCount = new CellRendererText();
            CellCount.Editable = true;
            CellCount.Edited += OnServiceCountEdited;
            CountColumn.PackStart (CellCount, true);
            Gtk.CellRendererText CellUnits = new CellRendererText ();
            CountColumn.PackStart (CellUnits, false);

            Gtk.CellRendererText CellPrice = new CellRendererText();
            CellPrice.Editable = true;
            CellPrice.Edited += OnServicePriceEdited;

            Gtk.CellRendererText CellMinSum = new CellRendererText();
            CellMinSum.Editable = true;
            CellMinSum.Edited += OnServiceMinSumEdited;

            treeviewServices.AppendColumn (ServiceColumn);
            ServiceColumn.AddAttribute (CellService, "text", (int)ServiceCol.service);
            treeviewServices.AppendColumn (CashColumn);
            CashColumn.AddAttribute (CellCash,"text", (int)ServiceCol.cash);
            treeviewServices.AppendColumn (CountColumn);
            CountColumn.AddAttribute (CellUnits,"text", (int)ServiceCol.units);
            CountColumn.SetCellDataFunc (CellCount, RenderCountColumn);
            treeviewServices.AppendColumn ("Цена", CellPrice, RenderPriceColumn);
            treeviewServices.AppendColumn ("Сумма", new Gtk.CellRendererText (), RenderSumColumn);
            treeviewServices.AppendColumn ("Мин. платеж", CellMinSum, RenderMinSumColumn);

            foreach(TreeViewColumn column in treeviewServices.Columns)
            {
                foreach(CellRenderer render in column.CellRenderers)
                {
                    column.AddAttribute (render, "background", (int)ServiceCol.row_color);
                }
            }

            treeviewServices.Columns[3].MinWidth = 90;

            treeviewServices.Model = ServiceListStore;
            treeviewServices.ShowAll();

            OnTreeviewServicesCursorChanged(null, null);
        }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:100,代码来源:Contract.cs

示例4: Order

        public Order()
            : base(Gtk.WindowType.Toplevel)
        {
            this.Build();
            notebook1.CurrentPage = 0;
            ComboWorks.ComboFillReference(comboExhibition, "exhibition", ComboWorks.ListMode.WithNo, true, "ordinal");
            dateArrval.Date = DateTime.Today;

            //Создаем таблицу номенклатуры
            ComboBox TempCombo = new ComboBox();
            ComboWorks.ComboFillReference(TempCombo, "materials", ComboWorks.ListMode.WithNo, true, "ordinal");
            MaterialNameList = TempCombo.Model;
            TempCombo.Destroy ();

            TempCombo = new ComboBox();
            ComboWorks.ComboFillReference(TempCombo, "facing", ComboWorks.ListMode.WithNo, true, "ordinal");
            FacingNameList = TempCombo.Model;
            TempCombo.Destroy ();

            ComponentsStore = new TreeStore(
                typeof(long), //row_id
                typeof(Nomenclature.NomType), //nomenclature_type
                typeof(int), //nomenclature_id
                typeof(string), //nomenclature
                typeof(string), //nomenclature_title
                typeof(string), //nomenclature_description
                typeof(int), //count
                typeof(int), //material_id
                typeof(string), //material
                typeof(int), //facing_id
                typeof(string), //facing
                typeof(string), //comment
                typeof(string), //price
                typeof(string), //price_total
                typeof(bool), //editable_count
                typeof(bool), //editable_price
                typeof(bool), //editable_material
                typeof(bool), //editable_facing
                typeof(bool), //editable_comment
                typeof(bool), //editable_discount
                typeof(int), //discount
                typeof(bool)); //editable_name

            BasisIter = ComponentsStore.AppendValues (
                (long)-1,
                Enum.Parse(typeof(Nomenclature.NomType), "construct"),
                1,
                null,
                "Каркас",
                null,
                1,
                -1,
                "",
                -1,
                "",
                "",
                "",
                "",
                false,
                false,
                false,
                false,
                false,
                false,
                null,
                false);

            ServiceIter = ComponentsStore.InsertNodeAfter (BasisIter);

            ComponentsStore.SetValues (
                ServiceIter,
                (long)-1,
                Enum.Parse (typeof(Nomenclature.NomType), "other"),
                1,
                null,
                "Услуги",
                "Кликните правой кнопкой мышы для добавления услуги",
                0,
                -1,
                "",
                -1,
                "",
                "",
                "",
                "",
                false,
                false,
                false,
                false,
                false,
                false,
                null,
                false);

            ColumnCount = new Gtk.TreeViewColumn ();
            ColumnCount.Title = "Кол-во";
            Gtk.CellRendererText CellCount = new CellRendererText ();
            CellCount.Editable = true;
            CellCount.Edited += OnCountEdited;
            ColumnCount.PackStart (CellCount, true);
//.........这里部分代码省略.........
开发者ID:QualitySolution,项目名称:CupboardDesigner,代码行数:101,代码来源:Order.cs

示例5: SeparationPayment

        public SeparationPayment()
        {
            this.Build ();

            ComboBox IncomeCombo = new ComboBox();
            ComboWorks.ComboFillReference(IncomeCombo,"income_items", ComboWorks.ListMode.OnlyItems);
            IncomeNameList = IncomeCombo.Model;
            IncomeCombo.Destroy ();

            //Создаем таблицу "Услуги"
            ServiceListStore = new Gtk.ListStore (typeof (long), //0 payment row id
                                                  typeof (long), //1 accrual row id
                                                  typeof (string), //2 service name
                                                  typeof (int),//3 income id
                                                  typeof (string), //4 income name
                                                  typeof (decimal),// 5 accrual sum
                                                  typeof (decimal), // 6 paid sum
                                                  typeof (decimal) // 7 other paid
                                                  );

            Gtk.TreeViewColumn IncomeItemsColumn = new Gtk.TreeViewColumn ();
            IncomeItemsColumn.Title = "Статья дохода";
            IncomeItemsColumn.MinWidth = 130;
            Gtk.CellRendererCombo CellIncomeItems = new CellRendererCombo();
            CellIncomeItems.TextColumn = 0;
            CellIncomeItems.Editable = true;
            CellIncomeItems.Model = IncomeNameList;
            CellIncomeItems.HasEntry = false;
            CellIncomeItems.Edited += OnIncomeItemComboEdited;
            IncomeItemsColumn.PackStart (CellIncomeItems, true);

            Gtk.TreeViewColumn AccrualColumn = new Gtk.TreeViewColumn ();
            AccrualColumn.Title = "Начислено";
            Gtk.CellRendererText CellAccrual = new CellRendererText();
            AccrualColumn.PackStart (CellAccrual, true);

            Gtk.TreeViewColumn PaidColumn = new Gtk.TreeViewColumn ();
            PaidColumn.Title = "Оплата";
            PaidColumn.MinWidth = 90;
            Gtk.CellRendererText CellPaid = new CellRendererText();
            CellPaid.Editable = true;
            CellPaid.Edited += OnPaidTextEdited;
            PaidColumn.PackStart (CellPaid, true);

            Gtk.TreeViewColumn OtherPaidColumn = new Gtk.TreeViewColumn ();
            OtherPaidColumn.Title = "Другие платежи";
            Gtk.CellRendererText CellOtherPaid = new CellRendererText();
            OtherPaidColumn.PackStart (CellOtherPaid, true);

            //ID payment row - 0
            //ID accrual row - 1
            treeviewServices.AppendColumn ("Услуга", new Gtk.CellRendererText (), "text", 2);
            treeviewServices.AppendColumn (IncomeItemsColumn);
            IncomeItemsColumn.AddAttribute (CellIncomeItems,"text", 4);
            treeviewServices.AppendColumn (AccrualColumn);
            AccrualColumn.SetCellDataFunc (CellAccrual, RenderAccrualColumn);
            treeviewServices.AppendColumn (PaidColumn);
            PaidColumn.SetCellDataFunc (CellPaid, RenderPaidColumn);
            treeviewServices.AppendColumn (OtherPaidColumn);
            OtherPaidColumn.SetCellDataFunc (CellOtherPaid, RenderOtherPaidColumn);

            treeviewServices.Model = ServiceListStore;
            treeviewServices.ShowAll();

            buttonAdd.Sensitive = false;
            buttonDel.Sensitive = false;
        }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:67,代码来源:SeparationPayment.cs

示例6: Accrual

        public Accrual()
        {
            this.Build ();
            allPendingMeterReadings = new Dictionary<TreeIter, List<PendingMeterReading>>();
            MainClass.ComboAccrualYearsFill (comboAccuralYear);

            ComboBox ServiceCombo = new ComboBox();
            ComboWorks.ComboFillReference(ServiceCombo,"services", ComboWorks.ListMode.OnlyItems);
            ServiceNameList = ServiceCombo.Model;
            ServiceCombo.Destroy ();

            ComboBox CashCombo = new ComboBox();
            string sqlSelect = "SELECT name, id, color FROM cash";
            ComboWorks.ComboFillUniversal(CashCombo, sqlSelect, "{0}", null, 1, ComboWorks.ListMode.OnlyItems, true);
            CashNameList = CashCombo.Model;
            CashCombo.Destroy ();

            MainClass.FillServiceListStore(out ServiceRefListStore);

            //Создаем таблицу "Услуги"
            ServiceListStore = new Gtk.ListStore (typeof (int), 	//0 - service id
                                                  typeof (string),	//1 - service name
                                                  typeof (int),		//2 - cash id
                                                  typeof (string),	//3 - cash name
                                                  typeof (string),	//5 - units name
                                                  typeof (decimal),	//6 - quantity
                                                  typeof (decimal),	//7 - price
                                                  typeof (decimal),	//8 - summa
                                                  typeof (long),	//9 - row id
                                                  typeof (string),	//10 - paid text
                                                  typeof (decimal),	//11 - paid value
                                                  typeof(bool),		//12 - from area
                                                  typeof(int),		//13 - number of counters
                                                  typeof(string)	//14 - marker color
                                                  );

            Gtk.TreeViewColumn ServiceColumn = new Gtk.TreeViewColumn ();
            ServiceColumn.Title = "Наименование";
            ServiceColumn.MinWidth = 180;
            Gtk.CellRendererCombo CellService = new CellRendererCombo();
            CellService.TextColumn = 0;
            CellService.Editable = true;
            CellService.Model = ServiceNameList;
            CellService.HasEntry = false;
            CellService.Edited += OnServiceComboEdited;
            ServiceColumn.PackStart (CellService, true);

            Gtk.TreeViewColumn CashColumn = new Gtk.TreeViewColumn ();
            CashColumn.Title = "Касса";
            CashColumn.MinWidth = 130;
            Gtk.CellRendererCombo CellCash = new CellRendererCombo();
            CellCash.TextColumn = 0;
            CellCash.Editable = true;
            CellCash.Model = CashNameList;
            CellCash.HasEntry = false;
            CellCash.Edited += OnCashComboEdited;
            CashColumn.PackStart (CellCash, true);

            Gtk.TreeViewColumn CountColumn = new Gtk.TreeViewColumn ();
            CountColumn.Title = "Количество";
            Gtk.CellRendererText CellCount = new CellRendererText();
            CellCount.Editable = true;
            CellCount.Edited += OnCountTextEdited;
            CountColumn.PackStart (CellCount, true);
            Gtk.CellRendererText CellUnits = new CellRendererText ();
            CountColumn.PackStart (CellUnits, false);

            Gtk.TreeViewColumn PriceColumn = new Gtk.TreeViewColumn ();
            PriceColumn.Title = "Цена";
            PriceColumn.MinWidth = 90;
            Gtk.CellRendererText CellPrice = new CellRendererText();
            CellPrice.Editable = true;
            CellPrice.Edited += OnPriceTextEdited;
            PriceColumn.PackStart (CellPrice, true);

            Gtk.TreeViewColumn SumColumn = new Gtk.TreeViewColumn ();
            SumColumn.Title = "Сумма";
            Gtk.CellRendererText CellSum = new CellRendererText();
            SumColumn.PackStart (CellSum, true);

            treeviewServices.AppendColumn (ServiceColumn);
            ServiceColumn.AddAttribute (CellService,"text", (int)ServiceCol.service);
            treeviewServices.AppendColumn (CashColumn);
            CashColumn.AddAttribute (CellCash,"text", (int)ServiceCol.cash);
            treeviewServices.AppendColumn (CountColumn);
            CountColumn.AddAttribute (CellUnits,"text", (int)ServiceCol.units);
            treeviewServices.AppendColumn (PriceColumn);
            treeviewServices.AppendColumn (SumColumn);
            treeviewServices.AppendColumn("Оплачено", new Gtk.CellRendererText (), "text", (int)ServiceCol.paid_text);

            CountColumn.SetCellDataFunc (CellCount, RenderCountColumn);
            PriceColumn.SetCellDataFunc (CellPrice, RenderPriceColumn);
            SumColumn.SetCellDataFunc (CellSum, RenderSumColumn);

            foreach(TreeViewColumn column in treeviewServices.Columns)
            {
                foreach(CellRenderer render in column.CellRenderers)
                {
                    column.AddAttribute (render, "background", (int)ServiceCol.row_color);
                }
//.........这里部分代码省略.........
开发者ID:QualitySolution,项目名称:Bazar,代码行数:101,代码来源:Accrual.cs


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