Canguro.Commands.Load.TemperatureGradientLineLoadCmd.Run C# (CSharp) Метод

Run() публичный Метод

Executes the command. Creates, gets parameters and add a Distributed line load to the selected line elements.
public Run ( Canguro services ) : void
services Canguro CommandServices object to interact with the system
Результат void
        public override void Run(Canguro.Controller.CommandServices services)
        {
            TemperatureGradientLineLoad load = new TemperatureGradientLineLoad();

            if (Canguro.Controller.Grid.LoadEditFrm.EditLoad(load) == System.Windows.Forms.DialogResult.OK)
            {

                List<Item> selection = services.GetSelection();

                foreach (Item item in selection)
                {
                    if (item is LineElement)
                        ((LineElement)item).Loads.Add((TemperatureGradientLineLoad)load.Clone());
                }
            }
        }
TemperatureGradientLineLoadCmd