本文整理汇总了C#中MainWindow.Move方法的典型用法代码示例。如果您正苦于以下问题:C# MainWindow.Move方法的具体用法?C# MainWindow.Move怎么用?C# MainWindow.Move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWindow
的用法示例。
在下文中一共展示了MainWindow.Move方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main(string[] args)
{
Application.Init ();
System.DateTime.SpecifyKind (System.DateTime.Now, DateTimeKind.Local);
MainWindow win = new MainWindow ();
win.WidthRequest = win.Display.DefaultScreen.Width;
win.HeightRequest = win.Display.DefaultScreen.Height;
win.Move (0, 0);
win.Show ();
Application.Run ();
}
示例2: 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();
}
示例3: Main
public static void Main(string[] args)
{
//bool onlyInstance;
//Push changes
//bool onlyInstance;
//Push changes test
//Mutex mtx = new Mutex (true, "XenoTorrent.exe", out onlyInstance); // используйте имя вашего приложения
if (!IsApplicationRunningOnMono ("XenoTorrent.exe"))
{
ep = Path.GetDirectoryName (System.Reflection.Assembly.GetExecutingAssembly ().Location);
InitSettings();
if (!Directory.Exists(tp))
{
Directory.CreateDirectory(tp);
}
if (!Directory.Exists (dp))
{
Directory.CreateDirectory (dp);
}
foreach (string s in args)
{
try
{
File.Copy(s, tp+"/"+Path.GetFileName(s));
}
catch{}
}
Application.Init ();
if (File.Exists(ep+"/1.png"))
trayIcon = new StatusIcon (new Pixbuf (ep+"/1.png"));
else
trayIcon = new StatusIcon();
trayIcon.Visible = true;
// Show a pop up menu when the icon has been right clicked.
trayIcon.PopupMenu += OnTrayIconPopup;
// A Tooltip for the Icon
trayIcon.Tooltip = "XenoTorrent";
MainWindow win = new MainWindow (tp,dp,ep, trayIcon);
// Show/Hide the window (even from the Panel/Taskbar) when the TrayIcon has been clicked.
trayIcon.Activate += delegate {
win.Move (win.Screen.Width - 385, win.Screen.Height - 320);
win.Visible = !win.Visible;
};
win.Move (win.Screen.Width - 385, win.Screen.Height - 320);
win.Show ();
Application.Run ();
}
}
示例4: 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;
}
示例5: 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;
}
示例6: 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();
}