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

C# Forms.ToolStripComboBox类代码示例

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

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



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

示例1: ApplyTheme

 static void ApplyTheme(ToolStripComboBox c)
 {
     c.Font = new Font("Candara", 9.0f);
     c.BackColor = Color.Lavender;
     c.ForeColor = Color.DarkMagenta;
     c.FlatStyle = FlatStyle.System;
 }
开发者ID:MGnuskina,项目名称:Tasks,代码行数:7,代码来源:LightClassicStyle.cs


示例2: loadIntoToolStripCombox_O2FindingFieldsNames

 public static void loadIntoToolStripCombox_O2FindingFieldsNames(ToolStripComboBox comboBox, string defaultValue)
 {
     comboBox.Items.Clear();
     foreach (PropertyInfo property in typeof (O2Finding).GetProperties())
         comboBox.Items.Add(property.Name);
     comboBox.Text = defaultValue;
 }
开发者ID:pusp,项目名称:o2platform,代码行数:7,代码来源:OzasmtMappedToWindowsForms.cs


示例3: Constructor

		public void Constructor ()
		{
			ToolStripComboBox tsi = new ToolStripComboBox ();

			//Assert.AreEqual ("System.Windows.Forms.AutoCompleteStringCollection", tsi.AutoCompleteCustomSource.GetType ().ToString (), "A1");
			//Assert.AreEqual (AutoCompleteMode.None, tsi.AutoCompleteMode, "A2");
			//Assert.AreEqual (AutoCompleteSource.None, tsi.AutoCompleteSource, "A3");
			Assert.AreEqual ("System.Windows.Forms.ToolStripComboBox+ToolStripComboBoxControl", tsi.ComboBox.GetType ().ToString (), "A4");
			//Assert.AreEqual (106, tsi.DropDownHeight, "A5");
			Assert.AreEqual (ComboBoxStyle.DropDown, tsi.DropDownStyle, "A6");
			Assert.AreEqual (121, tsi.DropDownWidth, "A7");
			Assert.AreEqual (false, tsi.DroppedDown, "A8");
			Assert.AreEqual (FlatStyle.Popup, tsi.FlatStyle, "A9");
			Assert.AreEqual (true, tsi.IntegralHeight, "A10");
			Assert.AreEqual ("System.Windows.Forms.ComboBox+ObjectCollection", tsi.Items.ToString (), "A11");
			Assert.AreEqual (8, tsi.MaxDropDownItems, "A12");
			Assert.AreEqual (0, tsi.MaxLength, "A13");
			Assert.AreEqual (-1, tsi.SelectedIndex, "A14");
			Assert.AreEqual (null, tsi.SelectedItem, "A15");
			Assert.AreEqual (string.Empty, tsi.SelectedText, "A16");
			Assert.AreEqual (0, tsi.SelectionLength, "A17");
			Assert.AreEqual (0, tsi.SelectionStart, "A18");
			Assert.AreEqual (false, tsi.Sorted, "A19");

			tsi = new ToolStripComboBox ("Bob");
			Assert.AreEqual ("Bob", tsi.Name, "A20");
			Assert.AreEqual (string.Empty, tsi.Control.Name, "A21");
		}
开发者ID:Profit0004,项目名称:mono,代码行数:28,代码来源:ToolStripComboBoxTest.cs


示例4: MenuInitialization

        /// <summary>
        /// Создание меню главного окна программы
        /// </summary>
        private void MenuInitialization()
        {
            this.menu = new MenuStrip();
            this.MainMenuStrip = menu;
            this.Controls.Add(this.menu);
            this.menu.BackColor = Color.DimGray;
            this.menu.ForeColor = Color.LightSkyBlue;
            this.menu.Dock = DockStyle.Top;

            this.menuItemFile = (ToolStripMenuItem)this.menu.Items.Add("&File");
            this.menuItemEdit = (ToolStripMenuItem)this.menu.Items.Add("&Edit");

            this.menuItemComboBox = new ToolStripComboBox();
            this.menuItemComboBox.Items.Add("connect");
            this.menuItemComboBox.Items.Add("disconnect");
            this.menuItemComboBox.SelectedItem = "connect";
            this.menu.Items.Add(this.menuItemComboBox);

            this.menuItemSearch = new ToolStripTextBox();
            this.menuItemSearch.Text = "Поиск";
            this.menuItemSearch.ForeColor = Color.DimGray;
            this.menu.Items.Add(this.menuItemSearch);

            this.fileItemOpen = this.menuItemFile.DropDownItems.Add("Open");
            this.fileItemSave = this.menuItemFile.DropDownItems.Add("Save");
            this.fileItemClose = this.menuItemFile.DropDownItems.Add("Close");

            this.editItemUndo = this.menuItemEdit.DropDownItems.Add("Undo");
            this.editItemRedo = this.menuItemEdit.DropDownItems.Add("Redo");
            this.menuItemEdit.DropDownItems.Add(new ToolStripSeparator());
            this.editItemCopy = this.menuItemEdit.DropDownItems.Add("Copy");
            this.editItemPast = this.menuItemEdit.DropDownItems.Add("Past");

            this.menu.Show();
        }
开发者ID:CodeLookBook,项目名称:C-sharp,代码行数:38,代码来源:FormMain.cs


示例5: ApplyTheme

 static void ApplyTheme(ToolStripComboBox c)
 {
     c.Font = new Font("Times New Roman", 9.0f);
     c.BackColor = Color.White;
     c.ForeColor = Color.Black;
     c.FlatStyle = FlatStyle.System;
 }
开发者ID:MGnuskina,项目名称:Tasks,代码行数:7,代码来源:StandartStyle.cs


示例6: KeySearch

        /* поиск по ключу */
        public void KeySearch(String _sqlQuery, ToolStripComboBox _cbox)
        {
            bool resolution = true;
            try{
                for(int k = 0; k < _cbox.Items.Count; k++)
                    if(_cbox.Items[k].ToString() == _cbox.Text) resolution = false;
                if(resolution) _cbox.Items.Add(_cbox.Text);

                _localDataSet.Clear(); // очистка

                _localClient.SelectSqlCommand = _sqlQuery;
                _localClient.ExecuteFill(_localDataSet, "Хранилище");
                // Загрузка дерева даных
                String NameGr = "";
                treeView1.Nodes.Clear();
                for(int i = 0; i < _localDataSet.Tables["Хранилище"].Rows.Count; i++){

                    if(_localDataSet.Tables["Хранилище"].Rows[i]["ТипОбъекта"].ToString() == "Элемент"){
                        NameGr = _localDataSet.Tables["Хранилище"].Rows[i]["ФайлИдентификатор"].ToString();
                        treeView1.Nodes.Add(NameGr);
                        treeView1.Nodes[treeView1.Nodes.Count-1].ImageIndex = 2;
                        treeView1.Nodes[treeView1.Nodes.Count-1].SelectedImageIndex = 2;
                    }

                }
                treeView1.Select();
                if(treeView1.Nodes.Count <= 0) treeviewMenu("");
            }catch{
                treeView1.Nodes.Clear();
                _localDataSet.Clear();
                richTextBox1.Clear();
            }
        }
开发者ID:CatfishStudio,项目名称:Catfish,代码行数:34,代码来源:MainForm.cs


示例7: CreateComboBox

		protected ToolStripComboBox CreateComboBox(ChoiceGroup choice, bool wantsSeparatorBefore)
		{
			UIItemDisplayProperties display = choice.GetDisplayProperties();
			string label = display.Text;
			choice.PopulateNow();


			if (label == null)
				label = AdapterStrings.ErrorGeneratingLabel;

			if (!display.Visible)
				return null;


			label = label.Replace("_", "&");

			ToolStripComboBox combo = new ToolStripComboBox();
			combo.Text = label;


			//foreach(ChoiceBase s in choice)
			//{
			//    item.Items.Add(s.Label);
			//}
			//item.Tag = choice;
			choice.ReferenceWidget = combo;
			combo.Tag = choice;
			FillCombo(choice);
			combo.SelectedIndexChanged += new EventHandler(OnSelectedIndexChanged);
			combo.Enabled = display.Enabled;
			combo.Visible = display.Visible;


			return combo;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:35,代码来源:BarAdapterBase.cs


示例8: DefaultPickFilter

        void IInitializable.Initialize()
        {
            if (m_pickFilters == null)
            {
                m_designView.PickFilter = new DefaultPickFilter();
                return;

            }

            m_pickFilterComboBox = new ToolStripComboBox();
            m_pickFilterComboBox.BeginUpdate();
            m_pickFilterComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
            m_pickFilterComboBox.Name = "pickCombo";
            m_pickFilterComboBox.ToolTipText = "Picking Filter".Localize();

            var defFilter = new DefaultPickFilter();
            m_filters.Add(defFilter.Name, defFilter);
            m_pickFilterComboBox.Items.Add(defFilter.Name);

            foreach (IPickFilter pickFilter in m_pickFilters)
            {
                m_filters.Add(pickFilter.Name, pickFilter);
                m_pickFilterComboBox.Items.Add(pickFilter.Name);

            }
            m_designView.PickFilter = defFilter;
            m_pickFilterComboBox.SelectedIndex = 0;

            m_pickFilterComboBox.EndUpdate();
            MenuInfo.Edit.GetToolStrip().Items.Add(m_pickFilterComboBox);
            m_pickFilterComboBox.SelectedIndexChanged += PickpickFilterComboBox_SelectedIndexChanged;

            m_settingsService.RegisterSettings(this,new BoundPropertyDescriptor(this, () => ActivePickFilter, "ActiveFilter",null, null));
        }
开发者ID:ldh9451,项目名称:XLE,代码行数:34,代码来源:PickFilterCommands.cs


示例9: LangComboxAdaptor

        public LangComboxAdaptor(ToolStripComboBox combox,Form frm)
        {
            this.combox = combox;
            this.frm = frm;

            combox.Items.Clear();

            string lang = StringResources.GetValue("lang");

            if (lang == null)
            {
                lang = "EN";
            }
            ArrayList tmpList = (ArrayList)Language.GetLanguageList(lang);

            foreach (string tmpStr in tmpList)
            {
                int idex= combox.Items.Add(tmpStr);

                if (getLangFromString(tmpStr) == lang)
                {
                    combox.SelectedIndex = idex;
                }

            }
            /* Reg Event */
            combox.SelectedIndexChanged += combox_SelectedIndexChanged;
        }
开发者ID:kozzzx,项目名称:LabelPlus,代码行数:28,代码来源:LangComboxAdaptor.cs


示例10: ZoomAdaptor

        public ZoomAdaptor(PicView picView, 
            ToolStripButton plusBtn,
            ToolStripButton minusBtn,
            ToolStripComboBox combox)
        {
            this.picView = picView;
            //this.form = form;
            this.plusBtn = plusBtn;
            this.minusBtn = minusBtn;
            this.combox = combox;

            picView.ZoomChanged += new EventHandler(zoomChanged);

            plusBtn.Click += new EventHandler(btnClick);
            minusBtn.Click += new EventHandler(btnClick);

            combox.DropDownStyle = ComboBoxStyle.DropDown;
            combox.DropDownHeight = 200;
            for(int i=20; i<=100; i+=20){
                combox.Items.Add(i.ToString() + "%");
            }

            combox.SelectedIndexChanged += new EventHandler(comboxTextUpdate);
            combox.Leave += new EventHandler(comboxTextUpdate);
            combox.KeyDown += new KeyEventHandler(comboxKeyDown);

            renew();
        }
开发者ID:noodlefighter,项目名称:LabelPlus,代码行数:28,代码来源:ZoomAdaptor.cs


示例11: ApplyTheme

 static void ApplyTheme(ToolStripComboBox c)
 {
     c.ComboBox.Font = new Font("Franklin Gothic", 9.0f);
     c.ComboBox.BackColor = Color.Black;
     c.ComboBox.ForeColor = Color.LightGray;
     c.FlatStyle = FlatStyle.Popup;
 }
开发者ID:MGnuskina,项目名称:Tasks,代码行数:7,代码来源:DarkGotic.cs


示例12: loadIntoToolStripCombox_O2TraceTypes

        public static void loadIntoToolStripCombox_O2TraceTypes(ToolStripComboBox comboBox)
        {
            comboBox.Items.Clear();

            foreach (object value in Enum.GetValues(typeof (TraceType)))
                comboBox.Items.Add(value);
        }
开发者ID:pusp,项目名称:o2platform,代码行数:7,代码来源:OzasmtMappedToWindowsForms.cs


示例13: ParallaxToolStrip

        public ParallaxToolStrip(SerialParallax osc, GraphControl gc)
        {
            oscillo = osc;
            graphControl = gc;

            //
            // toolStrip2
            //
            this.toolStrip = new System.Windows.Forms.ToolStrip();
            this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStrip.Location = new System.Drawing.Point(3, 0);
            this.toolStrip.Name = "toolStrip2";
            this.toolStrip.Size = new System.Drawing.Size(243, 25);
            this.toolStrip.TabIndex = 1;
            this.toolStrip.Text = "toolStrip2";

            this.triggerLabel = new System.Windows.Forms.ToolStripLabel();
            this.trigger = new System.Windows.Forms.ToolStripTextBox();
            this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
            this.triggerMode = new System.Windows.Forms.ToolStripComboBox();

            //
            // triggerLabel
            //
            this.triggerLabel.Name = "triggerLabel";
            this.triggerLabel.Size = new System.Drawing.Size(42, 22);
            this.triggerLabel.Text = "trigger";
            this.toolStrip.Items.Add(this.triggerLabel);

            //
            // trigger
            //
            this.trigger.Name = "trigger";
            this.trigger.Size = new System.Drawing.Size(50, 25);
            this.trigger.Text = "0";
            this.trigger.Validating += new System.ComponentModel.CancelEventHandler(this.trigger_Validating);
            this.trigger.Validated += new System.EventHandler(this.trigger_Validated);
            this.toolStrip.Items.Add(this.trigger);

            //
            // triggerMode
            //
            this.triggerMode.Items.AddRange(new object[] {
            "ch1 ˄",
            "ch1 ˅",
            "ch2 ˄",
            "ch2 ˅",
            "ext ˄"});
            this.triggerMode.Name = "triggerMode";
            this.triggerMode.Size = new System.Drawing.Size(20, 25);
            this.triggerMode.SelectedIndexChanged += new System.EventHandler(this.triggerMode_SelectedIndexChanged);
            triggerMode.SelectedIndex = 0;
            this.toolStrip.Items.Add(this.triggerMode);

            //channels.SelectedIndex = 0;
            trigger.Text = "0";
            triggerMode.SelectedIndex = 0;
            oscillo.TriggerVoltage = (float.Parse(trigger.Text));
        }
开发者ID:karawin,项目名称:xoscillo,代码行数:59,代码来源:ParallaxToolStrip.cs


示例14: getToolStripComboValues

 protected string getToolStripComboValues(ToolStripComboBox tcmb)
 {
     string[] items = new String[tcmb.Items.Count];
     for (int i = 0; i < tcmb.Items.Count; i++) {
         items[i] = (string)tcmb.Items[i];
     }
     return CommonLang.ArrayHelper<string>.join(items, ";");
 }
开发者ID:kmlxk,项目名称:CodeTemplater,代码行数:8,代码来源:MainForm.cs


示例15: ReloadQueries

 /// <summary>
 /// Reloads all xml queries
 /// </summary>
 /// <param name="cbx">combobox to fill</param>
 /// <param name="extension">file extention</param>
 public static void ReloadQueries(ToolStripComboBox cbx, string extension = "*.xml")
 {
     cbx.Items.Clear();
     foreach (var file in new DirectoryInfo(DirectoryPath).GetFiles(extension))
     {
         cbx.Items.Add(file.Name.Replace(extension, ""));
     }
 }
开发者ID:vermilion,项目名称:TaskManager,代码行数:13,代码来源:QueryBuilder.cs


示例16: listFolders

 //获取本地磁盘目录
 public void listFolders(ToolStripComboBox tscb)
 {
     string[] logicdrives = System.IO.Directory.GetLogicalDrives();
     for (int i = 0; i < logicdrives.Length; i++)
     {
         tscb.Items.Add(logicdrives[i]);
         tscb.SelectedIndex = 0;
     }
 }
开发者ID:junenigma,项目名称:uhvclient,代码行数:10,代码来源:MainMenu.cs


示例17: GetReferenceAssemblies

 public static string[] GetReferenceAssemblies(ToolStripComboBox comboBox)
 {
     string[] refassemblies = new string[comboBox.Items.Count];
     int i = 0;
     foreach (string s in comboBox.Items)
     {
         refassemblies[i++] = s;
     }
     return refassemblies;
 }
开发者ID:Baptista,项目名称:AVE,代码行数:10,代码来源:Program.cs


示例18: ProjectManager

        public ProjectManager(DockPanel panel, ToolStripComboBox[] comboBoxes, List<ToolStripButton> buttons,  TrackBar trackBar, string path)
        {
            Logger = LogManager.GetLogger(Settings.Default.ApplicationLogger);
            LayoutManager = new LayoutManager(panel, comboBoxes, buttons, trackBar);

            if (!Directory.Exists(path))
                Directory.CreateDirectory(path);

            DockConfigPath = Path.Combine(path, Settings.Default.DockingConfigurationPath);
        }
开发者ID:pavel-gridnev,项目名称:DatabaseBenchmark,代码行数:10,代码来源:ProjectManager.cs


示例19: FDMenus

		public FDMenus(IMainForm mainForm)
		{
            // modify the file menu
            ToolStripMenuItem fileMenu = (ToolStripMenuItem)mainForm.FindMenuItem("FileMenu");
            RecentProjects = new RecentProjectsMenu();
            fileMenu.DropDownItems.Insert(5, RecentProjects);

            // modify the view menu
            ToolStripMenuItem viewMenu = (ToolStripMenuItem)mainForm.FindMenuItem("ViewMenu");
            View = new ToolStripMenuItem(TextHelper.GetString("Label.MainMenuItem"));
			View.Image = Icons.Project.Img;
			viewMenu.DropDownItems.Add(View);

			// modify the tools menu - add a nice GUI classpath editor
            ToolStripMenuItem toolsMenu = (ToolStripMenuItem)mainForm.FindMenuItem("ToolsMenu");
            GlobalClasspaths = new ToolStripMenuItem(TextHelper.GetString("Label.GlobalClasspaths"));
			GlobalClasspaths.ShortcutKeys = Keys.F9 | Keys.Control;
            GlobalClasspaths.Image = Icons.Classpath.Img;
            toolsMenu.DropDownItems.Insert(toolsMenu.DropDownItems.Count - 3, GlobalClasspaths);
            mainForm.IgnoredKeys.Add(GlobalClasspaths.ShortcutKeys);

			ProjectMenu = new ProjectMenu();

            MenuStrip mainMenu = mainForm.MenuStrip;
            mainMenu.Items.Insert(5, ProjectMenu);

            ToolStrip toolBar = mainForm.ToolStrip;
			toolBar.Items.Add(new ToolStripSeparator());

            toolBar.Items.Add(RecentProjects.ToolbarSelector);

            BuildProject = new ToolStripButton(Icons.Gear.Img);
            BuildProject.Name = "BuildProject";
            BuildProject.ToolTipText = TextHelper.GetString("Label.BuildProject").Replace("&", "");
            toolBar.Items.Add(BuildProject);

            TestMovie = new ToolStripButton(Icons.GreenCheck.Img);
            TestMovie.Name = "TestMovie";
            TestMovie.ToolTipText = TextHelper.GetString("Label.TestMovie").Replace("&", "");
            toolBar.Items.Add(TestMovie);

            ConfigurationSelector = new ToolStripComboBox();
            ConfigurationSelector.Name = "ConfigurationSelector";
            ConfigurationSelector.ToolTipText = TextHelper.GetString("ToolTip.SelectConfiguration");
            ConfigurationSelector.Items.AddRange(new string[] { TextHelper.GetString("Info.Debug"), TextHelper.GetString("Info.Release") });
            ConfigurationSelector.DropDownStyle = ComboBoxStyle.DropDownList;
            ConfigurationSelector.AutoSize = false;
            ConfigurationSelector.Enabled = false;
            ConfigurationSelector.Width = 85;
            ConfigurationSelector.Margin = new Padding(1, 0, 0, 0);
            ConfigurationSelector.FlatStyle = PluginBase.MainForm.Settings.ComboBoxFlatStyle;
            ConfigurationSelector.Font = PluginBase.Settings.DefaultFont;
            toolBar.Items.Add(ConfigurationSelector);
        }
开发者ID:heon21st,项目名称:flashdevelop,代码行数:54,代码来源:FDMenus.cs


示例20: SledLuaLuaVersionService

 public SledLuaLuaVersionService(ICommandService commandService)
 {
     m_luaVerBox = new ToolStripComboBox("Lua Version");
     {
         var ver = new VersionWrapper(LuaVersion.Lua51, "Lua 5.1.4");
         m_luaVerBox.Items.Add(ver);
         m_luaVerBox.Items.Add(new VersionWrapper(LuaVersion.Lua52, "Lua 5.2.3"));
         m_luaVerBox.SelectedItem = ver;
         CurrentLuaVersion = ver.Version;
     }
     m_luaVerBox.SelectedIndexChanged += LuaVerBoxSelectedIndexChanged;
 }
开发者ID:arsaccol,项目名称:SLED,代码行数:12,代码来源:SledLuaLuaVersionService.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Forms.ToolStripContainer类代码示例发布时间:2022-05-26
下一篇:
C# Forms.ToolStripButton类代码示例发布时间: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