using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Aram_CRM_Project.UIL
{
    public partial class frmMessage : Form
    {
        public frmMessage()
        {
            InitializeComponent();
        }

        private bool _ResultQuestion;
        public bool ResultQuestion
        {
            set { _ResultQuestion = value; }
            get { return _ResultQuestion; }
        }

        private string _TitlePrintReport = string.Empty;
        public string TitlePrintReport
        {
            set { _TitlePrintReport = value; }
            get { return _TitlePrintReport; }
        }

        public void RegUnSuccess()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("RegUnSuccess");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void ErrorDeleteAdmin()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("ErrDeleteAdmin");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void ErrorReportOperation()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("ErrReportOperation");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void SureConfirm()
        {
            ConfigForm();
            this.Text = "  پیام";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("SureConfirm");
            this.picQuestion.Visible = true;
            this.btnNo.Visible = true;
            this.btnYes.Visible = true;
            this.ShowDialog();
        }

        public void ErrorNoSelectColumn()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("ErrNoSelectColumn");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void ErrorSizeColumn()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("ErrorSizeColumn");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void ErrorOnDatabase()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("ErrorOnDataBase");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void RepeatingForm()
        {
            ConfigForm();
            this.Text = "  پیام";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("ErrRepeatingForm");
            this.picInfo.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void RegSuccess()
        {
            ConfigForm();
            this.Text = "  پیام";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("RegSuccess");
            this.picInfo.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void RepeatingRecord()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("RepeatingRecord");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void RepeatingUsername()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("RepeatingUsername");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void DeleteSuccess()
        {
            ConfigForm();
            this.Text = "  پیام";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("DeleteSuccess");
            this.picInfo.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void RestoreSuccess()
        {
            ConfigForm();
            this.Text = "  پیام";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("RestoreSuccess");
            this.picInfo.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void BackupSuccess()
        {
            ConfigForm();
            this.Text = "  پیام";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("BackupSuccess");
            this.picInfo.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void RestoreUnSuccess()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("RestoreUnSuccess");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void BackupUnSuccess()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("BackupUnSuccess");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.ShowDialog();
        }

        public void DeleteConflict()
        {
            ConfigForm();
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("DeleteConflict");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.btnNo.Visible = false;
            this.btnYes.Visible = false;
            this.ShowDialog();
        }

        private void ConfigForm()
        {
            btnOK.Visible = false;
            lblTitle.Visible = false;
            txtTitle.Visible = false;
            PicError.Visible = false;
            picInfo.Visible = false;
            picQuestion.Visible = false;
            lblMessage.Text = "";
            btnExit.Visible = false;
            btnYes.Visible = false;
            btnNo.Visible = false;
        }

        public void DeleteError()
        {
            this.Text = "  خطا";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("Error");
            this.PicError.Visible = true;
            this.btnExit.Visible = true;
            this.btnNo.Visible = false;
            this.btnYes.Visible = false;
            this.ShowDialog();
        }

        public void DeleteRecordConfirm()
        {
            this.Text = "  اخطار";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("DeleteConfirm");
            this.picInfo.Visible = true;
            this.btnNo.Visible = true;
            this.btnYes.Visible = true;
            this.ShowDialog();
        }

        public void ConfirmPrintReserveBill()
        {
            this.Text = "  پیام";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("ConfirmPrintReserveBill");
            this.picInfo.Visible = true;
            this.btnNo.Visible = true;
            this.btnYes.Visible = true;
            this.ShowDialog();
        }

        public void ExitConfirm()
        {
            ConfigForm();
            this.Text = "  پیام";
            this.lblMessage.Text = Properties.Resources.ResourceManager.GetString("SureConfirm");
            this.picQuestion.Visible = true;
            this.btnNo.Visible = true;
            this.btnYes.Visible = true;
            this.ShowDialog();
        }

        public void GetTitlePrintReport()
        {
            ConfigForm();
            this.Text = "  پیام";
            lblTitle.Visible = true;
            txtTitle.Visible = true;
            picInfo.Visible = true;
            btnOK.Visible = true;
            this.ShowDialog();
        }

        private void btnNo_Click(object sender, EventArgs e)
        {
            ResultQuestion = false;
            this.Close();
        }

        private void btnYes_Click(object sender, EventArgs e)
        {
            ResultQuestion = true;
            this.Close();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            TitlePrintReport = txtTitle.Text.Trim();
            this.Close();
        }
    }
}
