protected override void OnBeforePrint(PrintEventArgs e) { base.OnBeforePrint(e); ReportLocalizer.Localize(this); ApplyRowStyle(xrRow1); ApplyRowStyle(xrDetailRow); }
public WorldsTimeRecordingWeekly() { InitializeComponent(); // if (ClientEnvironment.IsRuntimeMode) { ReportLocalizer.Localize(this); } }
public ManpowerTimePlanningPrintout() { InitializeComponent(); if (ClientEnvironment.IsRuntimeMode) { ReportLocalizer.Localize(this); } }
protected override void OnBeforePrint(PrintEventArgs e) { base.OnBeforePrint(e); ReportLocalizer.Localize(this); tc_World.Text = Localizer.GetLocalized("world") + " :"; fieldStore.Text = string.Format("{0}: {1}", Localizer.GetLocalized("Store"), _Props.StoreName); fieldWorld.Text = _Props.WorldName; if (_Props.WordID <= 0) { tc_World.Text = fieldWorld.Text = string.Empty; } tc_TimeRange.Text += string.Format("{0} {1}:\t{2} - {3}", Localizer.GetLocalized("year"), _Props.Year, _Props.StartDate.ToShortDateString(), _Props.EndDate.ToShortDateString()); switch (_Props.View) { case AbsencePlanningView.YearlyView: _DataTable = new YearTableFactory(AdaptToList(), _Props.Year, _Props.OnlyHolidays, _Props.ShowSummary); xrSubreport.ReportSource = (_Props.IsAustria ? new AbsenceYearlyAustria() as AbsenceYearly : new AbsenceYearly()).Bind(_DataTable as YearTableFactory); break; case AbsencePlanningView.MonthlyView: _DataTable = new MonthTableFactory(AdaptToList(), _Props.Year, _Props.MonthOrWeek, _Props.OnlyHolidays, _Props.ShowSummary); if (PaperKind == PaperKind.A3) { if (_Props.IsAustria) { xrSubreport.ReportSource = new AbsenceQuartlyAustria().Bind(_DataTable as MonthTableFactory); } else { xrSubreport.ReportSource = new AbsenceQartly().Bind(_DataTable as MonthTableFactory); } } else if (_Props.IsAustria) { xrSubreport.ReportSource = new AbsenceQuartlyAustriaA4().Bind(_DataTable as MonthTableFactory); } else { xrSubreport.ReportSource = new AbsenceQuartlyA4().Bind(_DataTable as MonthTableFactory); } break; case AbsencePlanningView.WeeklyView: _DataTable = new WeekTableFactory(AdaptToList(), _Props.Year, _Props.MonthOrWeek); xrSubreport.ReportSource = new AbsenceWeekly(); break; } }
public TimePlanningDaily() { InitializeComponent(); if (ClientEnvironment.IsRuntimeMode) { fieldCell_EmployeeName.DataBindings.Add("Text", DataSource, "FullName"); ReportLocalizer.Localize(this); } }
protected override void OnBeforePrint(PrintEventArgs e) { base.OnBeforePrint(e); ReportLocalizer.Localize(this); tblCaptionMonths.Height = 25; int month = 0; XRTableCell monthCell = null; XRTableCell weekCaptionCell = null; XRTableCell weekDataCell = null; int weekWidth = CalcWeekWidth(); CalculateWidth(weekWidth); int monthWeeksCount = 1; for (int monthNumer = 1; monthNumer < 13; monthNumer++) { foreach (int weekNumber in m_Data.Wrapper.GetWeekNumbersByMonths(monthNumer)) { if (month != monthNumer) { if (monthCell == null) { monthCell = lbCell_January; } else { tblCaptionMonths.InsertColumnToRight(monthCell); monthCell.Width = weekWidth * monthWeeksCount; monthCell = monthCell.NextCell; monthCell.Font = m_HeadFont; monthCell.Text = ReportLocalizer.GetMonthName(monthNumer); } monthCell.TextAlignment = TextAlignment.MiddleCenter; month = monthNumer; monthWeeksCount = 1; } else { monthWeeksCount++; } if (weekCaptionCell == null) { weekCaptionCell = lbCell_Week01; } else { tblCaptionWeeks.InsertColumnToRight(weekCaptionCell); weekCaptionCell.Width = weekWidth; weekCaptionCell = weekCaptionCell.NextCell; } weekCaptionCell.TextAlignment = TextAlignment.MiddleCenter; weekCaptionCell.Text = weekNumber.ToString(); weekCaptionCell.Font = m_HeadFont; if (weekDataCell == null) { weekDataCell = fieldCellWeek01; weekDataCell.Font = m_DataFont; } else { tblData.InsertColumnToRight(weekDataCell); weekDataCell.Width = weekWidth; weekDataCell.Font = m_DataFont; weekDataCell = weekDataCell.NextCell; } m_Data.BindDynamicCell(weekDataCell, weekNumber); weekDataCell.Name = PrintoutConst.DynName(weekNumber); weekDataCell.BeforePrint += new PrintEventHandler(weekDataCell_BeforePrint); } } }
//Wu.Country@2007-10-31 16:04 modified some of the following code. #region static static protected CurrentDesign.DesignerActionPropertyItem CreatePropertyItem(string memberName, ReportStringId id) { return(new CurrentDesign.DesignerActionPropertyItem(memberName, ReportLocalizer.GetString(id), "")); }
private static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += Application_ThreadException; ClientEnvironment.IsRuntimeMode = true; UCBaseEntity.IsDesignMode = false; DefaultDiction.BuildDefaultResource(); RemotingConfiguration.Configure("Baumax.Client.exe.config", false); // Define channel security IEnumerator channelEnum = ChannelServices.RegisteredChannels.GetEnumerator(); while (channelEnum.MoveNext()) { BasicChannelWithSecurity channel = channelEnum.Current as BasicChannelWithSecurity; if (channel != null) { channel.ITransportContext.IKeyStore.SetKey("/BAUMAX/SES", new KeyProvider_SelfEstablishingSymmetric()); } } if (!DoLogin()) { return; } try { mainForm = new MainForm(); mainForm.Text += String.Format(" - '{0}'", ClientEnvironment.AuthorizationService.GetCurrentUser().LoginName); ClientEnvironment.MainForm = mainForm; RequestNotificationService.Attach(mainForm); GenuineGlobalEventProvider.GenuineChannelsGlobalEvent += GenuineGlobalEventProvider_GenuineChannelsGlobalEvent; ReportLocalizer.InitDevExPreviewLocalizer(); DevExLocalizer.InitDevExLocalizer(); DevExGridLocalizer.InitDevExGridLocalizer(); Application.Run(mainForm); ClientEnvironment.DoLogout(); } catch (EntityException ex) { log.Error("Unhandled", ex); // 2think: how to localize? using (FrmEntityExceptionDetails frm = new FrmEntityExceptionDetails(ex)) { frm.Text = "Unhandled exception"; frm.ShowDialog(); } } catch (Exception ex) { log.Error("Unhandled", ex); MessageBox.Show(ex.ToString(), "Unhandled exception"); } }