Inheritance: WebMarco.Frontend.Common.BaseRectangle
コード例 #1
0
ファイル: BaseWindow.cs プロジェクト: vhnatyk/WebMarco.2.0
        public BaseWindow(Rectangle frame) :
            base(new System.Drawing.RectangleF(
                (float)(frame.TopLeft.X),
                (float)(frame.TopLeft.Y),
                (float)(frame.Width),
				(float)(frame.Height)), 
			NSWindowStyle.Resizable, 
			NSBackingStore.Buffered, 
			false) {
			InitializeComponent();
        }
コード例 #2
0
		// Shared initialization code
		void Initialize () {
			//does center itself in MakeKeyAndFront to replicate iOS behaviour
			//Point centerOfScreen = new Rectangle(NSScreen.MainScreen.Frame).Center;
			var rectangle = new Rectangle (new Point (0, 0), 800, 700);//TODO: must come from config, like last position etc
			Window = new BridgeTry.Mac.MainWindow (rectangle);
			//Window.CurrentFrame.Center = centerOfScreen;//TODO:Make it work and cross platform
			//Window.SetFrameOrigin (new System.Drawing.PointF ((float)(centerOfScreen.X), (float)(centerOfScreen.Y)));
			Window.StyleMask = NSWindowStyle.Miniaturizable | NSWindowStyle.Resizable | NSWindowStyle.Titled;
			Window.Center ();
			base.Window = (NSWindow)Window;
		}
コード例 #3
0
ファイル: MainWindow.cs プロジェクト: vhnatyk/WebMarco.2.0
		public override void MakeKeyAndOrderFront(NSObject sender) {
			///Is not necessary
			//TinyIoCContainer.Current.Register<WebMarco.Backend.App.Common.BaseAppDelegate, AppDelegate>((AppDelegate)(AppDelegate.Instance));
			//TinyIoCContainer.Current.Register<AppHelper.Data.Manager, Manager>(new Manager());
			//AppHelper.Data.ConnectDatabase();//TODO: noo has to be done async - otherwise will kill the app on huge db load due to timeout
			MainView = new MainView(this);

			Point center = new Rectangle (NSScreen.MainScreen.Frame).Center;
			MainView.CurrentFrame = Rectangle.GetBaseWithRectangleF(Frame);//TODO: must come from settings, like last position and size etc

			ContentView = (NSView)MainView;
			base.MakeKeyAndOrderFront(sender);

			MainView.Load(); //TODO: or here

			/// Program entry point is here




		}
コード例 #4
0
ファイル: MainWindow.cs プロジェクト: vhnatyk/WebMarco.2.0
		public MainWindow(Rectangle frame) : base(frame){ }
コード例 #5
0
ファイル: MainWindow.cs プロジェクト: vhnatyk/WebMarco.2.0
        public MainWindow(Rectangle frame) : base(frame) { 
			///Initialization, can be after base.OnCreate(bundle); though            
			BaseAppDelegate.Instance.StartServer(ProcessCallFromFrontend); //TODO:  has to be some sort of check to ensure or even enforce that server was started
		}