Beispiel #1
0
        private void bunifuFlatButton1_Click(object sender, EventArgs e)
        {
            List <int> upperLower = new List <int>(new int[] { 0, 1 });


            LargeFormat lf = new LargeFormat(1, upperLower);

            lf.Show();
        }
Beispiel #2
0
        //Click Print Button
        private void btnPrintLF_Click(object sender, EventArgs e)
        {
            if (changedCurrentNumberLF)
            {
                LFCurrentNo = Convert.ToInt32(txbLFStart.Text.ToString());
            }


            // number of print pages in txbLFPageCount
            int noLFPages = Convert.ToInt32(txbLFPageCount.Text);

            ////Take 1 off to match index loops - 10 in txb was 11 loops.
            //noLFPages--;

            //Create UpperLower List
            List <int>    upperLowerLF = new List <int>(new int[] { LFCurrentNo, (LFCurrentNo + noLFPages) });
            List <string> values       = new List <string>();

            int endPlusOne = LFCurrentNo + noLFPages;

            //create a list of LF Values
            for (int i = LFCurrentNo; i < (endPlusOne); i++)
            {
                string val = i.ToString().PadLeft(6, '0');
                //MessageBox.Show(val);
                values.Add(val);
            }

            LargeFormat lf = new LargeFormat(noLFPages, upperLowerLF, values);

            if (printDialogLF.ShowDialog() == DialogResult.OK)
            {
                lf.Show();
            }


            //Update DB with new current number
            SetCurrentNumber(endPlusOne, lfHeaderID);
            SetRecentNumberPages(noLFPages, lfHeaderID);


            //reset changed current number;
            changedCurrentNumberLF = false;

            //refresh current number value
            StartGetCurrentHeaderValues();

            //lf.Close();
        }