create appointment done
This commit is contained in:
@@ -42,6 +42,19 @@ namespace CampusAppWP8.Model.TimeTable
|
||||
/// <summary>Initializes a new instance of the <see cref="AppointmentModel" /> class. </summary>
|
||||
public AppointmentModel()
|
||||
{
|
||||
this.icalObj = new ICalObject();
|
||||
|
||||
CampusAppWP8.Utility.ICSProperties.Begin newBegin = new CampusAppWP8.Utility.ICSProperties.Begin();
|
||||
newBegin.Value = ICSTag.VCALENDAR;
|
||||
CampusAppWP8.Utility.ICSProperties.Version newVersion = new CampusAppWP8.Utility.ICSProperties.Version();
|
||||
newVersion.Value = 2.0f;
|
||||
CampusAppWP8.Utility.ICSProperties.ProductID newProdID = new CampusAppWP8.Utility.ICSProperties.ProductID();
|
||||
newProdID.Value = CampusAppWP8.Resources.AppResources.ApplicationTitle;
|
||||
|
||||
this.icalObj.Header = newBegin;
|
||||
this.icalObj.AddProperty(newVersion);
|
||||
this.icalObj.AddProperty(newProdID);
|
||||
|
||||
this.rect = new Rectangle();
|
||||
this.canvas = new Canvas();
|
||||
this.canvas.DoubleTap += new EventHandler<System.Windows.Input.GestureEventArgs>(this.OnCanvasClick);
|
||||
@@ -51,7 +64,11 @@ namespace CampusAppWP8.Model.TimeTable
|
||||
public AppointmentModel(string icsData) : this()
|
||||
{
|
||||
this.icalObj = ICSManager.ImportFromICS(icsData);
|
||||
|
||||
this.Calc();
|
||||
}
|
||||
|
||||
public void Calc()
|
||||
{
|
||||
this.CalcYOffset();
|
||||
this.CalcHeight();
|
||||
this.CalcRect();
|
||||
@@ -179,6 +196,13 @@ namespace CampusAppWP8.Model.TimeTable
|
||||
return retValue.ToArray();
|
||||
}
|
||||
|
||||
public void SetValue(object value)
|
||||
{
|
||||
ICalObject vevent = this.GetVEventObj(true);
|
||||
|
||||
vevent.AddProperty(value);
|
||||
}
|
||||
|
||||
private void CalcRect()
|
||||
{
|
||||
this.canvas.Children.Clear();
|
||||
@@ -248,19 +272,27 @@ namespace CampusAppWP8.Model.TimeTable
|
||||
|
||||
DTStart startTimeObj = eventObj.GetProperty(ICSTag.DT_START) as DTStart;
|
||||
DTEnd endTimeObj = eventObj.GetProperty(ICSTag.DT_END) as DTEnd;
|
||||
CampusAppWP8.Utility.ICSProperties.Duration durObj = eventObj.GetProperty(ICSTag.DURATION) as CampusAppWP8.Utility.ICSProperties.Duration;
|
||||
|
||||
if (startTimeObj == null
|
||||
|| endTimeObj == null)
|
||||
|| (endTimeObj == null && durObj == null))
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
DateTime startTimeValue = startTimeObj.Value;
|
||||
DateTime endTimeValue = endTimeObj.Value;
|
||||
if (endTimeObj != null)
|
||||
{
|
||||
DateTime startTimeValue = startTimeObj.Value;
|
||||
DateTime endTimeValue = endTimeObj.Value;
|
||||
|
||||
TimeSpan span = endTimeValue.Subtract(startTimeValue);
|
||||
TimeSpan span = endTimeValue.Subtract(startTimeValue);
|
||||
|
||||
this.height = span.TotalHours * AppointmentModel.DAY_HOUR_SPACING;
|
||||
this.height = span.TotalHours * AppointmentModel.DAY_HOUR_SPACING;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.height = durObj.Value.TotalHours * AppointmentModel.DAY_HOUR_SPACING;
|
||||
}
|
||||
|
||||
if (this.height < (AppointmentModel.DAY_HOUR_SPACING / 4))
|
||||
{
|
||||
@@ -274,13 +306,25 @@ namespace CampusAppWP8.Model.TimeTable
|
||||
this.CalcRect();
|
||||
}
|
||||
|
||||
private ICalObject GetVEventObj()
|
||||
private ICalObject GetVEventObj(bool create = false)
|
||||
{
|
||||
ICalObject retValue = this.icalObj.GetProperty(ICSTag.VEVENT) as ICalObject;
|
||||
|
||||
if (retValue == null)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
if (create == false)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
else
|
||||
{
|
||||
retValue = new ICalObject();
|
||||
Begin newHeader = new Begin();
|
||||
newHeader.Value = ICSTag.VEVENT;
|
||||
retValue.Header = newHeader;
|
||||
|
||||
this.icalObj.PropertieList.Add(retValue);
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -30,11 +31,133 @@
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<ScrollViewer x:Name="scrollView">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Title-->
|
||||
<StackPanel Grid.Row="0">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
<TextBox x:Name="InTitle" TextWrapping="NoWrap" AcceptsReturn="True" />
|
||||
</StackPanel>
|
||||
<!--Location-->
|
||||
<StackPanel Grid.Row="1">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Location, Source={StaticResource LocalizedStrings}}"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox x:Name="InLocation" TextWrapping="NoWrap" AcceptsReturn="True" Grid.Column="0"/>
|
||||
<Button x:Name="InLocationBtn" Grid.Column="1" Click="InLocationBtn_Click">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="30"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--callendar account ???-->
|
||||
<!--AllDay Ganztaegig-->
|
||||
<StackPanel x:Name="StackPanelAllDay" Grid.Row="2" Visibility="Collapsed">
|
||||
<CheckBox x:Name="InAllDay" Content="{Binding Path=LocalizedResources.AllDay, Source={StaticResource LocalizedStrings}}" Checked="InAllDay_Checked" Unchecked="InAllDay_Unchecked"/>
|
||||
</StackPanel>
|
||||
<!--Start date-->
|
||||
<StackPanel Grid.Row="3">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.When, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:DatePicker x:Name="InStartDate"/>
|
||||
<toolkit:TimePicker x:Name="InStartTime"/>
|
||||
</StackPanel>
|
||||
<!--Duration-->
|
||||
<StackPanel x:Name="StackPanelDuration" Grid.Row="4">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Duration, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker x:Name="InDuration" SelectionChanged="InDuration_SelectionChanged"/>
|
||||
</StackPanel>
|
||||
<!--End date-->
|
||||
<StackPanel x:Name="StackPanelEnd" Grid.Row="5" Visibility="Collapsed">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.To, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:DatePicker x:Name="InEndDate"/>
|
||||
<toolkit:TimePicker x:Name="InEndTime"/>
|
||||
</StackPanel>
|
||||
|
||||
<Border Grid.Row="6" BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0"/>
|
||||
|
||||
<!--Extend-->
|
||||
<StackPanel x:Name="StackPanelExtend" Grid.Row="7">
|
||||
<Button x:Name="ExtendBtn" Click="ExtendBtn_Click">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.ExtendedProperties, Source={StaticResource LocalizedStrings}}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<Grid x:Name="GridExtend" Grid.Row="8" Visibility="Collapsed">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Reminder-->
|
||||
|
||||
<!--Repeat-->
|
||||
<StackPanel Grid.Row="1">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Repeat, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker x:Name="InRepeat"/>
|
||||
</StackPanel>
|
||||
<!--status-->
|
||||
|
||||
<!--Attendees-->
|
||||
<StackPanel Grid.Row="3">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Attendees, Source={StaticResource LocalizedStrings}}"/>
|
||||
<TextBox Text="[PLACEHOLDER]"/>
|
||||
</StackPanel>
|
||||
<!--Private/Public-->
|
||||
<StackPanel Grid.Row="4">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Visibility, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker x:Name="InAccessClass"/>
|
||||
</StackPanel>
|
||||
<!--Description-->
|
||||
<StackPanel Grid.Row="5">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Description, Source={StaticResource LocalizedStrings}}"/>
|
||||
<TextBox x:Name="InDescription" AcceptsReturn="True" Height="160" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<!--
|
||||
calendar-Konto
|
||||
Alarm/reminder
|
||||
Status (Free/Busy???)
|
||||
-->
|
||||
<!--
|
||||
calendar account
|
||||
reminders (multi)
|
||||
-->
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<phone:PhoneApplicationPage.ApplicationBar>
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Minimized" Opacity="1.0" >
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -16,12 +16,245 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Model.TimeTable;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.ICSProperties;
|
||||
|
||||
public partial class AppointmentEdit : PhoneApplicationPage
|
||||
{
|
||||
private readonly string[] DurationListText = new string[] { "15 Minuten", "30 Minuten", "1 Stunde", "90 Minuten", "2 Stunden", "Ganztägig", "Benutzerdefiniert" };
|
||||
private readonly string[] RepeatListText = new string[] { "Einmal", "Täglich", "Jeden Mo-Fr", "Wöchentlich", "Monatlich", "Jährlich" };
|
||||
private readonly string[] AccessClassListText = new string[] { "Öffentlich", "Privat", "Vertraulich" };
|
||||
|
||||
private bool isDuration = true;
|
||||
|
||||
public AppointmentEdit()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.InDuration.ItemsSource = DurationListText;
|
||||
this.InRepeat.ItemsSource = RepeatListText;
|
||||
this.InAccessClass.ItemsSource = AccessClassListText;
|
||||
|
||||
ApplicationBarIconButton saveBtn = new ApplicationBarIconButton();
|
||||
saveBtn.IconUri = new Uri(Icons.Link, UriKind.Relative);
|
||||
saveBtn.Text = AppResources.Save;
|
||||
saveBtn.Click += new EventHandler(this.OnClickSaveBtn);
|
||||
ApplicationBar.Buttons.Add(saveBtn);
|
||||
|
||||
ApplicationBarIconButton cancelBtn = new ApplicationBarIconButton();
|
||||
cancelBtn.IconUri = new Uri(Icons.Link, UriKind.Relative);
|
||||
cancelBtn.Text = AppResources.Cancel;
|
||||
cancelBtn.Click += new EventHandler(this.OnClickSaveBtn);
|
||||
ApplicationBar.Buttons.Add(cancelBtn);
|
||||
|
||||
}
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
private void OnClickSaveBtn(object sender, EventArgs e)
|
||||
{
|
||||
AppointmentModel newItem = new AppointmentModel();
|
||||
|
||||
Summary newTitle = new Summary();
|
||||
newTitle.Value = this.InTitle.Text;
|
||||
newItem.SetValue(newTitle);
|
||||
|
||||
Location newLocation = new Location();
|
||||
newLocation.Value = this.InLocation.Text;
|
||||
newItem.SetValue(newLocation);
|
||||
|
||||
DateTime tempStartDT = this.InStartDate.Value.Value;
|
||||
TimeSpan tempStartTS = this.InStartTime.Value.Value.TimeOfDay;
|
||||
DTStart newDTStart = new DTStart();
|
||||
newDTStart.IsDate = false;
|
||||
newDTStart.Value = new DateTime(tempStartDT.Year, tempStartDT.Month, tempStartDT.Day, tempStartTS.Hours, tempStartTS.Minutes, 0);
|
||||
newItem.SetValue(newDTStart);
|
||||
|
||||
if(this.isDuration == true)
|
||||
{
|
||||
int durationHours = 0;
|
||||
int durationMinutes = 0;
|
||||
|
||||
switch (this.InDuration.SelectedIndex)
|
||||
{
|
||||
case 0: durationMinutes = 15; break;
|
||||
case 1: durationMinutes = 30; break;
|
||||
case 2: durationMinutes = 60; break;
|
||||
case 3: durationMinutes = 90; break;
|
||||
case 4: durationMinutes = 120; break;
|
||||
case 5: durationHours = 24; break;
|
||||
}
|
||||
|
||||
Utility.ICSProperties.Duration newDura = new Utility.ICSProperties.Duration();
|
||||
newDura.Value = new TimeSpan(durationHours, durationMinutes, 0);
|
||||
newItem.SetValue(newDura);
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime tempEndDT = this.InEndDate.Value.Value;
|
||||
TimeSpan tempEndTS = this.InEndTime.Value.Value.TimeOfDay;
|
||||
DTEnd newDTEnd = new DTEnd();
|
||||
newDTEnd.IsDate = false;
|
||||
newDTEnd.Value = new DateTime(tempEndDT.Year, tempEndDT.Month, tempEndDT.Day, tempEndTS.Hours, tempEndTS.Minutes, 0);
|
||||
newItem.SetValue(newDTEnd);
|
||||
}
|
||||
|
||||
DTStamp newDTStamp = new DTStamp();
|
||||
newDTStamp.Value = DateTime.Now;
|
||||
newItem.SetValue(newDTStamp);
|
||||
|
||||
DTCreated newDTCreated = new DTCreated();
|
||||
newDTCreated.Value = DateTime.Now;
|
||||
newItem.SetValue(newDTCreated);
|
||||
|
||||
LastModified newLM = new LastModified();
|
||||
newLM.Value = DateTime.Now;
|
||||
newItem.SetValue(newLM);
|
||||
|
||||
//byte[] deviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
|
||||
long uid = DateTime.Now.Ticks;
|
||||
long[] unique = new long[5];
|
||||
|
||||
//unique[0] = deviceID[0] << 24 | deviceID[13] << 16 | deviceID[7] << 8 | deviceID[16] << 0;
|
||||
//unique[1] = deviceID[11] << 24 | deviceID[18] << 16 | deviceID[1] << 8 | deviceID[5] << 0;
|
||||
//unique[2] = deviceID[17] << 24 | deviceID[8] << 16 | deviceID[3] << 8 | deviceID[19] << 0;
|
||||
//unique[3] = deviceID[10] << 24 | deviceID[6] << 16 | deviceID[12] << 8 | deviceID[2] << 0;
|
||||
//unique[4] = deviceID[9] << 24 | deviceID[14] << 16 | deviceID[4] << 8 | deviceID[15] << 0;
|
||||
|
||||
for(int i = 0; i < 5; i++)
|
||||
{
|
||||
unique[i] += uid;
|
||||
}
|
||||
|
||||
string unique_string = string.Format("{0:x08}{1:x08}{2:x08}{3:x08}{4:x08}", unique[0], unique[1], unique[2], unique[3], unique[4]) + "@" + AppResources.ApplicationTitle;
|
||||
unique_string = unique_string.Replace(" ", "");
|
||||
|
||||
UniqueID newUID = new UniqueID();
|
||||
newUID.Value = unique_string;
|
||||
newItem.SetValue(newUID);
|
||||
|
||||
if (this.GridExtend.Visibility == Visibility.Visible)
|
||||
{
|
||||
// Repeat
|
||||
if (this.InRepeat.SelectedIndex != 0)
|
||||
{
|
||||
RecurrenceRule newRepeat = new RecurrenceRule();
|
||||
|
||||
switch (this.InRepeat.SelectedIndex)
|
||||
{
|
||||
case 1:
|
||||
newRepeat.Value.Add(new Tuple<string, List<string>>(ICSValue.FREQ, new List<string>() { ICSValueValue.DAILY }));
|
||||
break;
|
||||
case 2:
|
||||
newRepeat.Value.Add(new Tuple<string, List<string>>(ICSValue.FREQ, new List<string>() { ICSValueValue.WEEKLY }));
|
||||
newRepeat.Value.Add(new Tuple<string, List<string>>(ICSValue.BY_DAY, new List<string>() { ICSValueValue.DAY_MO, ICSValueValue.DAY_TU, ICSValueValue.DAY_WE, ICSValueValue.DAY_TH, ICSValueValue.DAY_FR }));
|
||||
break;
|
||||
case 3:
|
||||
newRepeat.Value.Add(new Tuple<string, List<string>>(ICSValue.FREQ, new List<string>() { ICSValueValue.WEEKLY }));
|
||||
break;
|
||||
case 4:
|
||||
newRepeat.Value.Add(new Tuple<string, List<string>>(ICSValue.FREQ, new List<string>() { ICSValueValue.MONTHLY }));
|
||||
break;
|
||||
case 5:
|
||||
newRepeat.Value.Add(new Tuple<string, List<string>>(ICSValue.FREQ, new List<string>() { ICSValueValue.YEARLY }));
|
||||
break;
|
||||
}
|
||||
|
||||
newItem.SetValue(newRepeat);
|
||||
}
|
||||
|
||||
// Status
|
||||
|
||||
// Attendees
|
||||
|
||||
// Visibility
|
||||
AccessClass newAC = new AccessClass();
|
||||
|
||||
switch (this.InAccessClass.SelectedIndex)
|
||||
{
|
||||
case 0: newAC.Value = ICSValue.PUBLIC; break;
|
||||
case 1: newAC.Value = ICSValue.PRIVATE; break;
|
||||
case 2: newAC.Value = ICSValue.CONFIDENTIAL; break;
|
||||
}
|
||||
|
||||
newItem.SetValue(newAC);
|
||||
|
||||
// Description
|
||||
if (this.InDescription.Text.Length > 0)
|
||||
{
|
||||
Description newDesc = new Description();
|
||||
newDesc.Value = this.InDescription.Text;
|
||||
newItem.SetValue(newDesc);
|
||||
}
|
||||
}
|
||||
|
||||
newItem.Calc();
|
||||
TimeTable.AppointmentsModel.Appointments.Add(newItem);
|
||||
|
||||
Page page = App.RootFrame.Content as Page;
|
||||
page.NavigationService.GoBack();
|
||||
}
|
||||
|
||||
private void OnClickCancelBtn(object sender, EventArgs e)
|
||||
{
|
||||
Page page = App.RootFrame.Content as Page;
|
||||
page.NavigationService.GoBack();
|
||||
}
|
||||
|
||||
private void InLocationBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void InDuration_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
bool checkInStartTime = true;
|
||||
|
||||
if (DurationListText[(sender as ListPicker).SelectedIndex].Equals("Benutzerdefiniert") == true)
|
||||
{
|
||||
this.StackPanelEnd.Visibility = Visibility.Visible;
|
||||
this.StackPanelAllDay.Visibility = Visibility.Visible;
|
||||
this.StackPanelDuration.Visibility = Visibility.Collapsed;
|
||||
this.isDuration = false;
|
||||
}
|
||||
else if (DurationListText[(sender as ListPicker).SelectedIndex].Equals("Ganztägig") == true)
|
||||
{
|
||||
this.SetTimePicker(this.InStartTime, false);
|
||||
checkInStartTime = false;
|
||||
}
|
||||
|
||||
if (this.InStartTime.IsEnabled == false && checkInStartTime == true)
|
||||
{
|
||||
this.SetTimePicker(this.InStartTime, true);
|
||||
}
|
||||
}
|
||||
|
||||
private void InAllDay_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.SetTimePicker(this.InStartTime, false);
|
||||
this.SetTimePicker(this.InEndTime, false);
|
||||
}
|
||||
|
||||
private void InAllDay_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.SetTimePicker(this.InStartTime, true);
|
||||
this.SetTimePicker(this.InEndTime, true);
|
||||
}
|
||||
|
||||
private void SetTimePicker(TimePicker obj, bool enabled)
|
||||
{
|
||||
obj.IsEnabled = enabled;
|
||||
obj.Value = (enabled == true) ? DateTime.Now : DateTime.MinValue;
|
||||
}
|
||||
|
||||
private void ExtendBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.StackPanelExtend.Visibility = Visibility.Collapsed;
|
||||
this.GridExtend.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,12 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
propBtn.Text = AppResources.Properties;
|
||||
propBtn.Click += new EventHandler(this.OnClickProperties);
|
||||
ApplicationBar.Buttons.Add(propBtn);
|
||||
|
||||
ApplicationBarIconButton addBtn = new ApplicationBarIconButton();
|
||||
addBtn.IconUri = new Uri(Icons.Add, UriKind.Relative);
|
||||
addBtn.Text = AppResources.Add;
|
||||
addBtn.Click += new EventHandler(this.OnClickAdd);
|
||||
ApplicationBar.Buttons.Add(addBtn);
|
||||
}
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
@@ -204,6 +210,13 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
page.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
private void OnClickAdd(object sender, EventArgs e)
|
||||
{
|
||||
Uri url = new Uri("/Pages/TimeTable/AppointmentEdit.xaml", UriKind.Relative);
|
||||
Page page = App.RootFrame.Content as Page;
|
||||
page.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
private void AddContentUIElement(int index, UIElement elem)
|
||||
{
|
||||
(((this.itemPages[index].Content as ScrollViewer).Content as Canvas).Children[1] as Canvas).Children.Add(elem);
|
||||
|
||||
@@ -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 Hinzufügen ähnelt.
|
||||
/// </summary>
|
||||
@@ -105,6 +114,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <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>
|
||||
@@ -186,6 +204,15 @@ 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 Auf Startseite ähnelt.
|
||||
/// </summary>
|
||||
@@ -258,6 +285,24 @@ 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>
|
||||
@@ -294,6 +339,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 Fakultät ähnelt.
|
||||
/// </summary>
|
||||
@@ -555,6 +609,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <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>
|
||||
@@ -861,6 +924,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>
|
||||
@@ -897,6 +969,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 Kein gültigen NFC-Tag gefunden ähnelt.
|
||||
/// </summary>
|
||||
@@ -1122,6 +1203,24 @@ 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>
|
||||
@@ -1140,6 +1239,15 @@ 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>
|
||||
@@ -1157,5 +1265,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,4 +485,43 @@
|
||||
<data name="VisualScale" xml:space="preserve">
|
||||
<value>Anzeige Größe</value>
|
||||
</data>
|
||||
<data name="Duration" xml:space="preserve">
|
||||
<value>Dauer</value>
|
||||
</data>
|
||||
<data name="Location" xml:space="preserve">
|
||||
<value>Ort</value>
|
||||
</data>
|
||||
<data name="Title" xml:space="preserve">
|
||||
<value>Titel</value>
|
||||
</data>
|
||||
<data name="To" xml:space="preserve">
|
||||
<value>bis</value>
|
||||
</data>
|
||||
<data name="When" xml:space="preserve">
|
||||
<value>Wann</value>
|
||||
</data>
|
||||
<data name="AllDay" xml:space="preserve">
|
||||
<value>Ganztägig</value>
|
||||
</data>
|
||||
<data name="Attendees" xml:space="preserve">
|
||||
<value>Teilnehmer</value>
|
||||
</data>
|
||||
<data name="Cancel" xml:space="preserve">
|
||||
<value>Abbrechen</value>
|
||||
</data>
|
||||
<data name="Description" xml:space="preserve">
|
||||
<value>Beschreibung</value>
|
||||
</data>
|
||||
<data name="ExtendedProperties" xml:space="preserve">
|
||||
<value>Erweiterte Einstellungen</value>
|
||||
</data>
|
||||
<data name="Repeat" xml:space="preserve">
|
||||
<value>Wiederholung</value>
|
||||
</data>
|
||||
<data name="Save" xml:space="preserve">
|
||||
<value>Speichern</value>
|
||||
</data>
|
||||
<data name="Visibility" xml:space="preserve">
|
||||
<value>Sichtbarkeit</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -308,6 +308,11 @@ namespace CampusAppWP8.Utility
|
||||
/// <remarks>Fiedler, 05.09.2013. </remarks>
|
||||
/// <returns>The name. </returns>
|
||||
public abstract string GetName();
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public abstract void SetValues(object icsProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,5 +105,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return AccessClass.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as AccessClass).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,5 +107,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Action.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as Action).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -211,5 +211,23 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Attachment.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as Attachment).value;
|
||||
this.valueType = (icsProperty as Attachment).valueType;
|
||||
this.encodingType = (icsProperty as Attachment).encodingType;
|
||||
this.formatType = (icsProperty as Attachment).formatType;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,5 +182,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Attendee.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as Attendee).value;
|
||||
this.paramList = (icsProperty as Attendee).paramList;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,5 +111,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Begin.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as Begin).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,5 +103,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return CalendarScale.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as CalendarScale).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,5 +157,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Categories.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.valueList = (icsProperty as Categories).valueList;
|
||||
this.languageType = (icsProperty as Categories).languageType;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,5 +157,22 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Comment.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.altrep = (icsProperty as Comment).altrep;
|
||||
this.languageType = (icsProperty as Comment).languageType;
|
||||
this.value = (icsProperty as Comment).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,5 +98,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return DTCompleted.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as DTCompleted).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,5 +131,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return DTCreated.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.paramList = (icsProperty as DTCreated).paramList;
|
||||
this.value = (icsProperty as DTCreated).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -220,5 +220,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return DTEnd.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.paramList = (icsProperty as DTEnd).paramList;
|
||||
this.value = (icsProperty as DTEnd).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -243,5 +243,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return DTRecurrence.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.paramList = (icsProperty as DTRecurrence).paramList;
|
||||
this.values = (icsProperty as DTRecurrence).values;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,5 +114,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Duration.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.isNegative = (icsProperty as Duration).isNegative;
|
||||
this.value = (icsProperty as Duration).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -218,5 +218,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return FreeBusyTime.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.freebusyType = (icsProperty as FreeBusyTime).freebusyType;
|
||||
this.valueList = (icsProperty as FreeBusyTime).valueList;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,5 +115,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Geo.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as Geo).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,5 +82,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Method.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as Method).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,5 +113,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return PercentComplete.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as PercentComplete).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,5 +121,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Priority.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as Priority).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,5 +82,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return ProductID.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as ProductID).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,5 +151,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return RecurrenceRule.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.values = (icsProperty as RecurrenceRule).values;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,5 +141,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return RelatedTo.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.realType = (icsProperty as RelatedTo).realType;
|
||||
this.value = (icsProperty as RelatedTo).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,5 +87,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return RepeatCount.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as RepeatCount).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,5 +166,22 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return RequestStatus.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.paramList = (icsProperty as RequestStatus).paramList;
|
||||
this.valueCode = (icsProperty as RequestStatus).valueCode;
|
||||
this.valueList = (icsProperty as RequestStatus).valueList;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,5 +147,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Status.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as Status).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,5 +111,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return TimeTransparency.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as TimeTransparency).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,5 +90,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return TimeZoneIdentifier.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as TimeZoneIdentifier).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,5 +133,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return TimeZoneName.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.language = (icsProperty as TimeZoneName).language;
|
||||
this.value = (icsProperty as TimeZoneName).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,5 +122,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return TimeZoneOffsetFrom.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.isNegative = (icsProperty as TimeZoneOffsetFrom).isNegative;
|
||||
this.value = (icsProperty as TimeZoneOffsetFrom).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,5 +90,20 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return TimeZoneUrl.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.value = (icsProperty as TimeZoneUrl).value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,5 +198,23 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Trigger.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.paramList = (icsProperty as Trigger).paramList;
|
||||
this.valueDT = (icsProperty as Trigger).valueDT;
|
||||
this.valueTS = (icsProperty as Trigger).valueTS;
|
||||
this.valueTSNegative = (icsProperty as Trigger).valueTSNegative;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,5 +151,21 @@ namespace CampusAppWP8.Utility.ICSProperties
|
||||
{
|
||||
return Version.Name;
|
||||
}
|
||||
|
||||
/// <summary>Get the values from a property of the same type.</summary>
|
||||
/// <remarks>Fiedler, 25.09.2013.</remarks>
|
||||
/// <param name="icsProperty">property object.</param>
|
||||
public override void SetValues(object icsProperty)
|
||||
{
|
||||
if (icsProperty.GetType().Equals(this.GetType()) == true)
|
||||
{
|
||||
this.maxVer = (icsProperty as Version).maxVer;
|
||||
this.minVer = (icsProperty as Version).minVer;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException("param has a wrong type (" + icsProperty.GetType().ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,5 +100,19 @@ namespace CampusAppWP8.Utility
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
public void AddProperty(object icsProperty)
|
||||
{
|
||||
object tempProp = this.GetProperty((icsProperty as ICSClasses.Interface).GetName());
|
||||
|
||||
if (tempProp == null)
|
||||
{
|
||||
this.props.Add(icsProperty);
|
||||
}
|
||||
else
|
||||
{
|
||||
(tempProp as ICSClasses.Interface).SetValues(icsProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user