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

namespace MediaPortal.Plugins.MovingPictures.ConfigScreen.Popups {
    public partial class DataSourcesPopup : Form {
        public DataSourcePane DataSourcePane {
            get { return dataSourcePane1;  }
        }
        
        public DataSourcesPopup() {
            InitializeComponent();
        }

        private void DataSourcesPopup_Load(object sender, EventArgs e) {
            if (Owner == null)
                return;

            Point center = new Point();
            center.X = Owner.Location.X + (Owner.Width / 2);
            center.Y = Owner.Location.Y + (Owner.Height / 2);

            Point newLocation = new Point();
            newLocation.X = center.X - (Width / 2);
            newLocation.Y = center.Y - (Height / 2);

            Location = newLocation;
        }

        private void okButton_Click(object sender, EventArgs e) {
            Close();
        }
    }
}
