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
0
101. Example
Project: OKHOSTING.UI
Source File: ControlList.cs
Source File: ControlList.cs
public void Clear() { InnerList.Clear(); }
0
102. Example
Project: Legends-Viewer
Source File: DwarfTabPage.cs
Source File: DwarfTabPage.cs
public void Close() { Current.Dispose(); Controls.Clear(); }
0
103. Example
Project: Legends-Viewer
Source File: LegendsViewer.cs
Source File: LegendsViewer.cs
private void RemoveEventFilterCheckBoxes() { foreach (TabPage eventTab in EventTabs) eventTab.Controls.Clear(); }
0
104. Example
Project: PokerMuck
Source File: StatisticItemListDisplay.cs
Source File: StatisticItemListDisplay.cs
public void Clear() { this.Controls.Clear(); }
0
105. Example
Project: StackBuilder
Source File: UCtrlLayerList.cs
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(); }
0
106. Example
Project: ContinuousTests
Source File: TreeBasedSettingsDialog.cs
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; } }
0
107. Example
Project: ContinuousTests
Source File: TreeBasedSettingsDialog.cs
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; } }
0
108. Example
Project: ContinuousTests
Source File: TreeBasedSettingsDialog.cs
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; } }
0
109. Example
Project: NSMB-Editor
Source File: BinaryEdit.cs
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; } }
0
110. Example
Project: EDDiscovery
Source File: ActionPackEditCondition.cs
Source File: ActionPackEditCondition.cs
public new void Dispose() { panelConditionType.Controls.Clear(); Controls.Clear(); textBoxCondition.Dispose(); panelConditionType.Dispose(); base.Dispose(); }
0
111. Example
Project: EDDiscovery
Source File: ActionPackEditorForm.cs
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(); }
0
112. Example
Project: EDDiscovery
Source File: ActionPackEditProgram.cs
Source File: ActionPackEditProgram.cs
public new void Dispose() { Controls.Clear(); proglist.Dispose(); progedit.Dispose(); paras.Dispose(); base.Dispose(); }
0
113. Example
Project: FAtiMA-Toolkit
Source File: FormHelper.cs
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); }
0
114. Example
Project: HaSuite
Source File: PageCollection.cs
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; }
0
115. Example
Project: HaSuite
Source File: PageCollection.cs
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; }
0
116. Example
Project: JexusManager
Source File: WizardForm.cs
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(); }
0
117. Example
Project: logwizard
Source File: DropdownContainerControl.cs
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; }
0
118. Example
Project: NodeEditorWinforms
Source File: NodesControl.cs
Source File: NodesControl.cs
public void Clear() { graph.Nodes.Clear(); graph.Connections.Clear(); Controls.Clear(); Refresh(); rebuildConnectionDictionary = true; }
0
119. Example
Project: ACT.UltraScouter
Source File: PluginCore.cs
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, }); }
0
120. Example
Project: anycmd
Source File: MainForm.cs
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 }
0
121. Example
Project: anycmd
Source File: MainForm.cs
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; }
0
122. Example
Project: mRemoteNG
Source File: PageSequence.cs
Source File: PageSequence.cs
private void ActivatePage(int sequenceNumber) { _pageContainer.Controls.Clear(); _pageContainer.Controls.Add(_pages[sequenceNumber]); }
0
123. Example
Project: MvvmFx
Source File: ContentContainer.cs
Source File: ContentContainer.cs
private void ResetContent() { Controls.Clear(); _content = null; OnContentChanged(EventArgs.Empty); }
0
124. Example
Project: OpenLiveWriter
Source File: CategoryDisplayFormM1.cs
Source File: CategoryDisplayFormM1.cs
private void ClearForm() { if (_categoryControls.Count > 0) { categoryContainerControl.Controls.Clear(); _categoryControls.Clear(); } }
0
125. Example
Project: PokerMuck
Source File: CardListPanel.cs
Source File: CardListPanel.cs
private void ClearCardPictures() { if (cardPictures.Count > 0) cardPictures.Clear(); this.Controls.Clear(); }
0
126. Example
Project: PokerMuck
Source File: ControlListContainer.cs
Source File: ControlListContainer.cs
public void ClearAll() { Controls.Clear(); maxHeightTable.Clear(); }
0
127. Example
Project: PokerMuck
Source File: PlayerStatisticsDisplay.cs
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(); } }
0
128. Example
Project: poderosa
Source File: PaneDivision.cs
Source File: PaneDivision.cs
public void ClearControlTree() { if (_hostingControl != null) _hostingControl.Controls.Clear(); _first.ClearControlTree(); }
0
129. Example
Project: GEDKeeper
Source File: GKPortrait.cs
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; } }
0
130. Example
Project: tgc-viewer
Source File: TgcModifiers.cs
Source File: TgcModifiers.cs
public void Clear() { modifiersPanel.Controls.Clear(); modifiers.Clear(); }
0
131. Example
Project: AutoTest.Net
Source File: TreeBasedSettingsDialog.cs
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; } }
0
132. Example
Project: AutoTest.Net
Source File: TreeBasedSettingsDialog.cs
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; } }
0
133. Example
Project: AutoTest.Net
Source File: TreeBasedSettingsDialog.cs
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; } }
0
134. Example
Project: 0install-win
Source File: AppTileList.cs
Source File: AppTileList.cs
public void Clear() { _appTileQueue.Clear(); _appTileQueueHeight = 0; _flowLayout.Controls.Clear(); _flowLayout.Height = 0; _tileDictionary.Clear(); _lastTileLight = false; }
0
135. Example
Project: dp2
Source File: ControlExtensions.cs
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(); } } }
0
136. Example
Project: EDDiscovery
Source File: ConditionVariablesForm.cs
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(); }
0
137. Example
Project: MaterialWinforms
Source File: MaterialSideDrawer.cs
Source File: MaterialSideDrawer.cs
private void initSideDrawer() { bool LastControlWasDivider = false; /n ..... /n //View Source file for more details /n }
0
138. Example
Project: Histacom2
Source File: Game.cs
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(); }
0
139. Example
Project: VhdAttach
Source File: Upgrade [004].cs
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); }
0
140. Example
Project: anycmd
Source File: TargetItem.cs
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(); }
0
141. Example
Project: anycmd
Source File: TargetItem.cs
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; }
0
142. Example
Project: Urbanization
Source File: MainForm.cs
Source File: MainForm.cs
private void RegisterAreaRenderHelper(TerraformingOptions terraformingOptions = null, PersistedSimul/n ..... /n //View Source file for more details /n }
0
143. Example
Project: Tibialyzer
Source File: MainForm.cs
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()); }
0
144. Example
Project: OpenLiveWriter
Source File: InsertImageDialog.cs
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; }
0
145. Example
Project: poderosa
Source File: PaneDivision.cs
Source File: PaneDivision.cs
public void ClearControlTree() { if (_intermediateContainer != null) _intermediateContainer.Controls.Clear(); if (_next != null) _next.ClearControlTree(); if (!this.IsLeaf) _childList.ClearControlTree(); }
0
146. Example
Project: Sardauscan
Source File: HardwareStatusControl.cs
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(); }
0
147. Example
Project: MaxLifx
Source File: SoundGeneratorUI.cs
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(); }
0
148. Example
Project: UfcppSample
Source File: ReversiPanel.cs
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; }
0
149. Example
Project: Gum
Source File: MainWindow.cs
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); } }
0
150. Example
Project: Zero-K-Infrastructure
Source File: ToolTabs.cs
Source File: ToolTabs.cs
public void ClearTabs() { controls.Clear(); toolStrip.Items.Clear(); panel.Controls.Clear(); }