Exemplo n.º 1
0
        public static void NewPageSet(ClsCommand rb)
        {
            ClsPageSets.NewPageSet(rb.Value1);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "PageSets"))));
        }
Exemplo n.º 2
0
        public static void SaveAnzeigetabelle(ClsCommand rb)
        {
            Core.DB.Anzeigetabelle at = new JavaScriptSerializer().Deserialize <Core.DB.Anzeigetabelle>(rb.Value1);
            Core.DBControler.ClsOptionsControler.SaveAnzeigetabelle(at);

            if (at.Tabelle == "T01")
            {
                ClsDBVariablen.Instance.SetTabellenVariableWert(at.Tabelle, ClsTabellenfunktionen.TabelleToVariable_Json(ClsGlobal.Instance.TurnierID));
            }

            if (at.Tabelle == "T02")
            {
                ClsDBVariablen.Instance.SetTabellenVariableWert(at.Tabelle, ClsTabellenfunktionen.SpielplanToVariable_Json(ClsGlobal.Instance.TurnierID));
            }

            if (at.Tabelle == "T03")
            {
                ClsDBVariablen.Instance.SetTabellenVariableWert(at.Tabelle, ClsTabellenfunktionen.EreignisseToVariable_Json(ClsGlobal.Instance.TurnierID));
            }

            if (at.Tabelle == "Strafen")
            {
                ClsTabellenfunktionen.StrafenToVariable(ClsGlobal.Instance.Strafen1, "A");
                ClsTabellenfunktionen.StrafenToVariable(ClsGlobal.Instance.Strafen2, "B");
            }

            if (at.Tabelle == "T06")
            {
                ClsTabellenfunktionen.TorschuetzeToVariable(ClsGlobal.Instance.TurnierID);
            }

            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Anzeigetabellen"))));
        }
Exemplo n.º 3
0
        public static void TeamChange(ClsCommand rb)
        {
            Core.Mannschaften.ClsCommon.ChangeMannschaft(rb.Team, rb.Property, rb.Value1);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "TeamList"))));
        }
Exemplo n.º 4
0
        public static void SetOptValue(ClsCommand rb)
        {
            Core.DB.Options3 o3 = ClsOptionsControler.Options3(rb.Value1);
            o3.Value = rb.Value2;
            ClsOptionsControler.SaveOptions3(o3);
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Options"))));

            if (rb.Value1.Length > 12)
            {
                if (rb.Value1.Substring(0, 13) == "DisplayScreen")
                {
                    ClsGlobalEvents.Fire_DisplayPropChanged(null, null);
                }
            }

            if (rb.Value1 == "StartPageSet")
            {
                // aktuelle Anzeige umschalten
                ClsGlobal.Instance.ActivePage = ClsPages.GetFirstPageName(ClsPageSets.ActivePageSet());

                ClsCommand cmd = new ClsCommand();
                cmd.Type    = "JN";
                cmd.Command = "Reload";

                ClsServer.Instance.SendMessage(new JavaScriptSerializer().Serialize(cmd));

                // Liste der Anzeigeseiten aktualisieren
                GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "PageList"))));
            }
        }
Exemplo n.º 5
0
        public static void PlayerDel(ClsCommand rb)
        {
            Core.Mannschaften.ClsCommon.DelSpieler(rb.Player);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "PlayerList", team: rb.Team))));
        }
Exemplo n.º 6
0
        public static void setDivAttribute(ClsCommand rb)
        {
            ClsDivs.setDivAttribute(rb.PageSet, rb.Page, rb.Divs, rb.Property, rb.Value1);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Divs", pageSet: rb.PageSet, page: rb.Page))));
        }
Exemplo n.º 7
0
        public static void TeamDel(ClsCommand rb)
        {
            Core.Mannschaften.ClsCommon.DelMannschaft(rb.Team);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "TeamList"))));
        }
Exemplo n.º 8
0
        public static void CopyDivs(ClsCommand rb)
        {
            ClsDivs.CopyDiv(rb.Divs[0]);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Divs", pageSet: rb.PageSet, page: rb.Page))));
        }
Exemplo n.º 9
0
        public static void SetTimerEvent(ClsCommand rb)
        {
            Core.DB.Timerevent t = new JavaScriptSerializer().Deserialize <Core.DB.Timerevent>(rb.Value1);
            Core.DBControler.ClsTimerControler.SaveTimerEvent(t);

            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Timerevents", value1: t.TimerNr.ToString()))));
        }
Exemplo n.º 10
0
        public static void DelTimerEvent(ClsCommand rb)
        {
            int tnr = Convert.ToInt32(rb.Value1);

            Core.DBControler.ClsTimerControler.DelTimerEvent(tnr);
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Timerevents", value1: rb.Value2))));
        }
Exemplo n.º 11
0
 public static void AddPenaltie(ClsCommand rb)
 {
     Core.DB.Strafen n = new Core.DB.Strafen();
     n.Bezeichnung = rb.Value1;
     Core.DBControler.ClsOptionsControler.AddStrafe(n);
     GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Penalties", value1: rb.Value1))));
 }
Exemplo n.º 12
0
        public static void TimerOff(ClsCommand rb)
        {
            long tNr = Convert.ToInt32(rb.Value1);

            ClsZeitkontroler.Instance.ClockStop(tNr);
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "TimerObjects"))));
        }
Exemplo n.º 13
0
        public static void DelTurnier(ClsCommand rb)
        {
            int turnierNr = Convert.ToInt32(rb.Value1);

            ClsTurnierverwaltung.TurnierLoeschen(turnierNr);

            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "TurniereKomplett"))));
        }
Exemplo n.º 14
0
        public static void PlayerChange(ClsCommand rb)
        {
            Core.Mannschaften.ClsCommon.ChangeSpieler(rb.Player, rb.Property, rb.Value1);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "PlayerList", team: rb.Team))));
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "PlayerList", team: "ALL"))));
        }
Exemplo n.º 15
0
        public static void DelDivs(ClsCommand rb)
        {
            // ClsDivs.DeActivateDiv(rb.PageSet, rb.Page);
            ClsDivs.DelDiv(rb.Divs);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Divs", pageSet: rb.PageSet, page: rb.Page))));
        }
Exemplo n.º 16
0
        public static void NewTurnier(ClsCommand rb)
        {
            ClsTurnier turnier = new JavaScriptSerializer().Deserialize <ClsTurnier>(rb.Value1);

            ClsTurnierverwaltung.TurnierSpeichern(turnier);

            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "TurniereKomplett"))));
        }
Exemplo n.º 17
0
        public static void SetTurnierID(ClsCommand rb)
        {
            int turnierID = Convert.ToInt32(rb.Value1);

            // ClsTurnierfunktionen.LoadTurnier(turnierID);
            ClsGlobal.Instance.TurnierID = turnierID;
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "turnierID"))));
        }
Exemplo n.º 18
0
        public static void NewPage(ClsCommand rb)
        {
            int PageSetID = Convert.ToInt32(rb.PageSet);

            ClsPages.NewPage(PageSetID, rb.Value1);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Pages", pageSet: rb.PageSet))));
        }
Exemplo n.º 19
0
        public static void DelPageSet(ClsCommand rb)
        {
            int PageSetID = Convert.ToInt32(rb.PageSet);

            ClsPageSets.DeletePageSet(PageSetID);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "PageSets"))));
        }
Exemplo n.º 20
0
        public static void SetVariableDefault(ClsCommand rb)
        {
            string v = rb.Value1;
            string w = rb.Value2;

            ClsDBVariablen.Instance.SetVariablenDefault(v, w);

            // Variable neu an die Clients senden
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "SVariablen"))));
        }
Exemplo n.º 21
0
        public static void ChangeTabSortOrder(ClsCommand rb)
        {
            int id = Convert.ToInt32(rb.Value1);

            Core.DB.TabellenSort t = Core.DBControler.ClsOptionsControler.Tabellensortierung(id);
            t.absteigend = !t.absteigend;
            Core.DBControler.ClsOptionsControler.SaveTabellensortierung(t);

            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "TabellenSort"))));
        }
Exemplo n.º 22
0
        public static void SetPageGrid(ClsCommand rb)
        {
            int PageSetID = Convert.ToInt32(rb.PageSet);
            int PageID    = Convert.ToInt32(rb.Page);

            ClsPages.SetMarkStyleWert(PageSetID, PageID, "Grid", rb.Value1);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Page", pageSet: rb.PageSet, page: rb.Page))));
        }
Exemplo n.º 23
0
        public static void SetEvent(ClsCommand rb)
        {
            int id = Convert.ToInt32(rb.Value1);

            Core.DB.EreignissTyp erg = Core.DBControler.ClsEreignisControler.EreignissTyp(id);
            erg.Log = Convert.ToBoolean(rb.Value2);
            Core.DBControler.ClsEreignisControler.SaveEreignissTyp(erg);

            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Events"))));
        }
Exemplo n.º 24
0
        public static void delSnd(ClsCommand rb)
        {
            string file = Path.Combine(ClsMain.AppFolder, "web", "sounds", rb.Value1);

            if (File.Exists(file))
            {
                File.Delete(file);
                GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "AudioFileList"))));
            }
        }
Exemplo n.º 25
0
        public static void NewDiv(ClsCommand rb)
        {
            int PageSetID = Convert.ToInt32(rb.PageSet);
            int PageID    = Convert.ToInt32(rb.Page);

            ClsDivs.NewDiv(PageSetID, PageID);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Divs", pageSet: rb.PageSet, page: rb.Page))));
        }
Exemplo n.º 26
0
        public static void DownDivs(ClsCommand rb)
        {
            int PageID    = Convert.ToInt32(rb.Page);
            int PageSetID = Convert.ToInt32(rb.PageSet);

            ClsDivs.MoveDivs(PageSetID, PageID, rb.Divs, Direction.DirectionType.down);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Divs", pageSet: rb.PageSet, page: rb.Page))));
        }
Exemplo n.º 27
0
        public static void SetMatch(ClsCommand rb)
        {
            int    spielID = Convert.ToInt32(rb.Property);
            int    ToreA   = Convert.ToInt32(rb.Value1);
            int    ToreB   = Convert.ToInt32(rb.Value2);
            string mod     = rb.Value3;

            ClsSpielfunktionen.SetMatch(spielID, ToreA, ToreB, mod);
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "turnierID"))));
        }
Exemplo n.º 28
0
        public static void SwitchPage(ClsCommand rb)
        {
            int pageID = Convert.ToInt32(rb.Page);

            ClsDisplay.SetPage(ClsPageSets.ActivePageSet(), pageID);

            // answer
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "ActivePage"))));

            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "DivsActivePage", pageSet: rb.PageSet, page: rb.Page))));
        }
Exemplo n.º 29
0
        public static void AddTimerEvent(ClsCommand rb)
        {
            int tnr = Convert.ToInt32(rb.Value1);

            Core.DB.Timerevent m = new Core.DB.Timerevent();
            m.TimerNr   = tnr;
            m.Active    = true;
            m.Sekunden  = 0;
            m.Eventtype = 0;
            //m.Name = "";
            m.Soundfile     = "";
            m.Layer         = "";
            m.AndereTimerNr = -1;

            Core.DBControler.ClsTimerControler.AddTimerEvent(m);
            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "Timerevents", value1: rb.Value1))));
        }
Exemplo n.º 30
0
        public static void LowerTabSortPrio(ClsCommand rb)
        {
            int id = Convert.ToInt32(rb.Value1);
            List <Core.DB.TabellenSort> tl = Core.DBControler.ClsOptionsControler.Tabellensortierung();

            Core.DB.TabellenSort t1 = (from x in tl where x.ID == id select x).FirstOrDefault();
            int mem = t1.Prio;

            Core.DB.TabellenSort t2 = (from x in tl where x.Prio == mem + 1 select x).FirstOrDefault();
            if (t2 != null)
            {
                t1.Prio += 1;
                t2.Prio -= 1;
                Core.DBControler.ClsOptionsControler.SaveTabellensortierung(t1);
                Core.DBControler.ClsOptionsControler.SaveTabellensortierung(t2);
            }

            GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "TabellenSort"))));
        }