///<summary>
        /// Default constructor for FerdaContextHelp class.
        ///</summary>
        ///<param name="locManager">Manager of the localization of the application</param>
        ///<param name="menuDisp">The displayer of the menu</param>
        ///<param name="toolBar">The toolbar of the application</param>
        public FerdaContextHelp(ILocalizationManager locManager, IMenuDisplayer menuDisp, 
            IMenuDisplayer toolBar)
            : base()
        {
            //setting the localization
            localizationManager = locManager;
            ResManager = localizationManager.ResManager;

            //setting the menu displayer
            menuDisplayer = menuDisp;
            this.toolBar = toolBar;

            InitializeComponent();

            //setting the focus
            GotFocus += new EventHandler(FerdaContextHelp_GotFocus);

            //reseting the component
            Reset();

            //setting the text of the tutorial link label
            LLTutorial.Text = ResManager.GetString("ContextHelpStart");
        }
        ///<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();
        }
예제 #3
0
파일: UserMenu.cs 프로젝트: linshitrit/Menu
 public UserMenu(IMenuDisplayer <T> displayer, IDataReader <T> dataReader, IWriter writer)
 {
     Displayer  = displayer;
     DataReader = dataReader;
     Writer     = writer;
 }
        ///<summary>
        /// Default constructor for FerdaPropertyGrid class.
        ///</summary>
        ///<param name="locManager">Localization manager of the application</param>
        ///<param name="menuDisp">Menu of the application</param>
        ///<param name="toolBar">Toolbar of the application</param>
        public FerdaPropertyGrid(Menu.ILocalizationManager locManager,
            IMenuDisplayer menuDisp, IMenuDisplayer toolBar)
            : base()
        {
            viewDisplayers = new List<IViewDisplayer>();

            localizationManager = locManager;
            ResManager = localizationManager.ResManager;

            //setting the menu displayer
            menuDisplayer = menuDisp;
            this.toolBar = toolBar;

            //Setting the size
            Size = new System.Drawing.Size(170, 500);

            //setting the focus
            Enter += new EventHandler(FerdaPropertyGrid_Enter);
        }