本文整理汇总了C#中MainWindow.Resize方法的典型用法代码示例。如果您正苦于以下问题:C# MainWindow.Resize方法的具体用法?C# MainWindow.Resize怎么用?C# MainWindow.Resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWindow
的用法示例。
在下文中一共展示了MainWindow.Resize方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main(string[] args)
{
Application.Init ();
MainWindow win = new MainWindow ();
win .Resize (644,400);
win.Show ();
Application.Run ();
}
示例2: Main
public static int Main(String[] args)
{
KAboutData about = new KAboutData("p3", "Tutorial - p3", KDE.Ki18n(""), "0.1");
KCmdLineArgs.Init(args, about);
KApplication a = new KApplication();
MainWindow window = new MainWindow("Tutorial - p3");
window.Resize(400, 300);
window.Show();
return KApplication.Exec();
}
示例3: Main
public static void Main(string[] args)
{
if (Environment.OSVersion.Platform != PlatformID.Unix) {
Windows.kernel32.AttachConsole (Windows.kernel32.ATTACH_PARENT_PROCESS);
}
try {
Application.Init ();
MainWindow win = new MainWindow ();
win.Resize (1024, 768);
win.Show ();
Application.Run ();
} catch (FileNotFoundException ex) {
Console.Error.WriteLine (ex.Message);
}
}
示例4: Start
static void Start(string loadxaml, IEnumerable<Assembly> libs)
{
Gtk.Application.Init ();
MoonBase.Init ();
foreach (var lib in libs)
MoonBase.Assemblies.Add (lib);
var mw = new MoonArea ();
mw.Content = new System.Windows.Controls.TextBlock (){ Text = "Loading..." };
MainWindow win = new MainWindow ();
win.Title = "Xaml Source";
win.Show ();
win.Resize (750, 600);
win.MoonAreaContainer.Add (mw);
var loader = new ViewLoader (mw);
var xp = loader.LoadViewViewModel<XamlPanelViewModel> ("Views;component/Views/XamlPanel.xaml");
mw.Content = xp.View;
win.XpVM = (XamlPanelViewModel)xp.ViewModel;
if (loadxaml != null) {
try {
win.LoadFile (loadxaml);
} catch (Exception e) {
((XamlPanelViewModel)xp.ViewModel).UserContent
= new System.Windows.Controls.TextBlock ()
{
Text = String.Format("Error\n\n{0}", e.Message ),
Padding = new System.Windows.Thickness(10.0),
FontStyle = System.Windows.FontStyles.Italic };
}
}
Gtk.Application.Run ();
}
示例5: Main
public static int Main(String[] args)
{
KAboutData about = new KAboutData("p5", "Tutorial - p5", KDE.Ki18n(""), "0.1");
KCmdLineArgs.Init(args, about);
KApplication a = new KApplication();
if (!QDBusConnection.SessionBus().IsConnected()) {
Console.Error.WriteLine("Cannot connect to the D-BUS session bus.\n" +
"To start it, run:\n" +
"\teval `dbus-launch --auto-syntax`\n");
return 1;
}
MainWindow window = new MainWindow("Tutorial - p5");
window.Resize(300, 200);
window.Show();
return KApplication.Exec();
}
示例6: newwinn
public void newwinn ()
{
/* This is a method to use in other functions to open just
* a normal window the command is:
*
* newinn();
*
*/
MainWindow newinn = new MainWindow ();
//
newinn .Resize (hwin ,wwin );
newinn .Move ((wins*100),(wins*100));
newinn .Show ();
wins = wins + 1;
}
示例7: newwine
public void newwine (string t1, string t2,string ttitle)
{
/* To make a new window with t1 as Panel 1 text , t2 as Panel 2
* text and ttitle as Nexear's title ([email protected])
*
* The command is:
*
* newine ("Panel 1's Text","Panel2's Text","Title);
*
*/
MainWindow newin = new MainWindow ();
newin.panel1 .Buffer .Text = t1;
newin.panel2 .Buffer .Text = t2;
if (ttitle == "")
{
newin .Title = "Nexear";
}
else
{
newin.Title = ttitle + "@Nexear";
}
newin .Resize (hwin ,wwin );
newin .Move ((wins*100),(wins*100));
newin.Show ();
wins = wins + 1;
}
示例8: 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 ();
}