本文整理汇总了C#中MainWindow.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# MainWindow.ShowAll方法的具体用法?C# MainWindow.ShowAll怎么用?C# MainWindow.ShowAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWindow
的用法示例。
在下文中一共展示了MainWindow.ShowAll方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnLoginButtonClicked
//LOGIN
protected void OnLoginButtonClicked(object sender, EventArgs e)
{
try{
string connectionString = "Server=localhost;" + "Database=dbprueba;" +
"User ID=" + userEntry.Text.ToString () + ";" + "Password=" + pwdEntry.Text.ToString ();
App.Instance.DbConnection = new MySqlConnection (connectionString);
App.Instance.DbConnection.Open ();
MainWindow mWin = new MainWindow ();
mWin.ShowAll ();
this.Destroy ();
}
catch (MySqlException){
msgDialog = new MessageDialog (
this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "\t\tConnection Error\t\t\nCannot connect to database");
msgDialog.Title = "SQL DataBase Error";
msgDialog.Run ();
msgDialog.Destroy ();
pwdEntry.Text = "";
}
catch{
Console.WriteLine ("\nError 404 Not Found");
Application.Quit ();
}
}
示例2: Main
public static void Main(string[] args)
{
Application.Init();
var win = new MainWindow();
win.ShowAll();
Application.Run();
}
示例3: Main
public static void Main(string[] args)
{
Gtk.Application.Init ();
Gst.Application.Init ();
MainWindow window = new MainWindow ();
window.ShowAll ();
Gtk.Application.Run ();
}
示例4: Main
/// <summary>
/// The main method for the application.
/// </summary>
/// <param name="args">
/// Command-line arguments.
/// </param>
public static void Main(string[] args)
{
ExceptionManager.UnhandledException += HandleUnhandledException;
PersistenceContainer container = new PersistenceContainer();
Application.Init();
MainWindow mainWindow = new MainWindow(container);
mainWindow.ShowAll();
Application.Run();
}
示例5: Main
public static void Main(string[] args)
{
Application.Init ();
Gdk.Threads.Init();
MainWindow win = new MainWindow ();
win.ShowAll();
Gdk.Threads.Enter();
Application.Run ();
Gdk.Threads.Leave();
}
示例6: Main
private static void Main(string[] args)
{
nodeStore = new Gtk.NodeStore(typeof(NoteNode));
Gtk.Application.Init();
MainWindow win = new MainWindow(nodeStore);
win.ShowAll();
win.SaveNotes += SaveNotesHandler;
win.LoadNotes += LoadNotesHandler;
Gtk.Application.Run();
}
示例7: Main
/// <summary>
/// The entry point of the program, where the program control starts and ends.
/// </summary>
/// <param name="args">The command-line arguments.</param>
public static void Main(string[] args)
{
//Initialise application
Application.Init ();
//Create the Window
Window myWin = new MainWindow ("Object Recognition", 1024, 768);
//Show Everything
myWin.ShowAll ();
//Run until quit
Application.Run ();
}
示例8: Main
public static void Main(string[] args)
{
Application.Init ();
MainWindow win = new MainWindow ();
Gtk.Canvas canvas = new Gtk.Canvas ();
canvas.Engine.SetBackground (new Color (0.5, 0.5, 0.5));
win.Add (canvas);
BoxNode box = new BoxNode (new Color (1, 1, 1), 100, 100);
box.Draggable = true;
canvas.Root.Add (box);
PolygonNode poly = new PolygonNode (50, 50);
poly.Color = new Color (0, 0, 1);
poly.SetVerticies (new [] {
new Point (0, 1),
new Point (0, 0),
new Point (1, 0.5),
});
poly.Draggable = true;
canvas.Root.Add (poly);
LabelNode label = new LabelNode ("Label Node Test");
label.Color = new Color (1, 0, 0);
label.Draggable = true;
label.ClipInputToTextExtents = true;
canvas.Root.Add (label);
Random r = new Random ();
box.ActivatedEvent += (sender, e) => {
box.RotateTo (r.NextDouble () * 5);
};
ButtonNode button = new ButtonNode (new LabelNode ("Button"));
canvas.Root.Add (button);
button.MoveTo (300, 100);
win.SetSizeRequest (800, 200);
win.ShowAll ();
Application.Run ();
}
示例9: MainClass
public MainClass()
{
Application.Init();
Util.ThreadInit ();
mw = new MainWindow ();
mw.DeleteEvent += OnClose;
mw.AddEventListener(this);
mw.Move (200, 200);
mw.ShowAll ();
mw.SetColor (textcolor);
controller.AddWindow (mw);
queuethread = new Thread (Run);
queuethread.Start ();
Application.Run();
}
示例10: Main
public static void Main (string[] args)
{
// extract command line parameters
ArrayList parameters = commandline.ParseCommandLineParameters(args, "-", GetValidParameters());
string help_str = commandline.GetParameterValue("help", parameters);
if (help_str != "")
{
ShowHelp();
}
else
{
string stereo_camera_IP = "169.254.0.10";
string stereo_camera_IP_str = commandline.GetParameterValue("i", parameters);
if (stereo_camera_IP_str != "")
{
stereo_camera_IP = stereo_camera_IP_str;
}
int leftport = 10001;
string leftport_str = commandline.GetParameterValue("leftport", parameters);
if (leftport_str != "")
{
leftport= Convert.ToInt32(leftport_str);
}
int rightport = 10002;
string rightport_str = commandline.GetParameterValue("rightport", parameters);
if (rightport_str != "")
{
rightport = Convert.ToInt32(rightport_str);
}
Application.Init ();
MainWindow win = new MainWindow (stereo_camera_IP, leftport, rightport);
win.ShowAll ();
Application.Run ();
}
}
示例11: Main
public static void Main(string[] args)
{
configpath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/";
Application.Init();
win = new MainWindow();
var eventbox = new EventBox();
//win.ExposeEvent += OnExposed;
var chars = "abcdefghijklmnopqrstuvwxyz0123456789"; //ABCDEFGHIJKLMNOPQRSTUVWXYZ
var stringChars = new char[ssnamelength];
var random = new Random();
for (int i = 0; i < stringChars.Length; i++)
{
stringChars[i] = chars[random.Next(chars.Length)];
}
finalString = new string(stringChars) + ".png";
win.Hide();
TakeScreenshot(configpath + finalString.Replace(".png", "_pre.png"));
win.Show();
win.Decorated = false;
img = new Gtk.Image(configpath + finalString.Replace(".png", "_pre.png"));
eventbox.ButtonPressEvent += (ButtonPressHandler);
eventbox.ButtonReleaseEvent += (ButtonReleaseHandler);
img.Xalign = 0.5f;
img.Yalign = 0.5f;
eventbox.Add(img);
eventbox.ShowAll();
win.Add(eventbox);
win.ShowAll();
win.Move(0, 0);
Application.Run();
}
示例12: Main
public static void Main (string[] args)
{
Application.Init ();
MainWindow win = new MainWindow ();
win.Resize (800, 200);
Canvas canvas = new Canvas ();
canvas.Realized += (sender, e) => {
SearchBoxCanvasElement searchBox = new SearchBoxCanvasElement ();
searchBox.WidthRequest = 790;
searchBox.X = 5;
searchBox.Y = 3;
canvas.AddElement (searchBox);
// PhysicsCanvasElement physics = new PhysicsCanvasElement ();
// physics.WidthRequest = 800;
// physics.HeightRequest = 800;
// canvas.AddElement (physics);
};
win.Add (canvas);
win.ShowAll ();
Application.Run ();
}
示例13: Main
public static void Main(string[] args)
{
if (System.Environment.OSVersion.Platform == PlatformID.Unix)
XInitThreads ();
Gtk.Application.Init ();
Gst.Application.Init ();
MainWindow window = new MainWindow ();
window.ShowAll ();
#if HAVE_GTK_2_17_3
if (!gdk_window_ensure_native (window._da.GdkWindow.Handle)) {
Console.WriteLine ("Can't ensure a native window for the drawing area");
}
#endif
switch (System.Environment.OSVersion.Platform) {
case PlatformID.Unix:
window._xWindowId = gdk_x11_drawable_get_xid (window._da.GdkWindow.Handle);
break;
case PlatformID.Win32NT:
case PlatformID.Win32S:
case PlatformID.Win32Windows:
case PlatformID.WinCE:
window._xWindowId = (ulong) gdk_win32_drawable_get_handle (window._da.GdkWindow.Handle);
break;
}
Gtk.Application.Run ();
}