System.Windows.Forms.Control.ControlCollection.Clear()

Here are the examples of the csharp api class System.Windows.Forms.Control.ControlCollection.Clear() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

121 Examples 7

101. Example

Project: OKHOSTING.UI
Source File: ControlList.cs
public void Clear()
		{
			InnerList.Clear();

		}

102. Example

Project: Legends-Viewer
Source File: DwarfTabPage.cs
public void Close()
        {
            Current.Dispose();
            Controls.Clear();
        }

103. Example

Project: Legends-Viewer
Source File: LegendsViewer.cs
private void RemoveEventFilterCheckBoxes()
        {
            foreach (TabPage eventTab in EventTabs)
                eventTab.Controls.Clear();
        }

104. Example

Project: PokerMuck
Source File: StatisticItemListDisplay.cs
public void Clear()
        {
            this.Controls.Clear();
        }

105. Example

Project: StackBuilder
Source File: UCtrlLayerList.cs
private void Start()
        {
            // do not do anything when in design mode
            if (DesignMode)
                return;
            // clear all controls
            Controls.Clear();
            // start timer
            _index = 0; _x = 0; _y = 0;
            _timer.Interval = 50;
            _timer.Start();        
        }

106. Example

Project: ContinuousTests
Source File: TreeBasedSettingsDialog.cs
private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
		{
			string key = e.Node.FullPath;
			SettingsPage page = SettingsPages[key];
            Services.UserSettings.SaveSetting("Gui.Settings.InitialPage", key);

			if ( page != null && page != current )
			{
				panel1.Controls.Clear();
				panel1.Controls.Add( page );
				page.Dock = DockStyle.Fill;
				current = page;
				return;
			}
		}

107. Example

Project: ContinuousTests
Source File: TreeBasedSettingsDialog.cs
private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
		{
			string key = e.Node.FullPath;
			SettingsPage page = SettingsPages[key];
            Services.UserSettings.SaveSetting("Gui.Settings.InitialPage", key);

			if ( page != null && page != current )
			{
				panel1.Controls.Clear();
				panel1.Controls.Add( page );
				page.Dock = DockStyle.Fill;
				current = page;
				return;
			}
		}

108. Example

Project: ContinuousTests
Source File: TreeBasedSettingsDialog.cs
private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
		{
			string key = e.Node.FullPath;
			SettingsPage page = SettingsPages[key];
            Services.UserSettings.SaveSetting("Gui.Settings.InitialPage", key);

			if ( page != null && page != current )
			{
				panel1.Controls.Clear();
				panel1.Controls.Add( page );
				page.Dock = DockStyle.Fill;
				current = page;
				return;
			}
		}

109. Example

Project: NSMB-Editor
Source File: BinaryEdit.cs
private void AddCheckBoxes() {
            this.Controls.Clear();
            int pos = 2;
            CheckBox cb;
            for (int l = 1; l <= _CheckBoxCount; l++) {
                cb = new CheckBox();
                cb.AutoSize = true;
                cb.Text = "";
                cb.Location = new Point(pos, 3);
                cb.CheckedChanged += new EventHandler(CheckBoxCheckedChanged);
                this.Controls.Add(cb);
                pos += 17;
            }
        }

110. Example

Project: EDDiscovery
Source File: ActionPackEditCondition.cs
public new void Dispose()
        {
            panelConditionType.Controls.Clear();
            Controls.Clear();
            textBoxCondition.Dispose();
            panelConditionType.Dispose();    
            base.Dispose();
        }

111. Example

Project: EDDiscovery
Source File: ActionPackEditorForm.cs
public void Dispose()
            {
                panel.Controls.Clear();

                if (usercontrol != null)
                    usercontrol.Dispose();

                if (grouptype != null)
                    grouptype.Dispose();

                if (groupnamepanel != null)
                    groupnamepanel.Dispose();

                if (groupnamelabel != null)
                    groupnamelabel.Dispose();

                if (groupnamecollapsebutton != null)
                    groupnamecollapsebutton.Dispose();

                if (action != null)
                    action.Dispose();

                panel.Dispose();
            }

112. Example

Project: EDDiscovery
Source File: ActionPackEditProgram.cs
public new void Dispose()
        {
            Controls.Clear();
            proglist.Dispose();
            progedit.Dispose();
            paras.Dispose();
            base.Dispose();
        }

113. Example

Project: FAtiMA-Toolkit
Source File: FormHelper.cs
public static void ShowFormInContainerControl(Control ctl, Form frm)
        {
            frm.MainMenuStrip.Visible = false;
            frm.TopLevel = false;
            frm.FormBorderStyle = FormBorderStyle.None;
            frm.Dock = DockStyle.Fill;
            frm.Visible = true;
            ctl.Controls.Clear();
            ctl.Controls.Add(frm);
        }

114. Example

Project: HaSuite
Source File: PageCollection.cs
private void TabPages_CurrentPageChanged(TabPage currentPage, TabPage previousPage)
        {
            this.SuspendPainting = true;
            this.PageContainer.Controls.Clear();
            if ((currentPage != null))
            {
                currentPage.Control.Dock = DockStyle.Fill;
                currentPage.Control.Visible = true;
                this.PageContainer.Controls.Add(currentPage.Control);
            }
            this.SuspendPainting = false;
        }

115. Example

Project: HaSuite
Source File: PageCollection.cs
private void TabPages_PageRemoved(TabPage page)
        {
            if ((this.PageContainer.Contains(page.Control))) this.PageContainer.Controls.Clear();
            page.SetParent(null);
            page.TabPageCtl.OnClose -= OnPageClosing;
        }

116. Example

Project: JexusManager
Source File: WizardForm.cs
protected virtual void OnPageChanged(EventArgs e)
        {
            if (CurrentPage == null)
            {
                return;
            }

            _txtTitle.Text = CurrentPage.Caption;
            _pnlContainer.Controls.Clear();
            _pnlContainer.Controls.Add(CurrentPage);
            CurrentPage.Activate();
        }

117. Example

Project: logwizard
Source File: DropdownContainerControl.cs
public void SetControl(Control ctrl)
		{
			Controls.Clear();
			if (m_acceptButton != null)
				Controls.Add(m_acceptButton);
			if (m_cancelButton != null)
				Controls.Add(m_cancelButton);
			
			Rectangle client = ClientRectangle;
			this.Width += ctrl.Width - client.Width;
			this.Height += ctrl.Height - client.Height;
			ctrl.Location = ClientRectangle.Location;
			Controls.Add(ctrl);

			ctrl.TabIndex = 0;
			m_acceptButton.TabIndex = 1;
			m_cancelButton.TabIndex = 2;
		}

118. Example

Project: NodeEditorWinforms
Source File: NodesControl.cs
public void Clear()
        {
            graph.Nodes.Clear();
            graph.Connections.Clear();
            Controls.Clear();
            Refresh();
            rebuildConnectionDictionary = true;
        }

119. Example

Project: ACT.UltraScouter
Source File: PluginCore.cs
private void SetupPluginTabPages(
            TabPage baseTabPage)
        {
            // ????????????????
            baseTabPage.Text = "ULTRA SCOUTER";

            baseTabPage.Controls.Clear();
            baseTabPage.Controls.Add(new ElementHost()
            {
                Child = new BaseView(),
                Dock = DockStyle.Fill,
            });
        }

120. Example

Project: anycmd
Source File: MainForm.cs
private void mainTree_AfterSelect(object sender, TreeViewEventArgs e)
		{
			// Clear the main panel/n ..... /n //View Source file for more details /n }

121. Example

Project: anycmd
Source File: MainForm.cs
private void menuItemClose_Click(object sender, System.EventArgs e)
		{
			_mainTree.Nodes.Clear();
			_mainPanel.Controls.Clear();
			_path = string.Empty;
			_menuItemOpenPolicy.Enabled = true;
			_menuItemOpenRequest.Enabled = true;
			_menuItemSaveAs.Enabled = false;
			_menuItemSave.Enabled = false;
			_menuItemRunRequest.Enabled = false;
			_menuItemRunPolicy.Enabled = false;
		}

122. Example

Project: mRemoteNG
Source File: PageSequence.cs
private void ActivatePage(int sequenceNumber)
        {
            _pageContainer.Controls.Clear();
            _pageContainer.Controls.Add(_pages[sequenceNumber]);
        }

123. Example

Project: MvvmFx
Source File: ContentContainer.cs
private void ResetContent()
        {
            Controls.Clear();
            _content = null;
            OnContentChanged(EventArgs.Empty);
        }

124. Example

Project: OpenLiveWriter
Source File: CategoryDisplayFormM1.cs
private void ClearForm()
        {
            if (_categoryControls.Count > 0)
            {
                categoryContainerControl.Controls.Clear();
                _categoryControls.Clear();
            }
        }

125. Example

Project: PokerMuck
Source File: CardListPanel.cs
private void ClearCardPictures()
        {
            if (cardPictures.Count > 0) cardPictures.Clear();
            this.Controls.Clear();
        }

126. Example

Project: PokerMuck
Source File: ControlListContainer.cs
public void ClearAll()
        {
            Controls.Clear();
            maxHeightTable.Clear();
        }

127. Example

Project: PokerMuck
Source File: PlayerStatisticsDisplay.cs
private void RemoveStatistics(PlayerStatistics statistics)
        {
            // For each statistic category
            foreach (String category in statistics.GetCategories())
            {
                // Find the tab page for this category
                TabPage tp = FindTabPage(category);

                // Clear it
                tp.Controls.Clear();
            }
        }

128. Example

Project: poderosa
Source File: PaneDivision.cs
public void ClearControlTree() {
                if (_hostingControl != null)
                    _hostingControl.Controls.Clear();
                _first.ClearControlTree();
            }

129. Example

Project: GEDKeeper
Source File: GKPortrait.cs
private void RedrawButtons()
        {
            int lenwagon = 0;

            btnPanel.Controls.Clear();

            for (int i = 0, c = fBtnsList.Count; i < c; i++)
            {
                lenwagon += (i > 0) ? (8 + fBtnsList[i].Width) : fBtnsList[i].Width;
            }

            int center = lenwagon / 2;
            int startPosition = btnPanel.Width / 2 - center;

            for (int i = 0, c = fBtnsList.Count; i < c; i++)
            {
                int heightCenter = btnPanel.Height / 2;
                int btnCenter = fBtnsList[i].Height / 2;

                fBtnsList[i].Location = new Point(startPosition, heightCenter - btnCenter);
                btnPanel.Controls.Add(fBtnsList[i]);
                startPosition += fBtnsList[i].Width + 8;
            }
        }

130. Example

Project: tgc-viewer
Source File: TgcModifiers.cs
public void Clear()
        {
            modifiersPanel.Controls.Clear();
            modifiers.Clear();
        }

131. Example

Project: AutoTest.Net
Source File: TreeBasedSettingsDialog.cs
private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
		{
			string key = e.Node.FullPath;
			SettingsPage page = SettingsPages[key];
            Services.UserSettings.SaveSetting("Gui.Settings.InitialPage", key);

			if ( page != null && page != current )
			{
				panel1.Controls.Clear();
				panel1.Controls.Add( page );
				page.Dock = DockStyle.Fill;
				current = page;
				return;
			}
		}

132. Example

Project: AutoTest.Net
Source File: TreeBasedSettingsDialog.cs
private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
		{
			string key = e.Node.FullPath;
			SettingsPage page = SettingsPages[key];
            Services.UserSettings.SaveSetting("Gui.Settings.InitialPage", key);

			if ( page != null && page != current )
			{
				panel1.Controls.Clear();
				panel1.Controls.Add( page );
				page.Dock = DockStyle.Fill;
				current = page;
				return;
			}
		}

133. Example

Project: AutoTest.Net
Source File: TreeBasedSettingsDialog.cs
private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
		{
			string key = e.Node.FullPath;
			SettingsPage page = SettingsPages[key];
            Services.UserSettings.SaveSetting("Gui.Settings.InitialPage", key);

			if ( page != null && page != current )
			{
				panel1.Controls.Clear();
				panel1.Controls.Add( page );
				page.Dock = DockStyle.Fill;
				current = page;
				return;
			}
		}

134. Example

Project: 0install-win
Source File: AppTileList.cs
public void Clear()
        {
            _appTileQueue.Clear();
            _appTileQueueHeight = 0;

            _flowLayout.Controls.Clear();
            _flowLayout.Height = 0;

            _tileDictionary.Clear();
            _lastTileLight = false;
        }

135. Example

Project: dp2
Source File: ControlExtensions.cs
public static void ClearControls(this Control parent,
            bool bDispose = false)
        {
            if (parent.Controls.Count == 0)
                return;

            List<Control> controls = new List<Control>();
            foreach (Control control in parent.Controls)
            {
                controls.Add(control);
            }

            parent.Controls.Clear();
            if (bDispose)
            {
                foreach (Control control in controls)
                {
                    control.Dispose();
                }
            }
        }

136. Example

Project: EDDiscovery
Source File: ConditionVariablesForm.cs
private void Del_Clicked(object sender, EventArgs e)
        {
            ExtendedControls.ButtonExt b = sender as ExtendedControls.ButtonExt;
            Group g = (Group)b.Tag;

            g.panel.Controls.Clear();
            panelVScroll1.Controls.Remove(g.panel);
            groups.Remove(g);
            Invalidate(true);
            FixUpGroups();
        }

137. Example

Project: MaterialWinforms
Source File: MaterialSideDrawer.cs
private void initSideDrawer()
        {
            bool LastControlWasDivider = false;
            /n ..... /n //View Source file for more details /n }

138. Example

Project: Histacom2
Source File: Game.cs
public void Start()
        {

            //Panel.SuspendLayout();
            Time = 0;
            _dismantledMines = 0;
            _incorrectdismantledMines = 0;
            Panel.Enabled = true;
            Panel.Controls.Clear();

            // Create Spots
            _squares = new Square[Width, Height];
            for (int x = 0; x < Width; x++)
            {
                for (int y = 0; y < Height; y++)
                {
                    Square s = new Square(this, x, y);
                    s.Explode += new EventHandler(Explode);
                    s.Dismantle += new EventHandler(Dismantle);
                    s.Button.MouseDown += (send, args) => { if (_panel.Enabled) _window.button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperGasp; };
                    s.Button.MouseUp += (send, args) => { if (_panel.Enabled) _window.button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperSmile; };
                    _squares[x, y] = s;
                }
            }

            // Place Mines
            int b = 0;
            Random r = new Random();
            while (b < Mines)
            {
                int x = r.Next(Width);
                int y = r.Next(Height);

                Square s = _squares[x, y];
                if (!s.Minded)
                {
                    s.Minded = true;
                    b++;
                }
            }

            OnDismantledMinesChanged();
        }

139. Example

Project: VhdAttach
Source File: Upgrade [004].cs
protected override void Dispose(bool disposing) {
                if (disposing) {
                    foreach (Control iControl in this.Controls) {
                        iControl.Dispose();
                    }
                    this.bwCheck.Dispose();
                    this.bwDownload.Dispose();
                    this.Controls.Clear();
                }
                base.Dispose(disposing);
            }

140. Example

Project: anycmd
Source File: TargetItem.cs
private void button1_Click(object sender, System.EventArgs e)
        {
            LoadingData = true;
            for (int index = 0; index < _list.Count; index++)
            {
                _targetItem.Match[index] = ((CustomControls.Match)_list[index]).MatchElement;
            }

            LoadingData = false;
            ModifiedValue = false;

            lstMatch.Items.Clear();
            foreach (TargetMatchBaseReadWrite match in _targetItem.Match)
            {
                lstMatch.Items.Add(match);
            }
            mainPanel.Controls.Clear();
        }

141. Example

Project: anycmd
Source File: TargetItem.cs
private void btnRemove_Click(object sender, System.EventArgs e)
        {
            LoadingData = true;
            _list.Remove(lstMatch.SelectedIndex);
            _targetItem.Match.RemoveAt(lstMatch.SelectedIndex);
            lstMatch.Items.RemoveAt(lstMatch.SelectedIndex);
            mainPanel.Controls.Clear();
            LoadingData = false;
            index = -1;
        }

142. Example

Project: Urbanization
Source File: MainForm.cs
private void RegisterAreaRenderHelper(TerraformingOptions terraformingOptions = null, PersistedSimul/n ..... /n //View Source file for more details /n }

143. Example

Project: Tibialyzer
Source File: MainForm.cs
private void InitializeTabs() {
            Tabs = new List<TabInterface> { new MainTab(), new SettingsTab(), new HuntsTab(), new LogsTab(), new NotificationsTab(), new PopupsTab(), new DatabaseTab(), new AutoHotkeyTab(), new ScreenshotTab(), new BrowseTab(), new HelpTab(), new SystemTab(), new SummaryTab(), new HUDTab(), new HealthListTab(), new PortraitTab(), new AdvancedTab(), new AboutTab(), new TaskTab(), new Outfiter() };
            foreach (TabInterface tab in Tabs) {
                List<Control> controlList = new List<Control>();
                foreach (Control c in (tab as Form).Controls) {
                    controlList.Add(c);
                    c.Location = new Point(c.Location.X + mainButton.Location.X + mainButton.Width + 4, c.Location.Y + 24);
                    StyleManager.InitializeElement(c);
                    StyleManager.StyleElement(c);
                }
                (tab as Form).Controls.Clear();
                tabControls.Add(controlList);
            }

            foreach(Control c in this.Controls) {
                StyleManager.InitializeElement(c);
                StyleManager.StyleElement(c);
            }

            // Manually add controls that appear on multiple pages
            tabControls[3].Add((Tabs[2] as HuntsTab).GetHuntList());
            tabControls[3].Add((Tabs[2] as HuntsTab).GetHuntLabel());
        }

144. Example

Project: OpenLiveWriter
Source File: InsertImageDialog.cs
public void SetActiveControl(InsertImageSource source)
        {
            //if coming from file tab, hide all that stuff
            if (state != STATE.WEB)
            {
                foreach (IntPtr thing in controlsToShowHideOnTabSwitch)
                {
                    User32.ShowWindow(thing, SW.HIDE);
                }
            }

            //set the new source info
            activeImageSource = source;
            _panelImage.Controls.Clear();
            _panelImage.Controls.Add(activeImageSource.ImageSelectionControls);
            ManipulatePanels();
            _panelImage.Visible = true;
            activeImageSource.TabSelected();

            state = STATE.WEB;
        }

145. Example

Project: poderosa
Source File: PaneDivision.cs
public void ClearControlTree() {
                if (_intermediateContainer != null)
                    _intermediateContainer.Controls.Clear();
                if (_next != null)
                    _next.ClearControlTree();
                if (!this.IsLeaf)
                    _childList.ClearControlTree();
            }

146. Example

Project: Sardauscan
Source File: HardwareStatusControl.cs
private void ClearSettingsPanel()
		{
			IDisposable disp = SettingsPanel.Controls.Count > 0 ? SettingsPanel.Controls[0] as IDisposable : null;
			SettingsPanel.Controls.Clear();
			if (disp != null)
				disp.Dispose();
			SettingsPanel.Height = 0;
			this.HideSettings.Visible = false;
			NotifyChange();
		}

147. Example

Project: MaxLifx
Source File: SoundGeneratorUI.cs
private void ClearPanel(Control control)
        {
            foreach (Control c in control.Controls)
            {
                if (c.GetType() == typeof (Button)) ((Button) c).Click -= StopStart;
                if (c.GetType() == typeof (TrackBar)) ((TrackBar) c).ValueChanged -= VolumeChanged;
                c.Dispose();
            }

            control.Controls.Clear();
        }

148. Example

Project: UfcppSample
Source File: ReversiPanel.cs
private void CreateCells()
		{
			int image_width  = none_image.Width;
			int image_height = none_image.Height;

			cells = new ReversiCell[board.Width, board.Height];
			this.Controls.Clear();
			for(int x=0; x<board.Width; ++x)
				for(int y=0; y<board.Height; ++y)
				{
					ReversiCell cell = new ReversiCell(x, y, this);
					cell.Location = new Point(image_width*x, image_height*y);
					cell.Size = new Size(image_width, image_height);
					cell.SetColor(board[x, y]);
					cell.Click += new EventHandler(OnCellClick);
					this.Controls.Add(cell);
					this.cells[x,y] = cell;
				}
			this.Width = board.Width * image_width;
			this.Height = board.Height * image_height;
		}

149. Example

Project: Gum
Source File: MainWindow.cs
public void RemoveWpfControl(System.Windows.Controls.UserControl control)
        {
            List<Control> controls = new List<Control>();

            TabControl tabControl = null;
            TabPage tabPage = null;
            GetContainers(control, out tabPage, out tabControl);
            
            if(tabControl != null)
            {
                foreach(var controlInTabPage in tabPage.Controls)
                {
                    if(controlInTabPage is ElementHost)
                    {
                        (controlInTabPage as ElementHost).Child = null;
                    }
                }
                tabPage.Controls.Clear();
                tabControl.Controls.Remove(tabPage);
            }
        }

150. Example

Project: Zero-K-Infrastructure
Source File: ToolTabs.cs
public void ClearTabs()
        {
            controls.Clear();
            toolStrip.Items.Clear();
            panel.Controls.Clear();
        }