void SwitchBehavior() { Array values = Behaviors.GetValues(typeof(Behaviors)); state = (Behaviors)Rand.ChooseOne(values); behaviorTimer = Rand.Range(behaviorTimerMin, behaviorTimerMax); print("My state is: " + state.ToString() + ", Next behavior in " + behaviorTimer + " seconds"); }
private void ShowSection(Behaviors.Sections.Abstract.Section section, Point p) { List<PointF> points = null; try { points = section.GetValues(_file, p).ToList(); } catch { Forms.FormsHelper.ShowErrorMsg("Невозможно построить сечение"); return; } var mark = section.InitialPointMark; var caption = GetSectionFormCaption(section); using (var sectionForm = new Forms.SectionGraphForm(points, mark, caption)) { sectionForm.ShowDialog(); } _section.ResetSection(); }