// Shared initialization code void Initialize() { graphDisplay tmp = this.Window; tmp.theController = this; theGraph = new graphView(); theGraph.Frame = placeHolder2.Frame; if (graphBox != null) { graphBox.AddSubview(theGraph); } //placeHolder2.RemoveFromSuperview(); float x = NSUserDefaults.StandardUserDefaults.FloatForKey("graphDisplayX"); float y = NSUserDefaults.StandardUserDefaults.FloatForKey("graphDisplayY"); float w = NSUserDefaults.StandardUserDefaults.FloatForKey("graphDisplayW"); float h = NSUserDefaults.StandardUserDefaults.FloatForKey("graphDisplayH"); if ((w > 0) && (h > 0)) { CoreGraphics.CGRect restoreTo = new CoreGraphics.CGRect(x, y, w, h); tmp.SetFrame(restoreTo, false); resizeGraph(); } showLatest(); }
partial void graphBtn_Click(Foundation.NSObject sender) { if (myGraphCtrl == null) { myGraphCtrl = new graphDisplayController(); } myGraph = myGraphCtrl.Window; myGraph.HidesOnDeactivate = false; myGraph.MakeKeyAndOrderFront(this); myGraph.OrderFrontRegardless(); myGraph.Level = NSWindowLevel.Dock; myGraph.StyleMask = NSWindowStyle.NonactivatingPanel; myGraphCtrl.showLatest(); //myGraphCtrl.mainController = this; }