Пример #1
0
        //private since you can't make one
        private TerminalWindow(int width, int height)
            : base(width, height)
        {
            AlwaysOnTopOfMain = true;
#if __ANDROID__
            TerminalWidget terminalWidget = new TerminalWidget(true);
            this.AddChild(new SoftKeyboardContentOffset(terminalWidget, SoftKeyboardContentOffset.AndroidKeyboardOffset));
            terminalWidget.Closed += (sender, e) => { Close(); };
#else
            this.AddChild(new TerminalWidget(true));
#endif
            Title = LocalizedString.Get("MatterControl - Terminal");
            this.ShowAsSystemWindow();
            MinimumSize = minSize;

            string desktopPosition = UserSettings.Instance.get(TerminalWindowPositionKey);
            if (desktopPosition != null && desktopPosition != "")
            {
                string[] sizes = desktopPosition.Split(',');

                //If the desktop position is less than -10,-10, override
                int xpos = Math.Max(int.Parse(sizes[0]), -10);
                int ypos = Math.Max(int.Parse(sizes[1]), -10);
                DesktopPosition = new Point2D(xpos, ypos);
            }
        }
Пример #2
0
		//private since you can't make one
		private TerminalWindow(int width, int height)
			: base(width, height)
		{
			AlwaysOnTopOfMain = true;
#if __ANDROID__
			TerminalWidget terminalWidget = new TerminalWidget(true);
			this.AddChild(new SoftKeyboardContentOffset(terminalWidget));
			terminalWidget.Closed += (sender, e) => { Close(); };
#else
			this.AddChild(new TerminalWidget(true));
#endif
			Title = LocalizedString.Get("MatterControl - Terminal");
			this.ShowAsSystemWindow();
			MinimumSize = minSize;
			this.Name = "Gcode Terminal";
			string desktopPosition = UserSettings.Instance.get(TerminalWindowPositionKey);
			if (desktopPosition != null && desktopPosition != "")
			{
				string[] sizes = desktopPosition.Split(',');

				//If the desktop position is less than -10,-10, override
				int xpos = Math.Max(int.Parse(sizes[0]), -10);
				int ypos = Math.Max(int.Parse(sizes[1]), -10);
				DesktopPosition = new Point2D(xpos, ypos);
			}
		}