public void Parse() { for (int i = 0; i < Cores; i++) { ParameterizedThreadStart start = new ParameterizedThreadStart(ParseFile); Thread t = new Thread(start); t.Start(i); Threads.Add(t); } bool loop = true; while (loop) { int count = 0; for (int i = 0; i < Cores; i++) { if (Threads[i].IsAlive == false) { sfdcs[i].flush(); count++; } } if (count == Cores) { loop = false; } } StatusBar.Dispose(); return; }
/// <summary> /// Cleans up either unmanaged resources or managed and unmanaged resources. /// </summary> /// <remarks> /// <para> /// If disposing equals true, the method has been called directly or indirectly by a user's /// code. Managed and unmanaged resources can be disposed. /// </para> /// <para> /// If disposing equals false, the method has been called by the runtime from inside the /// finalizer and you should not reference other objects. Only unmanaged resources can /// be disposed. /// </para> /// </remarks> /// <param name="disposing">Was Dispose called manually?</param> protected override void Dispose(bool disposing) { if (!isDisposed) // Check To See If Dispose Has Already Been Called { if (disposing) // If disposing Equals true, Dispose All Managed And Unmanaged Resources { if (rtbInformation != null) { rtbInformation.Dispose(); } if (dgInputHelp != null) { dgInputHelp.Dispose(); } if (sbpCurrentFps != null) { sbpCurrentFps.Dispose(); } if (sbpHighestFps != null) { sbpHighestFps.Dispose(); } if (sbpLowestFps != null) { sbpLowestFps.Dispose(); } if (sbpOpenGlResolution != null) { sbpOpenGlResolution.Dispose(); } if (sbpWindowResolution != null) { sbpWindowResolution.Dispose(); } if (statusBar != null) { statusBar.Dispose(); } if (timer != null) { timer.Dispose(); } GC.SuppressFinalize(this); // Prevent Being Added To The Finalization Queue } // Release Any Unmanaged Resources Here, If disposing Was false, Only The Following Code Is Executed rtbInformation = null; dgInputHelp = null; sbpCurrentFps = null; sbpHighestFps = null; sbpLowestFps = null; sbpOpenGlResolution = null; sbpWindowResolution = null; statusBar = null; timer = null; } isDisposed = true; // Mark As disposed }
private void PrepareGame(int levelIN, int scoreIN, int livesIN) { if (this.newMap != null) { this.mapa = this.newMap; } else { this.mapa = new Map(0); } if (this.pac == null) { this.pac = new Pacman(this.mapa, 1, 3, 0); } else { this.pac.mapa = this.mapa; this.pac.position = this.mapa.GetStartPosition(); } if (SB != null) { SB.Dispose(); } #if DEBUG Console.WriteLine("[OK] Map and Pacman create."); #endif #region /* rozmery */ this.PlaygroundWidth = this.mapa.map.GetLength(0) * this.sizeField + 30; this.PlaygroundHeight = this.mapa.map.GetLength(1) * this.sizeField + 60; #endregion #region /* status bar */ SB = new StatusBar(); SB.Parent = this; SB.Text = "SPEED: " + this.actualSpeed.ToString() + "; LIVES: 3; SCORE: 0"; SB.Anchor = AnchorStyles.Bottom; SB.Dock = DockStyle.Bottom; SB.Font = new Font("serif", 13); SB.Height = 25; SB.Width = this.PlaygroundWidth - 5; SB.ForeColor = Color.AliceBlue; #endregion this.bonusIs = true; this.BackColor = Color.Black; this.Select(); // ziskani zamereni ClientSize = new Size(this.PlaygroundWidth, this.PlaygroundHeight); Paint -= new PaintEventHandler(this.OnStart); Paint += new PaintEventHandler(this.OnPaint); }
public void DisposeTest() { StatusBar sut = new StatusBar(); MyPanel panel = new MyPanel(); sut.Panels.Add(panel); sut.Dispose(); Assert.That(panel.IsDisposed, Is.True); }
void ReleaseDesignerOutlets() { if (WebPreview != null) { WebPreview.Dispose(); WebPreview = null; } if (ZoomLevel != null) { ZoomLevel.Dispose(); ZoomLevel = null; } if (StatusBar != null) { StatusBar.Dispose(); StatusBar = null; } }
void ReleaseDesignerOutlets() { if (ActionBar != null) { ActionBar.Dispose(); ActionBar = null; } if (AddressOK != null) { AddressOK.Dispose(); AddressOK = null; } if (BottomConstraint != null) { BottomConstraint.Dispose(); BottomConstraint = null; } if (BottomSeparator != null) { BottomSeparator.Dispose(); BottomSeparator = null; } if (DistanceFilters != null) { DistanceFilters.Dispose(); DistanceFilters = null; } if (DistanceFiltersOpenClose != null) { DistanceFiltersOpenClose.Dispose(); DistanceFiltersOpenClose = null; } if (DistanceLimit != null) { DistanceLimit.Dispose(); DistanceLimit = null; } if (DistanceLimitInput != null) { DistanceLimitInput.Dispose(); DistanceLimitInput = null; } if (DistanceSourceAddress != null) { DistanceSourceAddress.Dispose(); DistanceSourceAddress = null; } if (DistanceSourceAddressLabel != null) { DistanceSourceAddressLabel.Dispose(); DistanceSourceAddressLabel = null; } if (DistanceSourceAddressText != null) { DistanceSourceAddressText.Dispose(); DistanceSourceAddressText = null; } if (DistanceSourceCurrent != null) { DistanceSourceCurrent.Dispose(); DistanceSourceCurrent = null; } if (DistanceSourceCurrentLabel != null) { DistanceSourceCurrentLabel.Dispose(); DistanceSourceCurrentLabel = null; } if (DistanceUnitText != null) { DistanceUnitText.Dispose(); DistanceUnitText = null; } if (FilterLayout != null) { FilterLayout.Dispose(); FilterLayout = null; } if (ListType != null) { ListType.Dispose(); ListType = null; } if (ListView != null) { ListView.Dispose(); ListView = null; } if (ListViewMap != null) { ListViewMap.Dispose(); ListViewMap = null; } if (LoaderCircle != null) { LoaderCircle.Dispose(); LoaderCircle = null; } if (LoaderCircleLeftConstraint != null) { LoaderCircleLeftConstraint.Dispose(); LoaderCircleLeftConstraint = null; } if (LoadNext != null) { LoadNext.Dispose(); LoadNext = null; } if (LoadPrevious != null) { LoadPrevious.Dispose(); LoadPrevious = null; } if (MapSatellite != null) { MapSatellite.Dispose(); MapSatellite = null; } if (MapStreet != null) { MapStreet.Dispose(); MapStreet = null; } if (MapView != null) { MapView.Dispose(); MapView = null; } if (MenuAbout != null) { MenuAbout.Dispose(); MenuAbout = null; } if (MenuChatList != null) { MenuChatList.Dispose(); MenuChatList = null; } if (MenuChatListBg != null) { MenuChatListBg.Dispose(); MenuChatListBg = null; } if (MenuChatListBgCorner != null) { MenuChatListBgCorner.Dispose(); MenuChatListBgCorner = null; } if (MenuContainer != null) { MenuContainer.Dispose(); MenuContainer = null; } if (MenuHelpCenter != null) { MenuHelpCenter.Dispose(); MenuHelpCenter = null; } if (MenuIcon != null) { MenuIcon.Dispose(); MenuIcon = null; } if (MenuLayer != null) { MenuLayer.Dispose(); MenuLayer = null; } if (MenuLocation != null) { MenuLocation.Dispose(); MenuLocation = null; } if (MenuLogIn != null) { MenuLogIn.Dispose(); MenuLogIn = null; } if (MenuLogOut != null) { MenuLogOut.Dispose(); MenuLogOut = null; } if (MenuRegister != null) { MenuRegister.Dispose(); MenuRegister = null; } if (MenuSettings != null) { MenuSettings.Dispose(); MenuSettings = null; } if (NoResult != null) { NoResult.Dispose(); NoResult = null; } if (OpenFilters != null) { OpenFilters.Dispose(); OpenFilters = null; } if (OpenSearch != null) { OpenSearch.Dispose(); OpenSearch = null; } if (OrderBy != null) { OrderBy.Dispose(); OrderBy = null; } if (RefreshDistance != null) { RefreshDistance.Dispose(); RefreshDistance = null; } if (ResultSet != null) { ResultSet.Dispose(); ResultSet = null; } if (RippleMain != null) { RippleMain.Dispose(); RippleMain = null; } if (RippleRefreshDistance != null) { RippleRefreshDistance.Dispose(); RippleRefreshDistance = null; } if (RoundBottom != null) { RoundBottom.Dispose(); RoundBottom = null; } if (SearchIn != null) { SearchIn.Dispose(); SearchIn = null; } if (SearchLayout != null) { SearchLayout.Dispose(); SearchLayout = null; } if (SearchTerm != null) { SearchTerm.Dispose(); SearchTerm = null; } if (Snackbar != null) { Snackbar.Dispose(); Snackbar = null; } if (SnackBottomConstraint != null) { SnackBottomConstraint.Dispose(); SnackBottomConstraint = null; } if (SnackTopConstraint != null) { SnackTopConstraint.Dispose(); SnackTopConstraint = null; } if (SortBy_LastActiveDate != null) { SortBy_LastActiveDate.Dispose(); SortBy_LastActiveDate = null; } if (SortBy_RegisterDate != null) { SortBy_RegisterDate.Dispose(); SortBy_RegisterDate = null; } if (SortBy_ResponseRate != null) { SortBy_ResponseRate.Dispose(); SortBy_ResponseRate = null; } if (SortByCaption != null) { SortByCaption.Dispose(); SortByCaption = null; } if (StatusBar != null) { StatusBar.Dispose(); StatusBar = null; } if (StatusImage != null) { StatusImage.Dispose(); StatusImage = null; } if (StatusText != null) { StatusText.Dispose(); StatusText = null; } if (UseGeoContainer != null) { UseGeoContainer.Dispose(); UseGeoContainer = null; } if (UseGeoNo != null) { UseGeoNo.Dispose(); UseGeoNo = null; } if (UseGeoNoLabel != null) { UseGeoNoLabel.Dispose(); UseGeoNoLabel = null; } if (UseGeoYes != null) { UseGeoYes.Dispose(); UseGeoYes = null; } if (UseGeoYesLabel != null) { UseGeoYesLabel.Dispose(); UseGeoYesLabel = null; } if (UserSearchList != null) { UserSearchList.Dispose(); UserSearchList = null; } }
public override void WillTerminate(NSNotification notification) { _statusBar.Dispose(); _app.Stop(); }