Ejemplo n.º 1
0
 private void bRegister_onLeftClick(object sender, EventArgs e)
 {
     if (tbUsername.Text.Length > 0 && tbPassword.Text.Length > 0)
     {
         tbUsername.Unfocus();
         tbPassword.Unfocus();
         HEROsModNetwork.LoginService.RequestRegistration(tbUsername.Text, tbPassword.Text);
         Close();
     }
     else
     {
         Main.NewText(HEROsMod.HeroText("PleaseFillInUsernamePassword"));
     }
 }
Ejemplo n.º 2
0
 void bRegister_onLeftClick(object sender, EventArgs e)
 {
     if (tbUsername.Text.Length > 0 && tbPassword.Text.Length > 0)
     {
         tbUsername.Unfocus();
         tbPassword.Unfocus();
         HEROsModNetwork.LoginService.RequestRegistration(tbUsername.Text, tbPassword.Text);
         Close();
     }
     else
     {
         Main.NewText("Please fill in the Username and Password fields.");
     }
 }
Ejemplo n.º 3
0
        void bSave_onLeftClick(object sender, EventArgs e)
        {
            if (textbox.Text.Length > 0)
            {
                textbox.Unfocus();

                if (ModUtils.NetworkMode == NetworkMode.None)
                {
                    if (!Waypoints.AddWaypoint(textbox.Text, waypointPos))
                    {
                        UIMessageBox mb = new UIMessageBox("A waypoint with this name already exists, please enter another name.", UIMessageBoxType.Ok, true);
                        this.AddChild(mb);
                    }
                    else
                    {
                        Close();
                    }
                }
                else
                {
                    HEROsModNetwork.GeneralMessages.RequestAddWaypoint(textbox.Text, waypointPos);
                    Close();
                }
            }
        }
Ejemplo n.º 4
0
        private void bSave_onLeftClick(object sender, EventArgs e)
        {
            if (textbox.Text.Length > 0)
            {
                textbox.Unfocus();

                if (ModUtils.NetworkMode == NetworkMode.None)
                {
                    if (!Waypoints.AddWaypoint(textbox.Text, waypointPos))
                    {
                        UIMessageBox mb = new UIMessageBox(HEROsMod.HeroText("WaypointAlreadyExistsNote"), UIMessageBoxType.Ok, true);
                        this.AddChild(mb);
                    }
                    else
                    {
                        Close();
                    }
                }
                else
                {
                    HEROsModNetwork.GeneralMessages.RequestAddWaypoint(textbox.Text, waypointPos);
                    Close();
                }
            }
        }
Ejemplo n.º 5
0
 private void bSave_onLeftClick(object sender, EventArgs e)
 {
     if (textbox.Text.Length > 0)
     {
         textbox.Unfocus();
         HEROsModNetwork.LoginService.RequestAddGroup(textbox.Text);
         Close();
     }
 }
Ejemplo n.º 6
0
 private void bSave_onLeftClick(object sender, EventArgs e)
 {
     if (textbox.Text.Length >= 3)
     {
         textbox.Unfocus();
         HEROsModNetwork.Region region = new HEROsModNetwork.Region(textbox.Text, SelectionTool.Position, SelectionTool.Size);
         HEROsModNetwork.GeneralMessages.RequestCreateRegion(region);
         SelectionTool.Reset();
     }
     else
     {
         SelectionTool.Reset();
         Main.NewText(HEROsMod.HeroText("RegionNameTooShort"));
     }
     this.Close();
 }
Ejemplo n.º 7
0
 void bSave_onLeftClick(object sender, EventArgs e)
 {
     if (textbox.Text.Length >= 3)
     {
         textbox.Unfocus();
         HEROsModNetwork.Region region = new HEROsModNetwork.Region(textbox.Text, SelectionTool.Position, SelectionTool.Size);
         HEROsModNetwork.GeneralMessages.RequestCreateRegion(region);
         SelectionTool.Reset();
     }
     else
     {
         SelectionTool.Reset();
         Main.NewText("Region name must be at least 3 characters long");
     }
     this.Close();
 }