using System;
using System.Data;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using TinyHeels.App_Code;

namespace TinyHeels
{
    public partial class controlManagement : UserControl
    {
        private static controlManagement _instance;
        public static controlManagement Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new controlManagement();
                }
                return _instance;
            }
        }
        public controlManagement()
        {
            InitializeComponent();
        }
        Byte[] imgbytesReport;
        public byte[] imageToByteArray(System.Drawing.Image imageIn)
        {
            MemoryStream ms = new MemoryStream();
            imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
            return ms.ToArray();
        }
        Byte[] imgbytes;
        public void loadSettings()
        {
            
        }
        public Image byteArrayToImage(byte[] byteArrayIn)
        {
            MemoryStream ms = new MemoryStream(byteArrayIn);
            Image returnImage = Image.FromStream(ms);
            return returnImage;
        }

        private void label1_Click(object sender, EventArgs e)
        {
            ReportDailySales r = new ReportDailySales();
            r.ShowDialog();
        }

        private void label2_Click(object sender, EventArgs e)
        {
            ReportMonthlySsales m = new ReportMonthlySsales();
            m.ShowDialog();
        }

        private void label4_Click(object sender, EventArgs e)
        {
            MonthlyLedger obj = new MonthlyLedger();
            obj.ShowDialog();
        }

        private void b(object sender, EventArgs e)
        {
            Backup obj = new Backup();
            obj.ShowDialog();
        }

        private void label3_Click(object sender, EventArgs e)
        {
            DailyLedger obj = new DailyLedger();
            obj.ShowDialog();
        }
    }
}
