/// <summary>
 /// Initializes a new instance of the UserNavigationBar class.
 /// </summary>
 /// <param name="viewManager">
 /// The view management system used to enact commands from the user bar
 /// </param>
 public UserNavigationBar(ViewManager viewManager)
 {
     InitializeComponent();
     this.viewManager = viewManager;
     this.slidezoom.Minimum = -20;
     this.slidezoom.Maximum = 20;
        //// this.slidezoom.Value = 19;
     this.slidezoom.LargeChange = 3;
     this.slidezoom.SmallChange = 1;
        //// this.slidezoom.sm
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the LinkViewManager class.
        /// </summary>
        /// <param name="link">the node you want to manage</param>
        /// <param name="viewManager">the view management system</param>
        public LinkViewManager(model.Link link, ViewManager viewManager)
        {
            // set the node field
            this.link = link;
            this.link.GUIDataChanged += new EventHandler(this.Link_GUIDataChanged);

            // set the view manager pointer
            this.viewManager = viewManager;
            this.viewManager.ZoomRatioChanged += new EventHandler(this.ViewManager_ZoomRatioChanged);

            // set the style
            this.SetStyle();

            // create the corresponding view
            this.SetGUIComponent();

            this.TryUpdateGUIData();
        }
Esempio n. 3
0
        /// <summary>
        /// this function creates the view manager and set the events listening
        /// </summary>
        private void InitializeViewManager()
        {
            this.viewManager = new view.ViewManager(this.modelManager);

            this.viewManager.DecreaseDepth += delegate(object sender, EventArgs e)
            {
                this.modelManager.DecreaseDepth();
            };
            this.viewManager.IncreaseDepth += delegate(object sender, EventArgs e)
            {
                this.modelManager.IncreaseDepth();
            };
        }
Esempio n. 4
0
        /// <summary>
        /// Initializes a new instance of the NodeViewManager class.
        /// </summary>
        /// <param name="node">node you want to represent</param>
        /// <param name="viewManager">parent management system</param>
        public NodeViewManager(model.Node node, ViewManager viewManager)
        {
            // set the node field
            this.node = node;
            this.node.GUIDataChanged += new EventHandler(this.Node_GUIDataChanged);
            this.node.SelectionChanged += new EventHandler(this.Node_SelectionChanged);

            // set the view manager pointer
            this.viewManager = viewManager;
            this.viewManager.ZoomRatioChanged += new EventHandler(this.ViewManager_ZoomRatioChanged);

            // set the style
            this.SetStyle();

            // create the corresponding view
            this.SetGUIComponent();

            // update information from the node
            // we ask for an update of "node"
            this.TryUpdateGUIData();

            this.TryUpdateSelectionState();
        }