Esempio n. 1
0
 private void setTempVorlage()
 {
     tmpvorlage = new Vorlage("tmp" + tmpcounter, Convert.ToInt32(sqmin.Value), Convert.ToInt32(sqmax.Value), Convert.ToInt32(scrf.Value), Convert.ToInt32(sbreite.Value), Convert.ToInt32(shoehe.Value), Convert.ToInt32(scropbreite.Value), Convert.ToInt32(scrophoehe.Value), Convert.ToInt32(scropx.Value), Convert.ToInt32(scropy.Value), Convert.ToInt32(sMaxFileSize.Value), cbAudioAus.IsChecked.Value);
     tmpcounter += 1;
 }
Esempio n. 2
0
        private void btnVorlageSpeichern_Click(object sender, RoutedEventArgs e)
        {
            string disText = comVorlage.Text;

            if (disText.Length <= 0)
            {
                string tstring = "";
                int tint = this.E.lsVorlagen.Count + 1;
                bool isin = false;

                do
                {
                    tstring = "Vorlage " + tint;
                    isin = false;
                    foreach (Vorlage item in this.E.lsVorlagen)
                    {
                        if (item.strName == tstring)
                        {
                            isin = true;
                            tint += 1;
                            break;
                        }
                    }

                } while (isin == true);
                disText = tstring;
            }

            bool found = false;
            foreach (Vorlage item in this.E.lsVorlagen)
            {
                if (item.strName == disText)
                {
                    item.iqmin = Convert.ToInt32(sqmin.Value);
                    item.iqmax = Convert.ToInt32(sqmax.Value);
                    item.icrf = Convert.ToInt32(scrf.Value);
                    item.ibreite = Convert.ToInt32(sbreite.Value);
                    item.ihoehe = Convert.ToInt32(shoehe.Value);
                    item.icropbreite = Convert.ToInt32(scropbreite.Value);
                    item.icrophoehe = Convert.ToInt32(scrophoehe.Value);
                    item.icropx = Convert.ToInt32(scropx.Value);
                    item.icropy = Convert.ToInt32(scropy.Value);
                    item.imaxfilesize = Convert.ToInt32(sMaxFileSize.Value);
                    item.baudioaus = cbAudioAus.IsChecked.Value;
                    found = true;
                }
            }

            if (found == false)
            {
                Vorlage v = new Vorlage(disText, Convert.ToInt32(sqmin.Value), Convert.ToInt32(sqmax.Value),
                    Convert.ToInt32(scrf.Value), Convert.ToInt32(sbreite.Value), Convert.ToInt32(shoehe.Value),
                    Convert.ToInt32(scropbreite.Value), Convert.ToInt32(scrophoehe.Value), Convert.ToInt32(scropx.Value),
                    Convert.ToInt32(scropy.Value), Convert.ToInt32(sMaxFileSize.Value), cbAudioAus.IsChecked.Value);
                this.E.lsVorlagen.Add(v);
            }

            comVorlage.Text = disText;
            this.E.Speichern();

            LadeVorlagen();
        }