Пример #1
0
 void IStartStop.Action(object type, ActionType actionType)
 {
     if (child is IStartStop)
     {
         IStartStop ss = child as IStartStop;
         ss.Action(type, actionType);
     }
 }
        /// <summary>
        /// Performs start stop action
        /// </summary>
        /// <param name="desktop">Desktop</param>
        /// <param name="type">Action type</param>
        /// <param name="actionType">True in start and false in stop</param>
        static public void Action(this IDesktop desktop, object type, ActionType actionType)
        {
            IEnumerable <object> comp = desktop.AllComponents;

            foreach (object o in comp)
            {
                if (o is IStartStop)
                {
                    IStartStop ss = o as IStartStop;
                    ss.Action(type, actionType);
                }
            }
        }
 /// <summary>
 /// Performs action with form
 /// </summary>
 /// <param name="form">Form for action</param>
 /// <param name="type">Action type</param>
 /// <param name="actionType">Type of action</param>
 public static void Action(this Form form, object type, ActionType actionType)
 {
     if (form != null)
     {
         if (!form.IsDisposed)
         {
             if (form is IStartStop)
             {
                 IStartStop ss = form as IStartStop;
                 ss.Action(type, actionType);
             }
         }
     }
 }
Пример #4
0
        void IStartStop.Action(object type, Diagram.UI.Interfaces.ActionType actionType)
        {
            this.actionType = actionType;
            if (form == null)
            {
                return;
            }
            if (form.IsDisposed)
            {
                return;
            }
            IStartStop ss = form;

            ss.Action(type, actionType);
        }
Пример #5
0
        void IStartStop.Action(object type, ActionType actionType)
        {
            IStartStop ss = child;

            ss.Action(type, actionType);
        }
Пример #6
0
        void IStartStop.Action(object type, ActionType actionType)
        {
            IStartStop ss = label;

            ss.Action(type, actionType);
        }