Beispiel #1
0
 private void sendCommandToServer(int command, int duration)
 {
     if (RemoteServices.Instance.Admin)
     {
         this.m_reasonString = "";
         ReasonPopup popup = new ReasonPopup();
         popup.initResources(this, command - 0x3e8);
         popup.ShowDialog();
         if (this.m_reasonString.Length > 0)
         {
             RemoteServices.Instance.SendCommands(this.m_villageID, command, duration, this.m_reasonString);
             base.Close();
         }
         else
         {
             MyMessageBox.Show("Not reason given", "Admin Error");
         }
     }
     else
     {
         MyMessageBox.Show("Command not sent", "Admin Error");
     }
 }
 private void sendCommandToServer(int command, int duration)
 {
     if ((this.m_userID != RemoteServices.Instance.UserID) && (RemoteServices.Instance.Admin || RemoteServices.Instance.Moderator))
     {
         this.m_reasonString = "";
         ReasonPopup popup = new ReasonPopup();
         popup.init(this);
         popup.ShowDialog();
         if (this.m_reasonString.Length > 0)
         {
             RemoteServices.Instance.SendCommands(this.m_userID, command, duration, this.m_reasonString);
         }
         else
         {
             MyMessageBox.Show("Not reason given", "Admin Error");
         }
     }
     else
     {
         MyMessageBox.Show("Command not sent", "Admin Error");
     }
 }