Esempio n. 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="tools">Tools</param>
 /// <param name="ext">Extension of files</param>
 public FormDesktop(ToolsDiagram tools, string ext)
     : this()
 {
     Text = ResourceService.Resources.GetControlResource("Desktop", ControlUtilites.Resources) + " " + nDesktop;
     ++nDesktop;
     desktop = new PanelDesktop(tools);
     StaticExtensionDiagramUI.CurrentDeskop = desktop;
     desktop.Extension  = ext;
     desktop.AutoScroll = true;
     desktop.Dock       = DockStyle.Fill;
     panelCenter.Controls.Add(desktop);
     desktop.ResizeImage();
     ToolBox.EditorReceiver.AddEditorDrag(desktop);
     ToolBox.PictureReceiver.AddImageDrag(desktop);
 }
Esempio n. 2
0
        /// <summary>
        /// Creates Arrow Control
        /// </summary>
        /// <param name="control">Base Control</param>
        /// <param name="tools">Tools</param>
        public static void CreateArrowControl(Control control, ToolsDiagram tools)
        {
            PaletteToolBar toolBar   = new PaletteToolBar(tools);
            ImageList      imageList = new ImageList();

            imageList.ImageSize = new Size(25, 25);
            imageList.Images.Add(ResourceImage._object);
            imageList.Images.Add(ResourceImage.Arrow);
            toolBar.ImageList = imageList;
            toolBar.ImageList = imageList;

            PaletteButton p = new PaletteButton(toolBar, null, null, "", "Selection arrow", imageList.Images[0], 0, true);

            p.Visible = false;

            new PaletteButton(toolBar, null, null, "", "Selection arrow", imageList.Images[1], 1, true);
            control.Controls.Add(toolBar);
        }
Esempio n. 3
0
        /// <summary>
        /// Creates property editor from of desktop component
        /// </summary>
        /// <param name="comp">The component</param>
        /// <returns>The property editor</returns>
        public override object CreateForm(INamedComponent comp)
        {
            // Checks whether component is an arrow
            if (comp is IArrowLabel)
            {
                IArrowLabel    lab   = comp as IArrowLabel;
                ICategoryArrow arrow = lab.Arrow;

                /*!!! FOR ARTICLE SAMPLE if (arrow is Motion6D.MechanicalAggregateLink)
                 * {
                 *  return new Motion6D.UI.FormAggregateLink(lab);
                 * }*/
            }
            // The component is an object
            if (comp is IObjectLabel)
            {
                IObjectLabel lab = comp as IObjectLabel;
                // The object of component
                ICategoryObject obj  = lab.Object;
                Form            form = ToolsDiagram.CreateEditorForm(obj);
                if (form != null)
                {
                    return(form);
                }

                // Creation of iterator property editor
                if (obj is Regression.IteratorGLM)
                {
                    return(new FormIterateGLM(lab));
                }
                // Creation of VectorFormulaConsumer property editor
                if (obj is VectorFormulaConsumer)
                {
                    return(new DataPerformer.UI.Forms.FormVectorConsumer(lab));
                }
                if (obj.GetType().Equals(typeof(DataPerformer.Series)))
                {
                    object[] array = new object[] { (int)0, System.Drawing.Color.Red, new System.Collections.ICollection[0], true };
                    return(new DataPerformer.UI.Forms.FormSeries(lab, array));
                }
                if (obj is Table3D)
                {
                    return(new DataPerformer.UI.Forms.FormTable3D(lab));
                }
                if (obj is DataPerformer.Helpers.DataPerformerCollectionStateTransformer)
                {
                    return(new DataPerformer.UI.Forms.FormDataPerformerCollectionStateTransformer(lab));
                }
                if (obj is MatrixAssembly)
                {
                    return(new DataPerformer.UI.FormMatrixAssembly(lab));
                }
                if (obj is VectorAssembly)
                {
                    return(new FormVectorAssembly(lab));
                }
                if (obj is ArrayDisassembly)
                {
                    return(new FormArrayDisassembly(lab));
                }
                if (obj is ArrayTransformer)
                {
                    return(new DataPerformer.UI.Forms.FormArrayTransformer(lab));
                }
                if (obj is DataPerformer.ObjectTransformer)
                {
                    return(new DataPerformer.UI.Forms.FormObjectTransformer(lab));
                }
                if (obj is Chart.Objects.DrawSeries)
                {
                    return(new DataPerformer.UI.FormPointCollection(lab));
                }
                if (obj is DataPerformer.Helpers.KalmanFilter)
                {
                    return(new DataPerformer.UI.Forms.FormKalmanFilter(lab));
                }
                if (obj is FunctionAccumulator)
                {
                    return(new DataPerformer.UI.Forms.FormFuncAccumulator(lab));
                }
                if (obj is Regression.CombinedSelection)
                {
                    return(new FormCombinedSelection(lab));
                }
                if (obj is FormulaFilterIterator)
                {
                    return(new DataPerformer.UI.FormIteratorFilter(lab));
                }
                if (obj is DifferentialEquationSolver)
                {
                    return(new DataPerformer.UI.Forms.FormDiffEquation(lab));
                }
                if (obj is Recursive)
                {
                    return(new DataPerformer.UI.Forms.FormRecursive(lab));
                }
                if (obj is Regression.XmlSelectionCollection)
                {
                    return(new DataPerformer.UI.FormXmlSelection(lab));
                }
                if (obj is Regression.AliasRegression)
                {
                    return(new DataPerformer.UI.Forms.FormAliasRegression(lab));
                }
            }
            return(null);
        }