private void btnPrint_Click(object sender, EventArgs e)
        {
            //Input balance here if statement
            Main.FileLoc = FileLocFromMain;
            var printStatus = Main.PrintDocument();

            if (printStatus == true)
            {
                var Stat          = new frmStatus();
                var msgstatoutput = Stat.ShowDialog();
                if (msgstatoutput == DialogResult.Cancel)
                {
                    PrintSuccess = true;
                    serialPort1.Close();
                    this.Close();
                }
            }
        }
        private void ExecutePrint()
        {
            bool  IsColor;
            short Copies = Convert.ToInt16(txtNoOfCopies.Text);

            if (txtColored.Text == "Yes")
            {
                IsColor = true;
            }
            else
            {
                IsColor = false;
            }
            //Input balance here if statement
            Main.FileLoc = FileLocFromMain;
            var printStatus = Main.PrintDocument(IsColor, Copies);

            if (printStatus == true)
            {
                var Stat          = new frmStatus();
                var msgstatoutput = Stat.ShowDialog();
                if (msgstatoutput == DialogResult.Cancel)
                {
                    var path = Properties.Settings.Default.AdminPath + "Admin.xml";
                    var xDoc = XDocument.Load(path);
                    var node = xDoc.Descendants("Admin").FirstOrDefault(cd => cd.Element("paper").Value != "");
                    if (node.Name != null || node.Name != "")
                    {
                        int TotalRemaining = Convert.ToInt32(PaperCountLeft) - (Convert.ToInt32(txtNoOfCopies.Text) * Convert.ToInt32(txtNoOfPages.Text));
                        node.SetElementValue("paper", TotalRemaining);
                    }
                    xDoc.Save(path);
                    PrintSuccess = true;
                    serialPort1.Close();
                    this.Close();
                }
            }
        }