/// <summary> /// performs the action of processing the labels to prepare for printing /// </summary> private void ProcessLabels() { foreach (var selectedFamily in CheckInState.CheckIn.Families.Where(p => p.Selected)) { List <CheckInPerson> selectedPeople = selectedFamily.People.Where(p => p.Selected).ToList(); using (var rockContext = new RockContext()) { foreach (CheckInPerson selectedPerson in selectedPeople) { foreach (var groupType in selectedPerson.GroupTypes.Where(gt => gt.Selected)) { if (groupType.Labels != null) { foreach (var label in groupType.Labels) { var file = new BinaryFileService(rockContext).Get(label.FileGuid); Labels.Add(label); } } } } } } }
/// <summary> /// Update method /// </summary> /// <param name="gameTime"></param> protected override void Update(TimeSpan gameTime) { this.secondsTime += gameTime.TotalSeconds; if (this.index < this.Count && secondsTime > this.Interval) { this.secondsTime = 0; var offsetPosition = new Vector3((float)((0.5f * this.random.NextDouble() - 0.5f) * this.PositionRandom.X), (float)((0.5f * this.random.NextDouble() - 0.5f) * this.PositionRandom.Y), (float)((0.5f * this.random.NextDouble() - 0.5f) * this.PositionRandom.Z)); var position = this.transform.Position + offsetPosition; Entity box = Helpers.CreateBox("box" + this.index, position, Vector3.One * this.ItemSize, this.Mass, 3f); boxes.Add(box); EntityManager.Add(box); this.index++; Labels.Add("Emiter boxes", boxes.Count.ToString()); } inputService = WaveServices.Input; if (inputService.KeyboardState.IsConnected) { if (inputService.KeyboardState.R == ButtonState.Pressed && beforeKeyboardState.R != ButtonState.Pressed) { ResetEmiter(); } } beforeKeyboardState = inputService.KeyboardState; }
/// <summary> /// Constructs an instance from the dynamic network information returned by /// the Docker engine. /// </summary> /// <param name="source">The dynamic source value.</param> internal DockerNetwork(dynamic source) : this() { this.Inner = source; this.Name = source.Name; this.Id = source.Id; this.Scope = source.Scope; this.Driver = source.Driver; this.EnableIPv6 = source.EnableIPv6; this.Internal = source.Internal; this.Ipam = new DockerNetworkIpam(source.IPAM); foreach (var item in source.Containers) { Containers.Add(new DockerNetworkContainer(item)); } foreach (var item in source.Options) { Options.Add(item.Name, item.Value.ToString()); } foreach (var item in source.Labels) { Labels.Add(item.Name, item.Value.ToString()); } }
public async Task LoadAsync(ChartViewItem item) { try { using (var col = Items.LockChangedEvent()) { StopTicker(); CreateSeries(item); Items.Clear(); IEnumerable <ChartLookup> values = await _service.GetLookups(item.Model); foreach (var val in values) { Series[0].Values.Add(val.Value); Labels.Add(val.Date.ToShortDateString()); Items.Add(val); } } if (Items.Count > _ItemsCount) { ProcessTicker(); } } catch (Exception x) { _errorInfo.ShowError(x); } }
protected override void Update(TimeSpan gameTime) { inputService = WaveServices.Input; if (inputService.KeyboardState.IsConnected) { if (inputService.KeyboardState.D1 == ButtonState.Pressed && beforeKeyboardState.D1 != ButtonState.Pressed && state != State.PICK) { Entity e = EntityManager.Find("MainCamera"); LaunchBehavior behavior = e.FindComponent <LaunchBehavior>(); if (behavior != null) { behavior.Reset(); e.RemoveComponent <LaunchBehavior>(); } e.AddComponent(new PickingBehavior()); state = State.PICK; } else if (inputService.KeyboardState.D2 == ButtonState.Pressed && beforeKeyboardState.D2 != ButtonState.Pressed && state != State.LAUNCH) { Entity e = EntityManager.Find("MainCamera"); e.RemoveComponent <PickingBehavior>(); e.AddComponent(new LaunchBehavior()); state = State.LAUNCH; } Labels.Add("CameraState", this.state.ToString()); } beforeKeyboardState = inputService.KeyboardState; }
public AboveLineTrainingEntry(double x, double y, string lbl) { // Test example; "Valid line" is x=y Labels.Add(DoubleExtension.BoolToDouble(y >= x)); Inputs.Add(x); Inputs.Add(y); }
public virtual void UpdateLabels(List <string> labels) { Labels.Clear(); foreach (string label in labels) { Labels.Add(label); } }
public Teljesites() : base() { Labels.Add("Vételár"); Labels.Add("Áfa"); Labels.Add("Banki átutalás-e"); Labels.Add("Részteljesítés"); Labels.Add("Határidő"); }
Label NewLabel() { var lab = new Label(_tryCatchStack.Count > 0 ? _tryCatchStack.Last() : null); Labels.Add(lab); return(lab); }
public bool IsRowEmpty(int rowNo) { while (Labels.Count <= rowNo) { Labels.Add(null); } return(Labels[rowNo] == null); }
public Reszvetel() : base() { Labels.Add("Szerződés az"); Labels.Add("Személy az"); Labels.Add("Szervezet az"); Labels.Add("Résztvevő Típus"); Labels.Add("Szerep"); }
/// <summary> /// Write a offset with the offset marked as a label. Use set label later to change that /// label into an absolute offset. /// </summary> /// <param name="opcode"></param> /// <param name="label"></param> public void EmitLabel(Opcode opcode, string label) { Labels.Add(Length, label); Buffer.Position = Length; writer.Write((byte)opcode); writer.Write((short)0x0bad); writer.Flush(); Length = (int)Buffer.Position; }
public SzerzodesTargy() : base() { Labels.Add("Ingatlan az"); Labels.Add("Ingó az"); Labels.Add("Gépjármű az"); Labels.Add("Szerződés az"); Labels.Add("Eladó tulajdon arány"); Labels.Add("Teljesítés az"); }
// Get the last measured value of choosen measuring point and add it to series collection private void actualData(string measuringPoint) { var dataCollected = MainWindow.plcConnect.getData().Where(p => p.MeasuringPoin.Equals(measuringPoint)).Last(); SeriesCollection[0].Values.Remove(Convert.ToDouble(SeriesCollection[0].Values[0].ToString())); Labels.Remove(Labels[0].ToString()); SeriesCollection[0].Values.Add(Math.Round(Convert.ToDouble(dataCollected.Value), 2)); Labels.Add(dataCollected.Time); }
public LabelListSettingVm(LabelListSetting listSetting) { foreach (var setting in listSetting.LabelSettings) { //var vm = new LabelSettingVm(listSetting.RelatedLabelProperties.LabelClasses, setting.RelatedAttributeLabelClass, setting.Name); var vm = new LabelSettingVm(listSetting, setting); Labels.Add(vm); } }
public Cim() : base() { Labels.Add("Ország"); Labels.Add("Irányítószám"); Labels.Add("Város"); Labels.Add("Utca"); Labels.Add("Házszám"); Labels.Add("Emelet"); }
internal MsilLabel LabelAt(int i) { if (Labels.TryGetValue(i, out MsilLabel label)) { return(label); } Labels.Add(i, label = new MsilLabel()); return(label); }
public ReconnectionPage(BluetoothMag bluetooth) { InitializeComponent(); BGStuff.reconnectionPage = this; this.bluetooth = bluetooth; Labels.Add(txtTrying); Buttons.Add(btnCancel); ApplyTheme(); }
public DevIssueViewModel(DevIssue issue) { ID = issue.ID; Name = issue.Name; Content = issue.Content; PlayerType = SessionHelper.LoggedCitizen.GetPlayerType(); Day = issue.Day; Time = issue.Time.ToShortTimeString(); Avatar = new SmallEntityAvatarViewModel(issue.Citizen.Entity); Avatar.Classname = "avatar"; Files = issue.DevIssueUploadedFiles.ToList() .Select(f => new DevIssueUploadedFileViewModel(f)).ToList(); var actualLabels = issue.DevIssueLabelTypes.ToList(); foreach (var label in Enum.GetValues(typeof(DevIssueLabelTypeEnum)).Cast <DevIssueLabelTypeEnum>()) { var item = new SelectListItem() { Text = label.ToString(), Value = ((int)label).ToString(), Selected = actualLabels.Any(l => l.ID == (int)label) }; LabelTypes.Add(item); } foreach (var visibility in Enum.GetValues(typeof(VisibilityOptionEnum)).Cast <VisibilityOptionEnum>()) { var item = new SelectListItem() { Text = visibility.ToString(), Value = ((int)visibility).ToString(), Selected = issue.VisibilityOptionID == (int)visibility }; VisiblityOptions.Add(item); } foreach (var label in actualLabels) { labelIDs.Add(label.ID); Labels.Add(new DevIssueLabelViewModel(label)); } Score = ScoreHelper.ToString(issue.DevIssueVotes.Sum(v => v.Score)); CanVote = issue.DevIssueVotes.Any(v => v.CitizenID == SessionHelper.LoggedCitizen.ID) == false; CanUnvote = !CanVote; loadComments(issue); }
private void GetTrades() { var trades = AppService.Instance.GetCompletedTrades(); if (trades.Count == 0) { _noData = true; OnPropertyChanged("NoDataVisible"); return; } Offers = trades.Select(o => new StatsOffer() { ItemName = o.ItemName, PlayerName = o.PlayerName, Price = o.Price.ToString(), CurrencyImageLink = o.CurrencyImageLink == null ? AppService.Instance.GetCurrencyImageLink(o.Currency) : o.CurrencyImageLink }) .ToList(); var groups = GroupByDate(trades.OrderBy(t => t.Time).ToList()); int totalCurrency = 0; Dictionary <string, int> currencies = new Dictionary <string, int>(); foreach (var d in groups.Keys) { Labels.Add(d.ToString("dd MMM")); Trades[0].Values.Add(new ObservableValue(groups[d].Count())); Currencies[0].Values.Add(new ObservableValue(groups[d].Sum(t => t.Currency.ToLower() == "chaos" ? t.Price : Math.Ceiling(AppService.Instance.GetChaosValueOfRealNameCurrency(t.Currency) * t.Price)))); foreach (var t in groups[d]) { string currencyName = AppService.Instance.GetCurrencyRealName(t.Currency.ToLower()); if (!currencies.ContainsKey(currencyName)) { currencies.Add(currencyName, 0); } ++currencies[currencyName]; ++totalCurrency; } } foreach (var c in currencies.Keys) { CurrencyGroups.Add(new PieSeries { Title = c, Values = new ChartValues <ObservableValue>() { new ObservableValue(Math.Round((double)currencies[c] / (double)totalCurrency, 2)) } }); } }
protected override void OnMouseUp(MouseButtonEventArgs e) { Point location = RenderContextUtility.ConvertPoint(GetMousePosition(e)); if (GetToolBar().Contains(location)) { base.OnMouseUp(e); return; } if (_measuring) { if (e.ChangedButton == MouseButton.Left) { if (_firstClick == false) { _points.Clear(); _firstClick = true; } if (FindClosestPoint(location) == -1) { StopMeasuring(false); } else { _points.Add(_measureEndPoint); if (_points.Count > 1) { _line = new Line(_points[0], _points[1]) { LineWeightMethod = colorMethodType.byEntity, LineWeight = 1 }; string text = String.Format("{0} mm", Math.Round(_line.Length(), 2)); var to = new TextOnly((_line.StartPoint + _line.EndPoint) / 2, text, new Font("Tahoma", 8.25f), Color.Black, ContentAlignment.BottomLeft); Entities.Add(_line, Color.Black); Labels.Add(to); Invalidate(); StopMeasuring(false); } } } else if (e.ChangedButton == MouseButton.Right) { ResetMeasuring(); } } base.OnMouseUp(e); }
public void AddChartData(string label, int value) { Json labelItem = Labels.Add(); labelItem.SetStringValue(label); Json temperatureItem = Temperatures.Add(); temperatureItem.SetIntegerValue(value); }
/// <summary> /// Загрузка ярлыков на текущий рабочий стол /// </summary> public void LoadLabels() { Labels.Clear(); var tmpList = LabelService.GetLabelsRange(DesktopIndex, DesktopService.GetDesktop(DesktopIndex).LabelCount); foreach (LabelModel labelModel in tmpList) { Labels.Add(new LabelViewModel(labelModel, User.Login, User.Font, User.FontSize, User.FontBold, User.FontItalic, User.FontUnderline, User.FontStrikeout, User.FontColor)); } }
public void AddChartData(string label, int value) { Json labelItem = Labels.Add(); labelItem.StringValue = label; Json temperatureItem = Temperatures.Add(); temperatureItem.IntegerValue = value; }
private void DoAddLabel() { var newLabel = LabelCreateAndUpdateLogic.Create(); dataCenter.AddNewLabel(newLabel); connectionService.SendLabelAddedNotification(newLabel); Labels.Add(newLabel); SelectedLabel = newLabel; }
private void FillLabels(Dictionary <DateTime, decimal> groupDetais, bool isSortedByMonth) { if (Labels.Count == 0) { foreach (DateTime span in groupDetais.Keys) { Labels.Add(isSortedByMonth ? span.ToString("yyyy-MM") : span.ToString("yyyy")); } } }
public Label AddLabel(string name, System.Drawing.Color color) { Label item = new Label() { Index = _labels.Count + 1, Name = name, Color = color }; Labels.Add(item); return(item); }
private void SetPerformingNavigationFlag(bool value) { if (value && this.IsPerformingNavigation) { throw new InvalidOperationException("Another navigation is in progress"); } this.IsPerformingNavigation = value; Labels.Add("IsPerformingNavigation", this.IsPerformingNavigation); }
/// <summary> /// Adds the specified label to the issue. /// </summary> /// <param name="name">The name of the label.</param> public void AddLabel(string name) { // lazily create the label array if (Labels == null) { Labels = new List <string>(); } Labels.Add(name); }
public Label GetNamedLabel(string labelName) { Label label; if (!Labels.TryGetValue(labelName, out label)) { Labels.Add(labelName, label = IL.DefineLabel()); } return(label); }