enable datecreation to qrcode
This commit is contained in:
@@ -226,7 +226,7 @@ namespace CampusAppWP8.Pages.Dev
|
||||
|
||||
var result = this.barcodeReader.Decode(this.bit);
|
||||
|
||||
if (result != null )
|
||||
if (result != null)
|
||||
{
|
||||
Dispatcher.BeginInvoke(delegate
|
||||
{
|
||||
@@ -250,19 +250,24 @@ namespace CampusAppWP8.Pages.Dev
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BTUTagDefaultHandler.CampusMap == Settings.AppSetting.TagDefaultHandler)
|
||||
string qrContent = result.Text;
|
||||
switch (Settings.AppSetting.TagDefaultHandler)
|
||||
{
|
||||
this.GoToCampusMappage(result.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBoxResult msgResult = MessageBoxes.ShowBtuTagInfoOkCancelMessageBox(result.Text);
|
||||
if (msgResult.Equals(MessageBoxResult.OK))
|
||||
{
|
||||
string urlString = Constants.PathBTUTag_Info;
|
||||
Uri url = new Uri(urlString as string, UriKind.Relative);
|
||||
this.NavigationService.Navigate(url);
|
||||
}
|
||||
case BTUTagDefaultHandler.CampusMap:
|
||||
this.GoToCampusMappage(qrContent);
|
||||
break;
|
||||
case BTUTagDefaultHandler.DateCreation:
|
||||
this.GoToAppointment(qrContent);
|
||||
break;
|
||||
default:
|
||||
MessageBoxResult msgResult = MessageBoxes.ShowBtuTagInfoOkCancelMessageBox(result.Text);
|
||||
if (msgResult.Equals(MessageBoxResult.OK))
|
||||
{
|
||||
string urlString = Constants.PathBTUTag_Info;
|
||||
Uri url = new Uri(urlString as string, UriKind.Relative);
|
||||
this.NavigationService.Navigate(url);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -285,6 +290,25 @@ namespace CampusAppWP8.Pages.Dev
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary> Go to appointment. </summary>
|
||||
/// <remarks> Fiedler, 15.11.2013. </remarks>
|
||||
/// <param name="tagContent"> The tag content. </param>
|
||||
private void GoToAppointment(string tagContent)
|
||||
{
|
||||
string pid = Wp8StringManager.FilterPlaceIdinQRResultString(tagContent);
|
||||
string urlStr = Constants.PathTimeTable_AppointmentEdit + "?" + Constants.ParamPID + "=" + pid;
|
||||
Uri url = new Uri(urlStr, UriKind.Relative);
|
||||
|
||||
if (this.Dispatcher != null)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(new Action(() => NavigationService.Navigate(url)));
|
||||
}
|
||||
else
|
||||
{
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Capture thread function. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
private void CaptureThreadFunc()
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace CampusAppWP8.Pages
|
||||
//this.ContentPanel.Margin = new Thickness(76, -24, 24, 0); // LandscapeRight
|
||||
//this.ContentPanel.Margin = new Thickness(24, -24, 76, 0); // LandscapeLeft
|
||||
//this.AppTitle.Margin = new Thickness(12, 17, 0, 28);
|
||||
|
||||
|
||||
if (!this.Row3.Children.Contains(this.MailAppButton)
|
||||
&& !this.Row3.Children.Contains(this.OpenHoursAppButton)
|
||||
&& !this.Row3.Children.Contains(this.LinkAppButton))
|
||||
@@ -437,25 +437,25 @@ namespace CampusAppWP8.Pages
|
||||
}
|
||||
else
|
||||
{
|
||||
this.GoToAppointment(nfcContent);
|
||||
/* removed for testing
|
||||
if (AppSettings.BTUTagDefaultHandler.CampusMap == Settings.AppSetting.TagDefaultHandler)
|
||||
switch (Settings.AppSetting.TagDefaultHandler)
|
||||
{
|
||||
// search for placeId
|
||||
this.GoToCampusMappage(nfcContent);
|
||||
case BTUTagDefaultHandler.CampusMap:
|
||||
this.GoToCampusMappage(nfcContent);
|
||||
break;
|
||||
case BTUTagDefaultHandler.DateCreation:
|
||||
this.GoToAppointment(nfcContent);
|
||||
break;
|
||||
default:
|
||||
if (this.Dispatcher != null)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(new Action(() => this.ShowBtuTagMessageBox()));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ShowBtuTagMessageBox();
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.Dispatcher != null)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(new Action(() => this.ShowBtuTagMessageBox()));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ShowBtuTagMessageBox();
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
|
||||
Reference in New Issue
Block a user