private void mnuSetName_Click(object sender, RoutedEventArgs e)
 {
     if (dgStructures.SelectedItem != null)
     {
         try
         {
             windows.InputBox wdInput = new windows.InputBox();
             wdInput.ShowDialog();
             Request_Entity_SetName(((data.StructureInfo)dgStructures.SelectedItem).id, wdInput.txtInput.Text);
             wdInput = null;
         }
         catch
         {
         }
     }
 }
        private void mnuAddCredits_Click(object sender, RoutedEventArgs e)
        {
            if (dgPlayer.SelectedItem != null)
            {
                windows.InputBox wdInput = new windows.InputBox();
                wdInput.ShowDialog();

                try
                {
                    Player_AddCredits(((data.PlayerInfo)dgPlayer.SelectedItem).entityId, System.Convert.ToDouble(wdInput.txtInput.Text));
                }
                catch
                {
                    mainWindowDataContext.output.Add("Cant convert string to double");
                }
                wdInput = null;
            }
        }