private void ReloadData(string xmlPath)
		{
			p1 = new project1();
			XmlSerializer serializer = new XmlSerializer(p1.GetType());
			FileStream fs = new FileStream(xmlPath, FileMode.Open);

			p1 = (project1)serializer.Deserialize(fs);

			textBox30.Text = p1.pdfForclosureOrder;
			textBox31.Text = p1.pdfDisbursement;
			textBox32.Text = p1.pdfNotification;
			textBox33.Text = p1.pdfDeed;
			textBox34.Text = p1.pdfSheriffDeed;

			foreach (string misc in p1.miscPdfs)
			{
				listBoxPDF.Items.Add(misc);
			}

			tbName.Text = p1.mtgName;
			tbDeedHolder.Text = p1.deedHolder;
			tbFile.Text = p1.fileNumber;
			tbSurplus.Text = p1.surplusAmount.ToString();
			tbState.Text = p1.state;
			tbCounty.Text = p1.county;

			dateReviewed.SelectedDate = p1.dateReviewed;
			tbResearcher.Text = p1.researcher;
			tbHeld.Text = p1.verifyBy;
			tbVerify.Text = p1.verifyHow;
			tbAddress.Text = p1.foreclosedAdd;
			dateRecorded.SelectedDate = p1.dateRecorded;
			tbBook.Text = p1.book;
			tbPage.Text = p1.page;
			dateForclosed.SelectedDate = p1.dateForclosed;
			tbNote.Text = p1.amountOnNote.ToString();
			tbBeneficiary.Text = p1.beneficiary;


			if (p1.hasEstatesForm)
				cbAddEstates.IsChecked = true;

			tbEstatesNameDeceased.Text = p1.mtgName.Split(new char[] { ',' })[0];
			tbEstatesFileNumber.Text = p1.fileNumber;
			tbEstatesFunds.Text = p1.surplusAmount.ToString();
			cbEstatesCounty.Text = p1.county;
			cbEstatesState.Text = p1.state;
			dtEstateDateReviewed.SelectedDate = p1.dateReviewed;
			tbEstatesResearcher.Text = p1.researcher;
			tbEstatePartOf.Text = p1.estatePartOf;
			tbEstatesHow.Text = p1.verifyHow + " " + p1.verifyBy;



			tbEstatesDeathAtt.Text = p1.pdfEstateDeathCert;
			tbEstatesWillAtt.Text = p1.pdfEstateWill;
			tbEstatesNotifAtt.Text = p1.pdfEstateNotif;

			foreach (string itm in p1.pdfEstateAnyDocsList)
			{
				listEstateAnyDocs.Items.Add(itm);
			}

			foreach (string itm in p1.pdfEstateAnyOtherDocsList)
			{
				listEstateAnyOtherDocs.Items.Add(itm);
			}
			try
			{
				tbEstatesName1.Text = p1.conclusionList[0].Name;
				tbEstatesAmount1.Text = p1.conclusionList[0].Amount;

				tbEstatesName2.Text = p1.conclusionList[1].Name;
				tbEstatesAmount2.Text = p1.conclusionList[1].Amount;

				tbEstatesName3.Text = p1.conclusionList[2].Name;
				tbEstatesAmount3.Text = p1.conclusionList[2].Amount;

				tbEstatesName4.Text = p1.conclusionList[3].Name;
				tbEstatesAmount4.Text = p1.conclusionList[3].Amount;
			}
			catch{}

			mtgList.Clear();
			judList.Clear();
			claimantList.Clear();
			conclusionList.Clear();
			
			List<mtgClass> mtgList2 = new List<mtgClass>();
			List<judgementClass> judList2 = new List<judgementClass>();
			List<conclusionClass> conclusionList2 = new List<conclusionClass>();
			List<claimantsClass> claimantList2 = new List<claimantsClass>();

			mtgList2 = p1.mtgList;
			judList2 = p1.judgmentList;
			claimantList2 = p1.claimantList;
			conclusionList2 = p1.conclusionList;
			
			foreach (mtgClass mtg in mtgList2)
			{
				AddMtgs(mtg);
			}

			foreach (claimantsClass cls in claimantList2)
			{
				AddClaimants(cls);
			}

			foreach (judgementClass jud in judList2)
			{
				AddJudgCases(jud);
			}

			foreach (conclusionClass conCls in conclusionList2)
			{
				AddConclusion(conCls);
			}
			fs.Close();
		}
		private void Window_Loaded(object sender, RoutedEventArgs e)
		{
			ScrollViewer.Visibility = System.Windows.Visibility.Hidden;
			p1 = new project1();
			ClearStatic();
			Retry:
			if (!File.Exists(Properties.Settings.Default.pathTemplate))
			{
				MessageBox.Show("Missing path to Excel TEMPLATE. Please select the file");
				OpenFileDialog opendialog = new OpenFileDialog();
				opendialog.Filter = "Excel files|*.xl*";
				opendialog.Title = "EXCEL TEMPLATE";
				if (opendialog.ShowDialog() == true)
				{
					Properties.Settings.Default.pathTemplate = opendialog.FileName;
					Properties.Settings.Default.Save();
				}
				else
				{
					MessageBox.Show("No files selected. File path is required!");
					goto Retry;
				}

			}

			if (!File.Exists(Properties.Settings.Default.pathDeeds))
			{
				MessageBox.Show("Missing path to Excel DEEDS. Please select the file");
				OpenFileDialog opendialog = new OpenFileDialog();
				opendialog.Filter = "Excel files|*.xl*";
				opendialog.Title = "EXCEL DEEDS";
				if (opendialog.ShowDialog() == true)
				{
					Properties.Settings.Default.pathDeeds = opendialog.FileName;
					Properties.Settings.Default.Save();
				}
				else
				{
					MessageBox.Show("No files selected. File path is required!");
					goto Retry;
				}
			}

			if (!Directory.Exists(Properties.Settings.Default.pathSaveFolder))
			{
				MessageBox.Show("Missing folder path for <EXCEL> saving. Please select the folder.");
				Winforms.FolderBrowserDialog fdiag = new Winforms.FolderBrowserDialog();
				fdiag.Description = "EXCEL SAVE FOLDER";

				if (fdiag.ShowDialog() == Winforms.DialogResult.OK)
				{
					Properties.Settings.Default.pathSaveFolder = fdiag.SelectedPath;
					Properties.Settings.Default.Save();
				}
				else
				{
					MessageBox.Show("Path to <EXCEL> save folder is not set. Path required!");
					goto Retry;
				}

			}

			Excel.Application xlApp = new Excel.Application();
			Excel.Workbook xlWb = xlApp.Workbooks.Open(Properties.Settings.Default.pathTemplate, false, false);
			Excel.Worksheet xlWs = xlWb.Worksheets["countylist"];

			for (int rowx = 2; rowx <= xlWs.UsedRange.Rows.Count; rowx++)
			{
				if (!tbState.Items.Contains(xlWs.Cells[rowx, 2].Value2))
				{
					tbState.Items.Add(xlWs.Cells[rowx, 2].Value2);
					cbEstatesState.Items.Add(xlWs.Cells[rowx, 2].Value2);
				}
				CountyStateList.Add(new Tuple<string, string>(xlWs.Cells[rowx, 1].value, xlWs.Cells[rowx, 2].Value2));
				if (!tbHeld.Items.Contains(xlWs.Cells[rowx, 3].Value2))
					tbHeld.Items.Add(xlWs.Cells[rowx, 3].Value2);
			}
			try
			{
				tbHeld.SelectedIndex = 0;
			}
			catch
			{

			}

			xlWb.Close(false);
			xlApp.Quit();
			mtgID = 101;
			mtgLabelCount.Content = "0 OF 13";
			judgementID = 201;
			judgementLabelCount.Content = "0 OF 12";

			claimantID = 1;
			claimantsLabelCount.Content = "0 OF 7";

			conclusionID = 301;

			tbResearcher.SelectedIndex = 0;
			tbEstatesResearcher.Text = tbResearcher.Text;

			tbHeld.SelectedIndex = 0;
			tbEstatesHow.Text = tbHeld.Text;

			tbName.Focus();

			if (isTaxForm)
			{
				lblmtgDateForclosed.Margin = lblmtgDateRec.Margin;
				lblmtgDateRec.Visibility = System.Windows.Visibility.Collapsed;

				dateForclosed.Margin = dateRecorded.Margin;
				dateRecorded.Visibility = System.Windows.Visibility.Collapsed;

				lblmtgBook.Visibility = System.Windows.Visibility.Collapsed;
				lblmtgPage.Visibility = System.Windows.Visibility.Collapsed;

				tbBook.Visibility = System.Windows.Visibility.Collapsed;
				tbPage.Visibility = System.Windows.Visibility.Collapsed;

				lblmtgAmountNote.Content = "AMOUNT OF FORECLOSED ON(JUDGEMENT AMOUNT)";
				lblmtgBeneficiary.Content = "FORECLOSING ENTITY (COUNTRY OR CITY NAME)";

				lblmtgAmountNote.Margin = new Thickness(lblmtgAmountNote.Margin.Left, lblmtgAmountNote.Margin.Top - 70, lblmtgAmountNote.Margin.Right, lblmtgAmountNote.Margin.Bottom);
				lblmtgBeneficiary.Margin = new Thickness(lblmtgBeneficiary.Margin.Left, lblmtgBeneficiary.Margin.Top - 70, lblmtgBeneficiary.Margin.Right, lblmtgBeneficiary.Margin.Bottom);

				tbNote.Margin = new Thickness(tbNote.Margin.Left, tbNote.Margin.Top - 70, tbNote.Margin.Right, tbNote.Margin.Bottom);
				tbBeneficiary.Margin = new Thickness(tbBeneficiary.Margin.Left, tbBeneficiary.Margin.Top - 70, tbBeneficiary.Margin.Right, tbBeneficiary.Margin.Bottom);

			}

			expander8.Visibility = System.Windows.Visibility.Collapsed;


		}