Beispiel #1
0
        /*******************************************************************************************************************\
        *                                                                                                                 *
        \*******************************************************************************************************************/

        private void tbxShift_TextChanged(object sender, EventArgs e)
        {
            // Mark the crew

            TextBox tbx = (TextBox)sender;

            //Boatcrew b = (Boatcrew)(tbx.Tag);
            //string name = b.boat.ToString() + b.idx.ToString();
            //int shift = 0;

            Boat b = _nboats.Get(tbx.Text);

            for (int i = 0; i < tlpCrew.RowCount; i++)
            {
                ucStat uc = (ucStat)tlpCrew.GetControlFromPosition(0, i);

                //uc.RefreshShift((Boatcrew)(tbx.Tag), shift);
                uc.RefreshShift(b);
            }
        }
Beispiel #2
0
        /*******************************************************************************************************************\
        *                                                                                                                 *
        \*******************************************************************************************************************/

        private void update_vessels()
        {
            //foreach (var v in _oboats)
            //{
            //    List<Boatcrew> blst = (List<Boatcrew>)(v.Value);

            //    int shift = 0;
            //    foreach (Boatcrew b in blst)
            //        shift |= b.shiftid;

            //    for (int i = 0; i < tlpCrew.RowCount; i++)
            //    {
            //        ucStat uc = (ucStat)tlpCrew.GetControlFromPosition(0, i);

            //        uc.RefreshShift(blst[0], shift);
            //    }
            //}

            foreach (var v in _nboats._boats)
            {
                //List<Boat> blst = (List<Boat>)(v.Value);

                //int shift = 0;
                //foreach (Boat b in blst)
                //    shift |= b.shiftid;

                Boat b = _nboats.Get(v.Key);

                for (int i = 0; i < tlpCrew.RowCount; i++)
                {
                    ucStat uc = (ucStat)tlpCrew.GetControlFromPosition(0, i);

                    //uc.RefreshShift(blst[0], shift);
                    uc.RefreshShift(b);
                }
            }
        }