public MoonboardClient(MoonServerDB database, TextWriter log) { Database = database; Log = log; Debug = false; btmPanel = PanelClient.FromConfig(Constants.GetFileConfig("BottomPanel"), log); midPanel = PanelClient.FromConfig(Constants.GetFileConfig("MiddlePanel"), log); topPanel = PanelClient.FromConfig(Constants.GetFileConfig("TopPanel"), log); }
/// <summary> /// Populate values from the base palette. /// </summary> /// <param name="common">Reference to common settings.</param> public void PopulateFromBase(KryptonPaletteCommon common) { // Populate only the designated styles common.StateCommon.BackStyle = PaletteBackStyle.PanelClient; PanelClient.PopulateFromBase(); common.StateCommon.BackStyle = PaletteBackStyle.PanelAlternate; PanelAlternate.PopulateFromBase(); common.StateCommon.BackStyle = PaletteBackStyle.PanelRibbonInactive; PanelRibbonInactive.PopulateFromBase(); }
public void OpenControl(DialogControl dialogControl) { ShowCancelButton = dialogControl.ShowCancelButton; ShowApplyButton = dialogControl.ShowApplyButton; dialogControl.DataModifyStateChanged += DialogControl_DataModifyStateChanged; PanelClient.SuspendLayout(); PanelClient.Controls.Clear(); ChildControl = dialogControl; if (ChildControl != null) { this.Width += ChildControl.Width - PanelClient.ClientRectangle.Width; this.Height += ChildControl.Height - PanelClient.ClientRectangle.Height; PanelClient.Controls.Add(dialogControl); dialogControl.SetFormState(this); ChildControl.Dock = DockStyle.Fill; } PanelClient.ResumeLayout(); }
protected void lnkPDF_Click(object sender, EventArgs e) { Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment;filename=Panel.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache); StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); PanelClient.RenderControl(hw); StringReader sr = new StringReader(sw.ToString()); Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f); HTMLWorker htmlparser = new HTMLWorker(pdfDoc); PdfWriter.GetInstance(pdfDoc, Response.OutputStream); pdfDoc.Open(); htmlparser.Parse(sr); pdfDoc.Close(); Response.Write(pdfDoc); Response.End(); }