///<summary> /// Default constructor for FerdaView class. ///</summary> ///<param name="locManager"> /// Interface that takes care of the ///localizacion in the application /// </param> ///<param name="svgMan"> /// Interface for providing SVG graphics ///</param> ///<param name="menuDisp">Menu displayer</param> ///<param name="view">The view thath should be connected to this desktop</param> ///<param name="pm">The project manager of the application</param> ///<param name="arch">Control that displays the archive</param> ///<param name="provider">Provider of the icons</param> ///<param name="toolBar">Toolbar control</param> public FerdaDesktop(Menu.ILocalizationManager locManager, SVGManager svgMan, IMenuDisplayer menuDisp, ProjectManager.View view, ProjectManager.ProjectManager pm, Archive.IArchiveDisplayer arch, IIconProvider provider, IMenuDisplayer toolBar) : base() { //setting the icon this.provider = provider; //adding the localization localizationManager = locManager; ResManager = localizationManager.ResManager; //adding the svgManager svgManager = svgMan; //setting the menu displayer menuDisplayer = menuDisp; archiveDisplayer = arch; this.toolBar = toolBar; //Current view this.view = view; projectManager = pm; //name of the desktop Name = view.Name; //properties od the GraphControl to work propertly AllowMoveShape = true; AllowAddConnection = true; AllowAddShape = true; AllowDeleteShape = true; AllowDrop = true; AutoScroll = true; EnableContextMenu = true; EnableLayout = false; ShowGrid = false; Zoom = 1; RestrictToCanvas = false; this.ImeMode = System.Windows.Forms.ImeMode.On; //for now trial stuff BackgroundType = Netron.GraphLib.CanvasBackgroundTypes.Gradient; GradientTop = System.Drawing.Color.SkyBlue; //EventHandlers GotFocus += new EventHandler(FerdaDesktop_GotFocus); OnContextMenu += new MouseEventHandler(FerdaDesktop_ContextMenu); OnNewConnection += new NewConnection(FerdaDesktop_OnNewConnection); KeyPress += new KeyPressEventHandler(FerdaDesktop_KeyPress); OnFerdaMouseUp += new MouseEventHandler(FerdaDesktop_OnFerdaMouseUp); OnFerdaDeleteConnection += new FerdaConnection(FerdaDesktop_OnFerdaDeleteConnection); OnShapeRemoved += new NewShape(FerdaDesktop_OnShapeRemoved); //Setting the arrow for connections DefaultLineEnd = ConnectionEnds.RightFilledArrow; //Creation of the boxes and connections Adapt(); }
/// <summary> /// Constructor of the class when we want to get a property /// </summary> /// <param name="box">Box</param> /// <param name="res">Default resource manager</param> /// <param name="name">name of the property</param> /// <param name="views">Views to be refreshed</param> /// <param name="prop">To reset the propertygrid afterwards</param> /// <param name="arch">archive of the application</param> public OtherProperty(IBoxModule box, string name, Archive.IArchiveDisplayer arch, List<Desktop.IViewDisplayer> views, IPropertiesDisplayer prop, ResourceManager res) { this.box = box; this.propertyName = name; this.result = String.Empty; archiveDisplayer = arch; viewDisplayers = views; propertiesDisplayer = prop; resManager = res; }
/// <summary> /// Default constructor for the class /// </summary> /// <param name="arch">archive of the application</param> /// <param name="b">The property belongs to this boxes</param> /// <param name="name">Name of the property</param> /// <param name="res">Default resource manager</param> /// <param name="views">Views to be refreshed</param> /// <param name="prop">To reset the propertygrid afterwards</param> /// <param name="label">Label, that is selected in the sequence</param> public StringSequence(string name, IBoxModule [] b, ResourceManager res, Archive.IArchiveDisplayer arch, List<Desktop.IViewDisplayer> views, IPropertiesDisplayer prop, string label) { boxes = b; propertyName = name; resManager = res; this.selectedLabel = label; archiveDisplayer = arch; viewDisplayers = views; propertiesDisplayer = prop; }