本文整理汇总了C#中Gtk.Frame.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Frame.Show方法的具体用法?C# Frame.Show怎么用?C# Frame.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Frame
的用法示例。
在下文中一共展示了Frame.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AudioView
public AudioView()
{
// this.WidthRequest = 500; //250;
// this.HeightRequest = 375; //187;
Frame frame = new Frame();
frame.BorderWidth = 5;
frame.Show();
VBox vbox = new VBox(false, 0);
frame.Add(vbox);
vbox.Show();
Label label = new Label(Catalog.GetString("Audio Chat in progress..."));
label.Show();
vbox.PackStart(label, false, true, 5);
Button button = new Button(Catalog.GetString("End Call"));
button.Clicked += OnCloseAudioClicked;
button.Show();
vbox.PackStart(button, false, true, 5);
this.Add(frame);
}
示例2: Attach
public void Attach (DockToolbar bar)
{
this.bar = bar;
bar.FloatingDock = this;
Frame f = new Frame ();
f.Shadow = ShadowType.Out;
f.Add (bar);
Add (f);
f.Show ();
bar.Show ();
Show ();
}
示例3: VideoView
public VideoView()
{
preview_pos = PreviewPos.ButtonRight;
VBox vbox = new VBox(false, 0);
vbox.Show();
Frame frame = new Frame();
//frame.BorderWidth = 5;
frame.Show();
vbox.Add(frame);
mainView = new Gtk.EventBox();
mainView.WidthRequest = 400;
mainView.HeightRequest = 300;
mainView.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (255,255,255));
mainView.ModifyBg (Gtk.StateType.Active, new Gdk.Color (255,255,255));
mainView.Show();
//this.WidthRequest = 333; // 500; //250;
//this.HeightRequest = 250; // 375; //187; 250
preview = new Gtk.DrawingArea ();
preview.WidthRequest = 120; // 75; //150;
preview.HeightRequest = 90; // 56; //112;
preview.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0,0,0));
preview.ModifyBg (Gtk.StateType.Active, new Gdk.Color (0,0,0));
preview.Show();
fix = new Gtk.Fixed ();
fix.Put (preview, space, space);
fix.Show();
mainView.Add(fix);
frame.Add(mainView);
// Label label = new Label(Catalog.GetString("Video Chat in progress..."));
// label.Show();
// vbox.PackStart(label, false, true, 0);
Button button = new Button(Catalog.GetString("End Call"));
button.Clicked += OnCloseVideoClicked;
button.Show();
vbox.PackStart(button, false, false, 5);
this.Add(vbox);
mainView.SizeAllocated += OnSizeAllocated;
// this.SizeRequested += OnsizeRequested;
this.QueueResize ();
MovePreview ();
}
示例4: RemoteDesignerProcess
public RemoteDesignerProcess ()
{
Application.Init ();
designerFrame = new Gtk.Frame ();
propGridFrame = new Gtk.Frame ();
designerFrame.Shadow = ShadowType.None;
propGridFrame.Shadow = ShadowType.None;
designerFrame.BorderWidth = 0;
designerFrame.Show ();
propGridFrame.Show ();
}
示例5: AspNetEditViewContent
internal AspNetEditViewContent (IViewContent viewContent)
{
this.viewContent = viewContent;
designerFrame = new Frame ();
designerFrame.CanFocus = true;
designerFrame.Shadow = ShadowType.Out;
designerFrame.BorderWidth = 1;
viewContent.WorkbenchWindow.Closing += new WorkbenchWindowEventHandler(workbenchWindowClosingHandler);
outlineStore = null;
outlineView = null;
designerFrame.Show ();
}
示例6: ShowCalendar
public void ShowCalendar()
{
popup = new Window(WindowType.Popup);
popup.Screen = parent.Screen;
Frame frame = new Frame();
frame.Shadow = ShadowType.Out;
frame.Show();
popup.Add(frame);
VBox box = new VBox(false, 0);
box.Show();
frame.Add(box);
cal = new Calendar();
cal.DisplayOptions = CalendarDisplayOptions.ShowHeading
| CalendarDisplayOptions.ShowDayNames
| CalendarDisplayOptions.ShowWeekNumbers;
cal.KeyPressEvent += OnCalendarKeyPressed;
popup.ButtonPressEvent += OnButtonPressed;
cal.Show();
Alignment calAlignment = new Alignment(0.0f, 0.0f, 1.0f, 1.0f);
calAlignment.Show();
calAlignment.SetPadding(4, 4, 4, 4);
calAlignment.Add(cal);
box.PackStart(calAlignment, false, false, 0);
//Requisition req = SizeRequest();
parent.GdkWindow.GetOrigin(out xPos, out yPos);
// popup.Move(x + Allocation.X, y + Allocation.Y + req.Height + 3);
popup.Move(xPos, yPos);
popup.Show();
popup.GrabFocus();
Grab.Add(popup);
Gdk.GrabStatus grabbed = Gdk.Pointer.Grab(popup.GdkWindow, true,
Gdk.EventMask.ButtonPressMask
| Gdk.EventMask.ButtonReleaseMask
| Gdk.EventMask.PointerMotionMask, null, null, CURRENT_TIME);
if (grabbed == Gdk.GrabStatus.Success) {
grabbed = Gdk.Keyboard.Grab(popup.GdkWindow,
true, CURRENT_TIME);
if (grabbed != Gdk.GrabStatus.Success) {
Grab.Remove(popup);
popup.Destroy();
popup = null;
}
} else {
Grab.Remove(popup);
popup.Destroy();
popup = null;
}
cal.DaySelected += OnCalendarDaySelected;
cal.MonthChanged += OnCalendarMonthChanged;
cal.Date = date;
}
示例7: ShowCalendar
private void ShowCalendar()
{
popup = new Window(WindowType.Popup);
popup.Screen = tree.Screen;
Frame frame = new Frame();
frame.Shadow = ShadowType.Out;
frame.Show();
popup.Add(frame);
VBox box = new VBox(false, 0);
box.Show();
frame.Add(box);
cal = new Calendar();
cal.DisplayOptions = CalendarDisplayOptions.ShowHeading
| CalendarDisplayOptions.ShowDayNames
| CalendarDisplayOptions.ShowWeekNumbers;
cal.KeyPressEvent += OnCalendarKeyPressed;
popup.ButtonPressEvent += OnButtonPressed;
cal.Show();
Alignment calAlignment = new Alignment(0.0f, 0.0f, 1.0f, 1.0f);
calAlignment.Show();
calAlignment.SetPadding(4, 4, 4, 4);
calAlignment.Add(cal);
box.PackStart(calAlignment, false, false, 0);
// FIXME: Make the popup appear directly below the date
Gdk.Rectangle allocation = tree.Allocation;
// Gtk.Requisition req = tree.SizeRequest ();
int x = 0, y = 0;
tree.GdkWindow.GetOrigin(out x, out y);
// popup.Move(x + allocation.X, y + allocation.Y + req.Height + 3);
popup.Move(x + allocation.X, y + allocation.Y);
popup.Show();
popup.GrabFocus();
Grab.Add(popup);
Gdk.GrabStatus grabbed = Gdk.Pointer.Grab(popup.GdkWindow, true,
Gdk.EventMask.ButtonPressMask
| Gdk.EventMask.ButtonReleaseMask
| Gdk.EventMask.PointerMotionMask, null, null, CURRENT_TIME);
if (grabbed == Gdk.GrabStatus.Success) {
grabbed = Gdk.Keyboard.Grab(popup.GdkWindow,
true, CURRENT_TIME);
if (grabbed != Gdk.GrabStatus.Success) {
Grab.Remove(popup);
popup.Destroy();
popup = null;
}
} else {
Grab.Remove(popup);
popup.Destroy();
popup = null;
}
cal.DaySelectedDoubleClick += OnCalendarDaySelected;
cal.ButtonPressEvent += OnCalendarButtonPressed;
cal.Date = date == DateTime.MinValue ? DateTime.Now : date;
}
示例8: BuildPopup
private void BuildPopup(double min, double max, double step)
{
dock = new Window(WindowType.Popup);
dock.Screen = Screen;
dock.ButtonPressEvent += OnDockButtonPressEvent;
dock.KeyPressEvent += OnDockKeyPressEvent;
dock.KeyReleaseEvent += OnDockKeyReleaseEvent;
dock.ScrollEvent += OnPlusMinusScollEvent;
dock.Hidden += OnDockHidden;
Frame frame = new Frame();
frame.Shadow = ShadowType.Out;
frame.Show();
dock.Add(frame);
VBox box = new VBox(false, 0);
box.Show();
frame.Add(box);
Label label = new Label();
label.Markup = "<b><big>+</big></b>";
plus = new Button(label);
plus.Relief = ReliefStyle.None;
plus.ButtonPressEvent += OnPlusMinusButtonPressEvent;
plus.ButtonReleaseEvent += OnPlusMinusButtonReleaseEvent;
plus.ScrollEvent += OnPlusMinusScollEvent;
plus.ShowAll();
box.PackStart(plus, false, true, 0);
slider = new VolumeScale(this, min, max, step);
slider.SetSizeRequest(-1, SCALE_SIZE);
slider.DrawValue = false;
slider.Inverted = true;
slider.Show();
box.PackStart(slider, true, true, 0);
label = new Label();
label.Markup = "<b><big>\u2212</big></b>";
minus = new Button(label);
minus.Relief = ReliefStyle.None;
minus.ButtonPressEvent += OnPlusMinusButtonPressEvent;
minus.ButtonReleaseEvent += OnPlusMinusButtonReleaseEvent;
minus.ScrollEvent += OnPlusMinusScollEvent;
minus.ShowAll();
box.PackEnd(minus, false, true, 0);
Show();
}
示例9: AddSection
private void AddSection (Section section)
{
Frame frame = null;
if (section.Count == 0) {
return;
}
if (section.ShowLabel) {
frame = new Frame ();
Label label = new Label ();
label.Markup = String.Format ("<b>{0}</b>", GLib.Markup.EscapeText (section.Name));
label.UseUnderline = true;
label.Show ();
frame.LabelWidget = label;
frame.LabelXalign = 0.0f;
frame.LabelYalign = 0.5f;
frame.Shadow = ShadowType.None;
frame.Show ();
PackStart (frame, false, false, 0);
}
Alignment alignment = new Alignment (0.0f, 0.0f, 1.0f, 1.0f);
alignment.TopPadding = (uint)(frame == null ? 0 : 5);
alignment.LeftPadding = section.ShowLabel ? (uint)12 : (uint)0;
alignment.Show ();
if (frame != null) {
frame.Add (alignment);
} else {
PackStart (alignment, false, false, 0);
}
SectionBox box = new SectionBox (section);
box.Show ();
alignment.Add (box);
}
示例10: DesignSurfaceViewContent
internal DesignSurfaceViewContent (string designerFile)
{
_loaded = false;
_designerFile = designerFile;
_propertyGridFrame = new Gtk.Frame ();
_propertyGridFrame.Show ();
_surfaceFrame = new DesignSurfaceViewFrame (_propertyGridFrame);
_surfaceFrame.Show ();
}
示例11: CreateWidget
void CreateWidget()
{
Homogeneous = false;
Spacing = 1;
Add (date_entry = new Entry () {WidthChars = 10, IsEditable = true});
date_entry.Changed += HandleDateEntryChanged;
date_entry.Show ();
var bbox = new HBox ();
Widget w;
bbox.Add (w = calendar_label = new Label (Catalog.GetString ("Calendar")));
w.Show ();
bbox.Add (w = new Arrow (ArrowType.Down, ShadowType.Out));
w.Show ();
bbox.Show ();
Add (date_button = new Button (bbox));
date_button.Clicked += HandleCalendarButtonClicked;
date_button.Show ();
Add (time_entry = new Entry () {WidthChars = 12, IsEditable = true});
time_entry.Changed += HandleTimeEntryChanged;
time_entry.Show ();
Add (offset_entry = new Entry () {WidthChars = 6, IsEditable = true});
offset_entry.Changed += HandleOffsetEntryChanged;
offset_entry.Show ();
calendar = new Calendar ();
calendar.DaySelected += HandleCalendarDaySelected;
calendar.DaySelectedDoubleClick += HandleCalendarDaySelectedDoubleClick;
var frame = new Frame ();
frame.Add (calendar);
calendar.Show ();
calendar_popup = new Window (WindowType.Popup) {DestroyWithParent = true, Resizable = false};
calendar_popup.Add (frame);
calendar_popup.DeleteEvent += HandlePopupDeleted;
calendar_popup.KeyPressEvent += HandlePopupKeyPressed;
calendar_popup.ButtonPressEvent += HandlePopupButtonPressed;
frame.Show ();
UpdateWidget ();
}
示例12: DateEdit
public DateEdit (System.DateTime time, DateEditFlags flags)
{
datetime = new DateTimeZone (time);
datetime.Changed += HandleDateTimeZoneChanged;
this.flags = flags;
date_entry = new Gtk.Entry ();
date_entry.WidthChars = 10;
date_entry.Changed += HandleDateEntryChanged;
PackStart (date_entry, true, true, 0);
Gtk.HBox b_box = new Gtk.HBox ();
b_box.PackStart (new Gtk.Label (Catalog.GetString ("Calendar")), true, true, 0);
b_box.PackStart (new Gtk.Arrow(Gtk.ArrowType.Down, Gtk.ShadowType.Out), true, false, 0);
date_button = new Gtk.Button (b_box);
date_button.Clicked += HandleCalendarButtonClicked;
PackStart (date_button, false, false, 0);
calendar = new Gtk.Calendar ();
calendar.DaySelected += HandleCalendarDaySelected;
Gtk.Frame frame = new Gtk.Frame ();
frame.Add (calendar);
cal_popup = new Gtk.Window (Gtk.WindowType.Popup);
cal_popup.DestroyWithParent = true;
cal_popup.Add (frame);
cal_popup.Shown += HandleCalendarPopupShown;
cal_popup.GrabNotify += HandlePopupGrabNotify;
frame.Show ();
calendar.Show ();
time_entry = new Gtk.Entry ();
time_entry.WidthChars = 8;
time_entry.Changed += HandleTimeEntryChanged;
PackStart (time_entry, true, true, 0);
Gtk.CellRendererText timecell = new Gtk.CellRendererText ();
time_combo = new Gtk.ComboBox ();
time_store = new Gtk.TreeStore (typeof (string), typeof (int), typeof (int));
time_combo.Model = time_store;
time_combo.PackStart (timecell, true);
time_combo.SetCellDataFunc (timecell, new CellLayoutDataFunc (TimeCellFunc));
time_combo.Realized += FillTimeCombo;
time_combo.Changed += HandleTimeComboChanged;
PackStart (time_combo, false, false, 0);
zone_entry = new Gtk.Entry ();
zone_entry.IsEditable = false;
zone_entry.MaxLength = 6;
zone_entry.WidthChars = 6;
PackStart (zone_entry, true, true, 0);
Gtk.CellRendererText offsetcell = new Gtk.CellRendererText ();
offset_combo = new Gtk.ComboBox ();
offset_combo.Model = new Gtk.TreeStore (typeof (string), typeof (int));
offset_combo.PackStart (offsetcell, true);
offset_combo.SetCellDataFunc (offsetcell, new CellLayoutDataFunc (OffsetCellFunc));
FillOffsetCombo ();
offset_combo.Changed += HandleOffsetComboChanged;
PackStart (offset_combo, false, false, 0);
Update ();
ShowAll ();
}
示例13: inicia
private void inicia()
{
/* Create a new window */
Window window = new Window ("Ejemplo de frames y tal ...");
/* Here we connect the "destroy" event to a signal handler */
window.DeleteEvent += delete_event;
window.SetSizeRequest(500, 400);
/* Sets the border width of the window. */
window.BorderWidth= 10;
/* Create a Frame */
//Frame frame = new Frame("MyFrame");
frame = new Frame("MyFrame");
window.Add(frame);
/* Set the frame's label */
frame.Label = "Mueveme!!!!";
/* Align the label at the right of the frame */
//frame.SetLabelAlign((float)1.0,(float)0.0); esta anticuado
//valores entre 0.0 y 1.0, indica cada extremo
frame.LabelXalign = (float)1.0;
frame.LabelYalign = (float)1.0;
/* Set the style of the frame */
frame.ShadowType = (ShadowType) 4;
/* añade mis cositas*/
frame.Add(rellenoDelFrame());
frame.Show();
/* Display the window & all widgets*/
window.ShowAll();
}
示例14: QueryBuilder
public QueryBuilder(QueryBuilderModel model)
: base()
{
this.model = model;
matchesBox = new QueryBuilderMatches(model);
matchesBox.Spacing = 5;
matchesBox.Show();
Alignment matchesAlignment = new Alignment(0.0f, 0.0f, 1.0f, 1.0f);
matchesAlignment.Show();
matchesAlignment.SetPadding(10, 10, 10, 10);
matchesAlignment.Add(matchesBox);
Frame matchesFrame = new Frame(null);
matchesFrame.Show();
matchesFrame.Add(matchesAlignment);
matchesFrame.LabelWidget = BuildMatchHeader();
PackStart(matchesFrame, true, true, 0);
PackStart(BuildLimitFooter(), false, false, 0);
}
示例15: PrepareGUI
private void PrepareGUI()
{
Glade.XML gladeXML = Glade.XML.FromAssembly("blam.glade",
"mainWindow", null);
gladeXML.Autoconnect(this);
channelList = new ChannelList(mCollection);
((Container)channelListSw).Child = channelList;
channelList.ChannelSelectedEvent += ChannelSelected;
channelList.EditChannelEvent += EditChannelActivated;
channelList.MarkChannelAsReadEvent += MarkChannelAsReadActivated;
channelList.RemoveChannelEvent += RemoveChannelActivated;
channelList.RefreshChannelEvent += RefreshChannelActivated;
itemList = new ItemList(itemView, channelList);
((Container)itemListSw).Child = itemList;
itemView = new ItemView(itemList);
Frame f = new Frame ();
f.Shadow = ShadowType.In;
f.Add (itemView);
itemPaned.Add2 (f);
f.Show ();
itemView.OnUrl += OnUrl;
// a bit silly to do it every time, but works
itemList.PropertyChanged += (sender, e) => printMenuItem.Sensitive = true;
trayIcon = new TrayIcon (Catalog.GetString ("Blam News Reader"), mCollection);
trayIcon.ButtonPressEvent += TrayIconButtonPressCb;
trayIcon.RefreshAllEvent += RefreshAllActivated;
trayIcon.PreferencesEvent += PreferencesActivated;
trayIcon.AboutEvent += AboutActivated;
trayIcon.QuitEvent += QuitActivated;
channelsLabelText = channelsLabel.Text;
UpdateTotalNumberOfUnread ();
printMenuItem.Sensitive = false;
SensitizeChannelMenuItems(false);
// Setup drag-n-drop
Gtk.Drag.DestSet(mainWindow, DestDefaults.All,
DragEntries, DragAction.Copy | DragAction.Move);
mainWindow.DragDataReceived += DragDataReceivedCb;
RestoreWindowState();
mainWindow.IconName = "blam";
mainWindow.ShowAll ();
bool ShowItemList = Conf.Get(Preference.SHOW_ITEM_LIST, true);
if(ShowItemList){
itemPaned.Child1.Visible = true;
} else {
itemPaned.Child1.Visible = false;
}
channelDialog = new ChannelDialog (this);
addGroupDialog = new AddGroupDialog (this);
preferencesDialog = new PreferencesDialog (this.Window);
opmlDialog = new OpmlDialog (this.Window);
opmlDialog.ChannelAdded += channel => mCollection.Add(channel, true);
opmlDialog.ImportFinished += OpmlImportFinished;
}