void ReleaseDesignerOutlets() { if (DailyTemperatureLabel != null) { DailyTemperatureLabel.Dispose(); DailyTemperatureLabel = null; } if (DayLabel != null) { DayLabel.Dispose(); DayLabel = null; } if (NightTemperatureLabel != null) { NightTemperatureLabel.Dispose(); NightTemperatureLabel = null; } if (WeatherIconImageView != null) { WeatherIconImageView.Dispose(); WeatherIconImageView = null; } }
private void monthCalendarAdv2_PaintLabel(object sender, DayPaintEventArgs e) { // Cross Sundays and disable selection DayLabel day = sender as DayLabel; if (day != null && day.Date > DateTime.MinValue && day.Date.DayOfWeek == DayOfWeek.Sunday) { day.Selectable = false; // Mark label as not selectable... day.TrackMouse = false; // Do not track mouse movement... e.PaintBackground(); e.PaintText(Color.Gray); Rectangle r = day.Bounds; r.Inflate(-2, -2); SmoothingMode sm = e.Graphics.SmoothingMode; e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; using (Pen pen = new Pen(Color.FromArgb(128, Color.Red))) { e.Graphics.DrawLine(pen, r.X, r.Y, r.Right, r.Bottom); e.Graphics.DrawLine(pen, r.Right, r.Y, r.X, r.Bottom); } e.Graphics.SmoothingMode = sm; // Ensure that no part is rendered internally by control... e.RenderParts = DevComponents.Editors.DateTimeAdv.eDayPaintParts.None; } }
void ReleaseDesignerOutlets() { if (DayLabel != null) { DayLabel.Dispose(); DayLabel = null; } if (HoursLabel != null) { HoursLabel.Dispose(); HoursLabel = null; } }
private void monthCalendarAdv2_MonthChanged(object sender, EventArgs e) { // You can use this event to add custom markers to the calendar for example mark appointments for days... // In this sample we'll just pick the day 8 days from today... DateTime date = DateTime.Today.AddDays(8); // DayLabel control is used to represents each date on calendar DayLabel day = monthCalendarAdv2.GetDay(date); if (day != null) // Null will be returned if date is not displayed on calendar { // Display image on the label... day.Image = global::EditorsDateNumericCalendar.Properties.Resources.Bell; day.ImageAlign = eLabelPartAlignment.MiddleRight; day.TextAlign = eLabelPartAlignment.MiddleLeft; day.Tooltip = "Click image to see appointments"; // You can display the popup when day image is clicked with for example the appointment details... day.SubItems.Add(new ButtonItem("appointment1", "10:45 AM Call Dave to setup meeting")); day.SubItems.Add(new ButtonItem("appointment2", "12:05 PM Lunch with Kurt")); } }
void ReleaseDesignerOutlets() { if (DateLabel != null) { DateLabel.Dispose(); DateLabel = null; } if (DayLabel != null) { DayLabel.Dispose(); DayLabel = null; } if (Humid2Label != null) { Humid2Label.Dispose(); Humid2Label = null; } if (IconImage2 != null) { IconImage2.Dispose(); IconImage2 = null; } if (Speed2Label != null) { Speed2Label.Dispose(); Speed2Label = null; } if (Temp2Label != null) { Temp2Label.Dispose(); Temp2Label = null; } }
void ReleaseDesignerOutlets() { if (ActivityIndicator != null) { ActivityIndicator.Dispose(); ActivityIndicator = null; } if (BgImageView != null) { BgImageView.Dispose(); BgImageView = null; } if (CityLabel != null) { CityLabel.Dispose(); CityLabel = null; } if (ContentView != null) { ContentView.Dispose(); ContentView = null; } if (ContentView_LayoutCenterY != null) { ContentView_LayoutCenterY.Dispose(); ContentView_LayoutCenterY = null; } if (DayLabel != null) { DayLabel.Dispose(); DayLabel = null; } if (HumidityLabel != null) { HumidityLabel.Dispose(); HumidityLabel = null; } if (MainLabel != null) { MainLabel.Dispose(); MainLabel = null; } if (MonthLabel != null) { MonthLabel.Dispose(); MonthLabel = null; } if (TableView != null) { TableView.Dispose(); TableView = null; } if (TempLabel != null) { TempLabel.Dispose(); TempLabel = null; } if (WindLabel != null) { WindLabel.Dispose(); WindLabel = null; } }