using System;
using System.Windows.Forms;

namespace DeviceRepairAndOptimization.Pages
{
    public partial class page_UpkeepDialog : DevExpress.XtraEditors.XtraForm
    {
        public page_UpkeepDialog()
        {
            InitializeComponent();
            this.DialogResult = DialogResult.Cancel;
            this.CloseBox = false;
        }

        private void page_UpkeepDialog_Load(object sender, EventArgs e)
        {
            page_totalWarn page = new page_totalWarn(new Action(() => { DialogResult = DialogResult.OK; this.Close(); }));
            Control controls = pnl_Content.GetControlFromPosition(0, 0);
            if (controls != null)
            {
                controls.Controls.Clear();
            }

            page.Dock = DockStyle.Fill;
            page.TopLevel = false;
            pnl_Content.SizeChanged += page.Page_Resize;
            pnl_Content.Controls.Add(page, 0, 0);
            page.Show();
        }
    }
}
