using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Mig
{
public partial class NotePage : ContentPage
{
String strMessage = "";
public NotePage()
{
Title = "Note";
InitializeComponent();
btnNoteRemindme.Clicked += delegate
{
Navigation.PushModalAsync(new SummaryPage());
};
btnNoteNext.Clicked += delegate
{
Navigation.PushModalAsync(new SummaryPage());
};
etNote.TextChanged += EtNote_TextChanged;
var TapPaininAbdomen = new TapGestureRecognizer();
TapPaininAbdomen.Tapped += (sender, e) =>
{
if (string.IsNullOrWhiteSpace(etNote.Text))
{
etNote.Text = (etNote.Text + "Pain in the abdomen" + ", ");
}
else
{
string strName = etNote.Text;
string strNewChar = strName.Substring(Math.Max(0, strName.Length - 2));
if (strNewChar == ", ")
{
if (etNote.Text.Length > 0)
{
etNote.Text = etNote.Text.Substring(0, etNote.Text.Length - 2);
bool isExisting = false;
string[] items = etNote.Text.ToString().Split(',');
foreach (var eachItem in items)
{
if (eachItem == "Pain in the abdomen")
{
isExisting = true;
break;
}
}
if (!isExisting)
{
etNote.Text = (etNote.Text + ", " + "Pain in the abdomen" + ", ");
}
}
}
}
};
lblPainInTheAbdomen.GestureRecognizers.Add(TapPaininAbdomen);
var TapLossOfPain = new TapGestureRecognizer();
TapLossOfPain.Tapped += (sender, e) =>
{
if (string.IsNullOrWhiteSpace(etNote.Text))
{
etNote.Text = (etNote.Text + "Loss of appetite" + ", ");
}
else
{
if (etNote.Text.Length > 0)
{
string strName = etNote.Text;
string strNewChar = strName.Substring(Math.Max(0, strName.Length - 2));
if (strNewChar == ", ")
{
etNote.Text = etNote.Text.Substring(0, etNote.Text.Length - 2);
bool isExisting = false;
string[] items = etNote.Text.ToString().Split(',');
foreach (var eachItem in items)
{
if (eachItem == "Loss of appetite")
{
isExisting = true;
break;
}
}
if (!isExisting)
{
etNote.Text = (etNote.Text + ", " + "Loss of appetite" + ", ");
}
}
}
}
};
lblLossOfPain.GestureRecognizers.Add(TapLossOfPain);
var TapNauseaOfVomting = new TapGestureRecognizer();
TapNauseaOfVomting.Tapped += (sender, e) =>
{
if (string.IsNullOrWhiteSpace(etNote.Text))
{
etNote.Text = (etNote.Text + "Nausea or Vomiting" + ", ");
}
else
{
string strName = etNote.Text;
string strNewChar = strName.Substring(Math.Max(0, strName.Length - 2));
if (strNewChar == ", ")
{
if (etNote.Text.Length > 0)
{
etNote.Text = etNote.Text.Substring(0, etNote.Text.Length - 2);
bool isExisting = false;
string[] items = etNote.Text.ToString().Split(',');
foreach (var eachItem in items)
{
if (eachItem == "Nausea or Vomiting")
{
isExisting = true;
break;
}
}
if (!isExisting)
{
etNote.Text = (etNote.Text + ", " + "Nausea or Vomiting" + ", ");
}
}
}
}
};
lblNauseaOfVomting.GestureRecognizers.Add(TapNauseaOfVomting);
}
private void EtNote_TextChanged(object sender, TextChangedEventArgs e)
{
strMessage = e.NewTextValue;
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Mig
{
public partial class NotePage : ContentPage
{
String strMessage = "";
public NotePage()
{
Title = "Note";
InitializeComponent();
btnNoteRemindme.Clicked += delegate
{
Navigation.PushModalAsync(new SummaryPage());
};
btnNoteNext.Clicked += delegate
{
Navigation.PushModalAsync(new SummaryPage());
};
etNote.TextChanged += EtNote_TextChanged;
var TapPaininAbdomen = new TapGestureRecognizer();
TapPaininAbdomen.Tapped += (sender, e) =>
{
if (string.IsNullOrWhiteSpace(etNote.Text))
{
etNote.Text = (etNote.Text + "Pain in the abdomen" + ", ");
}
else
{
string strName = etNote.Text;
string strNewChar = strName.Substring(Math.Max(0, strName.Length - 2));
if (strNewChar == ", ")
{
if (etNote.Text.Length > 0)
{
etNote.Text = etNote.Text.Substring(0, etNote.Text.Length - 2);
bool isExisting = false;
string[] items = etNote.Text.ToString().Split(',');
foreach (var eachItem in items)
{
if (eachItem == "Pain in the abdomen")
{
isExisting = true;
break;
}
}
if (!isExisting)
{
etNote.Text = (etNote.Text + ", " + "Pain in the abdomen" + ", ");
}
}
}
}
};
lblPainInTheAbdomen.GestureRecognizers.Add(TapPaininAbdomen);
var TapLossOfPain = new TapGestureRecognizer();
TapLossOfPain.Tapped += (sender, e) =>
{
if (string.IsNullOrWhiteSpace(etNote.Text))
{
etNote.Text = (etNote.Text + "Loss of appetite" + ", ");
}
else
{
if (etNote.Text.Length > 0)
{
string strName = etNote.Text;
string strNewChar = strName.Substring(Math.Max(0, strName.Length - 2));
if (strNewChar == ", ")
{
etNote.Text = etNote.Text.Substring(0, etNote.Text.Length - 2);
bool isExisting = false;
string[] items = etNote.Text.ToString().Split(',');
foreach (var eachItem in items)
{
if (eachItem == "Loss of appetite")
{
isExisting = true;
break;
}
}
if (!isExisting)
{
etNote.Text = (etNote.Text + ", " + "Loss of appetite" + ", ");
}
}
}
}
};
lblLossOfPain.GestureRecognizers.Add(TapLossOfPain);
var TapNauseaOfVomting = new TapGestureRecognizer();
TapNauseaOfVomting.Tapped += (sender, e) =>
{
if (string.IsNullOrWhiteSpace(etNote.Text))
{
etNote.Text = (etNote.Text + "Nausea or Vomiting" + ", ");
}
else
{
string strName = etNote.Text;
string strNewChar = strName.Substring(Math.Max(0, strName.Length - 2));
if (strNewChar == ", ")
{
if (etNote.Text.Length > 0)
{
etNote.Text = etNote.Text.Substring(0, etNote.Text.Length - 2);
bool isExisting = false;
string[] items = etNote.Text.ToString().Split(',');
foreach (var eachItem in items)
{
if (eachItem == "Nausea or Vomiting")
{
isExisting = true;
break;
}
}
if (!isExisting)
{
etNote.Text = (etNote.Text + ", " + "Nausea or Vomiting" + ", ");
}
}
}
}
};
lblNauseaOfVomting.GestureRecognizers.Add(TapNauseaOfVomting);
}
private void EtNote_TextChanged(object sender, TextChangedEventArgs e)
{
strMessage = e.NewTextValue;
}
}
}
No comments:
Post a Comment