Exemple #1
0
 private void OnOK(object Obj, EventArgs EA)
 {
     Print_Registry.Set_TopLeft(TopLeft.Text);
     Print_Registry.Set_TopRight(TopRight.Text);
     Print_Registry.Set_BottomLeft(BottomLeft.Text);
     Print_Registry.Set_BottomRight(BottomRight.Text);
 }
Exemple #2
0
    public static bool HasFooter()
    {
        if (Print_Registry.Get_BottomLeft() != "")
        {
            return(true);
        }

        if (Print_Registry.Get_BottomRight() != "")
        {
            return(true);
        }

        return(false);
    }
Exemple #3
0
    public static bool HasHeader()
    {
        if (Print_Registry.Get_TopLeft() != "")
        {
            return(true);
        }

        if (Print_Registry.Get_TopRight() != "")
        {
            return(true);
        }

        return(false);
    }
Exemple #4
0
    public static void PageSetup()
    {
        DocumentName = TabManager.GetFilename();
        Content      = TabManager.GetText();

        PrintDoc.DocumentName = DocumentName;

        PrintDoc.DefaultPageSettings.Margins   = Print_Registry.GetMargins();
        PrintDoc.DefaultPageSettings.Landscape = Print_Registry.GetLandscape();

        DialogResult OK = SetupDlg.ShowDialog();

        if (OK != DialogResult.OK)
        {
            return;
        }

        Print_Registry.SetMargins(PrintDoc.DefaultPageSettings.Margins);
        Print_Registry.SetLandscape(PrintDoc.DefaultPageSettings.Landscape);
    }
Exemple #5
0
 public static String Get_BottomRight()
 {
     return(MakeText(Print_Registry.Get_BottomRight()));
 }
Exemple #6
0
 public static String Get_TopLeft()
 {
     return(MakeText(Print_Registry.Get_TopLeft()));
 }
Exemple #7
0
    public Print_HeaderFooter_Dialog()
    {
        Text = AppMain.AppName + " - Print Header / Footer";

        StartPosition   = FormStartPosition.CenterParent;
        FormBorderStyle = FormBorderStyle.FixedDialog;
        ClientSize      = new Size(400, 170);

        MaximizeBox   = false;
        MinimizeBox   = false;
        ControlBox    = false;
        ShowInTaskbar = false;

        new Note(this, 20, 25, "Top Left");

        TopLeft = new TextBox();

        TopLeft.Parent   = this;
        TopLeft.Location = new Point(100, 23);
        TopLeft.Size     = new Size(280, 20);
        TopLeft.Text     = Print_Registry.Get_TopLeft();

        new Note(this, 20, 50, "Top Right");

        TopRight = new TextBox();

        TopRight.Parent   = this;
        TopRight.Location = new Point(100, 48);
        TopRight.Size     = new Size(280, 20);
        TopRight.Text     = Print_Registry.Get_TopRight();

        new Note(this, 20, 75, "Bottom Left");

        BottomLeft = new TextBox();

        BottomLeft.Parent   = this;
        BottomLeft.Location = new Point(100, 73);
        BottomLeft.Size     = new Size(280, 20);
        BottomLeft.Text     = Print_Registry.Get_BottomLeft();

        new Note(this, 20, 100, "Bottom Right");

        BottomRight = new TextBox();

        BottomRight.Parent   = this;
        BottomRight.Location = new Point(100, 98);
        BottomRight.Size     = new Size(280, 20);
        BottomRight.Text     = Print_Registry.Get_BottomRight();

        Button OK = new Button();

        OK.Parent       = this;
        OK.Location     = new Point(20, 130);
        OK.Size         = new Size(70, 20);
        OK.Text         = "OK";
        OK.Click       += new EventHandler(OnOK);
        OK.DialogResult = DialogResult.OK;

        Button Help = new Button();

        Help.Parent   = this;
        Help.Location = new Point(100, 130);
        Help.Size     = new Size(70, 20);
        Help.Text     = "Help";
        Help.Click   += new EventHandler(OnHelp);
    }