private void BtRevert_Clicked(object sender, RoutedEventArgs e)
 {
     try {
         SPTableRows.Children.Clear();
         for (int i = 0; i < ActualTableDetails.Count; i++)
         {
             SPTableRows.Children.Add(new TableRow(ActualTableDetails[i].TableButtonName, ActualTableDetails[i].TableName, Order_Clicked).GetGrid());
         }
         if (IsSaveClicked)
         {
             XmlTablesNameList.Write(ActualTableDetails);
             IsSaveClicked = false;
         }
     }
     catch (Exception ex) { MessageBox.Show(ex.Message); }
     Disable();
 }
 private void BtSave_Clicked(object sender, RoutedEventArgs e)
 {
     try {
         IsSaveClicked = true;
         ModifiedTableDetails.Clear();
         for (int i = 0; i < SPTableRows.Children.Count; i++)
         {
             Grid gd = GetGridAt(i);
             ModifiedTableDetails.Add(new TableDetails()
             {
                 TableButtonName = (gd.Children[1] as TextBox).Text,
                 TableName       = (gd.Children[3] as TextBox).Text,
             });
         }
         XmlTablesNameList.Write(ModifiedTableDetails);
     }
     catch (Exception ex) { MessageBox.Show(ex.Message); }
     Disable();
 }