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 VEPROMS
{
	public partial class dlgImpHowToHandleROs : Form
	{
		private string _ImportedROFolder;
		public string ImportedROFolder
		{
			get { return _ImportedROFolder; }
			set { _ImportedROFolder = value; }
		}
		private string _WorkingDraftROFolder;
		public string WorkingDraftROFolder
		{
			get { return _WorkingDraftROFolder; }
			set { _WorkingDraftROFolder = value; }
		}
		private bool _CancelImport = true; // default to truen in case the dialog is closed with the red X in the upper right corner
		public bool CancelImport
		{
			get { return _CancelImport; }
		}
		private bool _ConvertROsToText = false;
		public bool ConvertROsToText
		{
			get { return _ConvertROsToText; }
		}
		public dlgImpHowToHandleROs()
		{
			InitializeComponent();
		}

		private void dlgImpHowToHandleROs_Load(object sender, EventArgs e)
		{
			rtbROPathInfo.Text = string.Format("The current Working Draft RO folder path is:\n\n   {0}\n\nThe procedure you are trying to import is from a database that has the RO folder path:\n\n   {1}\n\nSelect from the options below on how to handle the RO values when importing this procedure.", _WorkingDraftROFolder, _ImportedROFolder);
		}

		private void btnUseCurrentROs_Click(object sender, EventArgs e)
		{
			_ConvertROsToText = _CancelImport = false;
		}

		private void btnROsToText_Click(object sender, EventArgs e)
		{
			_CancelImport = false;
			_ConvertROsToText = true;
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			_CancelImport = true;
			_ConvertROsToText = false;
		}

		private void dlgImpHowToHandleROs_Resize(object sender, EventArgs e)
		{
			rtbROPathInfo.Refresh();
		}
	}
}
