Exemplo n.º 1
0
        public void SetBildVariableWert(string Variable, string BildPfad)
        {
            try
            {
                ClsBildVariabeln v = (from x in this.BildVariabelListe where x.ID == Variable select x).FirstOrDefault();
                if (v != null)
                {
                    v.Wert = BildPfad;

                    // send to HTML page
                    GlobalServerEvents.SendMessage("server", new ClsStringEventArgs(ClsVarCom.UpdateDivContentPic(Variable, v.Wert)));
                }
            }
            catch (Exception ex)
            {
                ClsError.Error(this.Name, MethodBase.GetCurrentMethod().ToString(), ex);
            }
        }
Exemplo n.º 2
0
        public ClsBildVariabeln GetBildVariable(string ID)
        {
            try
            {
                if (!string.IsNullOrEmpty(ID))
                {
                    ClsBildVariabeln v = (from x in this.BildVariabelListe where x.ID == ID select x).FirstOrDefault();
                    if (v != null)
                    {
                        return(v);
                    }
                }

                return(new ClsBildVariabeln());
            }
            catch (Exception ex)
            {
                ClsError.Error(this.Name, MethodBase.GetCurrentMethod().ToString(), ex);
                return(new ClsBildVariabeln());
            }
        }
Exemplo n.º 3
0
        //public event PropChangedEventHandler TextPropChanged;
        //public event PropChangedEventHandler BildPropChanged;
        //public event TPropChangedEventHandler TabellenPropChanged;

        public void Ini()
        {
            // Debugmodus
            string        modus  = System.Configuration.ConfigurationManager.AppSettings["Modus"];
            List <string> filter = new List <string>
            {
                "True"
            };

            if (modus != "")
            {
                filter.Add("Test");
            }

            // TextVariablen
            this.TextVariabelListe = new List <ClsTextVariabeln>();

            List <DB.Variablen> varlst1 = ClsVariablenControler.Variablen("S");

            foreach (DB.Variablen v in varlst1)
            {
                // suchen ob schon da
                int x = (from y in this.TextVariabelListe where y.ID == v.Name select y).Count();
                if (x > 0)
                {
                    break;
                }

                // debugmode prüfen
                if (filter.Contains(v.Aktiv))
                {
                    ClsTextVariabeln tv = new ClsTextVariabeln();
                    //tv.ID = v.ID;
                    tv.ID      = v.Name;
                    tv.Wert    = v.Default;
                    tv.Default = v.Default;

                    this.TextVariabelListe.Add(tv);
                }
            }

            // Bildvariablen
            this.BildVariabelListe = new List <ClsBildVariabeln>();

            List <DB.Variablen> varlst2 = ClsVariablenControler.Variablen("B");

            foreach (DB.Variablen v in varlst2)
            {
                // suchen ob schon da
                int x = (from y in this.BildVariabelListe where y.ID == v.Name select y).Count();
                if (x > 0)
                {
                    break;
                }

                // debugmode prüfen
                if (filter.Contains(v.Aktiv))
                {
                    ClsBildVariabeln bv = new ClsBildVariabeln();
                    bv.ID   = v.Name;
                    bv.Wert = v.Default;

                    this.BildVariabelListe.Add(bv);
                }
            }

            this.SetPaintballPictures();
            string prosession = ClsOptionsControler.Options3("PossessionBild").Value;

            ClsDBVariablen.Instance.SetBildVariableWert("B15", prosession);

            // TabellenVariablen
            this.TabelleVariabelListe = new List <ClsTabellenVariabeln>();

            List <DB.Variablen> varlst3 = ClsVariablenControler.Variablen("T");

            foreach (DB.Variablen v in varlst3)
            {
                // suchen ob schon da
                int x = (from y in this.TabelleVariabelListe where y.ID == v.Name select y).Count();
                if (x > 0)
                {
                    break;
                }

                // debugmode prüfen
                if (filter.Contains(v.Aktiv))
                {
                    ClsTabellenVariabeln bv = new ClsTabellenVariabeln();
                    bv.ID         = v.Name;
                    bv.RecPerPage = Convert.ToInt32(v.Default);

                    this.TabelleVariabelListe.Add(bv);
                }
            }

            // Anzeige Texte eintragen
            this.SetText();
        }