Esempio n. 1
0
 public static void showVacationMode()
 {
     if (GameEngine.Instance.World.NumVacationsAvailable > 0)
     {
         if (GameEngine.Instance.World.isAccount730Premium())
         {
             if ((popup == null) || !popup.Created)
             {
                 popup = new CreateVacationWindow();
             }
             popup.init();
             Form parentForm = InterfaceMgr.Instance.ParentForm;
             popup.Location = new Point((parentForm.Location.X + (parentForm.Width / 2)) - (popup.Width / 2), (parentForm.Location.Y + (parentForm.Height / 2)) - (popup.Height / 2));
             popup.Show(InterfaceMgr.Instance.ParentForm);
         }
         else
         {
             MyMessageBox.setForcedForm(InterfaceMgr.Instance.ParentForm);
             MyMessageBox.Show(SK.Text("VM_Not_Premium", "Vacation Mode requires you to have a 7 day or 30 day Premium Token active."), SK.Text("VM_Error", "Vacation Error"));
         }
     }
     else if (GameEngine.Instance.World.VacationNot30Days)
     {
         MyMessageBox.setForcedForm(InterfaceMgr.Instance.ParentForm);
         MyMessageBox.Show(SK.Text("VM_None_Available_30Days", "Vacation Mode is not available to you at this time. Your account must be at least 30 days old to be able to access Vacation Mode."), SK.Text("VM_Error", "Vacation Error"));
     }
     else
     {
         MyMessageBox.setForcedForm(InterfaceMgr.Instance.ParentForm);
         MyMessageBox.Show(SK.Text("VM_None_Available", "You have no Vacations Available at the current time."), SK.Text("VM_Error", "Vacation Error"));
     }
 }
Esempio n. 2
0
 private void cancelClick()
 {
     MyMessageBox.setForcedForm(base.ParentForm);
     if (MyMessageBox.Show(SK.Text("Vacation_Cancel_MessageBox_Body", "Are you sure you wish to Cancel Vacation Mode?"), SK.Text("Vacation_Cancel_MessageBox_Header", "Cancel Vacation Mode"), MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         Program.profileLogin.cancelVacationMode();
     }
 }
Esempio n. 3
0
        private void btnStartVacation_Click(object sender, EventArgs e)
        {
            DialogResult result;
            int          numDays = this.trackNumDays.Value;

            MyMessageBox.setForcedForm(this);
            if (!ProfileLoginWindow.inSpecialWorld)
            {
                result = MyMessageBox.Show(SK.Text("VM_start_vacation_warning1", "You are about to enter Vacation Mode.") + Environment.NewLine + Environment.NewLine + SK.Text("VM_start_vacation_warning2", "During this time all your villages will be protected from new attacks across all worlds, but you will be unable to cancel this for 3 days and you will have no access to your account during this period.") + Environment.NewLine + Environment.NewLine + SK.Text("VM_start_vacation_warning3", "Are you sure you wish to start Vacation Mode? ") + Environment.NewLine + ".", SK.Text("VM_Heading", "Start Vacation"), MessageBoxButtons.YesNo);
            }
            else
            {
                result = MyMessageBox.Show(SK.Text("VM_start_vacation_warning1", "You are about to enter Vacation Mode.") + Environment.NewLine + Environment.NewLine + SK.Text("VM_start_vacation_warning2", "During this time all your villages will be protected from new attacks across all worlds, but you will be unable to cancel this for 3 days and you will have no access to your account during this period.") + Environment.NewLine + Environment.NewLine + Environment.NewLine + SK.Text("VM_start_vacation_warning10", "IMPORTANT: Special World Warning.") + Environment.NewLine + Environment.NewLine + SK.Text("VM_start_vacation_warning11", "You are currently playing in a special world") + " : " + ProfileLoginWindow.specialWorldName + Environment.NewLine + Environment.NewLine + SK.Text("VM_start_vacation_warning12", "SPECIAL WORLDS CANNOT BE PROTECTED BY VACATION MODE. If you continue with applying Vacation Mode to your Stronghold Kingdoms account, your villages within the special world will not be protected by Vacation Mode leaving them vulnerable and you will not be able to login to the special world.") + Environment.NewLine + Environment.NewLine + SK.Text("VM_start_vacation_warning3", "Are you sure you wish to start Vacation Mode? ") + Environment.NewLine + ".", SK.Text("VM_Heading", "Start Vacation"), MessageBoxButtons.YesNo);
            }
            if (result == DialogResult.Yes)
            {
                RemoteServices.Instance.set_SetVacationMode_UserCallBack(new RemoteServices.SetVacationMode_UserCallBack(this.SetVacationMode_callback));
                RemoteServices.Instance.SetVacationMode(numDays);
            }
        }