Esempio n. 1
0
 private void UnLeased_SlipSelect(object sender, Controls.SlipsEventArgs e)
 {
     uxId.Text     = e.ID;
     uxWidth.Text  = e.Width;
     uxLength.Text = e.Length;
     uxDockID.Text = e.DockID;
 }
        protected void UxLeases_SelectedIndexChanged(object sender, EventArgs e)
        {
            // this is what invokes the event on selection when slip is selected

            if (SlipSelect != null)
            {
                // the the selected DockID and cast it to an intiger
                var dkId = Convert.ToInt32(UxLeases.SelectedValue);

                // call the manager class to get the slip object
                Slip slp = MarinaManager.Find(dkId);
                // instantiate the SlipsEventArgs class
                var arg = new SlipsEventArgs
                {
                    ID     = slp.ID.ToString(),
                    Width  = slp.Width.ToString(),
                    Length = slp.Length.ToString(),
                    DockID = slp.DockID.ToString(),
                };

                // invoke the event and pass the param values
                SlipSelect.Invoke(this, arg);
            }
        }