Beispiel #1
0
        /// <summary>
        /// Add a E-cell class of this ComponentSetting.
        /// </summary>
        /// <param name="type">a type of class</param>
        private void AddCreateMethod(string type)
        {
            PPathwayObject obj = null;
            switch (type)
            {
                case EcellObject.SYSTEM:
                    obj = new PPathwaySystem();
                    break;
                case EcellObject.PROCESS:
                    obj = new PPathwayProcess();
                    break;
                case EcellObject.VARIABLE:
                    obj = new PPathwayVariable();
                    break;
                case EcellObject.TEXT:
                    obj = new PPathwayText();
                    break;
                case EcellObject.STEPPER:
                    obj = new PPathwayStepper();
                    break;
                default:
                    throw new PathwayException(MessageResources.ErrUnknowType);
            }

            m_createMethod = obj.CreateNewObject;
        }
Beispiel #2
0
        /// <summary>
        /// Set text menu items.
        /// </summary>
        /// <param name="text"></param>
        private void SetTextAlignmenu(PPathwayText text)
        {
            StringAlignment align = text.PText.TextAlignment;
            this.toolStripAlignLeft.Enabled = align != StringAlignment.Near;
            this.toolStripAlignCenter.Enabled = align != StringAlignment.Center;
            this.toolStripAlignRight.Enabled = align != StringAlignment.Far;

            this.toolStripAlignLeft.Checked = align == StringAlignment.Near;
            this.toolStripAlignCenter.Checked = align == StringAlignment.Center;
            this.toolStripAlignRight.Checked = align == StringAlignment.Far;
        }