Exemplo n.º 1
0
        public IList <IController> FinController(string controllerId)
        {
            List <IController> controllers = new List <IController>();

            foreach (KeyValuePair <string, Control> pair in this._documents)
            {
                IWorkspace1 workspace  = pair.Value as IWorkspace1;
                IController controller = workspace.FindController(controllerId);
                if (controller != null)
                {
                    controllers.Add(controller);
                }
            }
            return(controllers);
        }
        public bool IsValid(object owner, Condition condition)
        {
            if (!(owner is IWorkspace1))
            {
                return(false);
            }
            IWorkspace1           workspace  = (IWorkspace1)owner;
            AppointmentController controller = workspace.FindController <AppointmentController>("");

            if (controller != null)
            {
                SchedulerViewType viewType;
                bool parseSuccess = SchedulerViewType.TryParse(condition.Name, true, out viewType);
                if (parseSuccess)
                {
                    return(controller.IsTheSameActiveViewType(viewType));
                }
            }
            return(false);
        }