Ejemplo n.º 1
0
		public AboutMenu ()
		{
			this.Title="About Kana Keys";

			NavigationPage.SetBackButtonTitle (this, "Back");
			versionCell = new CustomCell{  Text= "Version #"};
			copyrightCell = new CustomCell{  Text = "Copyright notice"};
			termsCell = new CustomCell{  Text = "Terms of use"};

			mainSection = new TableSection ();

			tableView = new TableView ();
			mainSection.Add (versionCell);
			mainSection.Add(copyrightCell);	
			mainSection.Add(termsCell);	
			versionCell.Tapped += VersionCell_Tapped;
			copyrightCell.Tapped+= CopyrightCell_Tapped;
			termsCell.Tapped+= TermsCell_Tapped;
			tableView.Intent = TableIntent.Menu;

			tableView.Root = new TableRoot{ 
				mainSection,
			};
			Content = tableView;
		}
Ejemplo n.º 2
0
		public TestMenu (string test)
		{
			testTitle = test;
			NavigationPage.SetBackButtonTitle (this, "Back");
			this.Title=test+" tests";
			monoCell = new CustomCell{ Text= "Monographs"};
			diaCell = new CustomCell{ Text = "Digraphs"};
			mainSection = new TableSection ();

			tableView = new TableView ();
			mainSection.Add (monoCell);
			mainSection.Add(diaCell);	
			monoCell.Tapped+= MonoCell_Tapped;
			diaCell.Tapped+= DiaCell_Tapped;
			tableView.Intent = TableIntent.Menu;

			tableView.Root = new TableRoot{ 
				mainSection,
			};
			Content = tableView;
		}
Ejemplo n.º 3
0
		public CompMenu (int mode=0)
		{
			wrongCount = 0;
			rIndex = 0;
			wIndex = 0;
			testMode = mode;
			NavigationPage.SetBackButtonTitle (this, "Back");
			testCount = 16;
			Title = "Comprehensive Tests";
			mainSection = new TableSection ();
			resetSection = new TableSection (){ Title = "Reset" };
			if (mode == 0) {
				testCount = 16;
				resetCell = new CustomCell (){ Text = "Reset all reading tests" };
				mainSection.Title="COMPREHENSIVE READING TESTS";
			}
			else if (mode == 1) {
				testCount = 32;
				resetCell = new CustomCell (){ Text = "Reset all writing tests" };
				mainSection.Title="COMPREHENSIVE WRITING TESTS";
			}

			testCell = new CustomCell[testCount];

			tableView = new TableView ();
			for (int i = 1; i <= testCount; i++) {
				testCell [i-1] = new CustomCell{ Text = "Test "+i };
				mainSection.Add (testCell[i-1]);
				testCell[i-1].Tapped+= MonoCell_Tapped;
			}
			resetSection.Add (resetCell);
			tableView.Intent = TableIntent.Menu;
			resetCell.Tapped+= ResetCell_Tapped;
			tableView.Root = new TableRoot{ 
				mainSection,
				resetSection
			};

			Content = tableView;
		}
Ejemplo n.º 4
0
		public HiraMenu ()
		{
			NavigationPage.SetBackButtonTitle (this, "Back");
			this.Title = "Hiragana Course";
			uHiraCell = new CustomCell{Text = "Basic Hiragana",ImageSource = ImageSource.FromResource("KeystotheKana.Resources.favicon.Basic Hiragana.png")};
			vHiraCell = new CustomCell{Text = "Dakuten Hiragana", ImageSource = ImageSource.FromResource("KeystotheKana.Resources.favicon.Dakuten Hiragana.png")};
			ecHiraCell = new CustomCell{Text = "Easily Confused Hiragana", ImageSource = ImageSource.FromResource("KeystotheKana.Resources.favicon.Easily Conf Hira.png")};
			hiraGloCell = new CustomCell{Text = "Hiragana Examples List", ImageSource = ImageSource.FromResource("KeystotheKana.Resources.favicon.Hira Examples List.png")};
			hiraSourceCell = new CustomCell{Text = "Hiragana Sources", ImageSource = ImageSource.FromResource("KeystotheKana.Resources.favicon.Hiragana Sources.png")};

			mainSection = new TableSection ();
		
			tableView = new TableView ();
			loadMenu ();

			tableView.Intent = TableIntent.Menu;

			tableView.Root = new TableRoot{  
				mainSection,
			} ;
			Content = tableView;
		}
Ejemplo n.º 5
0
		public BasicMenu ()
		{
			this.Title="Overview";
			NavigationPage.SetBackButtonTitle (this, "Overview");
			welcomeCell = new CustomCell{ Text= "Welcome",ImageSource =ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-Welcome.png")};
			introCell = new CustomCell{ Text= "Japanese Phonetic Writing",ImageSource =ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-JPW.png")};
			guideCell = new CustomCell{ Text = "Guide to This Course", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-GTTC.png")};
			mainSection = new TableSection ();

			tableView = new TableView ();
			mainSection.Add (welcomeCell);
			mainSection.Add (introCell);
			mainSection.Add(guideCell);	
			welcomeCell.Tapped+= WelcomeCell_Tapped;
			introCell.Tapped+= IntroCell_Tapped;
			guideCell.Tapped+= GuideCell_Tapped;
			tableView.Intent = TableIntent.Menu;

			tableView.Root = new TableRoot{ 
				mainSection,
			};
			Content = tableView;
		}
Ejemplo n.º 6
0
		public GLookupMenu ()
		{
			this.Title="Main Menu";
			this.Title="Gojūon Lookup";
			hiraCell = new CustomCell{ Text= "Hiragana",ImageSource =ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-GL-Hiragana.png")};
			kataCell = new CustomCell{ Text = "Katakana", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-GL-Katakana.png")};
			mixedCell = new CustomCell{ Text = "Mixed", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-GL-Mixed.png")};
			mainSection = new TableSection ();
		
			tableView = new TableView ();
			mainSection.Add (hiraCell);
			mainSection.Add(kataCell);	
			mainSection.Add(mixedCell);
			hiraCell.Tapped += HiraCell_Tapped;
			kataCell.Tapped+= KataCell_Tapped;
			mixedCell.Tapped+= MixedCell_Tapped;
			tableView.Intent = TableIntent.Menu;

			tableView.Root = new TableRoot{ 
				mainSection,
			};
			Content = tableView;
		}
Ejemplo n.º 7
0
		public KataMenu () 
		{
			
			NavigationPage.SetBackButtonTitle (this, "Back");
			this.Title="Katakana Course";
			uKataCell = new CustomCell{Text= "Basic Katakana",ImageSource =ImageSource.FromResource("KeystotheKana.Resources.favicon.Basic Katakana.png")};
			vKataCell = new CustomCell{Text = "Dakuten Katakana", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Dakuten Katakana.png")};
			ecKataCell = new CustomCell{Text = "Easily Confused Katakana", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Easily Conf Kata.png")};
			KataGloCell = new CustomCell{Text = "Katakana Examples List", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Kata Examples List.png")};
			KataSourceCell = new CustomCell{Text = "Katakana Sources", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Katakana Sources.png")};
			tranKataCell=new CustomCell{Text = "Transcription Katakana", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Transcr Katakana.png")};

			mainSection = new TableSection ();

			tableView = new TableView ();
			loadMenu ();
			tableView.Intent = TableIntent.Menu;

			tableView.Root = new TableRoot{  
				mainSection,
			} ;
			Content = tableView;
		}
Ejemplo n.º 8
0
		void VHiraTestCell_Tapped (object sender, EventArgs e)
		{
//			if (states [3]) {
//				mainSection.RemoveAt (mainSection.IndexOf ((CustomCell)sender) + 2);
//				mainSection.RemoveAt (mainSection.IndexOf ((CustomCell)sender) + 1);;
//				states [3] = false;
//			} else {
				CustomCell monoCell = new CustomCell{ Text = "    Monographs" };
				CustomCell diaCell = new CustomCell{ Text = "    Digraphs" };
				mainSection.Insert (mainSection.IndexOf ((CustomCell)sender) + 1, monoCell);
				mainSection.Insert (mainSection.IndexOf ((CustomCell)sender) + 2, diaCell);
				monoCell.Tapped += VHiraMonoCell_Tapped;
				diaCell.Tapped += VHiraDiaCell_Tapped;
			((CustomCell)sender).Tapped -= VHiraTestCell_Tapped;
//				states [3] = true;
//			}
		}
Ejemplo n.º 9
0
		void VHiraCell_Tapped (object sender, EventArgs e)
		{
//			if (!states [2]) {
				CustomCell lessonCell = new CustomCell{ Text = "  Lessons" };
				CustomCell testCell = new CustomCell{ Text = "  Tests" };
				mainSection.Insert (mainSection.IndexOf (vHiraCell) + 1, lessonCell);
				mainSection.Insert (mainSection.IndexOf (vHiraCell) + 2, testCell);
				lessonCell.Tapped += VLessonCell_Tapped;
				testCell.Tapped += VHiraTestCell_Tapped;
			((CustomCell)sender).Tapped -= VHiraCell_Tapped;
//				states [2] = true;
//			} else {
//				if (states [3]) {
//					mainSection.RemoveAt (mainSection.IndexOf (vHiraCell) + 4);
//					mainSection.RemoveAt (mainSection.IndexOf (vHiraCell) + 3);
//					states [3] = false;
//				}
//				mainSection.RemoveAt (mainSection.IndexOf (vHiraCell) + 2);
//				mainSection.RemoveAt (mainSection.IndexOf (vHiraCell) + 1);
//				states [2] = false;
//			}
		}
Ejemplo n.º 10
0
		void EcHiraCell_Tapped (object sender, EventArgs e)
		{
			//Navigation.PushAsync (new LessonMenu ("Easily Confused Hiragana"){ });
	//		if (!states [4]) {
				CustomCell lessonCell = new CustomCell{ Text = "  Lessons" };
				CustomCell testCell = new CustomCell{ Text = "  Tests" };
				mainSection.Insert (mainSection.IndexOf (ecHiraCell) + 1, lessonCell);
				mainSection.Insert (mainSection.IndexOf (ecHiraCell) + 2, testCell);
				lessonCell.Tapped += ecLessonCell_Tapped;
				testCell.Tapped += ecTestCell_Tapped;
			((CustomCell)sender).Tapped -= EcHiraCell_Tapped;
			//	states [4] = true;
//			} else {
//				mainSection.RemoveAt (mainSection.IndexOf (ecHiraCell) + 2);
//				mainSection.RemoveAt (mainSection.IndexOf (ecHiraCell) + 1);
//				states [4] = false;
//			}
		}
Ejemplo n.º 11
0
		public Main ()
		{
			this.Title="Main Menu";
			NavigationPage.SetBackButtonTitle (this, "Menu");
			basicCell = new CustomCell{ Text = "Overview", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-Overview2.png")};
			schedulesCell = new CustomCell {
				Text = "Study Schedules",
				ImageSource = ImageSource.FromResource ("KeystotheKana.Resources.favicon.studySchedule.png")
			};
			hiraCell = new CustomCell{ Text = "Hiragana Course", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Hiragana Course.png")};
			kataCell = new CustomCell{ Text = "Katakana Course", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Katakana Course.png") };

			gojColOrderCell=new CustomCell{Text = "Gojūon Collation Order", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-GCO.png")};

			mainSection = new TableSection ();
			section2 = new TableSection ();
			section3 = new TableSection ();
			section4 = new TableSection ();
			section2.Title = "CUSTOMIZED TESTS";
			section3.Title = "COMPREHENSIVE TESTS";
			section4.Title = "OTHER";
			mainSection.Title = "CURRICULUM";
			mainSection.Add (basicCell);
			mainSection.Add (schedulesCell);
			mainSection.Add(hiraCell);
			mainSection.Add(kataCell);
			mainSection.Add (gojColOrderCell);
			basicCell.Tapped += BasicCell_Tapped;
			hiraCell.Tapped += HiraCell_Tapped;
			kataCell.Tapped+= KataCell_Tapped;
			tableView = new TableView ();
			tableView.Intent = TableIntent.Menu;
			CustomCell udReviewSet = new CustomCell{ Text = "User-Defined Review Set", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.flag.png") };
			CustomCell recentErrors = new CustomCell{ Text = "Recent Errors", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.error.png") };
			section2.Add (udReviewSet);
			section2.Add (recentErrors);
			readingCell = new CustomCell{ Text = "Reading" , ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-Reading.png")};
			writingCell = new CustomCell{ Text = "Writing", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-Writing.png") };
			gLookupCell = new CustomCell{ Text = "Gojūon Lookup", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-GL.png")};
			section3.Add (readingCell);
			section3.Add (writingCell);
			section3.Add (gLookupCell);
			readingCell.Tapped += ReadingCell_Tapped;
			writingCell.Tapped+= WritingCell_Tapped;
			gLookupCell.Tapped+= GLookupCell_Tapped;
			settingsCell = new CustomCell{ Text = "Settings", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-Settings.png") };
			aboutCell = new CustomCell{ Text = "About Kana Keys", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-About KK.png")};

			aboutCell.Tapped+= AboutCell_Tapped;

			chartCell = new CustomCell{ Text = "Wall Chart", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-Wall Chart.png")};

			chartCell.Tapped += ChartCell_Tapped;
			rateCell = new CustomCell{ Text = "Rate Kana Keys", ImageSource=ImageSource.FromResource("KeystotheKana.Resources.favicon.Menu icon-Rate KK.png")};
			section4.Add (settingsCell);
			section4.Add (aboutCell);
			section4.Add (chartCell);
			section4.Add (rateCell);
			schedulesCell.Tapped += SchedulesCell_Tapped;
			settingsCell.Tapped += SettingsCell_Tapped;
			tableView.Root = new TableRoot{ 
				mainSection,
				section3,
				section4
			};
			gojColOrderCell.Tapped += GojColOrderCell_Tapped;
			rateCell.Tapped+= RateCell_Tapped;
			_ratingControl = new StoreRatingControl();
			Grid grTopLevel = new Grid
			{
				Padding = 0,

				HorizontalOptions = LayoutOptions.Fill,
				VerticalOptions = LayoutOptions.CenterAndExpand,
				RowDefinitions = 
				{
					new RowDefinition{ Height = GridLength.Auto},
				},
				ColumnDefinitions = 
				{
					new ColumnDefinition{ Width=new GridLength(1,GridUnitType.Star) },
				},
			};
			grTopLevel.Children.Add (tableView,0,0);
			grTopLevel.Children.Add(_ratingControl, 0,0);

			Content = grTopLevel;
		}
Ejemplo n.º 12
0
		void VKataCell_Tapped (object sender, EventArgs e)
		{
		//	if (!states [2]) {
				//Navigation.PushAsync (new LessonMenu ("Dakuten Hiragana"){ });
				CustomCell lessonCell = new CustomCell{ Text = "  Lessons" };
				CustomCell testCell = new CustomCell{ Text = "  Tests" };
				mainSection.Insert (mainSection.IndexOf (vKataCell) + 1, lessonCell);
				mainSection.Insert (mainSection.IndexOf (vKataCell) + 2, testCell);
				lessonCell.Tapped += VLessonCell_Tapped;
				testCell.Tapped += VKataTestCell_Tapped;
			((CustomCell)sender).Tapped -= VKataCell_Tapped;
			//	states [2] = true;
//			}
//			else {
//				if (states [3]) {
//					mainSection.RemoveAt (mainSection.IndexOf (vKataCell) + 4);
//					mainSection.RemoveAt (mainSection.IndexOf (vKataCell) + 3);
//					states [3] = false;
//				}
//				mainSection.RemoveAt (mainSection.IndexOf (vKataCell) + 2);
//				mainSection.RemoveAt (mainSection.IndexOf (vKataCell) + 1);
//				states [2] = false;
//			}
		}
Ejemplo n.º 13
0
		void UKataCell_Tapped (object sender, EventArgs e)
		{
			//Navigation.PushAsync (new LessonMenu ("Basic Hiragana"){ });
		//	if (!states [0]) {
				CustomCell lessonCell = new CustomCell{ Text = "  Lessons" };
				CustomCell testCell = new CustomCell{ Text = "  Tests" };
				mainSection.Insert (mainSection.IndexOf (uKataCell) + 1, lessonCell);
				mainSection.Insert (mainSection.IndexOf (uKataCell) + 2, testCell);
				lessonCell.Tapped += ULessonCell_Tapped;
				testCell.Tapped += UKataTestCell_Tapped;
				
			((CustomCell)sender).Tapped -= UKataCell_Tapped;
//			} else {
//				if (states [1]) {
//					mainSection.RemoveAt (mainSection.IndexOf (uKataCell) + 4);
//					mainSection.RemoveAt (mainSection.IndexOf (uKataCell) + 3);
//					states [1] = false;
//				}
//				mainSection.RemoveAt (mainSection.IndexOf (uKataCell) + 2);
//				mainSection.RemoveAt (mainSection.IndexOf (uKataCell) + 1);
//				states [0] = false;
//			}
		}
Ejemplo n.º 14
0
		void EcKataCell_Tapped (object sender, EventArgs e)
		{
//			if (!states [5]) {
				CustomCell lessonCell = new CustomCell{ Text = "  Lessons" };
				CustomCell testCell = new CustomCell{ Text = "  Tests" };
				mainSection.Insert (mainSection.IndexOf (ecKataCell) + 1, lessonCell);
				mainSection.Insert (mainSection.IndexOf (ecKataCell) + 2, testCell);
				lessonCell.Tapped += ecLessonCell_Tapped;
				testCell.Tapped += ecTestCell_Tapped;

			((CustomCell)sender).Tapped -= EcKataCell_Tapped;
//			}
//			else {
//				mainSection.RemoveAt (mainSection.IndexOf (ecKataCell) + 2);
//				mainSection.RemoveAt (mainSection.IndexOf (ecKataCell) + 1);
//				states [5] = false;
//			}
		}