當前位置: 首頁>>代碼示例>>C#>>正文


C# NumericUpDown.Hide方法代碼示例

本文整理匯總了C#中System.Windows.Forms.NumericUpDown.Hide方法的典型用法代碼示例。如果您正苦於以下問題:C# NumericUpDown.Hide方法的具體用法?C# NumericUpDown.Hide怎麽用?C# NumericUpDown.Hide使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Forms.NumericUpDown的用法示例。


在下文中一共展示了NumericUpDown.Hide方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ListDialog

        public ListDialog(String p_listItemType, String p_listLinkType, DataEntryController p_listController, int p_rootIDForList, DataEntryController p_callingController, int p_callingRootID)
            : base()
        {
            InitializeComponent();

            m_listLinkType = p_listLinkType;
            m_listItemType = p_listItemType;
            m_rootIDForList = p_rootIDForList;
            m_callingRootID = p_callingRootID;

            listController = p_listController;
            callingController = p_callingController;

            newNumericUpDown = new NumericUpDown();
            this.listView1.Controls.Add(newNumericUpDown);
            newNumericUpDown.Hide();

            //image list 
            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.listView1.SmallImageList = tempList;

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

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

            ComponentOptions compOptions = new ComponentOptions();
            compOptions.LevelDown = 0;

            IXPathNavigable callingInfoIXP = callingController.GetComponentAndChildren(m_callingRootID, p_listLinkType, 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 + ":"; 
            }

            IXPathNavigable titleIXP = listController.GetComponentAndChildren(m_rootIDForList, p_listLinkType, compOptions);
            XPathNavigator titleNavigator = titleIXP.CreateNavigator();

            XPathNavigator titleComponent = titleNavigator.SelectSingleNode("/Components/Component");

            if (titleComponent != null)
            {
                String titleType = titleComponent.GetAttribute("Type", titleComponent.NamespaceURI);
                this.Text = "Items of type " + m_listItemType + " from the " + titleType;
            }

            addButton.AutoSize = true;
            addButton.Text = "Add";
            addButton.Click += new EventHandler(addButton_Click);

            buttonCancel.Click += new EventHandler(buttonCancel_Click);

            this.listView1.MultiSelect = true;
        }
開發者ID:wshanshan,項目名稱:DDD,代碼行數:70,代碼來源:ListDialog.cs

示例2: ListDialog

        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;
        }
開發者ID:wshanshan,項目名稱:DDD,代碼行數:75,代碼來源:ListDialog.cs


注:本文中的System.Windows.Forms.NumericUpDown.Hide方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。