public void Popup(PAPIView parent) { InitializeComponent(); if (parent != null) { ViewController.lastView = parent; WfLogger.Log(this, LogLevel.DEBUG, "Open Popup from parent " + parent.GetType()); } SetDesign(); SetButtonDesign(); SetTextToActiveLanguage(); Size = new Size((int)((double)Width * 0.8), (int)((double)Height * 0.8)); ShowDialog(); }
// -------------------------------------------------------------------------------------------------------------------------------- /// <summary> /// Opens the view and hides the caller /// </summary> /// <param name="caller"></param> public void Open(PAPIView caller) { ViewController.lastView = caller; ViewController.curentlyOpenView = this; if (caller != null) { caller.Hide(); this.Location = caller.Location; this.Size = caller.Size; } SetDesign(); SetButtonDesign(); SetTextToActiveLanguage(); Show(); WfLogger.Log(this, LogLevel.DEBUG, "Opened View" + this.GetType().ToString()); }