some stuff
This commit is contained in:
@@ -243,6 +243,7 @@
|
||||
<Compile Include="Utility\Lui\Header\DefaultHeader.xaml.cs">
|
||||
<DependentUpon>DefaultHeader.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Lui\ListBoxFixed.cs" />
|
||||
<Compile Include="Utility\Lui\Templates\WeekView.xaml.cs">
|
||||
<DependentUpon>WeekView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<phone:Pivot x:Name="ThePivot" SelectionChanged="OnPivotSelectionChanged">
|
||||
<phone:Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible">
|
||||
<templ:WeekView />
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible" Loaded="ScrollViewer_Loaded">
|
||||
<templ:WeekView x:Name="TheWeekView" Loaded="TheWeekView_Loaded"/>
|
||||
</ScrollViewer>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWP8.Model.TimeTable;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility.Lui.Templates;
|
||||
|
||||
public partial class TimeTableWeek : PhoneApplicationPage
|
||||
{
|
||||
@@ -29,19 +30,17 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
private static readonly double WEEK_TABLE_HEAD_HALF = 15;
|
||||
private static readonly double WEEK_TABLE_INNER_THICKNESS = 1;
|
||||
private static readonly int WEEK_TABLE_ZINDEX_MAX = 10;
|
||||
private static readonly double WEEK_TABLE_ZINDEX_SHIFT = 3;
|
||||
|
||||
//private static readonly int WEEK_DAYS_IN_WEEK = 5;
|
||||
|
||||
private struct PageItem
|
||||
{
|
||||
public Canvas[] Content { get; set; }
|
||||
public DateTime DateFrom { get; set; }
|
||||
public DateTime DateTo { get; set; }
|
||||
public char WeekChar { get; set; }
|
||||
public int WeekNumber { get; set; }
|
||||
//public List<List<AppointmentModel>>[] Stacks { get; set; }
|
||||
public List<List<AppointmentModel>> Stacks { get; set; }
|
||||
public WeekView weekView { get; set; }
|
||||
//???
|
||||
public List<Appointment> appointmentList { get; set; }
|
||||
}
|
||||
|
||||
private static readonly int PIVOT_PAGES = 3;
|
||||
@@ -50,9 +49,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
|
||||
private PageItem[] itemPages = new PageItem[PIVOT_PAGES];
|
||||
private int lastSelectedIndex = 0;
|
||||
//private double APP_BAR_SPACE = 0;
|
||||
private int loadedWeekView = 0;
|
||||
private string[] testPiIt = new string[3] { "bla_1", "bla_2", "bla_3" };
|
||||
|
||||
|
||||
public TimeTableWeek()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -60,25 +60,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
DateTime firstDay = this.GetFirstDayOfWeek(DateTime.Now).AddDays(-7 * PIVOT_PAGES_HALF_DOWN);
|
||||
|
||||
this.ThePivot.ItemsSource = this.testPiIt;
|
||||
/*
|
||||
for (int i = 0; i < PIVOT_PAGES; i++)
|
||||
{
|
||||
/*
|
||||
this.itemPages[i].Stacks = new List<List<AppointmentModel>>[5]
|
||||
{
|
||||
new List<List<AppointmentModel>>(),
|
||||
new List<List<AppointmentModel>>(),
|
||||
new List<List<AppointmentModel>>(),
|
||||
new List<List<AppointmentModel>>(),
|
||||
new List<List<AppointmentModel>>()
|
||||
};
|
||||
*/
|
||||
/*
|
||||
this.itemPages[i].Stacks = new List<List<AppointmentModel>>();
|
||||
this.CreatePage(i, firstDay);
|
||||
firstDay = firstDay.AddDays(7);
|
||||
}
|
||||
*/
|
||||
|
||||
ApplicationBarIconButton dayViewBtn = new ApplicationBarIconButton();
|
||||
dayViewBtn.Text = AppResources.DayView;
|
||||
dayViewBtn.IconUri = new Uri(Icons.Info, UriKind.Relative);
|
||||
@@ -102,8 +84,6 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
addBtn.IconUri = new Uri(Icons.Add, UriKind.Relative);
|
||||
addBtn.Click += new EventHandler(this.OnClickCreate);
|
||||
ApplicationBar.Buttons.Add(addBtn);
|
||||
|
||||
//this.APP_BAR_SPACE = ApplicationBar.DefaultSize;
|
||||
}
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
@@ -153,13 +133,17 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
|
||||
private void OnClickDayView(object sender, EventArgs e)
|
||||
{
|
||||
/********* REMOVED FOR TESTING ********
|
||||
Uri url = new Uri(Constants.PathTimeTable_Day, UriKind.Relative);
|
||||
Page page = App.RootFrame.Content as Page;
|
||||
page.NavigationService.Navigate(url);
|
||||
*/
|
||||
this.itemPages[this.ThePivot.SelectedIndex].weekView.SetColumnBackground(0, new SolidColorBrush(Colors.Red));
|
||||
}
|
||||
|
||||
private void OnClickToday(object sender, EventArgs e)
|
||||
{
|
||||
/******* REMOVED FOR TESTING ********
|
||||
DateTime firstDay = this.GetFirstDayOfWeek(DateTime.Now).AddDays(-7 * PIVOT_PAGES_HALF_DOWN);
|
||||
this.ThePivot.SelectedIndex = PIVOT_PAGES_HALF_DOWN;
|
||||
|
||||
@@ -177,6 +161,8 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
|
||||
this.SetupPage(i);
|
||||
}
|
||||
*/
|
||||
this.itemPages[this.ThePivot.SelectedIndex].weekView.SetColumnBackground(0);
|
||||
}
|
||||
|
||||
private void OnClickProperties(object sender, EventArgs e)
|
||||
@@ -256,7 +242,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
int dayIndex = (indexVal >> 24) & 0xF;
|
||||
int index = (indexVal >> 12) & 0xFFF;
|
||||
int listIndex = (indexVal) & 0xFFF;
|
||||
|
||||
/*
|
||||
//AppointmentModel tempModel = this.itemPages[index].Stacks[dayIndex][listIndex].First();
|
||||
//this.itemPages[index].Stacks[dayIndex][listIndex].Remove(tempModel);
|
||||
//this.itemPages[index].Stacks[dayIndex][listIndex].Add(tempModel);
|
||||
@@ -289,11 +275,11 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.RemoveContentUIElement(index, sender as Canvas);
|
||||
*/
|
||||
// this.RemoveContentUIElement(index, sender as Canvas);
|
||||
|
||||
bool bubbleDrawn = false;
|
||||
|
||||
/*
|
||||
for (int day = 0; day < 5; day++)
|
||||
{
|
||||
if (this.itemPages[index].Stacks[listIndex][0].IsDate(this.itemPages[index].DateFrom.Date.AddDays(day)) > -1 && bubbleDrawn == false)
|
||||
@@ -309,7 +295,8 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
tempCan[0].Margin.Top);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private void OnListChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
@@ -354,8 +341,6 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
|
||||
headGrid.Width = e.NewSize.Width;
|
||||
|
||||
this.DrawBackground(tempBG);
|
||||
|
||||
this.SetupPage(index);
|
||||
}
|
||||
}
|
||||
@@ -379,7 +364,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
this.itemPages[index].Stacks[i].Clear();
|
||||
}
|
||||
/**/
|
||||
this.itemPages[index].Stacks.Clear();
|
||||
// this.itemPages[index].Stacks.Clear();
|
||||
|
||||
// this.itemPages[index].Content.Children.Clear();
|
||||
/*
|
||||
@@ -405,6 +390,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
// -------------------------------------------------------
|
||||
/*
|
||||
for (int i = 0; i < tempList.Count(); i++)
|
||||
{
|
||||
int[] intersectIndex = tempList[i].IntersectArray(tempList.ToArray());
|
||||
@@ -495,6 +481,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
for (int day = 0; day < 5; day++)
|
||||
{
|
||||
@@ -571,6 +558,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
// stack draw
|
||||
//for (int day = 0; day < 5; day++)
|
||||
{
|
||||
@@ -597,6 +585,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
Canvas[] tempCan = this.GetModelCanvasFromContent(index, this.itemPages[index].Stacks[day][i][0]);
|
||||
// FIXME: tempCan[0] ->
|
||||
@@ -608,6 +597,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
tempCan[0].Width + tempCan[0].Margin.Left,
|
||||
tempCan[0].Margin.Top);
|
||||
*/
|
||||
/*
|
||||
for (int day = 0; day < 5; day++)
|
||||
{
|
||||
if (this.itemPages[index].Stacks[i][0].IsDate(this.itemPages[index].DateFrom.Date.AddDays(day)) > -1)
|
||||
@@ -624,6 +614,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private void CreatePage(int itemIndex, DateTime weekStart)
|
||||
@@ -638,46 +629,11 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
DayOfWeek.Monday);
|
||||
this.itemPages[itemIndex].WeekChar = ((this.itemPages[itemIndex].WeekNumber % 2) == 0) ? 'B' : 'A';
|
||||
|
||||
ScrollViewer sv = new ScrollViewer();
|
||||
sv.Loaded += new RoutedEventHandler(this.OnAutoScroll);
|
||||
Canvas container = new Canvas();
|
||||
container.Height = WEEK_TABLE_CELL_HEIGHT * 24;
|
||||
Canvas canBG = new Canvas();
|
||||
canBG.Height = WEEK_TABLE_CELL_HEIGHT * 24;
|
||||
PivotItem pvItem = new PivotItem();
|
||||
|
||||
//this.DrawBackground(canBG);
|
||||
|
||||
//container.Children.Add(canBG);
|
||||
//container.Children.Add(this.itemPages[itemIndex].Content);
|
||||
container.SizeChanged += new SizeChangedEventHandler(this.OnCanvasSizeChanged);
|
||||
|
||||
Grid mainItGrid = new Grid();
|
||||
mainItGrid.Height = WEEK_TABLE_CELL_HEIGHT * 24;
|
||||
RowDefinition row_0 = new RowDefinition();
|
||||
row_0.Height = new GridLength(WEEK_TABLE_CELL_HEIGHT * 24, GridUnitType.Pixel);
|
||||
ColumnDefinition col_0 = new ColumnDefinition();
|
||||
col_0.Width = new GridLength(WEEK_TABLE_HEAD_WIDTH, GridUnitType.Pixel);
|
||||
ColumnDefinition col_day = new ColumnDefinition();
|
||||
col_day.Width = new GridLength(1, GridUnitType.Star);
|
||||
mainItGrid.RowDefinitions.Add(row_0);
|
||||
mainItGrid.ColumnDefinitions.Add(col_0); // left
|
||||
|
||||
// day columns
|
||||
for (int i = 0; i < PIVOT_PAGES_COLUMNS; i++)
|
||||
{
|
||||
mainItGrid.ColumnDefinitions.Add(col_day);
|
||||
}
|
||||
|
||||
sv.Content = mainItGrid;
|
||||
pvItem.Content = sv;
|
||||
|
||||
Grid headGrid = new Grid();
|
||||
|
||||
pvItem.Header = headGrid;
|
||||
|
||||
this.ThePivot.Items.Add(pvItem);
|
||||
|
||||
}
|
||||
|
||||
private void RemoveContentUIElement(int index, UIElement elem)
|
||||
@@ -846,104 +802,15 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
grid.Children.Add(headCan);
|
||||
}
|
||||
|
||||
private void DrawBackground(Canvas can)
|
||||
private void ScrollViewer_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Line vertLine = new Line();
|
||||
vertLine.X1 = 0;
|
||||
vertLine.Y1 = 0;
|
||||
vertLine.X2 = 0;
|
||||
vertLine.Y2 = (WEEK_TABLE_CELL_HEIGHT * 24);
|
||||
vertLine.Stroke = new SolidColorBrush(Colors.White);
|
||||
vertLine.Stretch = Stretch.Fill;
|
||||
vertLine.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
vertLine.Margin = new Thickness(WEEK_TABLE_HEAD_WIDTH, 0, 0, 0);
|
||||
vertLine.StrokeThickness = WEEK_TABLE_HEAD_THICKNESS;
|
||||
|
||||
for (int i = 0; i <= 24; i++)
|
||||
{
|
||||
// lines
|
||||
Line hLineHead = new Line();
|
||||
hLineHead.X1 = 0;
|
||||
hLineHead.Y1 = 0;
|
||||
hLineHead.X2 = WEEK_TABLE_HEAD_WIDTH;
|
||||
hLineHead.Y2 = 0;
|
||||
hLineHead.Stroke = new SolidColorBrush(Colors.White);
|
||||
hLineHead.Stretch = Stretch.Fill;
|
||||
hLineHead.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
hLineHead.Margin = new Thickness(0, (WEEK_TABLE_CELL_HEIGHT * i), 0, 0);
|
||||
hLineHead.StrokeThickness = WEEK_TABLE_HEAD_THICKNESS;
|
||||
}
|
||||
|
||||
Line hLineHalf = new Line();
|
||||
hLineHalf.X1 = 0;
|
||||
hLineHalf.Y1 = 0;
|
||||
hLineHalf.X2 = WEEK_TABLE_HEAD_HALF;
|
||||
hLineHalf.Y2 = 0;
|
||||
hLineHalf.Stroke = new SolidColorBrush(Colors.Gray);
|
||||
hLineHalf.Stretch = Stretch.Fill;
|
||||
hLineHalf.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
hLineHalf.Margin = new Thickness((WEEK_TABLE_HEAD_WIDTH - WEEK_TABLE_HEAD_HALF), (WEEK_TABLE_CELL_HEIGHT * i) + (WEEK_TABLE_CELL_HEIGHT / 2), 0, 0);
|
||||
hLineHalf.StrokeThickness = WEEK_TABLE_HEAD_THICKNESS;
|
||||
|
||||
Line hLineInn = new Line();
|
||||
hLineInn.X1 = 0;
|
||||
hLineInn.Y1 = 0;
|
||||
hLineInn.X2 = 1000;
|
||||
hLineInn.Y2 = 0;
|
||||
hLineInn.Stroke = new SolidColorBrush(Colors.DarkGray);
|
||||
hLineInn.Stretch = Stretch.Fill;
|
||||
hLineInn.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
hLineInn.Margin = new Thickness(WEEK_TABLE_HEAD_WIDTH, (WEEK_TABLE_CELL_HEIGHT * i), 0, 0);
|
||||
hLineInn.StrokeDashArray = new DoubleCollection();
|
||||
hLineInn.StrokeDashArray.Add(2);
|
||||
hLineInn.StrokeDashArray.Add(4);
|
||||
hLineInn.StrokeThickness = WEEK_TABLE_INNER_THICKNESS;
|
||||
|
||||
can.Children.Add(hLineHead);
|
||||
can.Children.Add(hLineInn);
|
||||
|
||||
if (i < 24)
|
||||
{
|
||||
can.Children.Add(hLineHalf);
|
||||
|
||||
// text
|
||||
TextBlock timeStamp = new TextBlock();
|
||||
timeStamp.Text = i.ToString("00") + ":00";
|
||||
timeStamp.Margin = new Thickness(0, (WEEK_TABLE_CELL_HEIGHT * i) + 2, 0, 0);
|
||||
timeStamp.FontSize = WEEK_TABLE_CELL_HEIGHT / 3;
|
||||
|
||||
can.Children.Add(timeStamp);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 1; i < 5; i++)
|
||||
{
|
||||
Line dayLine = new Line();
|
||||
dayLine.X1 = WEEK_TABLE_HEAD_WIDTH + (i * (can.Width - WEEK_TABLE_HEAD_WIDTH) / 5);
|
||||
dayLine.Y1 = 0;
|
||||
dayLine.X2 = dayLine.X1;
|
||||
dayLine.Y2 = (WEEK_TABLE_CELL_HEIGHT * 24);
|
||||
dayLine.Stroke = new SolidColorBrush(Colors.White);
|
||||
dayLine.Stretch = Stretch.Fill;
|
||||
dayLine.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
dayLine.Margin = new Thickness(0, 0, 0, 0);
|
||||
dayLine.StrokeThickness = WEEK_TABLE_HEAD_THICKNESS / 2;
|
||||
|
||||
can.Children.Add(dayLine);
|
||||
}
|
||||
|
||||
|
||||
can.Children.Add(vertLine);
|
||||
|
||||
Rectangle newrect = new Rectangle();
|
||||
newrect.Stroke = new SolidColorBrush(Colors.White);
|
||||
newrect.StrokeThickness = WEEK_TABLE_HEAD_THICKNESS;
|
||||
newrect.Stretch = Stretch.Fill;
|
||||
newrect.Width = can.Width - WEEK_TABLE_HEAD_WIDTH;
|
||||
newrect.Height = can.Height;
|
||||
newrect.Margin = new Thickness(WEEK_TABLE_HEAD_WIDTH, 0, 0, 0);
|
||||
|
||||
can.Children.Add(newrect);
|
||||
|
||||
private void TheWeekView_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.itemPages[this.loadedWeekView].weekView = sender as WeekView;
|
||||
this.loadedWeekView++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Ganztägig ähnelt.
|
||||
/// </summary>
|
||||
public static string AllDay {
|
||||
get {
|
||||
return ResourceManager.GetString("AllDay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die BTU-Tag via NFC ähnelt.
|
||||
/// </summary>
|
||||
@@ -114,6 +123,33 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Termin ähnelt.
|
||||
/// </summary>
|
||||
public static string Appointment {
|
||||
get {
|
||||
return ResourceManager.GetString("Appointment", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Teilnehmer ähnelt.
|
||||
/// </summary>
|
||||
public static string Attendees {
|
||||
get {
|
||||
return ResourceManager.GetString("Attendees", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Automatisch scrollen zur Stunde ähnelt.
|
||||
/// </summary>
|
||||
public static string AutoScrollToHour {
|
||||
get {
|
||||
return ResourceManager.GetString("AutoScrollToHour", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Sie haben einen BTU-Tag eingescannt ähnelt.
|
||||
/// </summary>
|
||||
@@ -204,6 +240,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Abbrechen ähnelt.
|
||||
/// </summary>
|
||||
public static string Cancel {
|
||||
get {
|
||||
return ResourceManager.GetString("Cancel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Kategorie ähnelt.
|
||||
/// </summary>
|
||||
public static string Categories {
|
||||
get {
|
||||
return ResourceManager.GetString("Categories", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Essenbeschreibung kopieren ähnelt.
|
||||
/// </summary>
|
||||
@@ -222,6 +276,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Erstellen ähnelt.
|
||||
/// </summary>
|
||||
public static string Creating {
|
||||
get {
|
||||
return ResourceManager.GetString("Creating", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Tagesansicht ähnelt.
|
||||
/// </summary>
|
||||
public static string DayView {
|
||||
get {
|
||||
return ResourceManager.GetString("DayView", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Löschen ähnelt.
|
||||
/// </summary>
|
||||
@@ -276,6 +348,33 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Beschreibung ähnelt.
|
||||
/// </summary>
|
||||
public static string Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Dauer ähnelt.
|
||||
/// </summary>
|
||||
public static string Duration {
|
||||
get {
|
||||
return ResourceManager.GetString("Duration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Bearbeiten ähnelt.
|
||||
/// </summary>
|
||||
public static string Edit {
|
||||
get {
|
||||
return ResourceManager.GetString("Edit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Events ähnelt.
|
||||
/// </summary>
|
||||
@@ -303,6 +402,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Erweiterte Einstellungen ähnelt.
|
||||
/// </summary>
|
||||
public static string ExtendedProperties {
|
||||
get {
|
||||
return ResourceManager.GetString("ExtendedProperties", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Favoriten ähnelt.
|
||||
/// </summary>
|
||||
@@ -348,6 +456,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die groß ähnelt.
|
||||
/// </summary>
|
||||
public static string Large {
|
||||
get {
|
||||
return ResourceManager.GetString("Large", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Ebene ähnelt.
|
||||
/// </summary>
|
||||
@@ -501,6 +618,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Autoscrollauswahl ähnelt.
|
||||
/// </summary>
|
||||
public static string ListPickerHeaderAutoScroll {
|
||||
get {
|
||||
return ResourceManager.GetString("ListPickerHeaderAutoScroll", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Campusauswahl ähnelt.
|
||||
/// </summary>
|
||||
@@ -555,6 +681,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Anzeigegrößenauswahl ähnelt.
|
||||
/// </summary>
|
||||
public static string ListPickerHeaderVisualScale {
|
||||
get {
|
||||
return ResourceManager.GetString("ListPickerHeaderVisualScale", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Ort ähnelt.
|
||||
/// </summary>
|
||||
public static string Location {
|
||||
get {
|
||||
return ResourceManager.GetString("Location", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Webmail ähnelt.
|
||||
/// </summary>
|
||||
@@ -564,6 +708,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die mittel ähnelt.
|
||||
/// </summary>
|
||||
public static string Medium {
|
||||
get {
|
||||
return ResourceManager.GetString("Medium", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Die Mensa ist heute geschlossen ähnelt.
|
||||
/// </summary>
|
||||
@@ -870,6 +1023,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Priorität ähnelt.
|
||||
/// </summary>
|
||||
public static string Priority {
|
||||
get {
|
||||
return ResourceManager.GetString("Priority", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt.
|
||||
/// </summary>
|
||||
@@ -879,6 +1041,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Einstellungen ähnelt.
|
||||
/// </summary>
|
||||
public static string Properties {
|
||||
get {
|
||||
return ResourceManager.GetString("Properties", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die ... suche ähnelt.
|
||||
/// </summary>
|
||||
@@ -888,6 +1059,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Wiederholung ähnelt.
|
||||
/// </summary>
|
||||
public static string Repeat {
|
||||
get {
|
||||
return ResourceManager.GetString("Repeat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die LeftToRight ähnelt.
|
||||
/// </summary>
|
||||
@@ -924,6 +1104,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Speichern ähnelt.
|
||||
/// </summary>
|
||||
public static string Save {
|
||||
get {
|
||||
return ResourceManager.GetString("Save", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Bitte halten Sie das Handy vor dem NFC-Tag und stellen Sie sicher das NFC (Tap+Send) eingeschaltet ist. ähnelt.
|
||||
/// </summary>
|
||||
@@ -1068,6 +1257,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die klein ähnelt.
|
||||
/// </summary>
|
||||
public static string Small {
|
||||
get {
|
||||
return ResourceManager.GetString("Small", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die vorlesen ähnelt.
|
||||
/// </summary>
|
||||
@@ -1149,6 +1347,33 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Titel ähnelt.
|
||||
/// </summary>
|
||||
public static string Title {
|
||||
get {
|
||||
return ResourceManager.GetString("Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die bis ähnelt.
|
||||
/// </summary>
|
||||
public static string To {
|
||||
get {
|
||||
return ResourceManager.GetString("To", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Heute ähnelt.
|
||||
/// </summary>
|
||||
public static string ToDay {
|
||||
get {
|
||||
return ResourceManager.GetString("ToDay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Aktuali-sieren ähnelt.
|
||||
/// </summary>
|
||||
@@ -1158,6 +1383,33 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Sichtbarkeit ähnelt.
|
||||
/// </summary>
|
||||
public static string Visibility {
|
||||
get {
|
||||
return ResourceManager.GetString("Visibility", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Anzeige Größe ähnelt.
|
||||
/// </summary>
|
||||
public static string VisualScale {
|
||||
get {
|
||||
return ResourceManager.GetString("VisualScale", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Wochenansicht ähnelt.
|
||||
/// </summary>
|
||||
public static string WeekView {
|
||||
get {
|
||||
return ResourceManager.GetString("WeekView", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Willkommen zur BTU-CampusApp WP8 ähnelt.
|
||||
/// </summary>
|
||||
@@ -1166,5 +1418,14 @@ namespace CampusAppWP8.Resources {
|
||||
return ResourceManager.GetString("WelcomeString", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Wann ähnelt.
|
||||
/// </summary>
|
||||
public static string When {
|
||||
get {
|
||||
return ResourceManager.GetString("When", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,6 +587,7 @@
|
||||
</data>
|
||||
<data name="PathTimeTable_Properties" xml:space="preserve">
|
||||
<value>/Pages/TimeTable/TimeTableProperties.xaml</value>
|
||||
</data>
|
||||
<data name="BTUTAG_QRStart" xml:space="preserve">
|
||||
<value>BTU-CampusApp</value>
|
||||
</data>
|
||||
|
||||
41
CampusAppWP8/CampusAppWP8/Utility/Lui/ListBoxFixed.cs
Normal file
41
CampusAppWP8/CampusAppWP8/Utility/Lui/ListBoxFixed.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ListBoxFixed.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Fiedler</author>
|
||||
// <date>22.10.2013</date>
|
||||
// <summary>Implements the list box fixed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Lui
|
||||
{
|
||||
using System.Windows.Controls;
|
||||
|
||||
/// <summary> A list box fixed. </summary>
|
||||
/// <remarks> Fiedler, 22.10.2013. </remarks>
|
||||
/// <seealso cref="T:System.Windows.Controls.ListBox"/>
|
||||
public class ListBoxFixed : ListBox
|
||||
{
|
||||
/// <summary> Initializes a new instance of the ListBoxFixed class. </summary>
|
||||
/// <remarks> Fiedler, 22.10.2013. </remarks>
|
||||
public ListBoxFixed()
|
||||
: base()
|
||||
{
|
||||
this.SelectionMode = SelectionMode.Single;
|
||||
this.SelectionChanged += new SelectionChangedEventHandler(this.SelectionFix);
|
||||
}
|
||||
|
||||
/// <summary> Selection fix. </summary>
|
||||
/// <remarks> Fiedler, 22.10.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Selection changed event information. </param>
|
||||
private void SelectionFix(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
ListBox obj = sender as ListBox;
|
||||
|
||||
if (obj.SelectedIndex >= 0)
|
||||
{
|
||||
obj.SelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,14 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:weekView="clr-namespace:CampusAppWP8.Utility.Lui.Templates"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
>
|
||||
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent" Height="960">
|
||||
<Grid x:Name="TheGrid" Background="Transparent" Height="960">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="BorderBrush" Value="White"/>
|
||||
@@ -22,23 +23,23 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!--left time line-->
|
||||
<ColumnDefinition Width="40"/>
|
||||
<ColumnDefinition Width="40" x:Name="Col_0"/>
|
||||
<!--monday-->
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*" x:Name="Col_1"/>
|
||||
<!--tuesday-->
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*" x:Name="Col_2"/>
|
||||
<!--wednesday-->
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*" x:Name="Col_3"/>
|
||||
<!--thursday-->
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*" x:Name="Col_4"/>
|
||||
<!--friday-->
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*" x:Name="Col_5"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--time line-->
|
||||
<Border Grid.Row="0" Grid.Column="0">
|
||||
<ListBox x:Name="TimeList" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" SelectionMode="Single" SelectionChanged="ListBoxSelectionChanged">
|
||||
<ListBox.ItemTemplate>
|
||||
<Border x:Name="TimeBorder" Grid.Row="0" Grid.Column="0">
|
||||
<lui:ListBoxFixed x:Name="TimeList" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" SelectionMode="Single">
|
||||
<lui:ListBoxFixed.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Canvas Height="40" Width="40">
|
||||
<TextBlock Text="{Binding}" Canvas.Left="0" Canvas.Top="0" FontSize="12"/>
|
||||
@@ -46,27 +47,27 @@
|
||||
<Line X1="0" Y1="0" X2="39" Y2="0" StrokeThickness="1" Stroke="Gray"/>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</lui:ListBoxFixed.ItemTemplate>
|
||||
</lui:ListBoxFixed>
|
||||
</Border>
|
||||
<!--monday-->
|
||||
<Border Grid.Row="0" Grid.Column="1">
|
||||
<weekView:WeekViewDay x:Name="MonList" BgListElements="24" BgListElementHeight="40" Background="BlueViolet" />
|
||||
<Border x:Name="MonBorder" Grid.Row="0" Grid.Column="1">
|
||||
<weekView:WeekViewDay x:Name="MonList" BgListElements="24" BgListElementHeight="40"/>
|
||||
</Border>
|
||||
<!--tuesday-->
|
||||
<Border Grid.Row="0" Grid.Column="2">
|
||||
<Border x:Name="TueBorder" Grid.Row="0" Grid.Column="2">
|
||||
<weekView:WeekViewDay x:Name="TueList" BgListElements="24" BgListElementHeight="40" />
|
||||
</Border>
|
||||
<!--wednesday-->
|
||||
<Border Grid.Row="0" Grid.Column="3">
|
||||
<Border x:Name="WedBorder" Grid.Row="0" Grid.Column="3">
|
||||
<weekView:WeekViewDay x:Name="WedList" BgListElements="24" BgListElementHeight="40" />
|
||||
</Border>
|
||||
<!--thursday-->
|
||||
<Border Grid.Row="0" Grid.Column="4">
|
||||
<Border x:Name="ThuBorder" Grid.Row="0" Grid.Column="4">
|
||||
<weekView:WeekViewDay x:Name="ThuList" BgListElements="24" BgListElementHeight="40" />
|
||||
</Border>
|
||||
<!--friday-->
|
||||
<Border Grid.Row="0" Grid.Column="5">
|
||||
<Border x:Name="FriBorder" Grid.Row="0" Grid.Column="5">
|
||||
<weekView:WeekViewDay x:Name="FriList" BgListElements="24" BgListElementHeight="40" />
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -14,11 +14,14 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Media;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
|
||||
public partial class WeekView : UserControl
|
||||
{
|
||||
private List<Border> borderList = new List<Border>();
|
||||
|
||||
private string[] timeStrings = new string[24];
|
||||
private string[] monStrings = new string[24];
|
||||
|
||||
@@ -29,6 +32,14 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
this.InitLayout();
|
||||
}
|
||||
|
||||
public void SetColumnBackground(int column, Brush brush = null)
|
||||
{
|
||||
if (column < this.borderList.Count())
|
||||
{
|
||||
this.borderList[column].Background = brush;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitLayout()
|
||||
{
|
||||
for (int i = 0; i < 24; i++)
|
||||
@@ -37,6 +48,12 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
this.monStrings[i] = i.ToString();
|
||||
}
|
||||
|
||||
this.borderList.Add(this.MonBorder);
|
||||
this.borderList.Add(this.TueBorder);
|
||||
this.borderList.Add(this.WedBorder);
|
||||
this.borderList.Add(this.ThuBorder);
|
||||
this.borderList.Add(this.FriBorder);
|
||||
|
||||
this.TimeList.ItemsSource = this.timeStrings;
|
||||
|
||||
//this.MonList.ItemsSource = this.monStrings;
|
||||
@@ -45,15 +62,5 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
//this.ThuList.ItemsSource = this.monStrings;
|
||||
//this.FriList.ItemsSource = this.monStrings;
|
||||
}
|
||||
|
||||
private void ListBoxSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
ListBox obj = sender as ListBox;
|
||||
|
||||
if (obj.SelectedIndex >= 0)
|
||||
{
|
||||
obj.SelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,26 @@
|
||||
>
|
||||
|
||||
<Grid x:Name="TheGrid">
|
||||
<Canvas x:Name="MainCanvas">
|
||||
<Canvas x:Name="BGCanvas" Canvas.ZIndex="1"/>
|
||||
<Canvas x:Name="UserCanvas" Canvas.ZIndex="2"/>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Canvas x:Name="MainCanvas" Grid.Row="0" Grid.Column="0">
|
||||
<Canvas
|
||||
x:Name="BGCanvas"
|
||||
Canvas.ZIndex="1"
|
||||
Height="{Binding Path=ActualHeight, ElementName=MainCanvas, Mode=OneWay}"
|
||||
Width="{Binding Path=ActualWidth, ElementName=MainCanvas, Mode=OneWay}"
|
||||
/>
|
||||
<Canvas
|
||||
x:Name="UserCanvas"
|
||||
Canvas.ZIndex="2"
|
||||
Height="{Binding Path=ActualHeight, ElementName=MainCanvas, Mode=OneWay}"
|
||||
Width="{Binding Path=ActualWidth, ElementName=MainCanvas, Mode=OneWay}"
|
||||
/>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,27 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Media;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="WeekViewDay.xaml.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Fiedler</author>
|
||||
// <date>22.10.2013</date>
|
||||
// <summary>Implements the week view day.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Lui.Templates
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Data;
|
||||
|
||||
public partial class WeekViewDay : UserControl
|
||||
{
|
||||
/// <summary> The background list elements property. </summary>
|
||||
public static readonly DependencyProperty BgListElementsProperty = DependencyProperty.Register("BgListElements", typeof(int), typeof(WeekViewDay), new PropertyMetadata(null));
|
||||
/// <summary> The background list element height property. </summary>
|
||||
public static readonly DependencyProperty BgListElementHeightProperty = DependencyProperty.Register("BgListElementHeight", typeof(double), typeof(WeekViewDay), new PropertyMetadata(null));
|
||||
|
||||
|
||||
/// <summary> Initializes a new instance of the WeekViewDay class. </summary>
|
||||
/// <remarks> Fiedler, 22.10.2013. </remarks>
|
||||
public WeekViewDay()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the background list elements. </summary>
|
||||
/// <value> The background list elements. </value>
|
||||
public int BgListElements
|
||||
{
|
||||
get
|
||||
@@ -40,6 +55,8 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the height of the background list element. </summary>
|
||||
/// <value> The height of the background list element. </value>
|
||||
public double BgListElementHeight
|
||||
{
|
||||
get
|
||||
@@ -58,6 +75,8 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Draw lines. </summary>
|
||||
/// <remarks> Fiedler, 22.10.2013. </remarks>
|
||||
private void DrawLines()
|
||||
{
|
||||
if (this.BgListElementHeight > 0
|
||||
@@ -65,12 +84,17 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
{
|
||||
this.BGCanvas.Children.Clear();
|
||||
|
||||
Binding colLineBind = new Binding();
|
||||
colLineBind.Path = new PropertyPath("ActualWidth");
|
||||
colLineBind.ElementName = "MainCanvas";
|
||||
colLineBind.Mode = BindingMode.OneWay;
|
||||
|
||||
for (int i = 1; i < this.BgListElements; i++)
|
||||
{
|
||||
Line hLineInn = new Line();
|
||||
hLineInn.X1 = 0;
|
||||
hLineInn.Y1 = 0;
|
||||
hLineInn.X2 = 1;
|
||||
hLineInn.SetBinding(Line.X2Property, colLineBind);
|
||||
hLineInn.Y2 = 0;
|
||||
hLineInn.Stroke = new SolidColorBrush(Colors.DarkGray);
|
||||
hLineInn.Stretch = Stretch.Fill;
|
||||
|
||||
@@ -426,6 +426,20 @@ namespace CampusAppWP8.Utility
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary> List box selection fixer. </summary>
|
||||
/// <remarks> Fiedler, 22.10.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Selection changed event information. </param>
|
||||
public static void ListBoxSelectionFixer(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
ListBox obj = sender as ListBox;
|
||||
|
||||
if (obj.SelectedIndex >= 0)
|
||||
{
|
||||
obj.SelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user