public MonthsTesting(Form ParentForm, FlatDesign.Colors Colors) { this.Colors = Colors; CreateContainer( ParentForm, Colors, "Months", "", null, "Words", null, "Testing"); OnHide = DisposeSpeechRecognitionEngine; GermanMonths = GermanMonthExample.Split(' '); GermanSeasons = GermanSeasonExample.Split(' '); EnglishSeasons = EnglishSeasonExample.Split(' '); SeasonImages = new Bitmap[EnglishSeasons.Length]; for (int i = 0; i < SeasonImages.Length; i++) { SeasonImages[i] = new Bitmap(@"..\..\..\downloads\Icons\" + EnglishSeasons[i] + ".png"); } RedSeasonImages = new Bitmap[EnglishSeasons.Length]; for (int i = 0; i < RedSeasonImages.Length; i++) { RedSeasonImages[i] = new Bitmap(@"..\..\..\downloads\Icons\" + EnglishSeasons[i] + "Red.png"); } TestControlButton = new Button(); TestControlButton.TabIndex = 0; TestControlButton.TabStop = false; TestControlButton.Location = new Point(20, 20); TestControlButton.Size = new Size(120, 50); TestControlButton.FlatStyle = FlatStyle.Flat; TestControlButton.BackColor = Colors.Origin; TestControlButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; TestControlButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; TestControlButton.FlatAppearance.BorderSize = 0; TestControlButton.Font = new Font("Calibri", 20); TestControlButton.ForeColor = Colors.Constant; TestControlButton.Text = "Start"; TestControlButton.TextAlign = ContentAlignment.MiddleCenter; TestControlButton.MouseClick += TestControlButton_MouseClick; SeasonPictureBox = new PictureBox(); SeasonPictureBox.Location = new Point(200, TestControlButton.Bottom + 50); SeasonPictureBox.Size = new Size(120, 120); SeasonPictureBox.BorderStyle = BorderStyle.None; SeasonPictureBox.BackColor = Colors.Background; SeasonPictureBox.SizeMode = PictureBoxSizeMode.CenterImage; SeasonLabel = new Label(); SeasonLabel.TabIndex = 0; SeasonLabel.Location = new Point(SeasonPictureBox.Right + 10, TestControlButton.Bottom + 50); SeasonLabel.Size = new Size(ContainerSize.Width - SeasonPictureBox.Right, 120); SeasonLabel.FlatStyle = FlatStyle.Flat; SeasonLabel.BorderStyle = BorderStyle.None; SeasonLabel.BackColor = Colors.Background; SeasonLabel.Font = new Font("Calibri", 50); SeasonLabel.ForeColor = Colors.Constant; SeasonLabel.TextAlign = ContentAlignment.MiddleLeft; MonthNumberLabel = new Label(); MonthNumberLabel.TabIndex = 0; MonthNumberLabel.Location = new Point(0, SeasonPictureBox.Bottom); MonthNumberLabel.Size = new Size(ContainerSize.Width, 300); MonthNumberLabel.FlatStyle = FlatStyle.Flat; MonthNumberLabel.BorderStyle = BorderStyle.None; MonthNumberLabel.BackColor = Colors.Background; MonthNumberLabel.Font = new Font("Calibri", 200); MonthNumberLabel.ForeColor = Colors.Constant; MonthNumberLabel.TextAlign = ContentAlignment.MiddleCenter; MonthNumberLabel.Text = "1"; SetMonthToRecognize(); AddControl(TestControlButton); AddControl(SeasonPictureBox); AddControl(SeasonLabel); AddControl(MonthNumberLabel); }
public MonthsListening(Form ParentForm, FlatDesign.Colors Colors) { this.Colors = Colors; CreateContainer( ParentForm, Colors, "Months", "", null, "Words", null, "Listening"); OnHide = DisposeSpeechSynthesizer; GermanMonths = GermanMonthExample.Split(' '); EnglishMonths = EnglishMonthExample.Split(' '); GermanSeasons = GermanSeasonExample.Split(' '); EnglishSeasons = EnglishSeasonExample.Split(' '); SeasonImages = new Bitmap[EnglishSeasons.Length]; for (int i = 0; i < SeasonImages.Length; i++) { SeasonImages[i] = new Bitmap(@"..\..\..\downloads\Icons\" + EnglishSeasons[i] + ".png"); } MonthGroundPanel = new Panel(); MonthGroundPanel.TabIndex = 0; MonthGroundPanel.TabStop = false; MonthGroundPanel.Location = new Point(50, 50); MonthGroundPanel.Size = new Size(ContainerSize.Width - 100, ContainerSize.Height - 100); MonthGroundPanel.BorderStyle = BorderStyle.None; MonthGroundPanel.BackColor = Colors.Background; SeasonPictureBox = new PictureBox(); SeasonPictureBox.Location = new Point(150, 10); SeasonPictureBox.Size = new Size(120, 120); SeasonPictureBox.BorderStyle = BorderStyle.None; SeasonPictureBox.BackColor = Colors.Background; SeasonPictureBox.Image = SeasonImages[0]; SeasonPictureBox.SizeMode = PictureBoxSizeMode.CenterImage; SeasonLabel = new Label(); SeasonLabel.TabIndex = 0; SeasonLabel.Location = new Point(SeasonPictureBox.Right + 10, 10); SeasonLabel.Size = new Size(MonthGroundPanel.Width - SeasonPictureBox.Right, 120); SeasonLabel.FlatStyle = FlatStyle.Flat; SeasonLabel.BorderStyle = BorderStyle.None; SeasonLabel.BackColor = Colors.Background; SeasonLabel.Font = new Font("Calibri", 50); SeasonLabel.ForeColor = Colors.Constant; SeasonLabel.Text = GermanSeasons[0]; SeasonLabel.TextAlign = ContentAlignment.MiddleLeft; GermanMonthLabel = new Label(); GermanMonthLabel.TabIndex = 0; GermanMonthLabel.Location = new Point(70, SeasonLabel.Bottom + 10); GermanMonthLabel.Size = new Size(MonthGroundPanel.Width - 140, 170); GermanMonthLabel.FlatStyle = FlatStyle.Flat; GermanMonthLabel.BorderStyle = BorderStyle.None; GermanMonthLabel.BackColor = Colors.Background; GermanMonthLabel.Font = new Font("Calibri", 80); GermanMonthLabel.ForeColor = Colors.Constant; GermanMonthLabel.Text = GermanMonths[0]; GermanMonthLabel.TextAlign = ContentAlignment.MiddleCenter; GermanMonthLabel.MouseClick += GermanMonthLabel_MouseClick; EnglishMonthLabel = new Label(); EnglishMonthLabel.TabIndex = 0; EnglishMonthLabel.Location = new Point(0, GermanMonthLabel.Bottom + 10); EnglishMonthLabel.Size = new Size(MonthGroundPanel.Width, 120); EnglishMonthLabel.FlatStyle = FlatStyle.Flat; EnglishMonthLabel.BorderStyle = BorderStyle.None; EnglishMonthLabel.BackColor = Colors.Background; EnglishMonthLabel.Font = new Font("Calibri", 40); EnglishMonthLabel.ForeColor = Colors.Constant; EnglishMonthLabel.Text = EnglishMonths[0]; EnglishMonthLabel.TextAlign = ContentAlignment.MiddleCenter; NextMonthButton = new Button(); NextMonthButton.TabIndex = 0; NextMonthButton.TabStop = false; NextMonthButton.Location = new Point(MonthGroundPanel.Width - 70, SeasonLabel.Bottom + 45); NextMonthButton.Size = new Size(70, 100); NextMonthButton.FlatStyle = FlatStyle.Flat; NextMonthButton.BackColor = Colors.Origin; NextMonthButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; NextMonthButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; NextMonthButton.FlatAppearance.BorderSize = 0; NextMonthButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Next.png"); NextMonthButton.ImageAlign = ContentAlignment.MiddleCenter; NextMonthButton.MouseClick += NextSeasonButton_MouseClick; PreviusMonthButton = new Button(); PreviusMonthButton.TabIndex = 0; PreviusMonthButton.TabStop = false; PreviusMonthButton.Location = new Point(0, SeasonLabel.Bottom + 45); PreviusMonthButton.Size = new Size(70, 100); PreviusMonthButton.FlatStyle = FlatStyle.Flat; PreviusMonthButton.BackColor = Colors.Origin; PreviusMonthButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; PreviusMonthButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; PreviusMonthButton.FlatAppearance.BorderSize = 0; PreviusMonthButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Previus.png"); PreviusMonthButton.ImageAlign = ContentAlignment.MiddleCenter; PreviusMonthButton.Visible = false; PreviusMonthButton.MouseClick += PreviusSeasonButton_MouseClick; MonthGroundPanel.Controls.Add(SeasonPictureBox); MonthGroundPanel.Controls.Add(SeasonLabel); MonthGroundPanel.Controls.Add(GermanMonthLabel); MonthGroundPanel.Controls.Add(EnglishMonthLabel); MonthGroundPanel.Controls.Add(NextMonthButton); MonthGroundPanel.Controls.Add(PreviusMonthButton); AddControl(MonthGroundPanel); }
public AllNumbersPracticing(Form ParentForm, FlatDesign.Colors Colors) { this.Colors = Colors; CreateContainer( ParentForm, Colors, "All numbers", "", new Bitmap(@"..\..\..\downloads\Icons\AllNumbers.png"), "Origins", new Bitmap(@"..\..\..\downloads\Icons\Origins.png"), "Practicing"); OnHide = DisposeSpeechInstruments; NumberWords = NumberWordsExample.Split(' '); NumberButtons = new Button[NumberWords.Length]; int Position = 0; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { NumberButtons[Position] = new Button(); NumberButtons[Position].TabIndex = 0; NumberButtons[Position].TabStop = false; if (i == 0 && j == 0) { NumberButtons[Position].Location = new Point(12, 13); } else if (i > 0 && j == 0) { NumberButtons[Position].Location = new Point(NumberButtons[Position - 10].Right + 5, 13); } else if (i == 0 && j > 0) { NumberButtons[Position].Location = new Point(12, NumberButtons[Position - 1].Bottom + 5); } else if (i > 0 && j > 0) { NumberButtons[Position].Location = new Point(NumberButtons[Position - 10].Right + 5, NumberButtons[Position - 1].Bottom + 5); } NumberButtons[Position].Size = new Size(73, 50); NumberButtons[Position].FlatStyle = FlatStyle.Flat; NumberButtons[Position].BackColor = Colors.Origin; NumberButtons[Position].FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; NumberButtons[Position].FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; NumberButtons[Position].FlatAppearance.BorderSize = 0; NumberButtons[Position].Font = new Font("Calibri", 16); NumberButtons[Position].ForeColor = Colors.Constant; NumberButtons[Position].TextAlign = ContentAlignment.MiddleCenter; NumberButtons[Position].MouseClick += NumberButton_MouseClick; Position++; } } for (int i = 0; i < 90; i++) { NumberButtons[i].Text = Convert.ToString(i + 10); } int Hunderd = 100; for (int i = 90; i < 100; i++) { NumberButtons[i].Text = Convert.ToString(Hunderd); Hunderd += 100; } NumberPanel = new Panel(); NumberPanel.TabIndex = 0; NumberPanel.TabStop = false; NumberPanel.Location = new Point(50, 50); NumberPanel.Size = new Size(ContainerSize.Width - 100, ContainerSize.Height - 100); NumberPanel.BorderStyle = BorderStyle.None; NumberPanel.BackColor = Colors.Background; NumberPanel.Visible = false; BackToNumbersButton = new Button(); BackToNumbersButton.TabIndex = 0; BackToNumbersButton.TabStop = false; BackToNumbersButton.Location = new Point(0, 0); BackToNumbersButton.Size = new Size(70, 70); BackToNumbersButton.FlatStyle = FlatStyle.Flat; BackToNumbersButton.BackColor = Colors.Origin; BackToNumbersButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; BackToNumbersButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; BackToNumbersButton.FlatAppearance.BorderSize = 0; BackToNumbersButton.Image = new Bitmap(@"..\..\..\downloads\Icons\BackToNumbers.png"); BackToNumbersButton.ImageAlign = ContentAlignment.MiddleCenter; BackToNumbersButton.MouseClick += BackToNumbersButton_MouseClick; NumberLabel = new Label(); NumberLabel.TabIndex = 0; NumberLabel.Location = new Point(70, 0); NumberLabel.Size = new Size(NumberPanel.Width - 140, 270); NumberLabel.FlatStyle = FlatStyle.Flat; NumberLabel.BorderStyle = BorderStyle.None; NumberLabel.BackColor = Colors.Background; NumberLabel.Font = new Font("Calibri", 160); NumberLabel.ForeColor = Colors.Constant; NumberLabel.TextAlign = ContentAlignment.MiddleCenter; NumberWordLabel = new Label(); NumberWordLabel.TabIndex = 0; NumberWordLabel.Location = new Point(70, NumberLabel.Bottom); NumberWordLabel.Size = new Size(NumberPanel.Width - 140, 100); NumberWordLabel.FlatStyle = FlatStyle.Flat; NumberWordLabel.BorderStyle = BorderStyle.None; NumberWordLabel.BackColor = Colors.Background; NumberWordLabel.Font = new Font("Calibri", 50); NumberWordLabel.ForeColor = Colors.Constant; NumberWordLabel.TextAlign = ContentAlignment.MiddleCenter; NumberWordLabel.MouseClick += NumberWordLabel_MouseClick; NumberWordPartsLabel = new Label(); NumberWordPartsLabel.TabIndex = 0; NumberWordPartsLabel.Location = new Point(0, NumberWordLabel.Bottom); NumberWordPartsLabel.Size = new Size(NumberPanel.Width, 100); NumberWordPartsLabel.FlatStyle = FlatStyle.Flat; NumberWordPartsLabel.BorderStyle = BorderStyle.None; NumberWordPartsLabel.BackColor = Colors.Background; NumberWordPartsLabel.Font = new Font("Calibri", 40); NumberWordPartsLabel.ForeColor = Colors.Constant; NumberWordPartsLabel.TextAlign = ContentAlignment.MiddleCenter; NumberWordPartsLabel.MouseClick += NumberWordPartsLabel_MouseClick; PreviusNumberButton = new Button(); PreviusNumberButton.TabIndex = 0; PreviusNumberButton.TabStop = false; PreviusNumberButton.Location = new Point(0, 220); PreviusNumberButton.Size = new Size(70, 100); PreviusNumberButton.FlatStyle = FlatStyle.Flat; PreviusNumberButton.BackColor = Colors.Origin; PreviusNumberButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; PreviusNumberButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; PreviusNumberButton.FlatAppearance.BorderSize = 0; PreviusNumberButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Previus.png"); PreviusNumberButton.ImageAlign = ContentAlignment.MiddleCenter; PreviusNumberButton.MouseClick += PreviusNumberButton_MouseClick; NextNumberButton = new Button(); NextNumberButton.TabIndex = 0; NextNumberButton.TabStop = false; NextNumberButton.Location = new Point(NumberPanel.Width - 70, 220); NextNumberButton.Size = new Size(70, 100); NextNumberButton.FlatStyle = FlatStyle.Flat; NextNumberButton.BackColor = Colors.Origin; NextNumberButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; NextNumberButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; NextNumberButton.FlatAppearance.BorderSize = 0; NextNumberButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Next.png"); NextNumberButton.ImageAlign = ContentAlignment.MiddleCenter; NextNumberButton.MouseClick += NextNumberButton_MouseClick; NumberPanel.Controls.Add(BackToNumbersButton); NumberPanel.Controls.Add(NumberLabel); NumberPanel.Controls.Add(NumberWordPartsLabel); NumberPanel.Controls.Add(NumberWordLabel); NumberPanel.Controls.Add(PreviusNumberButton); NumberPanel.Controls.Add(NextNumberButton); AddControl(NumberPanel); for (int i = 0; i < NumberButtons.Length; i++) { AddControl(NumberButtons[i]); } }
public LetterCombinationsTesting(Form ParentForm, FlatDesign.Colors Colors) { this.Colors = Colors; CreateContainer( ParentForm, Colors, "LetterCombinations", "", new Bitmap(@"..\..\..\downloads\Icons\LetterCombinations.png"), "Origins", new Bitmap(@"..\..\..\downloads\Icons\Origins.png"), "Testing"); OnHide = DisposeSpeechInstruments; LetterCombinations = LetterCombinationsExample.Split(' '); LetterCombinationExampleWords = LetterCombinationExampleWordsExample.Split('|'); TranslatedExampleWords = TranslatedExampleWordsExample.Split('|'); TestControlButton = new Button(); TestControlButton.TabIndex = 0; TestControlButton.TabStop = false; TestControlButton.Location = new Point(20, 20); TestControlButton.Size = new Size(120, 50); TestControlButton.FlatStyle = FlatStyle.Flat; TestControlButton.BackColor = Colors.Origin; TestControlButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; TestControlButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; TestControlButton.FlatAppearance.BorderSize = 0; TestControlButton.Font = new Font("Calibri", 20); TestControlButton.ForeColor = Colors.Constant; TestControlButton.Text = "Start"; TestControlButton.TextAlign = ContentAlignment.MiddleCenter; TestControlButton.MouseClick += TestControlButton_MouseClick; LetterCombinationPanel = new Panel(); LetterCombinationPanel.TabIndex = 0; LetterCombinationPanel.TabStop = false; LetterCombinationPanel.Location = new Point(90, TestControlButton.Bottom + 12); LetterCombinationPanel.Size = new Size(ContainerSize.Width - 180, 400); LetterCombinationPanel.BorderStyle = BorderStyle.None; LetterCombinationPanel.BackColor = Colors.Background; LetterCombinationPanel.Visible = false; LetterCombinationLabel = new Label(); LetterCombinationLabel.TabIndex = 0; LetterCombinationLabel.Location = new Point(0, 0); LetterCombinationLabel.Size = new Size(LetterCombinationPanel.Width, 300); LetterCombinationLabel.BorderStyle = BorderStyle.None; LetterCombinationLabel.BackColor = Colors.Background; LetterCombinationLabel.Font = new Font("Calibri", 180); LetterCombinationLabel.ForeColor = Colors.Constant; LetterCombinationLabel.TextAlign = ContentAlignment.MiddleCenter; LetterCombinationExampleWordLabel = new Label(); LetterCombinationExampleWordLabel.TabIndex = 0; LetterCombinationExampleWordLabel.Location = new Point(70, LetterCombinationLabel.Bottom); LetterCombinationExampleWordLabel.Size = new Size((LetterCombinationPanel.Width - 70) / 2, 100); LetterCombinationExampleWordLabel.BorderStyle = BorderStyle.None; LetterCombinationExampleWordLabel.BackColor = Colors.Background; LetterCombinationExampleWordLabel.Font = new Font("Calibri", 38); LetterCombinationExampleWordLabel.ForeColor = Colors.Constant; LetterCombinationExampleWordLabel.TextAlign = ContentAlignment.MiddleLeft; TranslatedExampleWordLabel = new Label(); TranslatedExampleWordLabel.TabIndex = 0; TranslatedExampleWordLabel.Location = new Point(LetterCombinationExampleWordLabel.Right, LetterCombinationLabel.Bottom); TranslatedExampleWordLabel.Size = new Size((LetterCombinationPanel.Width - 70) / 2, 100); TranslatedExampleWordLabel.BorderStyle = BorderStyle.None; TranslatedExampleWordLabel.BackColor = Colors.Background; TranslatedExampleWordLabel.Font = new Font("Calibri", 38); TranslatedExampleWordLabel.ForeColor = Colors.Constant; TranslatedExampleWordLabel.TextAlign = ContentAlignment.MiddleLeft; LetterCombinationPanel.Controls.Add(LetterCombinationLabel); LetterCombinationPanel.Controls.Add(LetterCombinationExampleWordLabel); LetterCombinationPanel.Controls.Add(TranslatedExampleWordLabel); AddControl(TestControlButton); AddControl(LetterCombinationPanel); }
public Editor(Form ParentForm, FlatDesign.Colors Colors) { this.ParentForm = ParentForm; this.Colors = Colors; CreateContainer( ParentForm, Colors, "Editor", "", null, "Editor", null, "Creating"); CustomControls = new List <Control>(); NameLabel = new Label(); NameLabel.TabIndex = 0; NameLabel.Location = new Point(10, 10); NameLabel.AutoSize = true; NameLabel.Width = 200; NameLabel.FlatStyle = FlatStyle.Flat; NameLabel.BorderStyle = BorderStyle.None; NameLabel.BackColor = Colors.Background; NameLabel.Font = new Font("Calibri", 24); NameLabel.ForeColor = Colors.Constant; NameLabel.Text = "Name : "; NameLabel.TextAlign = ContentAlignment.MiddleLeft; NameTextBox = new TextBox(); NameTextBox.TabIndex = 0; NameTextBox.TabStop = false; NameTextBox.Location = new Point(NameLabel.Right, 10); NameTextBox.Width = ContainerSize.Width - NameLabel.Width - 20; NameTextBox.BorderStyle = BorderStyle.None; NameTextBox.BackColor = Color.White; NameTextBox.Font = new Font("Calibri", 24); NameTextBox.ForeColor = Colors.Background; NameTextBox.TextAlign = HorizontalAlignment.Left; OverviewLabel = new Label(); OverviewLabel.TabIndex = 0; OverviewLabel.Location = new Point(10, 65); OverviewLabel.AutoSize = true; OverviewLabel.Width = 200; OverviewLabel.FlatStyle = FlatStyle.Flat; OverviewLabel.BorderStyle = BorderStyle.None; OverviewLabel.BackColor = Colors.Background; OverviewLabel.Font = new Font("Calibri", 24); OverviewLabel.ForeColor = Colors.Constant; OverviewLabel.Text = "Overview : "; OverviewLabel.TextAlign = ContentAlignment.MiddleLeft; OverviewTextBox = new TextBox(); OverviewTextBox.TabIndex = 0; OverviewTextBox.TabStop = false; OverviewTextBox.Location = new Point(10, 110); OverviewTextBox.Size = new Size(ContainerSize.Width - 20, 300); OverviewTextBox.Multiline = true; OverviewTextBox.BorderStyle = BorderStyle.None; OverviewTextBox.BackColor = Color.White; OverviewTextBox.Font = new Font("Calibri", 24); OverviewTextBox.ForeColor = Colors.Background; OverviewTextBox.TextAlign = HorizontalAlignment.Left; ContinueButton = new Button(); ContinueButton.TabIndex = 0; ContinueButton.TabStop = false; ContinueButton.Size = new Size(300, 70); ContinueButton.Location = new Point(ContainerSize.Width / 2 - ContinueButton.Width / 2, OverviewTextBox.Bottom + 50); ContinueButton.FlatStyle = FlatStyle.Flat; ContinueButton.BackColor = Colors.Origin; ContinueButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; ContinueButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; ContinueButton.FlatAppearance.BorderSize = 0; ContinueButton.Font = new Font("Calibri", 24); ContinueButton.ForeColor = Colors.Constant; ContinueButton.Text = "Continue"; ContinueButton.TextAlign = ContentAlignment.MiddleCenter; ContinueButton.MouseClick += ContinueButton_MouseClick; InstrumentsPanel = new Panel(); InstrumentsPanel.TabIndex = 0; InstrumentsPanel.TabStop = false; InstrumentsPanel.Location = new Point(ContainerSize.Width / 2 - 75, 10); InstrumentsPanel.Size = new Size(150, 50); InstrumentsPanel.BorderStyle = BorderStyle.None; InstrumentsPanel.BackColor = Colors.Background; InstrumentsPanel.Visible = false; AddCustomLabelButton = new Button(); AddCustomLabelButton.TabIndex = 0; AddCustomLabelButton.TabStop = false; AddCustomLabelButton.Location = new Point(0, 0); AddCustomLabelButton.Size = new Size(50, 50); AddCustomLabelButton.FlatStyle = FlatStyle.Flat; AddCustomLabelButton.BackColor = Colors.Curtain; AddCustomLabelButton.FlatAppearance.MouseOverBackColor = Colors.CurtainButtonMouseOver; AddCustomLabelButton.FlatAppearance.MouseDownBackColor = Colors.CurtainButtonMouseDown; AddCustomLabelButton.FlatAppearance.BorderSize = 0; AddCustomLabelButton.Image = new Bitmap(@"..\..\..\downloads\Icons\AddText.png"); AddCustomLabelButton.ImageAlign = ContentAlignment.MiddleCenter; AddCustomLabelButton.MouseClick += AddCustomLabelButton_MouseClick; AddCustomTextBoxButton = new Button(); AddCustomTextBoxButton.TabIndex = 0; AddCustomTextBoxButton.TabStop = false; AddCustomTextBoxButton.Location = new Point(50, 0); AddCustomTextBoxButton.Size = new Size(50, 50); AddCustomTextBoxButton.FlatStyle = FlatStyle.Flat; AddCustomTextBoxButton.BackColor = Colors.Curtain; AddCustomTextBoxButton.FlatAppearance.MouseOverBackColor = Colors.CurtainButtonMouseOver; AddCustomTextBoxButton.FlatAppearance.MouseDownBackColor = Colors.CurtainButtonMouseDown; AddCustomTextBoxButton.FlatAppearance.BorderSize = 0; AddCustomTextBoxButton.Image = new Bitmap(@"..\..\..\downloads\Icons\AddInput.png"); AddCustomTextBoxButton.ImageAlign = ContentAlignment.MiddleCenter; AddCustomTextBoxButton.MouseClick += AddCustomTextBoxButton_MouseClick; AddCustomPictureBoxButton = new Button(); AddCustomPictureBoxButton.TabIndex = 0; AddCustomPictureBoxButton.TabStop = false; AddCustomPictureBoxButton.Location = new Point(100, 0); AddCustomPictureBoxButton.Size = new Size(50, 50); AddCustomPictureBoxButton.FlatStyle = FlatStyle.Flat; AddCustomPictureBoxButton.BackColor = Colors.Curtain; AddCustomPictureBoxButton.FlatAppearance.MouseOverBackColor = Colors.CurtainButtonMouseOver; AddCustomPictureBoxButton.FlatAppearance.MouseDownBackColor = Colors.CurtainButtonMouseDown; AddCustomPictureBoxButton.FlatAppearance.BorderSize = 0; AddCustomPictureBoxButton.Image = new Bitmap(@"..\..\..\downloads\Icons\AddPicture.png"); AddCustomPictureBoxButton.ImageAlign = ContentAlignment.MiddleCenter; AddCustomPictureBoxButton.MouseClick += AddCustomPictureBoxButton_MouseClick; InstrumentsPanel.Controls.Add(AddCustomLabelButton); InstrumentsPanel.Controls.Add(AddCustomTextBoxButton); InstrumentsPanel.Controls.Add(AddCustomPictureBoxButton); PageGroundPanel = new Panel(); PageGroundPanel.TabIndex = 0; PageGroundPanel.TabStop = false; PageGroundPanel.Location = new Point(50, 50); PageGroundPanel.Size = new Size(ContainerSize.Width - 100, ContainerSize.Height - 100); PageGroundPanel.BorderStyle = BorderStyle.None; PageGroundPanel.BackColor = Colors.Background; PageGroundPanel.Visible = false; NextPageButton = new Button(); NextPageButton.TabIndex = 0; NextPageButton.TabStop = false; NextPageButton.Location = new Point(PageGroundPanel.Width - 75, PageGroundPanel.Height / 2 - 50); NextPageButton.Size = new Size(75, 100); NextPageButton.FlatStyle = FlatStyle.Flat; NextPageButton.BackColor = Colors.Origin; NextPageButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; NextPageButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; NextPageButton.FlatAppearance.BorderSize = 0; NextPageButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Next.png"); NextPageButton.ImageAlign = ContentAlignment.MiddleCenter; PreviusPageButton = new Button(); PreviusPageButton.TabIndex = 0; PreviusPageButton.TabStop = false; PreviusPageButton.Location = new Point(0, PageGroundPanel.Height / 2 - 50); PreviusPageButton.Size = new Size(75, 100); PreviusPageButton.FlatStyle = FlatStyle.Flat; PreviusPageButton.BackColor = Colors.Origin; PreviusPageButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; PreviusPageButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; PreviusPageButton.FlatAppearance.BorderSize = 0; PreviusPageButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Previus.png"); PreviusPageButton.ImageAlign = ContentAlignment.MiddleCenter; PageGroundPanel.Controls.Add(NextPageButton); PageGroundPanel.Controls.Add(PreviusPageButton); AddControl(NameLabel); AddControl(NameTextBox); AddControl(OverviewLabel); AddControl(OverviewTextBox); AddControl(ContinueButton); AddControl(InstrumentsPanel); AddControl(PageGroundPanel); }
public void CreateContainer(Form ParentForm, FlatDesign.Colors Colors, string Name, string Overview, Bitmap Image, string CurtainItemName, Bitmap CurtainItemImage, string StripeItemName) { name = Name; image = Image; curtainItemName = CurtainItemName; curtainItemImage = CurtainItemImage; stripeItemName = StripeItemName; pointer = new Pointer(this, Colors); pointer.Button.MouseClick += Control_MouseClick; Threads = new List <Thread>(); GroundPanel = new Panel(); GroundPanel.TabIndex = 0; GroundPanel.TabStop = false; GroundPanel.Location = new Point(51, 31); GroundPanel.Size = new Size(ParentForm.Width - 52, ParentForm.Height - 32); GroundPanel.BorderStyle = BorderStyle.None; GroundPanel.BackColor = Colors.Background; GroundPanel.Visible = false; GroundPanel.MouseClick += Control_MouseClick; HeaderPanel = new Panel(); HeaderPanel.TabIndex = 0; HeaderPanel.TabStop = false; HeaderPanel.Location = new Point(0, 0); HeaderPanel.Size = new Size(GroundPanel.Width, 50); HeaderPanel.BorderStyle = BorderStyle.None; HeaderPanel.BackColor = Colors.Origin; HeaderPanel.MouseClick += Control_MouseClick; BackButton = new Button(); BackButton.TabIndex = 0; BackButton.TabStop = false; BackButton.Location = new Point(0, 0); BackButton.Size = new Size(HeaderPanel.Height, HeaderPanel.Height); BackButton.FlatStyle = FlatStyle.Flat; BackButton.BackColor = HeaderPanel.BackColor; BackButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; BackButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; BackButton.FlatAppearance.BorderSize = 0; BackButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Back.png"); BackButton.ImageAlign = ContentAlignment.MiddleCenter; BackButton.MouseClick += BackButton_MouseClick; CaptionLabel = new Label(); CaptionLabel.TabIndex = 0; CaptionLabel.Location = new Point(BackButton.Right, 4); CaptionLabel.AutoSize = true; CaptionLabel.BorderStyle = BorderStyle.None; CaptionLabel.FlatStyle = FlatStyle.Flat; CaptionLabel.BackColor = HeaderPanel.BackColor; CaptionLabel.Font = new Font("Calibri", 24); CaptionLabel.ForeColor = Colors.Constant; CaptionLabel.Text = Name; CaptionLabel.TextAlign = ContentAlignment.MiddleLeft; CaptionLabel.MouseClick += Control_MouseClick; OverviewLabel = new Label(); OverviewLabel.TabIndex = 0; OverviewLabel.Location = new Point(200, 0); OverviewLabel.Size = new Size(HeaderPanel.Width - 200, HeaderPanel.Height); OverviewLabel.BorderStyle = BorderStyle.None; OverviewLabel.FlatStyle = FlatStyle.Flat; OverviewLabel.BackColor = HeaderPanel.BackColor; OverviewLabel.Font = new Font("Calibri", 12); OverviewLabel.ForeColor = Colors.Constant; OverviewLabel.Text = Overview; OverviewLabel.TextAlign = ContentAlignment.MiddleLeft; OverviewLabel.MouseClick += Control_MouseClick; ControlPanel = new Panel(); ControlPanel.TabIndex = 0; ControlPanel.TabStop = false; ControlPanel.Location = new Point(0, HeaderPanel.Height); ControlPanel.Size = new Size(GroundPanel.Width, GroundPanel.Height - HeaderPanel.Height); ControlPanel.BorderStyle = BorderStyle.None; ControlPanel.BackColor = Colors.Background; ControlPanel.MouseClick += Control_MouseClick; HeaderPanel.Controls.Add(BackButton); HeaderPanel.Controls.Add(CaptionLabel); HeaderPanel.Controls.Add(OverviewLabel); GroundPanel.Controls.Add(HeaderPanel); GroundPanel.Controls.Add(ControlPanel); ParentForm.Controls.Add(GroundPanel); }
public NumbersFrom0To9Listening(Form ParentForm, FlatDesign.Colors Colors) { this.Colors = Colors; CreateContainer( ParentForm, Colors, "Numbers from 0 to 9", "", new Bitmap(@"..\..\..\downloads\Icons\NumbersFrom0To9.png"), "Origins", new Bitmap(@"..\..\..\downloads\Icons\Origins.png"), "Listening"); OnHide = DisposeSpeechSynthesizer; NumberWords = NumberWordsExample.Split(' '); NumberButtons = new Button[10]; for (int i = 0; i < 10; i++) { NumberButtons[i] = new Button(); NumberButtons[i].TabIndex = 0; NumberButtons[i].TabStop = false; if (i == 0) { NumberButtons[i].Location = new Point(10, 10); } else { NumberButtons[i].Location = new Point(NumberButtons[i - 1].Right + 10, 10); } NumberButtons[i].Size = new Size(69, 69); NumberButtons[i].FlatStyle = FlatStyle.Flat; NumberButtons[i].BackColor = Colors.Origin; NumberButtons[i].FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; NumberButtons[i].FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; NumberButtons[i].FlatAppearance.BorderSize = 0; NumberButtons[i].Font = new Font("Calibri", 24); NumberButtons[i].ForeColor = Colors.Constant; NumberButtons[i].Text = Convert.ToString(i); NumberButtons[i].TextAlign = ContentAlignment.MiddleCenter; NumberButtons[i].MouseClick += NumberButton_MouseClick; } NumberPanel = new Panel(); NumberPanel.TabIndex = 0; NumberPanel.TabStop = false; NumberPanel.Location = new Point(50, NumberButtons[0].Bottom + 10); NumberPanel.Size = new Size(ContainerSize.Width - 100, ContainerSize.Height - (NumberButtons[0].Height + 20)); NumberPanel.BorderStyle = BorderStyle.None; NumberPanel.BackColor = Colors.Background; NumberPanel.Visible = false; NumberLabel = new Label(); NumberLabel.TabIndex = 0; NumberLabel.Location = new Point(0, 0); NumberLabel.Size = new Size(NumberPanel.Width, 300); NumberLabel.BorderStyle = BorderStyle.None; NumberLabel.BackColor = Colors.Background; NumberLabel.Font = new Font("Calibri", 160); NumberLabel.ForeColor = Colors.Constant; NumberLabel.TextAlign = ContentAlignment.BottomCenter; NumberWordLabel = new Label(); NumberWordLabel.TabIndex = 0; NumberWordLabel.Location = new Point(0, NumberLabel.Bottom); NumberWordLabel.Size = new Size(NumberPanel.Width, NumberPanel.Height - NumberLabel.Height); NumberWordLabel.BorderStyle = BorderStyle.None; NumberWordLabel.BackColor = Colors.Background; NumberWordLabel.Font = new Font("Calibri", 80); NumberWordLabel.ForeColor = Colors.Constant; NumberWordLabel.TextAlign = ContentAlignment.TopCenter; NumberWordLabel.MouseClick += NumberWordLabel_MouseClick; NextNumberButton = new Button(); NextNumberButton.TabIndex = 0; NextNumberButton.TabStop = false; NextNumberButton.Size = new Size(70, 100); NextNumberButton.Location = new Point(NumberPanel.Width - NextNumberButton.Width, NumberPanel.Height / 2 - NextNumberButton.Height / 2); NextNumberButton.FlatStyle = FlatStyle.Flat; NextNumberButton.BackColor = Colors.Origin; NextNumberButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; NextNumberButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; NextNumberButton.FlatAppearance.BorderSize = 0; NextNumberButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Next.png"); NextNumberButton.ImageAlign = ContentAlignment.MiddleCenter; NextNumberButton.MouseClick += NextNumberButton_MouseClick; PreviusNumberButton = new Button(); PreviusNumberButton.TabIndex = 0; PreviusNumberButton.TabStop = false; PreviusNumberButton.Size = new Size(70, 100); PreviusNumberButton.Location = new Point(0, NumberPanel.Height / 2 - PreviusNumberButton.Height / 2); PreviusNumberButton.FlatStyle = FlatStyle.Flat; PreviusNumberButton.BackColor = Colors.Origin; PreviusNumberButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; PreviusNumberButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; PreviusNumberButton.FlatAppearance.BorderSize = 0; PreviusNumberButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Previus.png"); PreviusNumberButton.ImageAlign = ContentAlignment.MiddleCenter; PreviusNumberButton.MouseClick += PreviusNumberButton_MouseClick; NumberLabel.Controls.Add(NextNumberButton); NumberLabel.Controls.Add(PreviusNumberButton); NumberPanel.Controls.Add(NumberLabel); NumberPanel.Controls.Add(NumberWordLabel); for (int i = 0; i < 10; i++) { AddControl(NumberButtons[i]); } AddControl(NumberPanel); }
public ClockPracticing(Form ParentForm, FlatDesign.Colors Colors) { this.Colors = Colors; CreateContainer( ParentForm, Colors, "Clock", "", null, "Words", null, "Practicing"); OnHide = DisposeSpeechInstruments; TimeNumbers = TimeNumberExample.Split(' '); TimeExpressions = TimeExpressionExample.Split('|'); ClockLabel = new Label(); ClockLabel.TabIndex = 0; ClockLabel.Location = new Point(50, 50); ClockLabel.Size = new Size(ContainerSize.Width - 100, 300); ClockLabel.FlatStyle = FlatStyle.Flat; ClockLabel.BorderStyle = BorderStyle.None; ClockLabel.BackColor = Colors.Background; ClockLabel.Font = new Font("Calibri", 148); ClockLabel.ForeColor = Colors.Constant; ClockLabel.Text = TimeNumbers[0]; ClockLabel.TextAlign = ContentAlignment.MiddleCenter; ClockLabel.MouseClick += ClockLabel_MouseClick; NextClockButton = new Button(); NextClockButton.TabIndex = 0; NextClockButton.TabStop = false; NextClockButton.Location = new Point(ClockLabel.Width - 70, 100); NextClockButton.Size = new Size(70, 100); NextClockButton.FlatStyle = FlatStyle.Flat; NextClockButton.BackColor = Colors.Origin; NextClockButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; NextClockButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; NextClockButton.FlatAppearance.BorderSize = 0; NextClockButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Next.png"); NextClockButton.ImageAlign = ContentAlignment.MiddleCenter; NextClockButton.MouseClick += NextClockButton_MouseClick; PreviusClockButton = new Button(); PreviusClockButton.TabIndex = 0; PreviusClockButton.TabStop = false; PreviusClockButton.Location = new Point(0, 100); PreviusClockButton.Size = new Size(70, 100); PreviusClockButton.FlatStyle = FlatStyle.Flat; PreviusClockButton.BackColor = Colors.Origin; PreviusClockButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; PreviusClockButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; PreviusClockButton.FlatAppearance.BorderSize = 0; PreviusClockButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Previus.png"); PreviusClockButton.ImageAlign = ContentAlignment.MiddleCenter; PreviusClockButton.MouseClick += PreviusClockButton_MouseClick; PreviusClockButton.Visible = false; ExpressionLabel = new Label(); ExpressionLabel.TabIndex = 0; ExpressionLabel.Location = new Point(0, 350); ExpressionLabel.Size = new Size(ContainerSize.Width, 100); ExpressionLabel.FlatStyle = FlatStyle.Flat; ExpressionLabel.BorderStyle = BorderStyle.None; ExpressionLabel.BackColor = Colors.Background; ExpressionLabel.Font = new Font("Calibri", 36); ExpressionLabel.ForeColor = Colors.Constant; ExpressionLabel.Text = TimeExpressions[0]; ExpressionLabel.TextAlign = ContentAlignment.MiddleCenter; ExpressionLabel.MouseClick += ExpressionLabel_MouseClick; ClockLabel.Controls.Add(NextClockButton); ClockLabel.Controls.Add(PreviusClockButton); AddControl(ClockLabel); AddControl(ExpressionLabel); }
public LetterCombinationsListening(Form ParentForm, FlatDesign.Colors Colors) { this.Colors = Colors; CreateContainer( ParentForm, Colors, "Letter combinations", "", new Bitmap(@"..\..\..\downloads\Icons\LetterCombinations.png"), "Origins", new Bitmap(@"..\..\..\downloads\Icons\Origins.png"), "Listening"); OnHide = DisposeSpeechSynthesizer; string[] LetterCombinations = LetterCombinationsExample.Split(' '); LetterCombinationExampleWords = LetterCombinationExampleWordsExample.Split('|'); TranslatedExampleWords = TranslatedExampleWordsExample.Split('|'); LetterCombinationButtons = new List <Button>(); for (int i = 0; i < LetterCombinations.Length / 2; i++) { LetterCombinationButtons.Add(new Button()); LetterCombinationButtons[i].TabIndex = 0; LetterCombinationButtons[i].TabStop = false; if (i == 0) { LetterCombinationButtons[i].Location = new Point(10, 12); } else { LetterCombinationButtons[i].Location = new Point(10, LetterCombinationButtons[i - 1].Bottom + 2); } LetterCombinationButtons[i].Size = new Size(70, 48); LetterCombinationButtons[i].FlatStyle = FlatStyle.Flat; LetterCombinationButtons[i].BackColor = Colors.Origin; LetterCombinationButtons[i].FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; LetterCombinationButtons[i].FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; LetterCombinationButtons[i].FlatAppearance.BorderSize = 0; LetterCombinationButtons[i].Font = new Font("Calibri", 18); LetterCombinationButtons[i].ForeColor = Colors.Constant; LetterCombinationButtons[i].Text = LetterCombinations[i]; LetterCombinationButtons[i].TextAlign = ContentAlignment.MiddleCenter; LetterCombinationButtons[i].MouseClick += LetterCombinationButton_MouseClick; } for (int i = LetterCombinations.Length / 2; i < LetterCombinations.Length; i++) { LetterCombinationButtons.Add(new Button()); LetterCombinationButtons[i].TabIndex = 0; LetterCombinationButtons[i].TabStop = false; if (i == LetterCombinations.Length / 2) { LetterCombinationButtons[i].Location = new Point(ContainerSize.Width - 80, 12); } else { LetterCombinationButtons[i].Location = new Point(ContainerSize.Width - 80, LetterCombinationButtons[i - 1].Bottom + 2); } LetterCombinationButtons[i].Size = new Size(70, 48); LetterCombinationButtons[i].FlatStyle = FlatStyle.Flat; LetterCombinationButtons[i].BackColor = Colors.Origin; LetterCombinationButtons[i].FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; LetterCombinationButtons[i].FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; LetterCombinationButtons[i].FlatAppearance.BorderSize = 0; LetterCombinationButtons[i].Font = new Font("Calibri", 18); LetterCombinationButtons[i].ForeColor = Colors.Constant; LetterCombinationButtons[i].Text = LetterCombinations[i]; LetterCombinationButtons[i].TextAlign = ContentAlignment.MiddleCenter; LetterCombinationButtons[i].MouseClick += LetterCombinationButton_MouseClick; } LetterCombinationPanel = new Panel(); LetterCombinationPanel.TabIndex = 0; LetterCombinationPanel.TabStop = false; LetterCombinationPanel.Location = new Point(LetterCombinationButtons[0].Right + 50, LetterCombinationButtons[0].Top); LetterCombinationPanel.Size = new Size(LetterCombinationButtons[LetterCombinations.Length / 2].Left - 50 - LetterCombinationPanel.Left, ContainerSize.Height - 24); LetterCombinationPanel.BorderStyle = BorderStyle.None; LetterCombinationPanel.BackColor = Colors.Background; LetterCombinationPanel.Visible = false; LetterCombinationLabel = new Label(); LetterCombinationLabel.TabIndex = 0; LetterCombinationLabel.Location = new Point(0, 50); LetterCombinationLabel.Size = new Size(LetterCombinationPanel.Width, 120); LetterCombinationLabel.BorderStyle = BorderStyle.None; LetterCombinationLabel.BackColor = Colors.Background; LetterCombinationLabel.Font = new Font("Calibri", 60); LetterCombinationLabel.ForeColor = Colors.Constant; LetterCombinationLabel.TextAlign = ContentAlignment.MiddleCenter; LetterCombinationExampleWordLabel = new Label(); LetterCombinationExampleWordLabel.TabIndex = 0; LetterCombinationExampleWordLabel.Location = new Point(0, LetterCombinationLabel.Bottom); LetterCombinationExampleWordLabel.Size = new Size(LetterCombinationPanel.Width, 200); LetterCombinationExampleWordLabel.BorderStyle = BorderStyle.None; LetterCombinationExampleWordLabel.BackColor = Colors.Background; LetterCombinationExampleWordLabel.Font = new Font("Calibri", 80); LetterCombinationExampleWordLabel.ForeColor = Colors.Constant; LetterCombinationExampleWordLabel.TextAlign = ContentAlignment.MiddleCenter; LetterCombinationExampleWordLabel.MouseClick += LetterCombinationExampleWordLabel_MouseClick; TranslatedExampleWordLabel = new Label(); TranslatedExampleWordLabel.TabIndex = 0; TranslatedExampleWordLabel.Location = new Point(0, LetterCombinationExampleWordLabel.Bottom); TranslatedExampleWordLabel.Size = new Size(LetterCombinationPanel.Width, 100); TranslatedExampleWordLabel.BorderStyle = BorderStyle.None; TranslatedExampleWordLabel.BackColor = Colors.Background; TranslatedExampleWordLabel.Font = new Font("Calibri", 50); TranslatedExampleWordLabel.ForeColor = Colors.Constant; TranslatedExampleWordLabel.TextAlign = ContentAlignment.MiddleCenter; LetterCombinationPanel.Controls.Add(LetterCombinationLabel); LetterCombinationPanel.Controls.Add(LetterCombinationExampleWordLabel); LetterCombinationPanel.Controls.Add(TranslatedExampleWordLabel); for (int i = 0; i < LetterCombinationButtons.Count; i++) { AddControl(LetterCombinationButtons[i]); } AddControl(LetterCombinationPanel); }
public void CreateNavigation(Form Form, FlatDesign.Colors Colors, List <ViewControls.ContainerControls.Container> Containers) { Curtain = new ViewControls.NavigationControls.Curtain(Form, Colors); Curtain.GetItemsFrom(Containers); }
public Header(Form ParentForm, FlatDesign.Colors Colors) { this.ParentForm = ParentForm; GroundPanel = new Panel(); GroundPanel.TabIndex = 0; GroundPanel.TabStop = false; GroundPanel.Location = new Point(1, 1); GroundPanel.Size = new Size(ParentForm.Width - 2, 30); GroundPanel.BorderStyle = BorderStyle.None; GroundPanel.BackColor = Colors.Origin; GroundPanel.MouseDown += Control_MouseDown; GroundPanel.MouseMove += Control_MouseMove; GroundPanel.MouseUp += Control_MouseUp; ImagePictureBox = new PictureBox(); ImagePictureBox.Location = new Point(3, 0); ImagePictureBox.Size = new Size(GroundPanel.Height, GroundPanel.Height); ImagePictureBox.BorderStyle = BorderStyle.None; ImagePictureBox.BackColor = GroundPanel.BackColor; ImagePictureBox.Image = ParentForm.Icon.ToBitmap(); ImagePictureBox.SizeMode = PictureBoxSizeMode.CenterImage; ImagePictureBox.Visible = false; ImagePictureBox.MouseDown += Control_MouseDown; ImagePictureBox.MouseMove += Control_MouseMove; ImagePictureBox.MouseUp += Control_MouseUp; CaptionLabel = new Label(); CaptionLabel.TabIndex = 0; CaptionLabel.Location = new Point(4, 4); CaptionLabel.AutoSize = true; CaptionLabel.FlatStyle = FlatStyle.Flat; CaptionLabel.BorderStyle = BorderStyle.None; CaptionLabel.BackColor = GroundPanel.BackColor; CaptionLabel.Font = new Font("Calibri", 12); CaptionLabel.ForeColor = Colors.Constant; CaptionLabel.Text = ParentForm.Text; CaptionLabel.TextAlign = ContentAlignment.MiddleLeft; CaptionLabel.MouseDown += Control_MouseDown; CaptionLabel.MouseMove += Control_MouseMove; CaptionLabel.MouseUp += Control_MouseUp; MinimizeButton = new Button(); MinimizeButton.TabIndex = 0; MinimizeButton.TabStop = false; MinimizeButton.Location = new Point(GroundPanel.Width - GroundPanel.Height * 2, 0); MinimizeButton.Size = new Size(GroundPanel.Height, GroundPanel.Height); MinimizeButton.FlatStyle = FlatStyle.Flat; MinimizeButton.BackColor = GroundPanel.BackColor; MinimizeButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; MinimizeButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; MinimizeButton.FlatAppearance.BorderSize = 0; MinimizeButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Minimize.png"); MinimizeButton.ImageAlign = ContentAlignment.MiddleCenter; MinimizeButton.MouseClick += MinimizeButton_MouseClick; CloseButton = new Button(); CloseButton.TabIndex = 0; CloseButton.TabStop = false; CloseButton.Location = new Point(GroundPanel.Width - GroundPanel.Height, 0); CloseButton.Size = new Size(GroundPanel.Height, GroundPanel.Height); CloseButton.FlatStyle = FlatStyle.Flat; CloseButton.BackColor = GroundPanel.BackColor; CloseButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; CloseButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; CloseButton.FlatAppearance.BorderSize = 0; CloseButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Close.png"); CloseButton.ImageAlign = ContentAlignment.MiddleCenter; CloseButton.MouseClick += CloseButton_MouseClick; GroundPanel.Controls.Add(ImagePictureBox); GroundPanel.Controls.Add(CaptionLabel); GroundPanel.Controls.Add(MinimizeButton); GroundPanel.Controls.Add(CloseButton); ParentForm.Controls.Add(GroundPanel); }
public AlphabetListening(Form ParentForm, FlatDesign.Colors Colors) { this.Colors = Colors; CreateContainer( ParentForm, Colors, "Alphabet", "A list of letters according to German alphabet. Click on a \"Play\" button to listen to all alphabet, or click on a letter to hear it.", new Bitmap(@"..\..\..\downloads\Icons\Alphabet.png"), "Origins", new Bitmap(@"..\..\..\downloads\Icons\Origins.png"), "Listening"); OnHide = DisposeSpeechSynthesizer; string[] Letters = AlphabetTemplate.Split(' '); LetterButtons = new Button[Letters.Length]; for (int i = 0; i < 15; i++) { LetterButtons[i] = new Button(); LetterButtons[i].TabIndex = 0; LetterButtons[i].TabStop = false; if (i == 0) { LetterButtons[i].Location = new Point(11, 11); } else { LetterButtons[i].Location = new Point(LetterButtons[i - 1].Right + 2, 11); } LetterButtons[i].Size = new Size(50, 50); LetterButtons[i].FlatStyle = FlatStyle.Flat; LetterButtons[i].BackColor = Colors.Origin; LetterButtons[i].FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; LetterButtons[i].FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; LetterButtons[i].FlatAppearance.BorderSize = 0; LetterButtons[i].Font = new Font("Calibri", 14); LetterButtons[i].ForeColor = Colors.Constant; LetterButtons[i].Text = Letters[i]; LetterButtons[i].TextAlign = ContentAlignment.MiddleCenter; LetterButtons[i].MouseClick += LetterButton_MouseClick; } for (int i = 15; i < LetterButtons.Length; i++) { LetterButtons[i] = new Button(); LetterButtons[i].TabIndex = 0; LetterButtons[i].TabStop = false; if (i == 15) { LetterButtons[i].Location = new Point(36, 63); } else { LetterButtons[i].Location = new Point(LetterButtons[i - 1].Right + 2, 63); } LetterButtons[i].Size = new Size(50, 50); LetterButtons[i].FlatStyle = FlatStyle.Flat; LetterButtons[i].BackColor = Colors.Origin; LetterButtons[i].FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; LetterButtons[i].FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; LetterButtons[i].FlatAppearance.BorderSize = 0; LetterButtons[i].Font = new Font("Calibri", 14); LetterButtons[i].ForeColor = Colors.Constant; LetterButtons[i].Text = Letters[i]; LetterButtons[i].TextAlign = ContentAlignment.MiddleCenter; LetterButtons[i].MouseClick += LetterButton_MouseClick; } LetterLabel = new Label(); LetterLabel.TabIndex = 0; LetterLabel.Location = new Point(50, 115); LetterLabel.Size = new Size(ContainerSize.Width - 100, ContainerSize.Height - 117); LetterLabel.BorderStyle = BorderStyle.None; LetterLabel.FlatStyle = FlatStyle.Flat; LetterLabel.BackColor = Colors.Background; LetterLabel.Font = new Font("Calibri light", 200); LetterLabel.ForeColor = Colors.Constant; LetterLabel.TextAlign = ContentAlignment.MiddleCenter; LetterLabel.MouseClick += LetterLabel_MouseClick; NextLetterButton = new Button(); NextLetterButton.TabIndex = 0; NextLetterButton.TabStop = false; NextLetterButton.Size = new Size(70, 100); NextLetterButton.Location = new Point(LetterLabel.Width - NextLetterButton.Width, LetterLabel.Height / 2 - NextLetterButton.Height / 2); NextLetterButton.FlatStyle = FlatStyle.Flat; NextLetterButton.BackColor = Colors.Origin; NextLetterButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; NextLetterButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; NextLetterButton.FlatAppearance.BorderSize = 0; NextLetterButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Next.png"); NextLetterButton.ImageAlign = ContentAlignment.MiddleCenter; NextLetterButton.Visible = false; NextLetterButton.MouseClick += NextLetterButton_MouseClick; PreviusLetterButton = new Button(); PreviusLetterButton.TabIndex = 0; PreviusLetterButton.TabStop = false; PreviusLetterButton.Size = new Size(70, 100); PreviusLetterButton.Location = new Point(0, LetterLabel.Height / 2 - PreviusLetterButton.Height / 2); PreviusLetterButton.FlatStyle = FlatStyle.Flat; PreviusLetterButton.BackColor = Colors.Origin; PreviusLetterButton.FlatAppearance.MouseOverBackColor = Colors.OriginButtonMouseOver; PreviusLetterButton.FlatAppearance.MouseDownBackColor = Colors.OriginButtonMouseDown; PreviusLetterButton.FlatAppearance.BorderSize = 0; PreviusLetterButton.Image = new Bitmap(@"..\..\..\downloads\Icons\Previus.png"); PreviusLetterButton.ImageAlign = ContentAlignment.MiddleCenter; PreviusLetterButton.Visible = false; PreviusLetterButton.MouseClick += PreviusLetterButton_MouseClick; LetterLabel.Controls.Add(NextLetterButton); LetterLabel.Controls.Add(PreviusLetterButton); for (int i = 0; i < LetterButtons.Length; i++) { AddControl(LetterButtons[i]); } AddControl(LetterLabel); }