void ReleaseDesignerOutlets() { if (BreadUnitsLabel != null) { BreadUnitsLabel.Dispose(); BreadUnitsLabel = null; } if (InsulinLabel != null) { InsulinLabel.Dispose(); InsulinLabel = null; } if (LevelLabel != null) { LevelLabel.Dispose(); LevelLabel = null; } if (TimeLabel != null) { TimeLabel.Dispose(); TimeLabel = null; } }
private void generateGraphVisualization() { int maxLevel = 1; //Calculando cantidad de niveles del grafo foreach (GraphNode node in pensum.Vertices) { if (pensum.OutDegree(node) == 0) { int level = getNodeLevel(node); if (level > maxLevel) { maxLevel = level; } } } //Renderizando un identificador lateral para cada label int levelY = 10; for (int i = 1; i <= maxLevel; i++) { LevelLabel lbl = new LevelLabel(i); lbl.Location = new Point(10, levelY); panelGrafo.Controls.Add(lbl); levelY += 151; } //Renderizando primero los vertices que no tienen hijos /*foreach (GraphNode node in pensum.Vertices) * { * if (pensum.OutDegree(node) == 0 && pensum.InDegree(node) == 0) * { * panelGrafo.Controls.Add(node.Sub); * node.Sub.X = currentMaxX + 2; * node.Sub.Y = 0; * currentMaxX++; * currentMaxX++; * node.Sub.Location = new Point(50 + 125 * node.Sub.X, 30 + 150 * node.Sub.Y); * } * }*/ //Renderizando los vértices del grafo foreach (GraphNode node in pensum.Vertices) { addNodeToGraphView(node, -1); } //Llamando a refresh para renderizar las aristas del grafo panelGrafo.Refresh(); }
public override void SetListBytes(ref List <byte> listBytes) { sectionIdentifier = Section.LEDR; int previousSize = listBytes.Count; if (LevelLabel.Length > 64) { LevelLabel = new string(LevelLabel.Take(64).ToArray()); } foreach (char c in LevelLabel) { listBytes.Add((byte)c); } for (int i = LevelLabel.Length; i < 64; i++) { listBytes.Add(0); } listBytes.AddRange(GameProgress.Reverse()); listBytes.AddRange(Unknown1.Reverse()); listBytes.AddRange(Unknown2.Reverse()); listBytes.AddRange(Unknown3.Reverse()); if (ThumbnailIcon != ThumbIcon.None) { listBytes.Add((byte)ThumbnailIcon); listBytes.Add(0); listBytes.Add(0); listBytes.Add(0); } listBytes.AddRange(Unknown4.Reverse()); if (UnknownText.Length > 0xA8) { UnknownText = new string(UnknownText.Take(0xA8).ToArray()); } foreach (char c in UnknownText) { listBytes.Add((byte)c); } bytesUsed = listBytes.Count - previousSize; for (int i = bytesUsed; i < 0x100; i++) { listBytes.Add(0xBF); } blockSize = listBytes.Count - previousSize; }
private static void AddOptionLabel(SpanWithText span, LevelLabel label, bool isLeft, OptionData opt) { string text = label == LevelLabel.Объем ? opt.Volume.ToString() : label == LevelLabel.ОткрИнтерес ? opt.OpenInterest.ToString() : string.Format("{0:MMMyy}", opt.DateExpiration); if (isLeft) { span.TextLeft = text; } else { span.TextRight = text; } }
private void HandleItemChecked(object sender, ItemCheckEventArgs e) { object selectedItem = checkedSplitList.Items[e.Index]; if (settings.CriteriaToSplit == ComponentSettings.SplitCriteria.Zones) { if (selectedItem is IZone) { IZone zone = (IZone)selectedItem; if (e.NewValue == CheckState.Checked) { settings.SplitZones.Add(zone); } else { settings.SplitZones.Remove(zone); } } else { LevelLabel level = (LevelLabel)selectedItem; if (e.NewValue == CheckState.Checked) { settings.SplitZoneLevels.Add(level.Level); } else { settings.SplitZoneLevels.Remove(level.Level); } } } else if (settings.CriteriaToSplit == ComponentSettings.SplitCriteria.Levels) { LevelLabel level = (LevelLabel)selectedItem; if (e.NewValue == CheckState.Checked) { settings.SplitLevels.Add(level.Level); } else { settings.SplitLevels.Remove(level.Level); } } }
private void BindingInitialize() { Binding DifficultyBinding = new Binding("Difficulty") { Source = Host }; DifficultyLabel.SetBinding(Label.ContentProperty, DifficultyBinding); Binding LevelBinding = new Binding("Level") { Source = Host }; LevelLabel.SetBinding(Label.ContentProperty, LevelBinding); Binding ScoreBinding = new Binding("Score") { Source = Host }; ScoreLabel.SetBinding(Label.ContentProperty, ScoreBinding); ResultScore.SetBinding(Label.ContentProperty, ScoreBinding); Binding LevelupProgressBinding = new Binding("LevelupProgress") { Source = Host }; Binding LevelupMaximumBinding = new Binding("LevelupMaximum") { Source = Host }; LevelupProgressBar.SetBinding(ProgressBar.ValueProperty, LevelupProgressBinding); LevelupProgressBar.SetBinding(ProgressBar.MaximumProperty, LevelupMaximumBinding); Binding TotalClearRowsBinding = new Binding("TotalClearRows") { Source = Host }; ResultClearRows.SetBinding(Label.ContentProperty, TotalClearRowsBinding); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (ExperienceBar != null) { if (!ExperienceBar.IsDisposed) { ExperienceBar.Dispose(); } ExperienceBar = null; } if (NewMailIcon != null) { if (!NewMailIcon.IsDisposed) { NewMailIcon.Dispose(); } NewMailIcon = null; } if (ClassLabel != null) { if (!ClassLabel.IsDisposed) { ClassLabel.Dispose(); } ClassLabel = null; } if (LevelLabel != null) { if (!LevelLabel.IsDisposed) { LevelLabel.Dispose(); } LevelLabel = null; } if (ACLabel != null) { if (!ACLabel.IsDisposed) { ACLabel.Dispose(); } ACLabel = null; } if (MRLabel != null) { if (!MRLabel.IsDisposed) { MRLabel.Dispose(); } MRLabel = null; } if (DCLabel != null) { if (!DCLabel.IsDisposed) { DCLabel.Dispose(); } DCLabel = null; } if (MCLabel != null) { if (!MCLabel.IsDisposed) { MCLabel.Dispose(); } MCLabel = null; } if (SCLabel != null) { if (!SCLabel.IsDisposed) { SCLabel.Dispose(); } SCLabel = null; } if (AccuracyLabel != null) { if (!AccuracyLabel.IsDisposed) { AccuracyLabel.Dispose(); } AccuracyLabel = null; } if (AgilityLabel != null) { if (!AgilityLabel.IsDisposed) { AgilityLabel.Dispose(); } AgilityLabel = null; } if (HealthLabel != null) { if (!HealthLabel.IsDisposed) { HealthLabel.Dispose(); } HealthLabel = null; } if (ManaLabel != null) { if (!ManaLabel.IsDisposed) { ManaLabel.Dispose(); } ManaLabel = null; } if (ExperienceLabel != null) { if (!ExperienceLabel.IsDisposed) { ExperienceLabel.Dispose(); } ExperienceLabel = null; } if (AttackModeLabel != null) { if (!AttackModeLabel.IsDisposed) { AttackModeLabel.Dispose(); } AttackModeLabel = null; } if (PetModeLabel != null) { if (!PetModeLabel.IsDisposed) { PetModeLabel.Dispose(); } PetModeLabel = null; } } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { CompanionDisplay = null; CompanionDisplayPoint = Point.Empty; if (CompanionTabControl != null) { if (!CompanionTabControl.IsDisposed) { CompanionTabControl.Dispose(); } CompanionTabControl = null; } if (CompanionBagTab != null) { if (!CompanionBagTab.IsDisposed) { CompanionBagTab.Dispose(); } CompanionBagTab = null; } if (PickUpFilterTab != null) { if (!PickUpFilterTab.IsDisposed) { PickUpFilterTab.Dispose(); } PickUpFilterTab = null; } if (ItemNameFilterTab != null) { if (!ItemNameFilterTab.IsDisposed) { ItemNameFilterTab.Dispose(); } ItemNameFilterTab = null; } if (EquipmentGrid != null) { for (int i = 0; i < EquipmentGrid.Length; i++) { if (EquipmentGrid[i] != null) { if (!EquipmentGrid[i].IsDisposed) { EquipmentGrid[i].Dispose(); } EquipmentGrid[i] = null; } } EquipmentGrid = null; } if (InventoryGrid != null) { if (!InventoryGrid.IsDisposed) { InventoryGrid.Dispose(); } InventoryGrid = null; } if (WeightLabel != null) { if (!WeightLabel.IsDisposed) { WeightLabel.Dispose(); } WeightLabel = null; } if (HungerLabel != null) { if (!HungerLabel.IsDisposed) { HungerLabel.Dispose(); } HungerLabel = null; } if (NameLabel != null) { if (!NameLabel.IsDisposed) { NameLabel.Dispose(); } NameLabel = null; } if (LevelLabel != null) { if (!LevelLabel.IsDisposed) { LevelLabel.Dispose(); } LevelLabel = null; } if (ExperienceLabel != null) { if (!ExperienceLabel.IsDisposed) { ExperienceLabel.Dispose(); } ExperienceLabel = null; } if (Level3Label != null) { if (!Level3Label.IsDisposed) { Level3Label.Dispose(); } Level3Label = null; } if (Level5Label != null) { if (!Level5Label.IsDisposed) { Level5Label.Dispose(); } Level5Label = null; } if (Level7Label != null) { if (!Level7Label.IsDisposed) { Level7Label.Dispose(); } Level7Label = null; } if (Level10Label != null) { if (!Level10Label.IsDisposed) { Level10Label.Dispose(); } Level10Label = null; } if (ModeComboBox != null) { if (!ModeComboBox.IsDisposed) { ModeComboBox.Dispose(); } ModeComboBox = null; } BagWeight = 0; MaxBagWeight = 0; InventorySize = 0; } }
void ReleaseDesignerOutlets() { if (ActiveItems_Label != null) { ActiveItems_Label.Dispose(); ActiveItems_Label = null; } if (CandyButton != null) { CandyButton.Dispose(); CandyButton = null; } if (Collected_Label != null) { Collected_Label.Dispose(); Collected_Label = null; } if (HelpLabel != null) { HelpLabel.Dispose(); HelpLabel = null; } if (HighScoreLabel != null) { HighScoreLabel.Dispose(); HighScoreLabel = null; } if (InfoButton != null) { InfoButton.Dispose(); InfoButton = null; } if (LevelLabel != null) { LevelLabel.Dispose(); LevelLabel = null; } if (LevelUpLabel != null) { LevelUpLabel.Dispose(); LevelUpLabel = null; } if (MainView != null) { MainView.Dispose(); MainView = null; } if (RestartButton != null) { RestartButton.Dispose(); RestartButton = null; } if (ScoreLabel != null) { ScoreLabel.Dispose(); ScoreLabel = null; } if (SettingsButton != null) { SettingsButton.Dispose(); SettingsButton = null; } }
private static void AddOptionLabel(SpanWithText span, LevelLabel label, bool isLeft, OptionData opt) { string text = label == LevelLabel.Объем ? opt.Volume.ToString() : label == LevelLabel.ОткрИнтерес ? opt.OpenInterest.ToString() : string.Format("{0:MMMyy}", opt.DateExpiration); if (isLeft) span.TextLeft = text; else span.TextRight = text; }