Exemple #1
0
        //Load/Reload LUA File
        private void buttonLoadEvents_Click(object sender, EventArgs e)
        {
            try
            {
                listViewEventsList.Items.Clear();
                listViewEventsList.BeginUpdate();
                Int32 Index = 0;
                foreach (var de in FuncsLib.dump["GEM_Events"]["realms"]["Elysium"]["events"].GetDict())
                {
                    String       EId = de.Key.ToString().Replace("\"", "");
                    ListViewItem Items;
                    Items      = new ListViewItem();
                    Items.Text = (EId);
                    Items.SubItems.Add(FuncsLib.dump["GEM_Events"]["realms"]["Elysium"]["events"].Safe[EId]["ev_place"].GetString());
                    Items.SubItems.Add(FuncsLib.UnixTimeStampToDateTime(FuncsLib.dump["GEM_Events"]["realms"]["Elysium"]["events"].Safe[EId]["ev_date"].GetInt()));
                    Items.SubItems.Add(FuncsLib.dump["GEM_Events"]["realms"]["Elysium"]["events"].Safe[EId]["titular_count"].GetStringLenient());
                    Items.SubItems.Add(FuncsLib.dump["GEM_Events"]["realms"]["Elysium"]["events"].Safe[EId]["ev_comment"].GetString());
                    listViewEventsList.Items.Add(Items);

                    Index++;
                }
                listViewEventsList.EndUpdate();

                FuncsLib.SortLVEvent(listViewEventsList, 2);
                toolStripStatusLbl.Text = "Liste des Events Chargé.";
            }
            catch { toolStripStatusLbl.Text = "Erreur, Impossible de charger le fichier LUA."; }
        }
Exemple #2
0
        //Show Events Infos Trigger
        private void listViewEventsList_SelectedIndexChanged(object sender, EventArgs e)
        {
            FuncsLib.GetListViewSelectedIndex(listViewEventsList);

            for (int ev = 0; ev < listViewEventsList.Items.Count; ev++)
            {
                if (listViewEventsList.Items[ev].Selected == true)
                {
                    listBoxDetailsEvent.Items.Clear();
                    listBoxDetailsEvent.BeginUpdate();
                    Int32 Index = 0;
                    for (Int32 i = 1; i <= FuncsLib.dump["GEM_Events"]["realms"]["Elysium"]["events"][listViewEventsList.Items[ev].Text]["titulars"].Count; i++)
                    {
                        if (GetStringPlayerInfoLUA(i, "name").ToString() != null)
                        {
                            String       RaidName = FuncsLib.dump["GEM_Events"]["realms"]["Elysium"]["events"][listViewEventsList.Items[FuncsLib.EventSelected].Text]["ev_place"].GetString();
                            ListViewItem Items;
                            Items      = new ListViewItem();
                            Items.Text = "P" + i.ToString();
                            Items.SubItems.Add(GetStringPlayerInfoLUA(i, "name"));
                            Items.SubItems.Add(GetStringPlayerInfoLUA(i, "class"));
                            listBoxDetailsEvent.Items.Add(Items);
                            toolStripStatusLbl.Text = "Evenement: [" + RaidName + "] Chargé.";
                            if (RaidName.Contains("Molten") || RaidName.Contains("R1"))
                            {
                                textBoxFeuilleGoogle.Text = "Inscription GEM MC Jeudi [BaseDonnée]";
                            }
                            if (RaidName.Contains("Molten") && RaidName.Contains("R2"))
                            {
                                textBoxFeuilleGoogle.Text = "Inscription GEM MC Dimanche [BaseDonnée]";
                            }
                            else if (RaidName.Contains("Blackwing") || RaidName.Contains("BWL") || RaidName.Contains("Repaire"))
                            {
                                textBoxFeuilleGoogle.Text = "Inscription GEM BWL [BaseDonnée]";
                            }
                            else if (RaidName.Contains("Zul") || RaidName.Contains("ZG"))
                            {
                                textBoxFeuilleGoogle.Text = "Inscription GEM ZG [BaseDonnée]";
                            }
                            Index++;
                        }
                    }
                    listBoxDetailsEvent.EndUpdate();
                }
            }
        }