本文整理汇总了C#中Gtk.Window.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# Window.ShowAll方法的具体用法?C# Window.ShowAll怎么用?C# Window.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Window
的用法示例。
在下文中一共展示了Window.ShowAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TabbedSkin
public TabbedSkin(BasilProject project, ITaskBuilder taskBuilder)
{
_project = project;
_tabsToTools = new System.Collections.Hashtable();
window = new Gtk.Window ("WeSay");
window.SetDefaultSize (600, 400);
window.DeleteEvent += new DeleteEventHandler (WindowDelete);
HBox hbox = new HBox (false, 0);
window.Add (hbox);
Notebook notebook = new Notebook ();
notebook.SwitchPage += new SwitchPageHandler(OnNotebookSwitchPage);
hbox.PackStart(notebook, true, true, 0);
foreach (ITask t in taskBuilder.Tasks)
{
VBox container = new VBox();
t.Container = container;
int i = notebook.AppendPage(container, new Label(t.Label));
_tabsToTools.Add(i, t);
}
window.ShowAll ();
}
示例2: Main
static void Main ()
{
Application.Init ();
Gtk.Window w = new Gtk.Window ("System.Drawing and Gtk#");
// Custom widget sample
a = new PrettyGraphic ();
// Event-based drawing
b = new DrawingArea ();
b.ExposeEvent += new ExposeEventHandler (ExposeHandler);
b.SizeAllocated += new SizeAllocatedHandler (SizeAllocatedHandler);
Button c = new Button ("Quit");
c.Clicked += new EventHandler (quit);
MovingText m = new MovingText ();
Box box = new HBox (true, 0);
box.Add (a);
box.Add (b);
box.Add (m);
box.Add (c);
w.Add (box);
w.ShowAll ();
Application.Run ();
}
示例3: Lesson06
float rtri; // Angle For The Triangle
#endregion Fields
#region Constructors
public Lesson06()
{
// Create a new GLArea widget and request a size
glarea = new GLArea (attrlist);
glarea.SetSizeRequest (300, 300);
// Set some event handlers
glarea.ExposeEvent += OnExposed;
glarea.Realized += OnRealized;
glarea.Unrealized += OnUnrealized;
glarea.ConfigureEvent += OnConfigure;
// Create a new Vertical Box that the GLArea can live in
VBox vb = new VBox (false, 0);
// Pack the GLArea widget into the VBox
vb.PackStart (glarea, true, true, 0);
// Create a new window and name it appropriately
Window win = new Window ("NeHe Lesson06");
// Pack the VBox into the window
win.Add (vb);
// Show all of win's contained widgets
win.ShowAll ();
}
示例4: GetToken
public void GetToken()
{
window = new Gtk.Window ("packingdemo");
window.Title = "CircleCi Indicator Configuration";
window.WindowPosition = WindowPosition.Center;
HBox hbox = new HBox ();
VBox vbox = new VBox (false, 0);
Label label = new Label ();
label.Markup = "Please provide your CircleCi token.\nYou can get one <a href=\"https://circleci.com/account/api\">here</a>.";
entry = new Entry ();
Button okButton = new Button ("OK");
vbox.PackStart (label, false, false, 20);
vbox.PackStart (entry, false, false, 0);
vbox.PackStart (okButton, false, false, 20);
hbox.PackStart (vbox, false, false, 50);
window.Add(hbox);
entry.KeyReleaseEvent += HandleKeyReleaseEvent;
okButton.Clicked += HandleClicked;;
window.ShowAll ();
}
示例5: DemoMain
public DemoMain ()
{
SetupDefaultIcon ();
window = new Gtk.Window ("Gtk# Code Demos");
window.SetDefaultSize (600, 400);
window.DeleteEvent += new DeleteEventHandler (WindowDelete);
HBox hbox = new HBox (false, 0);
window.Add (hbox);
treeView = CreateTree ();
hbox.PackStart (treeView, false, false, 0);
Notebook notebook = new Notebook ();
hbox.PackStart (notebook, true, true, 0);
notebook.AppendPage (CreateText (infoBuffer, false), new Label ("_Info"));
TextTag heading = new TextTag ("heading");
heading.Font = "Sans 18";
infoBuffer.TagTable.Add (heading);
notebook.AppendPage (CreateText (sourceBuffer, true), new Label ("_Source"));
window.ShowAll ();
}
示例6: CategoriaListView
public CategoriaListView()
{
TreeViewHelper t=new TreeViewHelper(treeView,"Select * from categoria");
Gtk.Action refreshAction = new Gtk.Action("refreshAction", null, null, Stock.Refresh);
//tengo acceso al actionGroup de IEntityListView
actionGroup.Add(refreshAction);
refreshAction.Activated += delegate {t.Refresh ();};
Gtk.Action editAction = new Gtk.Action("editAction", null, null, Stock.Edit);
actionGroup.Add(editAction);
editAction.Activated += delegate {
Window ventana=new Window("Editar");
ventana.SetDefaultSize(500,500);
VBox h=new VBox(true,10);
ventana.Add (h);
Label enunciado=new Label("Introduce el nuevo valor:");
h.Add (enunciado);
Entry caja=new Entry();
h.Add (caja);
Button b=new Button("Editar");
h.Add (b);
b.Clicked+=delegate
{
IDbCommand dbCommand=App.Instance.DbConnection.CreateCommand();
dbCommand.CommandText =
string.Format ("update categoria set nombre='{1}' where id={0}", t.Id,caja.Text);
dbCommand.ExecuteNonQuery ();
};
ventana.ShowAll();
};
}
示例7: Main21
public static void Main21 (string[] args)
{
Application.Init();
Window win = new Window ("Menu Sample App");
win.DeleteEvent += new DeleteEventHandler (delete_cb);
win.DefaultWidth = 200;
win.DefaultHeight = 150;
VBox box = new VBox (false, 2);
MenuBar mb = new MenuBar ();
Menu file_menu = new Menu ();
MenuItem exit_item = new MenuItem("Exit");
exit_item.Activated += new EventHandler (exit_cb);
file_menu.Append (exit_item);
MenuItem file_item = new MenuItem("File");
file_item.Submenu = file_menu;
mb.Append (file_item);
box.PackStart(mb, false, false, 0);
Button btn = new Button ("Yep, that's a menu");
box.PackStart(btn, true, true, 0);
win.Add (box);
win.ShowAll ();
Application.Run ();
}
示例8: Run
public void Run(IGuiExternalInterface IGuiExternalInterface)
{
CommonGuiDisplayOpengl = new CommonGuiDisplayOpengl(IGuiExternalInterface, this);
CommonGuiInput = new CommonGuiInput(IGuiExternalInterface);
this.IGuiExternalInterface = IGuiExternalInterface;
//var Window = new Window("Hello world!");
Application.Init();
Window = new Window("Soywiz's Psp Emulator");
this.GLWidget = new GLWidget(OpenglGpuImpl.UsedGraphicsMode);
Window.WindowPosition = WindowPosition.Center;
Window.SetSizeRequest(480, 272);
Window.Child = GLWidget;
GLWidget.RenderFrame += GLWidget_RenderFrame;
GLWidget.SetSizeRequest(480, 272);
//GLWidget.ShowAll();
Window.Removed += Window_Removed;
Window.KeyPressEvent += Window_KeyPressEvent;
Window.KeysChanged += Window_KeysChanged;
Window.KeyReleaseEvent += Window_KeyReleaseEvent;
Window.ShowAll();
//GLWidget.KeyPressEvent += Window_KeyPressEvent;
//GLWidget.KeyReleaseEvent += Window_KeyReleaseEvent;
PspDisplay.DrawEvent += PspDisplay_DrawEvent;
OpenOpenDialog();
CommonGuiInput.ReLoadControllerConfig();
Application.Run();
}
示例9: HeightMapSizeDialog
public HeightMapSizeDialog( DoneCallback source )
{
this.source = source;
window = new Window ("Heightmap width and height:");
window.SetDefaultSize (200, 100);
Table table = new Table( 3, 2, false );
table.BorderWidth = 20;
table.RowSpacing = 20;
table.ColumnSpacing = 20;
window.Add(table);
table.Attach(new Label("Width:"), 0, 1, 0, 1);
table.Attach(new Label("Height:"), 0, 1, 1, 2);
widthcombo = new Combo();
widthcombo.PopdownStrings = new string[]{"4","8","12","16","20","24","28","32"};
table.Attach(widthcombo, 1, 2, 0, 1);
heightcombo = new Combo();
heightcombo.PopdownStrings = new string[]{"4","8","12","16","20","24","28","32"};
table.Attach(heightcombo, 1, 2, 1, 2);
Button button = new Button (Stock.Ok);
button.Clicked += new EventHandler (OnOkClicked);
button.CanDefault = true;
table.Attach(button, 1, 2, 2, 3);
window.Modal = true;
window.ShowAll();
}
示例10: Main20
public static void Main20 (string[] args)
{
Application.Init ();
PopulateStore ();
Window win = new Window ("TreeView demo");
win.DeleteEvent += new DeleteEventHandler (DeleteCB);
win.DefaultWidth = 320;
win.DefaultHeight = 480;
ScrolledWindow sw = new ScrolledWindow ();
win.Add (sw);
TreeView tv = new TreeView (store);
tv.HeadersVisible = true;
tv.AppendColumn ("One", new CellRendererText (), new TreeCellDataFunc (CellDataA));
tv.AppendColumn ("Two", new CellRendererText (), new TreeCellDataFunc (CellDataB));
sw.Add (tv);
win.ShowAll ();
Application.Run ();
}
示例11: DoWork
/// <summary>
/// Runs in a separate thread.
/// </summary>
public void DoWork()
{
Application.Init();
//Create the Window
myWin = new Window("N'Oubliez pas les paroles - Fenêtre de contrôle");
myWin.DeleteEvent += this.OnWindowDeleteEvent;
vBox = new VBox();
myWin.Add(vBox);
myPlayerScoreController = new PlayerScoreController(this);
vBox.Add(myPlayerScoreController.GetPaneBox());
mySongTestController = new SongTestController(this);
vBox.Add(mySongTestController.GetPaneBox());
// Rend tout visible
myWin.ShowAll();
// start the message pump
messagePumper.Start();
Application.Run();
}
示例12: ConsoleGtk
public ConsoleGtk ()
{
Window win = new Window ("MonoLOGO");
win.DeleteEvent += new EventHandler (Window_Delete);
win.BorderWidth = 4;
win.DefaultSize = new Size (450, 300);
VBox vbox = new VBox (false, 4);
win.EmitAdd (vbox);
ScrolledWindow swin = new ScrolledWindow (new Adjustment (0.0, 0.0, 0.0, 0.0, 0.0, 0.0), new Adjustment (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
swin.HscrollbarPolicy = Gtk.PolicyType.Automatic;
swin.VscrollbarPolicy = Gtk.PolicyType.Automatic;
swin.ShadowType = Gtk.ShadowType.In;
vbox.PackStart (swin, true, true, 0);
TextBuffer buf = new TextBuffer (new TextTagTable ());
Out = new TextWriterGtk (buf);
TextView text = new TextView (buf);
text.Editable = false;
swin.EmitAdd (text);
Entry entry = new Entry ();
entry.Activate += new EventHandler (Entry_Activate);
vbox.PackStart (entry, false, false, 0);
win.ShowAll ();
}
示例13: Main
static void Main (string [] args)
{
Application.Init ();
if (args.Length <= 0) {
Console.WriteLine ("\nUSAGE: ImageBrowser.exe <directory>\n");
return;
}
string dir = args [0];
Gtk.Window window = new Gtk.Window ("Image Browser");
Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow (new Adjustment (IntPtr.Zero), new Adjustment (IntPtr.Zero));
ArrayList images = GetItemsFromDirectory (dir);
Gtk.Table table = PopulateTable (images);
window.Title = String.Format ("{0}: {1} ({2} images)", window.Title, dir, images.Count);
window.SetDefaultSize (300, 200);
window.DeleteEvent += Window_Delete;
scroll.AddWithViewport (table);
scroll.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
window.Add (scroll);
window.ShowAll ();
Application.Run ();
}
示例14: TreeViewDemo
public TreeViewDemo ()
{
DateTime start = DateTime.Now;
Application.Init ();
PopulateStore ();
Window win = new Window ("TreeView demo");
win.DeleteEvent += new DeleteEventHandler (DeleteCB);
win.SetDefaultSize (640,480);
ScrolledWindow sw = new ScrolledWindow ();
win.Add (sw);
TreeView tv = new TreeView (store);
tv.HeadersVisible = true;
tv.EnableSearch = false;
tv.AppendColumn ("Name", new CellRendererText (), "text", 0);
tv.AppendColumn ("Type", new CellRendererText (), "text", 1);
sw.Add (tv);
dialog.Destroy ();
dialog = null;
win.ShowAll ();
Console.WriteLine (count + " nodes added.");
Console.WriteLine ("Startup time: " + DateTime.Now.Subtract (start));
Application.Run ();
}
示例15: SetView
protected virtual void SetView (PhotoImageView view)
{
if (controls != null)
controls.Destroy ();
controls = null;
this.view = view;
if (view == null)
return;
Widget w = CreateControls ();
if (w != null) {
#if false
ControlOverlay c = new ControlOverlay (view);
c.AutoHide = false;
w.ShowAll ();
c.Add (w);
c.Visibility = ControlOverlay.VisibilityType.Full;
controls = c;
#else
Window win = new Window (String.Format ("{0}", GetTitle ()));
win.TransientFor = (Gtk.Window) view.Toplevel;
win.Add (w);
win.ShowAll ();
win.DeleteEvent += delegate { Destroy (); };
controls = win;
#endif
}
}