public CustomParameterTextBoxWeb()
        {
            myHelper = new ViewComponentHelper(this, UpdateType.Parameter);

            InitializeComponent();
        }
Exemple #2
0
        public ListDialog(String p_listAddFromScreen, String p_listItemType, String p_listLinkType, IController p_listController, int p_rootIDForList, String p_callingLinkType, IController p_callingController, int p_callingRootID)
            : base()
        {
            myHelper = new ViewComponentHelper(this);

            InitializeComponent();

            CreateColumns();

            m_listLinkType = p_listLinkType;
            m_callingLinkType = p_callingLinkType;

            m_listItemType = p_listItemType;

            m_rootIDForList = p_rootIDForList;
            m_callingRootID = p_callingRootID;

            listController = p_listController;
            callingController = p_callingController;

            amountToAddUpDown = new NumericUpDown();
            this.myScrollingListView.Controls.Add(amountToAddUpDown);
            amountToAddUpDown.Hide();

            this.myScrollingListView.ItemSelectionChanged += new ListViewItemSelectionChangedEventHandler(listView1_ItemSelectionChanged);
            this.myScrollingListView.DoubleClick += new EventHandler(ListDialog_DoubleClick);
            this.myScrollingListView.HScrollMoved += new EventHandler(listView1_ScrollMoved);
            this.myScrollingListView.VScrollMoved += new EventHandler(listView1_ScrollMoved);
            this.myScrollingListView.MouseWheelRotated += new EventHandler(listView1_MouseWheelRotated);

            this.amountToAddUpDown.KeyDown += new KeyEventHandler(newNumericUpDown_KeyDown);

            // initialize label
            ComponentOptions compOptions = new ComponentOptions();
            compOptions.LevelDown = 0;

            IXPathNavigable callingInfoIXP = callingController.GetComponentAndChildren(m_callingRootID, p_callingLinkType, compOptions);
            XPathNavigator callingNavigator = callingInfoIXP.CreateNavigator();

            XPathNavigator callingRootComponent = callingNavigator.SelectSingleNode("/Components/Component");

            if (callingRootComponent != null)
            {
                String rootName = callingRootComponent.GetAttribute("Name", callingRootComponent.NamespaceURI);
                String rootType = callingRootComponent.GetAttribute("Type", callingRootComponent.NamespaceURI);
                addButtonLabel.Text = "Add selected items to " + rootType + " " + rootName + ":";
            }

            // initialize title
            this.Text = "Items of type " + m_listItemType + " from the " + p_listAddFromScreen;

            addButton.AutoSize = true;
            addButton.Text = "Add";
            addButton.Click += new EventHandler(AddButton_Click);
            closeButton.Click += new EventHandler(buttonCancel_Click);

            this.myScrollingListView.MultiSelect = true;

            // update / close hooks:
            callingController.RegisterForUpdate(this);
            this.FormClosing += new FormClosingEventHandler(ListDialog_FormClosing);

            // default images
            Dictionary<String, Bitmap> typeImage = listController.GetIcons();
            ImageList tempList = new ImageList();
            Image image;

            foreach (String k in typeImage.Keys)
            {
                image = typeImage[k];
                tempList.Images.Add(k, image);
            }

            this.myScrollingListView.SmallImageList = tempList;
        }
 internal ErrorHandlingWrapper(Controller controller)
 {
     _response      = controller.Response;
     _localRedirect = controller.LocalRedirect;
     _viewComponent = controller.ViewComponent;
 }
 internal ErrorHandlingWrapper(PageModel pageModel)
 {
     _response      = pageModel.Response;
     _localRedirect = pageModel.LocalRedirect;
     _viewComponent = pageModel.ViewComponent;
 }
Exemple #5
0
        public DiagramWeb()
            : base()
        {
            myHelper = new ViewComponentHelper(this);

            this.ObjectResized += new GoSelectionEventHandler(Diagram_ObjectResized);
            this.LinkCreated += new GoSelectionEventHandler(GraphView_LinkCreated);
            this.SelectionDeleting += new CancelEventHandler(GraphView_SelectionDeleting);
            this.SelectionMoved += new EventHandler(Diagram_SelectionMoved);
            this.LinkRelinked += new GoSelectionEventHandler(Diagram_LinkRelinked);
            this.ObjectContextClicked += new GoObjectEventHandler(Diagram_ObjectSingleClicked);

            this.IDAttribute = XmlSchemaConstants.Display.Component.Id;
            this.NameAttribute = XmlSchemaConstants.Display.Component.Name;
            this.TypeAttribute = XmlSchemaConstants.Display.Component.Type;
            this.LinkIDAttribute = XmlSchemaConstants.Display.Component.LinkID;

            this.DragsRealtime = true;
            this.NoFocusSelectionColor = this.PrimarySelectionColor;

            // auto scroll
            //this.AutoScrollDelay = 1000; // wait 1 second before auto scrolling
            //this.AutoScrollTime = 100;  // autoscroll every 100 milliseconds
            //this.AutoScrollRegion = new Size(16, 16); // detect auto scroll +- 16 pixels from margins

            // remove cut
            this.AllowCopy = false;

            // this will force the mvp xml dll to load...
            IndexingXPathNavigator tempNav = new IndexingXPathNavigator(new XmlDocument().CreateNavigator());

            //Copy Tools
            mouseMoveCopy = new List<GoTool>();
            mouseUpCopy = new List<GoTool>();
            mouseDownCopy = new List<GoTool>();

            allowedTypes = new List<String>();

            foreach (GoTool copyMe in MouseMoveTools)
            {
                mouseMoveCopy.Add(copyMe);
            }

            foreach (GoTool copyMe in MouseUpTools)
            {
                mouseUpCopy.Add(copyMe);
            }

            foreach (GoTool copyMe in MouseDownTools)
            {
                mouseDownCopy.Add(copyMe);
            }

            // no transform to start
            transform = null;
        }