本文整理汇总了C#中ComboBoxEntry类 的典型用法代码示例。如果您正苦于以下问题:C# ComboBoxEntry类的具体用法?C# ComboBoxEntry怎么用?C# ComboBoxEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ComboBoxEntry类 属于命名空间,在下文中一共展示了ComboBoxEntry类 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ToolBarComboBox
public ToolBarComboBox(int width, int activeIndex, bool allowEntry, params string[] contents)
{
if (allowEntry)
ComboBox = new ComboBoxEntry (contents);
else {
Model = new ListStore (typeof(string), typeof (object));
if (contents != null) {
foreach (string entry in contents) {
Model.AppendValues (entry, null);
}
}
ComboBox = new ComboBox ();
ComboBox.Model = Model;
CellRendererText = new CellRendererText();
ComboBox.PackStart(CellRendererText, false);
ComboBox.AddAttribute(CellRendererText,"text",0);
}
ComboBox.AddEvents ((int)Gdk.EventMask.ButtonPressMask);
ComboBox.WidthRequest = width;
if (activeIndex >= 0)
ComboBox.Active = activeIndex;
ComboBox.Show ();
Add (ComboBox);
Show ();
}
开发者ID:RodH257, 项目名称:Pinta, 代码行数:29, 代码来源:ToolBarComboBox.cs
示例2: ToolBarComboBox
public ToolBarComboBox (int width, int activeIndex, bool allowEntry, params string[] contents)
{
if (allowEntry)
ComboBox = new ComboBoxEntry (contents);
else {
Model = new ListStore (typeof(string), typeof (object));
if (contents != null)
foreach (string entry in contents)
Model.AppendValues (entry, null);
ComboBox = CreateComboBox ();
ComboBox.Model = Model;
}
ComboBox.AddEvents ((int)Gdk.EventMask.ButtonPressMask);
ComboBox.WidthRequest = width;
if (activeIndex >= 0)
ComboBox.Active = activeIndex;
ComboBox.Show ();
Add (ComboBox);
Show ();
}
开发者ID:RudoCris, 项目名称:Pinta, 代码行数:26, 代码来源:ToolBarComboBox.cs
示例3: OpenLocationDialog
public OpenLocationDialog () : base (Catalog.GetString ("Open Location"))
{
var location_box = new HBox () {
Spacing = 6
};
address_entry = ComboBoxEntry.NewText();
address_entry.Entry.Activated += (o, e) => Respond (ResponseType.Ok);
var browse_button = new Button(Catalog.GetString("Browse..."));
browse_button.Clicked += OnBrowseClicked;
location_box.PackStart(address_entry, true, true, 0);
location_box.PackStart(browse_button, false, false, 0);
VBox.Spacing = 6;
VBox.PackStart (new Label () {
Xalign = 0.0f,
Text = Catalog.GetString (
"Enter the address of the file you would like to open:")
}, false, false, 0);
VBox.PackStart (location_box, false, false, 0);
VBox.ShowAll ();
AddStockButton (Stock.Cancel, ResponseType.Cancel);
AddStockButton (Stock.Open, ResponseType.Ok, true);
LoadHistory();
address_entry.Entry.HasFocus = true;
}
开发者ID:gclark916, 项目名称:banshee, 代码行数:31, 代码来源:OpenLocationDialog.cs
示例4: OpenRemoteServer
public OpenRemoteServer () : base (Catalog.GetString ("Open remote DAAP server"), null)
{
VBox.Spacing = 6;
VBox.PackStart (new Label () {
Xalign = 0.0f,
Text = Catalog.GetString ("Enter server IP address and port:")
}, true, true, 0);
HBox box = new HBox ();
box.Spacing = 12;
VBox.PackStart (box, false, false, 0);
address_entry = ComboBoxEntry.NewText ();
address_entry.Entry.Activated += OnEntryActivated;
address_entry.Entry.WidthChars = 30;
address_entry.Show ();
port_entry = new SpinButton (1d, 65535d, 1d);
port_entry.Value = 3689;
port_entry.Show ();
box.PackStart (address_entry, true, true, 0);
box.PackEnd (port_entry, false, false, 0);
address_entry.HasFocus = true;
VBox.ShowAll ();
AddStockButton (Stock.Cancel, ResponseType.Cancel);
AddStockButton (Stock.Add, ResponseType.Ok, true);
LoadHistory();
}
开发者ID:gclark916, 项目名称:banshee, 代码行数:33, 代码来源:OpenRemoteServer.cs
示例5: Initialize
public void Initialize (EditSession session)
{
this.session = session;
//if standard values are supported by the converter, then
//we list them in a combo
if (session.Property.Converter.GetStandardValuesSupported (session))
{
ListStore store = new ListStore (typeof (string));
ComboBoxEntry combo = new ComboBoxEntry (store, 0);
PackStart (combo, true, true, 0);
combo.Changed += TextChanged;
entry = combo.Entry;
entry.HeightRequest = combo.SizeRequest ().Height;
//but if the converter doesn't allow nonstandard values,
// then we make the entry uneditable
if (session.Property.Converter.GetStandardValuesExclusive (session)) {
entry.IsEditable = false;
entry.CanFocus = false;
}
//fill the list
foreach (object stdValue in session.Property.Converter.GetStandardValues (session)) {
store.AppendValues (session.Property.Converter.ConvertToString (session, stdValue));
}
//a value of "--" gets rendered as a --, if typeconverter marked with UsesDashesForSeparator
object[] atts = session.Property.Converter.GetType ()
.GetCustomAttributes (typeof (StandardValuesSeparatorAttribute), true);
if (atts.Length > 0) {
string separator = ((StandardValuesSeparatorAttribute)atts[0]).Separator;
combo.RowSeparatorFunc = delegate (TreeModel model, TreeIter iter) {
return separator == ((string) model.GetValue (iter, 0));
};
}
}
// no standard values, so just use an entry
else {
entry = new Entry ();
PackStart (entry, true, true, 0);
}
//either way we have an entry to play with
entry.HasFrame = false;
entry.Activated += TextChanged;
if (ShouldShowDialogButton ()) {
Button button = new Button ("...");
PackStart (button, false, false, 0);
button.Clicked += ButtonClicked;
}
Spacing = 3;
ShowAll ();
}
开发者ID:jira-sarec, 项目名称:ICSE-2012-TraceLab, 代码行数:56, 代码来源:TextEditor.cs
示例6: ReceiptSaveDialog
public ReceiptSaveDialog(Window parent, string rawFileName)
: base()
{
mRawFileName = rawFileName;
// Laying out
Title = "Save receipt for " + System.IO.Path.GetFileName(mRawFileName);
SetPosition(WindowPosition.Center);
SetSizeRequest(450, 180);
//this.AllowGrow = false;
this.SkipPagerHint = true;
this.SkipTaskbarHint = true;
this.HasSeparator = false;
Parent = parent;
mCancelButton = (Button)AddButton("Cancel", ResponseType.Cancel);
mSaveButton = (Button)AddButton("Save", ResponseType.Accept);
this.Default = mSaveButton;
VBox radio_buttons_box = new VBox(false, 2);
radio_buttons_box.BorderWidth = 6;
mDefault = new RadioButton("Default receipt for this photo (no name)");
mCustom = new RadioButton(mDefault, "Custom receipt for this photo");
mClass = new RadioButton(mDefault, "A common receipt for all photos in the same folder");
radio_buttons_box.PackStart(mDefault);
radio_buttons_box.PackStart(mCustom);
radio_buttons_box.PackStart(mClass);
VBox.Add(radio_buttons_box);
HBox name_box = new HBox(false, 8);
name_box.BorderWidth = 6;
Image receipt_icon = new Image();
receipt_icon.Pixbuf = Gdk.Pixbuf.LoadFromResource("CatEye.UI.Gtk.res.png.cestage-small-24x24.png");
Label name_label = new Label("Name:");
ListStore name_store = new ListStore(typeof(string));
mNameComboBoxEntry = new ComboBoxEntry(name_store, 0);
name_box.PackStart(receipt_icon, false, false, 0);
name_box.PackStart(name_label, false, false, 0);
name_box.PackStart(mNameComboBoxEntry, true, true, 0);
VBox.PackStart(name_box, false, false, 0);
// Adding events
Shown += HandleUIChange;
mDefault.Clicked += HandleUIChange;
mCustom.Clicked += HandleUIChange;
mClass.Clicked += HandleUIChange;
mNameComboBoxEntry.Entry.Changed += HandleUIChange;
this.ShowAll();
}
开发者ID:bigfatbrowncat, 项目名称:CatEye, 代码行数:54, 代码来源:ReceiptSaveDialog.cs
示例7: set_setting
public void set_setting (Setting s)
{
if(_s != null)
throw new Exception("set_setting may only be used once per instance!");
_s = s;
name_label.Text = _s.Name;
if (_s.Choices != null && _s.Limited) {
// TODO: This is broken, code was originally written to store a string
// but in this particular case there is a setting with string type
// and you are given an array of choices, so what should really be
// stored is a value between 0 and the length of the array; to
// indicate which choice is selected. As I am changing User-Agent
// switcher to "Un Limited" I do not have a use case for this yet.
ComboBox cobo = new ComboBox ((String[])_s.Choices);
cobo.SetSizeRequest (100, 20);
cobo.Name = _s.Name;
cobo.Changed += cobo_changed;
vbox2.Add (cobo);
} else if (_s.Choices != null && !_s.Limited) {
ComboBoxEntry combo = new ComboBoxEntry ((String[])_s.Choices);
combo.SetSizeRequest (100, 20);
combo.Name = _s.Name;
combo.Entry.Text = (String)_s.Value;
combo.Changed += combo_changed;
vbox2.Add (combo);
} else {
Entry e = new Entry ((string)_s.Value);
e.Name = _s.Name;
e.Changed += e_changed;
vbox2.Add (e);
}
Label l = new Label (_s.Description);
l.SetSizeRequest (315, 100);
l.SetAlignment (0, 0);
l.LineWrap = true;
l.SingleLineMode = false;
l.SetPadding (10, 2);
Pango.FontDescription pf2 = new Pango.FontDescription ();
pf2.Weight = Pango.Weight.Light;
l.ModifyFont (pf2);
vbox2.Add(l);
}
开发者ID:Meticulus, 项目名称:tactical, 代码行数:45, 代码来源:string_setting_viewer.cs
示例8: ToolBarComboBox
public ToolBarComboBox(int width, int activeIndex, bool allowEntry, params string[] contents)
{
if (allowEntry)
ComboBox = new ComboBoxEntry (contents);
else
ComboBox = new ComboBox (contents);
ComboBox.AddEvents ((int)Gdk.EventMask.ButtonPressMask);
ComboBox.WidthRequest = width;
if (activeIndex >= 0)
ComboBox.Active = activeIndex;
ComboBox.Show ();
Add (ComboBox);
Show ();
}
开发者ID:xxgreg, 项目名称:Pinta, 代码行数:18, 代码来源:ToolBarComboBox.cs
示例9: Create
public override Widget Create(object caller)
{
List<String> licenseTemplateTexts = new List<String>();
licenseTemplateTexts.Add("non-redistributable (forbid sharing and modification of this level)");
licenseTemplateTexts.Add("GPL 2+ / CC-by-sa 3.0 (allow sharing and modification of this level)");
comboBox = new ComboBoxEntry(licenseTemplateTexts.ToArray());
OnFieldChanged(Field); //same code for initialization
comboBox.Changed += OnComboBoxChanged;
HBox box = new HBox();
box.PackStart(comboBox, true, true, 0);
box.Name = Field.Name;
CreateToolTip(caller, comboBox);
return box;
}
开发者ID:Karkus476, 项目名称:supertux-editor, 代码行数:20, 代码来源:ChooseLicenseWidget.cs
示例10: CreateiFolderActionButtonArea
//.........这里部分代码省略.........
new EventHandler(OnResolveConflicts);
buttontips.SetTip(ResolveConflictsButton, Util.GS("Resolve conflicts"),"");
SynchronizedFolderTasks = new VBox(false, 0);
ButtonControl.PackStart(SynchronizedFolderTasks, false, false, 0);
spacerHBox = new HBox(false, 0);
SynchronizedFolderTasks.PackStart(spacerHBox, false, false, 0);
hbox = new HBox(false, 0);
OpenSynchronizedFolderButton = new Button(hbox);
vbox.PackStart(OpenSynchronizedFolderButton, false, false, 0);
buttonText = new Label(
string.Format("<span>{0}</span>",
Util.GS("Open...")));
hbox.PackStart(buttonText, false, false, 4);
buttonText.UseMarkup = true;
buttonText.UseUnderline = false;
buttonText.Xalign = 0;
OpenSynchronizedFolderButton.Visible = false;
OpenSynchronizedFolderButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png")));
OpenSynchronizedFolderButton.Clicked +=
new EventHandler(OnOpenSynchronizedFolder);
buttontips.SetTip(OpenSynchronizedFolderButton, Util.GS("Open iFolder"),"");
hbox = new HBox(false, 0);
SynchronizeNowButton = new Button(hbox);
vbox.PackStart(SynchronizeNowButton, false, false, 0);
buttonText = new Label(
string.Format("<span>{0}</span>",
Util.GS("Synchronize Now")));
hbox.PackStart(buttonText, true, true, 4);
buttonText.UseMarkup = true;
buttonText.UseUnderline = false;
buttonText.Xalign = 0;
SynchronizeNowButton.Sensitive = false;
SynchronizeNowButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder-sync48.png")));
SynchronizeNowButton.Clicked +=
new EventHandler(OnSynchronizeNow);
buttontips.SetTip(SynchronizeNowButton, Util.GS("Synchronize Now"),"");
hbox = new HBox(false, 0);
RemoveiFolderButton = new Button(hbox);
vbox.PackStart(RemoveiFolderButton, false, false, 0);
buttonText = new Label(
string.Format("<span>{0}</span>",
Util.GS("Revert to a Normal Folder")));
hbox.PackStart(buttonText, true, true, 4);
buttonText.UseMarkup = true;
buttonText.UseUnderline = false;
buttonText.Xalign = 0;
RemoveiFolderButton.Sensitive = false;
RemoveiFolderButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("revert48.png")));
RemoveiFolderButton.Clicked +=
new EventHandler(RemoveiFolderHandler);
buttontips.SetTip(RemoveiFolderButton, Util.GS("Revert to a Normal Folder"),"");
hbox = new HBox(false, 0);
ViewFolderPropertiesButton = new Button(hbox);
vbox.PackStart(ViewFolderPropertiesButton, false, false, 0);
buttonText = new Label(
string.Format("<span>{0}</span>",
Util.GS("Properties...")));
hbox.PackStart(buttonText, true, true, 4);
buttonText.UseMarkup = true;
buttonText.UseUnderline = false;
buttonText.Xalign = 0;
ViewFolderPropertiesButton.Visible = false;
ViewFolderPropertiesButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png")));
ViewFolderPropertiesButton.Clicked +=
new EventHandler(OnShowFolderProperties);
buttontips.SetTip(ViewFolderPropertiesButton, Util.GS("Properties"),"");
ButtonControl.PackStart(new Label(""), false, false, 4);
HBox searchHBox = new HBox(false, 4);
searchHBox.WidthRequest = 110;
ButtonControl.PackEnd(searchHBox, false, false, 0);
SearchEntry = new Entry();
searchHBox.PackStart(SearchEntry, true, true, 0);
SearchEntry.SelectRegion(0, -1);
SearchEntry.CanFocus = true;
SearchEntry.Changed +=
new EventHandler(OnSearchEntryChanged);
Label l = new Label("<span size=\"small\"></span>");
l = new Label(
string.Format(
"<span size=\"large\">{0}</span>",
Util.GS("Filter")));
ButtonControl.PackEnd(l, false, false, 0);
l.UseMarkup = true;
l.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
l.Xalign = 0.0F;
VBox viewChanger = new VBox(false,0);
string[] list = {Util.GS("Open Panel"),Util.GS("Close Panel"),Util.GS("Thumbnail View"),Util.GS("List View") };
viewList = new ComboBoxEntry (list);
viewList.Active = 0;
viewList.WidthRequest = 110;
viewList.Changed += new EventHandler(OnviewListIndexChange);
VBox dummyVbox = new VBox(false,0);
Label labeldummy = new Label( string.Format( ""));
labeldummy.UseMarkup = true;
dummyVbox.PackStart(labeldummy,false,true,0);
viewChanger.PackStart(dummyVbox,false,true,0);
viewChanger.PackStart(viewList,false,true,0);
ButtonControl.PackEnd(viewChanger, false, true,0);
return buttonArea;
}
开发者ID:RoDaniel, 项目名称:featurehouse, 代码行数:101, 代码来源:iFolderWindow.cs
示例11: frmExclusions_Load
/// <summary>
/// Setup the form.
/// </summary>
/// <param name="sender">system parameter</param>
/// <param name="e">system parameter</param>
/// <history>
/// [Curtis_Beard] 03/07/2012 ADD: 3131609, exclusions
/// [Curtis_Beard] 11/11/2014 CHG: use FilterItem
/// </history>
private void frmExclusions_Load(object sender, EventArgs e)
{
Language.ProcessForm(this);
cboCategories.DisplayMember = "DisplayName";
foreach (string name in Enum.GetNames(typeof(FilterType.Categories)))
{
ComboBoxEntry entry = new ComboBoxEntry();
entry.DisplayName = Language.GetGenericText("Exclusions." + name);
entry.ValueName = name;
cboCategories.Items.Add(entry);
}
// load fields with values if in edit mode.
if (_item != null)
{
cboCategories.SelectedIndex = cboCategories.FindStringExact(Language.GetGenericText("Exclusions." + _item.FilterType.Category.ToString()));
cboTypes.SelectedIndex = cboTypes.FindStringExact(Language.GetGenericText("Exclusions." + _item.FilterType.SubCategory.ToString()));
switch (_item.FilterType.ValueType)
{
case FilterType.ValueTypes.DateTime:
fvtValue.SetViewType(FilterValueType.ViewTypes.DateTime);
break;
case FilterType.ValueTypes.Long:
fvtValue.SetViewType(FilterValueType.ViewTypes.Numeric);
break;
case FilterType.ValueTypes.Size:
fvtValue.SetViewType(FilterValueType.ViewTypes.Size);
fvtValue.SetSizeDropDown(_item.ValueSizeOption);
break;
case FilterType.ValueTypes.String:
fvtValue.SetViewType(FilterValueType.ViewTypes.String);
break;
}
if (_item.FilterType.ValueType != FilterType.ValueTypes.Null)
{
if (_item.FilterType.ValueType == FilterType.ValueTypes.Size)
{
fvtValue.Value = AstroGrep.Core.Convertors.ConvertFileSizeForDisplay(_item.Value, _item.ValueSizeOption);
}
else
{
fvtValue.Value = _item.Value;
}
}
cboOptions.SelectedIndex = cboOptions.FindStringExact(Language.GetGenericText("Exclusions." + _item.ValueOption.ToString()));
chkIgnoreCase.Checked = _item.ValueIgnoreCase;
}
}
开发者ID:joshball, 项目名称:astrogrep, 代码行数:58, 代码来源:frmAddEditExclusions.cs
示例12: LoadHistory
static void LoadHistory (string propertyName, ComboBoxEntry entry)
{
entry.Entry.Completion = new EntryCompletion ();
var store = new ListStore (typeof(string));
entry.Entry.Completion.Model = store;
entry.Model = store;
entry.Entry.ActivatesDefault = true;
entry.TextColumn = 0;
var history = PropertyService.Get<string> (propertyName);
if (!string.IsNullOrEmpty (history)) {
string[] items = history.Split (historySeparator);
foreach (string item in items) {
if (string.IsNullOrEmpty (item))
continue;
store.AppendValues (item);
}
entry.Entry.Text = items[0];
}
}
开发者ID:nieve, 项目名称:monodevelop, 代码行数:19, 代码来源:FindInFilesDialog.cs
示例13: ShowDirectoryPathUI
void ShowDirectoryPathUI ()
{
if (labelPath != null)
return;
// We want to add the Path combo box right below the Scope
uint row = TableGetRowForItem (tableFindAndReplace, labelScope) + 1;
// DirectoryScope
labelPath = new Label {
LabelProp = GettextCatalog.GetString ("_Path:"),
UseUnderline = true,
Xalign = 0f
};
labelPath.Show ();
hboxPath = new HBox ();
comboboxentryPath = new ComboBoxEntry ();
comboboxentryPath.Destroyed += ComboboxentryPathDestroyed;
LoadHistory ("MonoDevelop.FindReplaceDialogs.PathHistory", comboboxentryPath);
comboboxentryPath.Show ();
hboxPath.PackStart (comboboxentryPath);
labelPath.MnemonicWidget = comboboxentryPath;
buttonBrowsePaths = new Button { Label = "..." };
buttonBrowsePaths.Clicked += ButtonBrowsePathsClicked;
buttonBrowsePaths.Show ();
hboxPath.PackStart (buttonBrowsePaths, false, false, 0);
hboxPath.Show ();
// Add the Directory Path row to the table
TableAddRow (tableFindAndReplace, row++, labelPath, hboxPath);
// Add a checkbox for searching the directory recursively...
checkbuttonRecursively = new CheckButton {
Label = GettextCatalog.GetString ("Re_cursively"),
Active = properties.Get ("SearchPathRecursively", true),
UseUnderline = true
};
checkbuttonRecursively.Destroyed += CheckbuttonRecursivelyDestroyed;
checkbuttonRecursively.Show ();
TableAddRow (tableFindAndReplace, row, null, checkbuttonRecursively);
}
开发者ID:nieve, 项目名称:monodevelop, 代码行数:46, 代码来源:FindInFilesDialog.cs
示例14: ShowReplaceUI
void ShowReplaceUI ()
{
if (replaceMode)
return;
labelReplace = new Label { Text = GettextCatalog.GetString ("_Replace:"), Xalign = 0f, UseUnderline = true };
comboboxentryReplace = new ComboBoxEntry ();
LoadHistory ("MonoDevelop.FindReplaceDialogs.ReplaceHistory", comboboxentryReplace);
comboboxentryReplace.Show ();
labelReplace.Show ();
TableAddRow (tableFindAndReplace, 1, labelReplace, comboboxentryReplace);
buttonReplace = new Button () {
Label = "gtk-find-and-replace",
UseUnderline = true,
CanDefault = true,
UseStock = true,
};
// Note: We override the stock label text instead of using SetButtonIcon() because the
// theme may override whether or not the icons are shown. Using SetButtonIcon() would
// break the theme by forcing icons even if the theme says "no".
OverrideStockLabel (buttonReplace, GettextCatalog.GetString ("R_eplace"));
buttonReplace.Clicked += HandleReplaceClicked;
buttonReplace.Show ();
AddActionWidget (buttonReplace, 0);
buttonReplace.GrabDefault ();
replaceMode = true;
Requisition req = SizeRequest ();
Resize (req.Width, req.Height);
}
开发者ID:nieve, 项目名称:monodevelop, 代码行数:34, 代码来源:FindInFilesDialog.cs
示例15: HandleScopeChanged
void HandleScopeChanged (object sender, EventArgs e)
{
if (hboxPath != null) {
// comboboxentryPath and buttonBrowsePaths are destroyed with hboxPath
foreach (Widget w in new Widget[] {
labelPath,
hboxPath,
checkbuttonRecursively
}) {
tableFindAndReplace.Remove (w);
w.Destroy ();
}
labelPath = null;
hboxPath = null;
comboboxentryPath = null;
buttonBrowsePaths = null;
checkbuttonRecursively = null;
//tableFindAndReplace.NRows = showReplace ? 4u : 3u;
var childCombo = (Table.TableChild)tableFindAndReplace[labelFileMask];
childCombo.TopAttach = tableFindAndReplace.NRows - 3;
childCombo.BottomAttach = tableFindAndReplace.NRows - 2;
childCombo = (Table.TableChild)tableFindAndReplace[searchentry1];
childCombo.TopAttach = tableFindAndReplace.NRows - 3;
childCombo.BottomAttach = tableFindAndReplace.NRows - 2;
}
if (comboboxScope.Active == ScopeDirectories) {
// DirectoryScope
tableFindAndReplace.NRows = showReplace ? 6u : 5u;
labelPath = new Label {
LabelProp = GettextCatalog.GetString("_Path:"),
UseUnderline = true,
Xalign = 0f
};
tableFindAndReplace.Add (labelPath);
var childCombo = (Table.TableChild)tableFindAndReplace[labelPath];
childCombo.TopAttach = tableFindAndReplace.NRows - 3;
childCombo.BottomAttach = tableFindAndReplace.NRows - 2;
childCombo.XOptions = childCombo.YOptions = (AttachOptions)4;
hboxPath = new HBox ();
var properties = PropertyService.Get ("MonoDevelop.FindReplaceDialogs.SearchOptions", new Properties ());
comboboxentryPath = new ComboBoxEntry ();
comboboxentryPath.Destroyed += ComboboxentryPathDestroyed;
LoadHistory ("MonoDevelop.FindReplaceDialogs.PathHistory", comboboxentryPath);
hboxPath.PackStart (comboboxentryPath);
labelPath.MnemonicWidget = comboboxentryPath;
var boxChild = (Box.BoxChild)hboxPath[comboboxentryPath];
boxChild.Position = 0;
boxChild.Expand = boxChild.Fill = true;
buttonBrowsePaths = new Button { Label = "..." };
buttonBrowsePaths.Clicked += ButtonBrowsePathsClicked;
hboxPath.PackStart (buttonBrowsePaths);
boxChild = (Box.BoxChild)hboxPath[buttonBrowsePaths];
boxChild.Position = 1;
boxChild.Expand = boxChild.Fill = false;
tableFindAndReplace.Add (hboxPath);
childCombo = (Table.TableChild)tableFindAndReplace[hboxPath];
childCombo.TopAttach = tableFindAndReplace.NRows - 3;
childCombo.BottomAttach = tableFindAndReplace.NRows - 2;
childCombo.LeftAttach = 1;
childCombo.RightAttach = 2;
childCombo.XOptions = childCombo.YOptions = (AttachOptions)4;
checkbuttonRecursively = new CheckButton {
Label = GettextCatalog.GetString ("Re_cursively"),
Active = properties.Get ("SearchPathRecursively", true),
UseUnderline = true
};
checkbuttonRecursively.Destroyed += CheckbuttonRecursivelyDestroyed;
tableFindAndReplace.Add (checkbuttonRecursively);
childCombo = (Table.TableChild)tableFindAndReplace[checkbuttonRecursively];
childCombo.TopAttach = tableFindAndReplace.NRows - 2;
childCombo.BottomAttach = tableFindAndReplace.NRows - 1;
childCombo.LeftAttach = 1;
childCombo.RightAttach = 2;
childCombo.XOptions = childCombo.YOptions = (AttachOptions)4;
childCombo = (Table.TableChild)tableFindAndReplace[labelFileMask];
childCombo.TopAttach = tableFindAndReplace.NRows - 1;
childCombo.BottomAttach = tableFindAndReplace.NRows;
childCombo = (Table.TableChild)tableFindAndReplace[searchentry1];
childCombo.TopAttach = tableFindAndReplace.NRows - 1;
childCombo.BottomAttach = tableFindAndReplace.NRows;
}
Requisition req = SizeRequest ();
Resize (req.Width, req.Height);
// this.QueueResize ();
ShowAll ();
//.........这里部分代码省略.........
开发者ID:yayanyang, 项目名称:monodevelop, 代码行数:101, 代码来源:FindInFilesDialog.cs
示例16: cboTypes_SelectedIndexChanged
/// <summary>
/// Setup controls based on selected type.
/// </summary>
/// <param name="sender">system parameter</param>
/// <param name="e">system parameter</param>
/// <history>
/// [Curtis_Beard] 03/07/2012 ADD: 3131609, exclusions
/// [Curtis_Beard] 08/13/2014 ADD: 78, add binary files exclusion
/// [Curtis_Beard] 11/11/2014 CHG: use FilterItem
/// </history>
private void cboTypes_SelectedIndexChanged(object sender, EventArgs e)
{
var cboItem = cboTypes.SelectedItem as ComboBoxEntry;
var et = cboItem.Value as FilterType;
// default value field to string and clear values
fvtValue.SetViewType(FilterValueType.ViewTypes.String);
fvtValue.ResetValue();
// set ignore case checkbox
chkIgnoreCase.Checked = false;
chkIgnoreCase.Enabled = et.SupportsIgnoreCase;
// setup options drop down
cboOptions.Items.Clear();
cboOptions.DisplayMember = "DisplayName";
if (et.SupportedValueOptions == null || (et.SupportedValueOptions.Count == 1 && et.SupportedValueOptions[0] == FilterType.ValueOptions.None))
{
cboOptions.Enabled = false;
}
else
{
cboOptions.Enabled = true;
foreach (var item in et.SupportedValueOptions)
{
ComboBoxEntry entry = new ComboBoxEntry();
entry.DisplayName = Language.GetGenericText(string.Format("Exclusions.{0}", item));
entry.ValueName = item.ToString();
cboOptions.Items.Add(entry);
}
}
// set value type/view
switch (et.ValueType)
{
case FilterType.ValueTypes.Null:
fvtValue.Enabled = false;
fvtValue.SetViewType(FilterValueType.ViewTypes.String);
break;
case FilterType.ValueTypes.String:
fvtValue.Enabled = true;
fvtValue.SetViewType(FilterValueType.ViewTypes.String);
break;
case FilterType.ValueTypes.DateTime:
fvtValue.Enabled = true;
fvtValue.SetViewType(FilterValueType.ViewTypes.DateTime);
break;
case FilterType.ValueTypes.Long:
fvtValue.Enabled = true;
fvtValue.SetViewType(FilterValueType.ViewTypes.Numeric);
break;
case FilterType.ValueTypes.Size:
fvtValue.Enabled = true;
fvtValue.SetViewType(FilterValueType.ViewTypes.Size);
break;
}
}
开发者ID:joshball, 项目名称:astrogrep, 代码行数:71, 代码来源:frmAddEditExclusions.cs
示例17: SetText
// Version 1.0.0
public static void SetText(ComboBoxEntry cbWidget, string strText)
{
cbWidget.InsertText(0, strText);
cbWidget.Active = 0;
}
开发者ID:Ellorion, 项目名称:ClassCollection, 代码行数:6, 代码来源:CBHelper.cs
示例18: InitializeComponent
/// <summary>
/// Initializes all GUI components.
/// </summary>
/// <history>
/// [Curtis_Beard] 11/03/2006 Created
/// </history>
private void InitializeComponent()
{
this.SetDefaultSize (Core.GeneralSettings.WindowWidth, Core.GeneralSettings.WindowHeight);
if (Core.GeneralSettings.WindowLeft == -1 && Core.GeneralSettings.WindowTop == -1)
this.SetPosition(WindowPosition.Center);
else
this.Move(Core.GeneralSettings.WindowLeft, Core.GeneralSettings.WindowTop);
this.DeleteEvent += new DeleteEventHandler(OnWindowDelete);
this.Title = Constants.ProductName;
this.Icon = Images.GetPixbuf("AstroGrep_Icon.ico");
MainTooltips = new Tooltips();
VBox vbox = new VBox();
vbox.BorderWidth = 0;
Frame leftFrame = new Frame();
leftFrame.Shadow = ShadowType.In;
leftFrame.WidthRequest = 200;
VBox searchBox = new VBox();
VBox searchOptionsBox = new VBox();
searchBox.BorderWidth = 3;
searchOptionsBox.BorderWidth = 3;
lblSearchStart = new Label("Search Path");
lblSearchStart.SetAlignment(0,0);
btnBrowse = new Button();
btnBrowse.SetSizeRequest(32, 20);
Gtk.Image img = new Image();
img.Pixbuf = Images.GetPixbuf("folder-open.png");
VBox browseBox = new VBox();
browseBox.PackStart(img, false, false, 0);
MainTooltips.SetTip(btnBrowse, "Select the folder to start the search", "");
btnBrowse.Clicked += new EventHandler(btnBrowse_Clicked);
btnBrowse.Add(browseBox);
cboSearchStart = ComboBoxEntry.NewText();
cboSearchFilter = ComboBoxEntry.NewText();
cboSearchText = ComboBoxEntry.NewText();
LoadComboBoxEntry(cboSearchStart, Core.GeneralSettings.SearchStarts, true);
LoadComboBoxEntry(cboSearchFilter, Core.GeneralSettings.SearchFilters, false);
LoadComboBoxEntry(cboSearchText, Core.GeneralSettings.SearchTexts, false);
cboSearchStart.Changed += new EventHandler(cboSearchStart_Changed);
lblSearchFilter = new Label("File Types");
lblSearchFilter.SetAlignment(0,0);
lblSearchText = new Label("Search Text");
lblSearchText.SetAlignment(0,0);
// search path
VBox startVBox = new VBox();
startVBox.BorderWidth = 0;
cboSearchStart.WidthRequest = 100;
SetActiveComboBoxEntry(cboSearchStart);
HBox startHBox = new HBox();
startHBox.BorderWidth = 0;
startHBox.PackStart(cboSearchStart, true, true, 0);
startHBox.PackEnd(btnBrowse, false, false, 0);
startVBox.PackStart(lblSearchStart, false, false, 0);
startVBox.PackStart(startHBox, true, false, 0);
searchBox.PackStart(startVBox, true, false, 0);
// search filter
VBox filterVBox = new VBox();
cboSearchFilter.Active = 0;
filterVBox.BorderWidth = 0;
filterVBox.PackStart(lblSearchFilter, false, false, 0);
filterVBox.PackStart(cboSearchFilter, true, false, 0);
searchBox.PackStart(filterVBox, true, false, 0);
// search text
VBox textVBox = new VBox();
cboSearchText.Active = 0;
textVBox.BorderWidth = 0;
textVBox.PackStart(lblSearchText, false, false, 0);
textVBox.PackStart(cboSearchText, true, false, 0);
searchBox.PackStart(textVBox, true, false, 0);
// Search/Cancel buttons
searchBox.PackStart(CreateButtons(), false, false, 0);
// Search Options
chkRegularExpressions = new CheckButton("Regular Expressions");
chkCaseSensitive = new CheckButton("Case Sensitive");
chkWholeWord = new CheckButton("Whole Word");
chkRecurse = new CheckButton("Recurse");
chkFileNamesOnly = new CheckButton("Show File Names Only");
chkFileNamesOnly.Clicked += new EventHandler(chkFileNamesOnly_Clicked);
chkNegation = new CheckButton("Negation");
//.........这里部分代码省略.........
开发者ID:joshball, 项目名称:astrogrep, 代码行数:101, 代码来源:frmMain.cs
示例19: NavigationBar
public NavigationBar(NavigationType navigationType)
{
this.navigationType = navigationType;
cbeNavigation = new ComboBoxEntry();
cbeNavigation.Entry.Completion = new EntryCompletion ();
cbeNavigation.Entry.KeyReleaseEvent += cbeNavigationKeyReleas;
cbeNavigation.Events = EventMask.AllEventsMask;
cbeNavigation.Entry.Completion.Model = navigationStore;
cbeNavigation.Model = navigationStore;
cbeNavigation.Entry.ActivatesDefault = true;
cbeNavigation.TextColumn = 0;
IList<RecentFile> lRecentProjects;
switch (this.navigationType)
{
case NavigationType.favorites:
lRecentProjects = MainClass.Settings.RecentFiles.GetFavorite();
break;
case NavigationType.libs:
lRecentProjects = MainClass.Settings.FavoriteFiles.GetLibsFavorite();
break;
case NavigationType.publish:
lRecentProjects = MainClass.Settings.FavoriteFiles.GetPublishFavorite();
break;
case NavigationType.emulator:
lRecentProjects = MainClass.Settings.FavoriteFiles.GetEmulatorFavorite();
break;
default:
lRecentProjects = MainClass.Settings.RecentFiles.GetFavorite();
break;
}
//= this.recentFiles.GetFavorite();//MainClass.Settings.RecentFiles.GetFavorite();
foreach(RecentFile rf in lRecentProjects){
navigationStore.AppendValues(rf.FileName);
}
cbeNavigation.Changed+= cbeNavigationChanged;
pixbufYes = null;
string fileYes = System.IO.Path.Combine(MainClass.Paths.ResDir, "starSelect.png");
string fileNo = System.IO.Path.Combine(MainClass.Paths.ResDir, "starUnselect.png");
if (System.IO.File.Exists(fileYes)) {
pixbufYes = new Pixbuf(fileYes);
btnFavorite = new Button(new Gtk.Image(pixbufYes));
}
if (System.IO.File.Exists(fileNo)) {
pixbufNo = new Pixbuf(fileNo);
btnFavorite = new Button(new Gtk.Image(pixbufNo));
} else {
btnFavorite = new Button();
}
btnFavorite.TooltipText = MainClass.Languages.Translate("close");
btnFavorite.Relief = ReliefStyle.None;
btnFavorite.CanFocus = false;
btnFavorite.WidthRequest = btnFavorite.HeightRequest =24;
btnFavorite.Clicked+= btnFavoriteClick;
PackEnd (cbeNavigation, true, true, 0);
PackStart (btnFavorite, false, false, 0);
}
开发者ID:moscrif, 项目名称:ide, 代码行数:67, 代码来源:NavigationBar.cs
示例20: NewProjectWizzard_New
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:19192| 2023-10-27
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9988| 2022-11-06
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8327| 2022-11-06
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8696| 2022-11-06
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8639| 2022-11-06
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9657| 2022-11-06
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8624| 2022-11-06
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7998| 2022-11-06
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8656| 2022-11-06
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7535| 2022-11-06
请发表评论