コード例 #1
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.Seitezwei = ((LeMa_A.Seite2)(target));
         return;
     }
     this._contentLoaded = true;
 }
コード例 #2
0
        private void weiter_Click(object sender, RoutedEventArgs e)
        {
            Amount am = new Amount
            {
                amount = Convert.ToInt32(File.ReadAllText("amount.txt"))
            };

            string[] textBoxes = new string[8];

            textBoxes[0] = durchgefuehrtVon.Text;
            textBoxes[1] = datum.Text;
            textBoxes[2] = nameSchueler.Text;
            textBoxes[3] = klasse.Text;
            textBoxes[4] = schule.Text;
            textBoxes[5] = geburtsDatum.Text;
            textBoxes[6] = allgemeineAnmerkungen.Text;

            if (deutschSprachig.IsChecked == true)
            {
                textBoxes[7] = "deutsch";
            }
            else if (andereSprache.IsChecked == true)
            {
                textBoxes[7] = "andereSprache" + "#" + andereSpracheText.Text;
            }
            else if (mehrSprachig.IsChecked == true)
            {
                textBoxes[7] = "mehrSprachig" + "#" + mehrSprachigText.Text;
            }

            string[] old  = new string[0];
            string[] save = new string[textBoxes.Length];

            if (am.amount != 0)
            {
                try
                {
                    old  = File.ReadAllLines("seite1.txt");
                    save = new string[(8 * am.amount) + textBoxes.Length];
                }
                catch (IOException ex)
                {
                    MessageBox.Show("Keine alten Einträge vorhanden!\n" + ex);
                }
            }
            int i = 0;

            for (int j = 0; j < 8 * am.amount; j++)
            {
                save[i] = old[i];
                i++;
            }

            foreach (string item in textBoxes)
            {
                save[i] = item;
                i++;
            }

            File.WriteAllLines("seite1.txt", save);

            Seite2 s2 = new Seite2();

            s2.Show();

            this.Close();
        }
コード例 #3
0
ファイル: Seite2.g.i.cs プロジェクト: Kneidl1202/LemaB
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Seitezwei = ((LeMa_A.Seite2)(target));
                return;

            case 2:
                this.verstaendnis1 = ((System.Windows.Controls.CheckBox)(target));

            #line 19 "..\..\Seite2.xaml"
                this.verstaendnis1.Checked += new System.Windows.RoutedEventHandler(this.CheckBox_Checked);

            #line default
            #line hidden
                return;

            case 3:
                this.verstaendnis2 = ((System.Windows.Controls.CheckBox)(target));

            #line 20 "..\..\Seite2.xaml"
                this.verstaendnis2.Checked += new System.Windows.RoutedEventHandler(this.verstaendnis2_Checked);

            #line default
            #line hidden
                return;

            case 4:
                this.verstaendnis3 = ((System.Windows.Controls.CheckBox)(target));

            #line 22 "..\..\Seite2.xaml"
                this.verstaendnis3.Checked += new System.Windows.RoutedEventHandler(this.verstaendnis3_Checked);

            #line default
            #line hidden
                return;

            case 5:
                this.verstaendnis4 = ((System.Windows.Controls.CheckBox)(target));

            #line 23 "..\..\Seite2.xaml"
                this.verstaendnis4.Checked += new System.Windows.RoutedEventHandler(this.verstaendnis4_Checked);

            #line default
            #line hidden
                return;

            case 6:
                this.spontan5 = ((System.Windows.Controls.CheckBox)(target));

            #line 33 "..\..\Seite2.xaml"
                this.spontan5.Checked += new System.Windows.RoutedEventHandler(this.spontan5_Checked);

            #line default
            #line hidden
                return;

            case 7:
                this.spontan7 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 8:
                this.spontan10 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 9:
                this.falsch5 = ((System.Windows.Controls.TextBox)(target));

            #line 36 "..\..\Seite2.xaml"
                this.falsch5.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.falsch5_TextChanged);

            #line default
            #line hidden
                return;

            case 10:
                this.falsch7 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 11:
                this.falsch10 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 12:
                this.nicht5 = ((System.Windows.Controls.TextBox)(target));

            #line 39 "..\..\Seite2.xaml"
                this.nicht5.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.nicht5_TextChanged);

            #line default
            #line hidden
                return;

            case 13:
                this.nicht7 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 14:
                this.nicht10 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 15:
                this.bei5 = ((System.Windows.Controls.TextBox)(target));

            #line 42 "..\..\Seite2.xaml"
                this.bei5.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.bei5_TextChanged);

            #line default
            #line hidden
                return;

            case 16:
                this.bei7 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 17:
                this.bei10 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 18:
                this.garnicht5 = ((System.Windows.Controls.CheckBox)(target));

            #line 45 "..\..\Seite2.xaml"
                this.garnicht5.Checked += new System.Windows.RoutedEventHandler(this.garnicht5_Checked);

            #line default
            #line hidden
                return;

            case 19:
                this.garnicht7 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 20:
                this.garnicht10 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 21:
                this.spontan9 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 22:
                this.spontan12 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 23:
                this.spontan16 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 24:
                this.falsch9 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 25:
                this.falsch12 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 26:
                this.falsch16 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 27:
                this.nicht9 = ((System.Windows.Controls.TextBox)(target));

            #line 63 "..\..\Seite2.xaml"
                this.nicht9.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.nicht9_TextChanged);

            #line default
            #line hidden
                return;

            case 28:
                this.nicht12 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 29:
                this.nicht16 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 30:
                this.bei9 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 31:
                this.bei12 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 32:
                this.bei16 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 33:
                this.garnicht9 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 34:
                this.garnicht12 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 35:
                this.garnicht16 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 36:
                this.weiter = ((System.Windows.Controls.Button)(target));

            #line 72 "..\..\Seite2.xaml"
                this.weiter.Click += new System.Windows.RoutedEventHandler(this.Weiter_Click);

            #line default
            #line hidden
                return;

            case 37:
                this.speichern = ((System.Windows.Controls.Button)(target));

            #line 73 "..\..\Seite2.xaml"
                this.speichern.Click += new System.Windows.RoutedEventHandler(this.Speichern_Click_1);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }