public AddMechanicForm(NewVipAvtoSet set) { _set = set; Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.Language); InitializeComponent(); }
public VisualRow(NewVipAvtoSet.NormativesRow norma, DRandom random) { Id = norma.Tag; _minval = norma.MinValue; _maxval = norma.MaxValue; _random = random; }
public EditNormativeForm(NewVipAvtoSet.NormativesRow selected, NewVipAvtoSet set) { Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.Language); InitializeComponent(); _selected = selected; _set = set; }
public EditMechanicForm(NewVipAvtoSet.MechanicsRow row, NewVipAvtoSet set) { Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.Language); InitializeComponent(); _selected = row; _set = set; }
public EditGroupForm(NewVipAvtoSet.GroupsRow select, NewVipAvtoSet set) { Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.Language); InitializeComponent(); _selectedRow = select; _set = set; }
public AddProtocol(NewVipAvtoSet set) { _set = set; Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.Language); InitializeComponent(); _gbo = GBOSTATE.None; _rows = new List<VisualRow>(); }
public static void DrawPictorgam(this Graphics graphics, NewVipAvtoSet.MesuresRow[] mesures, int i, int height, Font normalFont, int ind, bool mode = false) { var sf = new StringFormat { Alignment = StringAlignment.Center }; var norms = new Normatives(); NewVipAvtoSet.MesuresRow[] value = (from NewVipAvtoSet.MesuresRow item in mesures where item.NormativeTag == i select item) .ToArray(); if (value.Length == 0) { graphics.DrawImage(Resources.none, 690, height, 15, 15); } else { if (mode) graphics.DrawString( value[0].Value + " (" + Math.Round(GetSmokeVal(value[0].Value), norms.DecimalPoints[ind]) + ")", normalFont, Brushes.Black, new PointF(610F, height), sf); else { graphics.DrawString(value[0].Value.ToString(), normalFont, Brushes.Black, new PointF(610F, height), sf); } double minval = value[0].MinValue; double maxval = norms.HardNorms[ind]; if (mode) graphics.DrawString( String.Format("[{0};{1}] ({2};{3})", minval, maxval, Math.Round(GetSmokeVal(minval), norms.DecimalPoints[ind]), Math.Round(GetSmokeVal(maxval), norms.DecimalPoints[ind])), normalFont, Brushes.Black, new PointF(510F, height), sf); else { graphics.DrawString(String.Format("[{0};{1}]", minval, maxval), normalFont, Brushes.Black, new PointF(510F, height), sf); } if (minval <= value[0].Value && value[0].Value <= maxval) { graphics.DrawImage(Resources.pass, 690, height, 15, 15); } else { graphics.DrawImage(Resources.fail, 690, height, 15, 15); } } }
public PrintJournalDocument(NewVipAvtoSet.ProtocolsRow[] rows, DateTime from, DateTime to, NewVipAvtoSet set) { Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.Language); _rows = rows; _from = from; _to = to; _set = set; OriginAtMargins = true; DefaultPageSettings.Margins = new Margins(40, 30, 30, 30); DocumentName = _rm.GetString("journal") + from.ToShortDateString() + " - " + to.ToShortDateString(); PrintPage += PrintProtocolDocument_PrintPage; DefaultPageSettings.PaperSize.RawKind = 9; /*A4 - http://msdn.microsoft.com/en-us/library/system.drawing.printing.papersize.rawkind(v=vs.110).aspx */ }
public PrintProtocolDocument(NewVipAvtoSet.ProtocolsRow protocol, NewVipAvtoSet set) { Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.Language); _protocolRow = protocol; _mesures = protocol.GetMesuresRows(); _set = set; OriginAtMargins = true; DefaultPageSettings.Margins = new Margins(60, 30, 30, 30); DocumentName = _rm.GetString("protocol") + " №" + _protocolRow.BlankNumber; PrintPage += PrintProtocolDocument_PrintPage; DefaultPageSettings.PaperSize.RawKind = 9; /*A4 - http://msdn.microsoft.com/en-us/library/system.drawing.printing.papersize.rawkind(v=vs.110).aspx */ }