Ejemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            EditMain main = new EditMain();

            main.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
    public void Setup(EditMain editMain)
    {
        this.editMain = editMain;
        Util.FindIfNotSet(this, ref userMain);

        FindMaxDist();
    }
Ejemplo n.º 3
0
    public override void Launch(EditMain _editmain)
    {
        base.Launch(_editmain);
        Util.FindIfNotSet(this, ref terrain);
        Util.FindIfNotSet(this, ref terrainRendering);
        Util.FindIfNotSet(this, ref undoStack);
        Util.FindIfNotSet(this, ref createTerrainPreview);

        editTerrainTool.Setup();

        terrainToolSettings = editMain.GetTerrainSidebar();
        terrainToolSettings.onModeChange      = SetMode;
        terrainToolSettings.onShapeChange     = SetShape;
        terrainToolSettings.onDirectionChange = SetDirection;

        terrainToolSettings.onEditCopy   = editTerrainTool.CopySelection;
        terrainToolSettings.onEditPaint  = editTerrainTool.PaintSelection;
        terrainToolSettings.onEditDelete = editTerrainTool.DeleteSelection;

        terrainToolSettings.RequestOpen();
        SetMode(terrainToolSettings.GetMode());
        SetShape(terrainToolSettings.GetBlockShape());
        SetDirection(terrainToolSettings.GetBlockDirection());

        createTerrainPreview.SetTint(editMain.GetAvatarTint());
        createToolRay.SetLocalRayOriginTransform(emissionAnchor);
        createToolRay.SetTint(editMain.GetAvatarTint());
        editMain.SetCameraFollowingActor(false);
        editMain.TryEscapeOutOfCameraView();

        RefreshPreviewVisibility();
    }
Ejemplo n.º 4
0
 /*  public override bool ShowSelectedTargetFeedback()
  * {
  * return false;
  * }
  */
 public override void Launch(EditMain _editmain)
 {
     base.Launch(_editmain);
     toolEffectController.SetTint(editMain.GetAvatarTint());
     toolEffectController.originTransform = emissionAnchor;
     ForceUpdateTargetActor();
 }
Ejemplo n.º 5
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string teamToBeDELETED = lbTeamList.SelectedItem.ToString();

            TeamsEntity            selT   = storeHelper.TeamsList.FirstOrDefault(w => w.TeamName == teamToBeDELETED);
            List <WrestlersEntity> wrests = storeHelper.WrestlersList.Where(w => w.TeamName == teamToBeDELETED).ToList();

            foreach (WrestlersEntity w in wrests)
            {
                w.TeamName = "";

                wHelper.SaveWrestlersList(w);
            }

            string file = string.Concat(Directory.GetCurrentDirectory(), "\\Saves\\Main\\Teams\\" + selT.TeamID + ".dat");

            if (File.Exists(file))
            {
                File.Delete(file);
            }

            EditMain main = new EditMain();

            main.Show();
            this.Hide();
        }
Ejemplo n.º 6
0
    public virtual void Launch(EditMain _editmain)
    {
        Util.FindIfNotSet(this, ref toolMemory);
        editMain       = _editmain;
        mainAnchor     = editMain.mainAnchor;
        emissionAnchor = editMain.emissionAnchor;
        inputControl   = editMain.GetInputControl();

        active = true;


        if (reticleRect != null)
        {
            reticleRect.SetParent(editMain.GetReticleAnchor());
            reticleRect.anchoredPosition = Vector2.zero;
            reticleRect.gameObject.SetActive(true);
        }

        if (subtoolbarRect != null)
        {
            subtoolbarRect.SetParent(editMain.bottomToolbarAnchor);
            subtoolbarRect.SetAsFirstSibling();
            subtoolbarRect.anchoredPosition = Vector2.zero;
            subtoolbarRect.localScale       = Vector3.one;
        }

        if (subtoolbar != null)
        {
            subtoolbar.Setup();
            subtoolbar.OnSelectIndex = (newindex) => subtoolbarIndex = newindex;
            subtoolbar.SelectIndex(toolMemory.RequestSubtoolbarIndex(GetType()));
        }
    }
Ejemplo n.º 7
0
    public override void Launch(EditMain _editmain)
    {
        base.Launch(_editmain);
        Util.FindIfNotSet(this, ref voosEngine);
        Util.FindIfNotSet(this, ref undoStack);

        SetToPaste();
    }
Ejemplo n.º 8
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (isEditOrg)
            {
                if (tbInitals.Text == "" || tbNewName.Text == "" || cbxLoc.SelectedItem == null)
                {
                    tbNewName.BackColor = Color.MistyRose;
                    tbInitals.BackColor = Color.MistyRose;
                    cbxLoc.BackColor    = Color.MistyRose;
                }
                else
                {
                    PromotionsEntity promo = shHelper.PromotionsList.FirstOrDefault(p => p.Name == lbOrgList.SelectedItem.ToString());

                    foreach (PromotionsEntity p in shHelper.PromotionsList)
                    {
                        if (p.OrgID == promo.OrgID)
                        {
                            promo.Name     = tbNewName.Text;
                            promo.Initals  = tbInitals.Text;
                            promo.Location = cbxLoc.SelectedItem.ToString();

                            pHelper.SavePromotionsList(promo);
                        }
                    }

                    EditMain main = new EditMain();
                    main.Show();
                    this.Hide();
                }
            }
            else
            {
                if (tbInitals.Text == "" || tbNewName.Text == "" || cbxLoc.SelectedItem == null)
                {
                    tbNewName.BackColor = Color.MistyRose;
                    tbInitals.BackColor = Color.MistyRose;
                    cbxLoc.BackColor    = Color.MistyRose;
                }
                else
                {
                    PromotionsEntity promo = new PromotionsEntity()
                    {
                        OrgID    = idHelper.CurrentID(false, false, false, true, false, false, false),
                        Name     = tbNewName.Text,
                        Initals  = tbInitals.Text,
                        Location = cbxLoc.SelectedItem.ToString()
                    };

                    pHelper.SavePromotionsList(promo);

                    EditMain main = new EditMain();
                    main.Show();
                    this.Hide();
                }
            }
        }
Ejemplo n.º 9
0
    public override void Launch(EditMain _editmain)
    {
        base.Launch(_editmain);

        inputField       = editMain.textToolInput;
        inputFieldObject = editMain.textToolInputObject;
        inputField.onEndEdit.AddListener((inputstring) => EndTextEditing());
        inputField.onValueChanged.AddListener(UpdateInputText);
        selectorNode.transform.localScale = DEFAULT_TEXT_SCALE * SELECTOR_NODE_LOCAL_SCALE;
        numManualRotations = 0;
    }
Ejemplo n.º 10
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (lbOrgList.SelectedItems.Count == 1)
            {
                Promotions promo = promos.FirstOrDefault(p => p.Name == lbOrgList.SelectedItem.ToString());

                pHelper.DeletePromotion(promo);

                EditMain main = new EditMain();
                main.Show();
                this.Hide();
            }
        }
Ejemplo n.º 11
0
    public override void Launch(EditMain _editmain)
    {
        base.Launch(_editmain);
        selectionEffect = Instantiate(inspectorEffectPrefab, transform).transform;
        effectColor     = selectionEffect.GetComponent <ToolRingFXColor>();

        selectionEffect.gameObject.SetActive(false);
        inspectorController             = editMain.GetInspectorController();
        inspectorController.onOpenActor = OnOpenActor;
        ForceUpdateTargetActor();

        inspectorController.Show();
    }
Ejemplo n.º 12
0
    public override void Launch(EditMain _editmain)
    {
        base.Launch(_editmain);

        creationLibrary              = editMain.GetCreationLibrarySidebar();
        creationLibrary.updateAsset += UpdateAsset;
        UpdateAsset(creationLibrary.GetLastResult());
        creationLibrary.RequestOpen();
        createToolRay.SetLocalRayOriginTransform(emissionAnchor);
        createToolRay.SetTint(editMain.GetAvatarTint());
        createToolPreview.SetTint(editMain.GetAvatarTint());
        editMain.TryEscapeOutOfCameraView();
    }
Ejemplo n.º 13
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string orgToBeDELETED = lbOrgList.SelectedItem.ToString();

            List <WrestlersEntity> selW     = shHelper.WrestlersList.Where(w => w.CurrentCompanyName == orgToBeDELETED).ToList();
            List <TitlesEntity>    selT     = shHelper.TitlesList.Where(t => t.OwnerOrgName == orgToBeDELETED).ToList();
            List <TeamsEntity>     selTeams = shHelper.TeamsList.Where(te => te.OrgName == orgToBeDELETED).ToList();

            foreach (WrestlersEntity w in selW)
            {
                w.CurrentCompanyName = "";
                w.BrandName          = "";

                w.TeamName = "";


                wHelper.SaveWrestlersList(w);
            }

            foreach (TitlesEntity t in selT)
            {
                t.OwnerOrgName = "";

                tHelper.SaveTitlesList(t);
            }

            //Delete Teams attached to Org (cannot have team w/o org it performs in)
            foreach (TeamsEntity t in selTeams)
            {
                string teamFile = string.Concat(Directory.GetCurrentDirectory(), "\\Saves\\Main\\Teams\\" + t.TeamID + ".dat");

                if (File.Exists(teamFile))
                {
                    File.Delete(teamFile);
                }
            }

            PromotionsEntity promo = shHelper.PromotionsList.FirstOrDefault(p => p.Name == lbOrgList.SelectedItem.ToString());

            string file = string.Concat(Directory.GetCurrentDirectory(), "\\Saves\\Main\\Promotions\\" + promo.OrgID + ".dat");

            if (File.Exists(file))
            {
                File.Delete(file);
            }

            EditMain main = new EditMain();

            main.Show();
            this.Hide();
        }
    bool IsCodeEditorOpen()
    {
        if (editMain == null)
        {
            editMain = FindObjectOfType <EditMain>();
        }

        if (editMain != null)
        {
            return(editMain.IsCodeViewOpen());
        }
        else
        {
            return(false);
        }
    }
Ejemplo n.º 15
0
    public override void Launch(EditMain _editmain)
    {
        base.Launch(_editmain);

        gizmoSelectionFeedback.Setup();

        toolEffectController.originTransform = emissionAnchor;
        toolEffectController.SetTint(editMain.GetAvatarTint());
        moveToolSettings = Instantiate(moveToolSettingsPrefab, editMain.topLeftAnchor);
        moveToolSettings.Setup();
        dummyTransform = new GameObject("MoveDummyTransform").transform;
        dummyTransform.SetParent(transform);
        LoadToolMemory();

        ForceUpdateTargetActor();
    }
Ejemplo n.º 16
0
    public override void Launch(EditMain _editmain)
    {
        base.Launch(_editmain);

        rotateSelectionFeedback.Setup();

        rotateToolSettings = Instantiate(rotateToolSettingsPrefab, editMain.topLeftAnchor);
        rotateToolSettings.Setup();
        toolEffectController.SetTint(editMain.GetAvatarTint());
        toolEffectController.originTransform = emissionAnchor;
        internalTransform = new GameObject().transform;

        LoadToolMemory();

        ForceUpdateTargetActor();
    }
Ejemplo n.º 17
0
 public ActorInfo(VoosActor actor, EditMain editMain)
 {
     this.actor    = actor;
     hierarchyPath = new List <ActorHierarchyInfo>();
     for (VoosActor thisActor = actor; thisActor != null; thisActor = thisActor.GetParentActor())
     {
         ActorHierarchyInfo info = new ActorHierarchyInfo();
         info.name        = thisActor.name;
         info.displayName = thisActor.GetDisplayName();
         if (editMain != null)
         {
             info.distance = Vector3.Distance(editMain.GetAvatarPosition(), thisActor.GetPosition());
         }
         hierarchyPath.Insert(0, info);
     }
 }
Ejemplo n.º 18
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string wrestToBeDELETED = lbWrestlerList.SelectedItem.ToString();

            WrestlersEntity wrest = shHelper.WrestlersList.FirstOrDefault(w => w.Name == wrestToBeDELETED);

            string file = string.Concat(Directory.GetCurrentDirectory(), "\\Saves\\Main\\Wrestlers\\" + wrest.WrestlerID + ".dat");

            if (File.Exists(file))
            {
                File.Delete(file);
            }

            EditMain main = new EditMain();

            main.Show();
            this.Hide();
        }
Ejemplo n.º 19
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string teamToBeDELETED = lbChampList.SelectedItem.ToString();

            TitlesEntity title = tHelper.PopulateTitlesList().FirstOrDefault(t => t.Name == teamToBeDELETED);

            string file = string.Concat(Directory.GetCurrentDirectory(), "\\Saves\\Main\\Titles\\" + title.TitleID + ".dat");

            if (File.Exists(file))
            {
                File.Delete(file);
            }

            EditMain main = new EditMain();

            main.Show();
            this.Hide();
        }
Ejemplo n.º 20
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (tbNewName.Text == null || tbInitals.Text == null || cbxLoc.SelectedItem == null)
            {
                tbNewName.BackColor = Color.MistyRose;
                tbInitals.BackColor = Color.MistyRose;
                cbxLoc.BackColor    = Color.MistyRose;
            }
            else
            {
                Promotions newPromo = new Promotions()
                {
                    Name     = tbNewName.Text,
                    Initals  = tbInitals.Text,
                    Location = cbxLoc.SelectedItem.ToString()
                };

                pHelper.SavePromotionsList(newPromo);

                EditMain main = new EditMain();
                main.Show();
                this.Hide();
            }
        }
Ejemplo n.º 21
0
    public override void Launch(EditMain _editmain)
    {
        base.Launch(_editmain);

        logicSidebar    = editMain.GetLogicSidebar();
        selectionEffect = Instantiate(inspectorEffectPrefab, transform).transform;
        selectionEffect.GetComponent <ToolRingFXColor>().SetTint(editMain.GetAvatarTint());

        selectionEffect.gameObject.SetActive(false);

        logicSidebar.OnSwitchToCodeView = OnSwitchToCodeView;
        logicSidebar.OnSwitchToCardView = OnSwitchToCardView;

        logicSidebar.onOpenActor = OnOpenActor;

        if (toolMemory.logicTabIndex == 0)
        {
            logicSidebar.SetToCardView();
        }
        else
        {
            logicSidebar.SetToCodeView();
        }

        if (editMain.GetSingleTargetActor() != null)
        {
            if (!(editMain.GetSingleTargetActor() == toolMemory.logicActor && toolMemory.logicSidebarClosed))
            {
                ForceUpdateTargetActor();
            }
        }
        else
        {
            logicSidebar.OpenWithParams(null);
        }
    }
Ejemplo n.º 22
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (isEdit)
            {
                if (tbNewName.Text == "" ||
                    cbxWeight.SelectedItem == null ||
                    cbxSpec.SelectedItem == null ||
                    cbxAsscOrg.SelectedItem == null ||
                    cbxGenre.SelectedItem == null
                    )
                {
                    tbNewName.BackColor  = Color.MistyRose;
                    cbxWeight.BackColor  = Color.MistyRose;
                    cbxSpec.BackColor    = Color.MistyRose;
                    cbxAsscOrg.BackColor = Color.MistyRose;
                    cbxGenre.BackColor   = Color.MistyRose;
                }
                else
                {
                    TitlesEntity title = tHelper.PopulateTitlesList().FirstOrDefault(ti => ti.Name == lbChampList.SelectedItem.ToString());

                    foreach (TitlesEntity t in storeHelper.TitlesList)
                    {
                        if (t.TitleID == title.TitleID)
                        {
                            title.Name           = tbNewName.Text;
                            title.WeightClass    = cbxWeight.SelectedItem.ToString();
                            title.OwnerOrgName   = cbxAsscOrg.SelectedItem.ToString();
                            title.Specialization = cbxSpec.SelectedItem.ToString();
                            title.GenereType     = cbxGenre.SelectedItem.ToString();

                            tHelper.SaveTitlesList(title);

                            EditMain main = new EditMain();
                            main.Show();
                            this.Hide();
                        }
                    }
                }
            }
            else
            {
                if (tbNewName.Text == "" ||
                    cbxWeight.SelectedItem == null ||
                    cbxSpec.SelectedItem == null ||
                    cbxAsscOrg.SelectedItem == null ||
                    cbxGenre.SelectedItem == null
                    )
                {
                    tbNewName.BackColor  = Color.MistyRose;
                    cbxWeight.BackColor  = Color.MistyRose;
                    cbxSpec.BackColor    = Color.MistyRose;
                    cbxAsscOrg.BackColor = Color.MistyRose;
                    cbxGenre.BackColor   = Color.MistyRose;
                }
                else
                {
                    TitlesEntity title = new TitlesEntity()
                    {
                        TitleID        = idHelper.CurrentID(false, false, false, false, false, true, false),
                        Name           = tbNewName.Text,
                        WeightClass    = cbxWeight.SelectedItem.ToString(),
                        OwnerOrgName   = cbxAsscOrg.SelectedItem.ToString(),
                        Specialization = cbxSpec.SelectedItem.ToString(),
                        GenereType     = cbxGenre.SelectedItem.ToString()
                    };

                    tHelper.SaveTitlesList(title);

                    EditMain main = new EditMain();
                    main.Show();
                    this.Hide();
                }
            }
        }
Ejemplo n.º 23
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (isEdit)
            {
                WrestlersEntity wrest = shHelper.WrestlersList.FirstOrDefault(w => w.Name == lbWrestlerList.SelectedItem.ToString());

                foreach (WrestlersEntity w in shHelper.WrestlersList)
                {
                    if (w.WrestlerID == wrest.WrestlerID)
                    {
                        if (tbNewName.Text == "" || cbxWeight.SelectedItem == null)
                        {
                            tbNewName.BackColor = Color.MistyRose;
                            cbxWeight.BackColor = Color.MistyRose;
                        }
                        else
                        {
                            int wins   = 0;
                            int losses = 0;
                            int draws  = 0;

                            int tempWins  = 0;
                            int tempLoss  = 0;
                            int tempDraws = 0;

                            if (tbWins.Text == "" ||
                                tbLosses.Text == "" ||
                                tbDraws.Text == "")
                            {
                                wins   = 0;
                                losses = 0;
                                draws  = 0;
                            }
                            else if (int.TryParse(tbWins.Text, out tempWins) &&
                                     int.TryParse(tbLosses.Text, out tempLoss) &&
                                     int.TryParse(tbDraws.Text, out tempDraws))
                            {
                                wins   = tempWins;
                                losses = tempLoss;
                                draws  = tempDraws;

                                IDSetterHelper idHelper = new IDSetterHelper();

                                string assocCo = "";

                                if (cbxAsscCo.SelectedItem != null)
                                {
                                    assocCo = cbxAsscCo.SelectedItem.ToString();
                                }
                                else
                                {
                                    assocCo = "";
                                }

                                wrest.Name               = tbNewName.Text;
                                wrest.WeightClass        = cbxWeight.SelectedItem.ToString();
                                wrest.CurrentCompanyName = assocCo;
                                wrest.Wins               = wins;
                                wrest.Losses             = losses;
                                wrest.Draws              = draws;

                                wHelper.SaveWrestlersList(wrest);

                                EditMain main = new EditMain();
                                main.Show();
                                this.Hide();
                            }
                        }
                    }
                }
            }
            else
            {
                if (tbNewName.Text == "" || cbxWeight.SelectedItem == null)
                {
                    tbNewName.BackColor = Color.MistyRose;
                    cbxWeight.BackColor = Color.MistyRose;
                }
                else
                {
                    int wins   = 0;
                    int losses = 0;
                    int draws  = 0;

                    int tempWins  = 0;
                    int tempLoss  = 0;
                    int tempDraws = 0;

                    if (tbWins.Text == "" ||
                        tbLosses.Text == "" ||
                        tbDraws.Text == "")
                    {
                        wins   = 0;
                        losses = 0;
                        draws  = 0;
                    }
                    else if (int.TryParse(tbWins.Text, out tempWins) &&
                             int.TryParse(tbLosses.Text, out tempLoss) &&
                             int.TryParse(tbDraws.Text, out tempDraws))
                    {
                        wins   = tempWins;
                        losses = tempLoss;
                        draws  = tempDraws;

                        IDSetterHelper idHelper = new IDSetterHelper();

                        string assocCo   = "";
                        string brandName = "";

                        if (cbxAsscCo.SelectedItem != null)
                        {
                            assocCo = cbxAsscCo.SelectedItem.ToString();
                        }
                        else
                        {
                            assocCo = "";
                        }

                        WrestlersEntity wrest = new WrestlersEntity()
                        {
                            WrestlerID         = idHelper.CurrentID(false, false, false, false, false, false, true),
                            Name               = tbNewName.Text,
                            WeightClass        = cbxWeight.SelectedItem.ToString(),
                            CurrentCompanyName = assocCo,

                            Wins   = Convert.ToInt32(tbWins.Text),
                            Losses = Convert.ToInt32(tbLosses.Text),
                            Draws  = Convert.ToInt32(tbDraws.Text),

                            BrandName = brandName,

                            TeamName = ""
                        };

                        wHelper.SaveWrestlersList(wrest);

                        EditMain main = new EditMain();
                        main.Show();
                        this.Hide();
                    }
                }
            }
        }
Ejemplo n.º 24
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (isEdit)
            {
                TeamsEntity team = storeHelper.TeamsList.FirstOrDefault(t => t.TeamName == lbTeamList.SelectedItem.ToString());

                foreach (TeamsEntity t in storeHelper.TeamsList)
                {
                    if (team.TeamID == t.TeamID)
                    {
                        if (tbNewName.Text == "")
                        {
                            tbNewName.BackColor = Color.MistyRose;
                        }
                        else
                        {
                            int    wins   = 0;
                            int    losses = 0;
                            int    draws  = 0;
                            string asscCo;

                            int tempWins  = 0;
                            int tempLoss  = 0;
                            int tempDraws = 0;

                            if (tbWins.Text == "" ||
                                tbLosses.Text == "" ||
                                tbDraws.Text == "")
                            {
                                wins   = 0;
                                losses = 0;
                                draws  = 0;
                            }
                            else if (int.TryParse(tbWins.Text, out tempWins) &&
                                     int.TryParse(tbLosses.Text, out tempLoss) &&
                                     int.TryParse(tbDraws.Text, out tempDraws))
                            {
                                wins   = tempWins;
                                losses = tempLoss;
                                draws  = tempDraws;

                                if (string.IsNullOrWhiteSpace(cbxAsscCo.SelectedItem.ToString()))
                                {
                                    asscCo = "";
                                }
                                else
                                {
                                    asscCo = cbxAsscCo.SelectedItem.ToString();
                                }

                                team.TeamName = tbNewName.Text;
                                team.OrgName  = asscCo;
                                team.Wins     = wins;
                                team.Losses   = losses;
                                team.Draws    = draws;

                                tHelper.SaveTeamsList(team);

                                EditMain main = new EditMain();
                                main.Show();
                                this.Hide();
                            }
                            else
                            {
                                tbWins.BackColor   = Color.MistyRose;
                                tbLosses.BackColor = Color.MistyRose;
                                tbDraws.BackColor  = Color.MistyRose;
                            }
                        }
                    }
                }
            }
            else
            {
                if (tbNewName.Text == "")
                {
                    tbNewName.BackColor = Color.MistyRose;
                }
                else
                {
                    int    wins   = 0;
                    int    losses = 0;
                    int    draws  = 0;
                    string asscCo;

                    int tempWins  = 0;
                    int tempLoss  = 0;
                    int tempDraws = 0;

                    if (tbWins.Text == "" ||
                        tbLosses.Text == "" ||
                        tbDraws.Text == "")
                    {
                        wins   = 0;
                        losses = 0;
                        draws  = 0;
                    }
                    else if (int.TryParse(tbWins.Text, out tempWins) &&
                             int.TryParse(tbLosses.Text, out tempLoss) &&
                             int.TryParse(tbDraws.Text, out tempDraws))
                    {
                        wins   = tempWins;
                        losses = tempLoss;
                        draws  = tempDraws;

                        TeamsEntity team = storeHelper.TeamsList.FirstOrDefault(t => t.TeamName == lbTeamList.SelectedItem.ToString());

                        if (string.IsNullOrWhiteSpace(cbxAsscCo.SelectedItem.ToString()))
                        {
                            asscCo = "";
                        }
                        else
                        {
                            asscCo = cbxAsscCo.SelectedItem.ToString();
                        }


                        TeamsEntity newTeam = new TeamsEntity()
                        {
                            TeamID   = idHelper.CurrentID(false, false, false, false, true, false, false),
                            TeamName = tbNewName.Text,
                            OrgName  = asscCo,
                            Wins     = wins,
                            Losses   = losses,
                            Draws    = draws
                        };

                        tHelper.SaveTeamsList(newTeam);

                        EditMain main = new EditMain();
                        main.Show();
                        this.Hide();
                    }
                    else
                    {
                        tbWins.BackColor   = Color.MistyRose;
                        tbLosses.BackColor = Color.MistyRose;
                        tbDraws.BackColor  = Color.MistyRose;
                    }
                }
            }
        }