Example #1
0
        public Form1()
        {
            InitializeComponent();
            timer1.Start();

            this.FormClosing += new FormClosingEventHandler(Form1_FormClosing);

            try
            {
                list = Data_Classes.PlayerList.FromSerializedString(GetPlayerString());
                foreach (var p in list.MasterList)
                    p.TimesGone = TimesGone(p);

                foreach (var p in list.HealerList)
                    p.TimesGone = TimesGone(p);
            } catch (Exception) { }

            try
            {
                F10History = Data_Classes.F10EntryList.FromSerializedString(GetF10String());
            } catch (Exception) { }

            //Add Columns to the MasterList
            this.isalstMaster.Columns.Add(new IsaListBox2.ListBoxColumn("Level", 35, IsaListBox2.ListBoxSizeMode.Fixed, this.Font));
            this.isalstMaster.Columns.Add(new IsaListBox2.ListBoxColumn("Display", 50, IsaListBox2.ListBoxSizeMode.Fill, this.Font));
            this.isalstMaster.Columns.Add(new IsaListBox2.ListBoxColumn("JobDesc", 65, IsaListBox2.ListBoxSizeMode.Fixed, this.Font));

            //Add Columns to the HealerList
            this.isalstHealers.Columns.Add(new IsaListBox2.ListBoxColumn("Level", 35, IsaListBox2.ListBoxSizeMode.Fixed, this.Font));
            this.isalstHealers.Columns.Add(new IsaListBox2.ListBoxColumn("Display", 50, IsaListBox2.ListBoxSizeMode.Fill, this.Font));
            this.isalstHealers.Columns.Add(new IsaListBox2.ListBoxColumn("JobDesc", 65, IsaListBox2.ListBoxSizeMode.Fixed, this.Font));

            //Add Columns to the WeekendList
            this.isalstWeekends.Columns.Add(new IsaListBox2.ListBoxColumn("NickName", 50, IsaListBox2.ListBoxSizeMode.Fill, this.Font));
            this.isalstWeekends.Columns.Add(new IsaListBox2.ListBoxColumn("DaysDesc", 145, IsaListBox2.ListBoxSizeMode.Fixed, this.Font));

            //Add Columns to the F10List
            this.isalstF10.Columns.Add(new IsaListBox2.ListBoxColumn("NickName", 50, IsaListBox2.ListBoxSizeMode.Fill, this.Font));
            this.isalstF10.Columns.Add(new IsaListBox2.ListBoxColumn("MissedDesc", 75, IsaListBox2.ListBoxSizeMode.Fixed, this.Font));

            LoadSettings();
            //this.nudHistory.Value = Properties.Settings.Default.HistoryCount == 0 ? 7 : Properties.Settings.Default.HistoryCount;
            //this.nudSlots.Value = Properties.Settings.Default.SlotCount == 0 ? 7 : Properties.Settings.Default.SlotCount;

            this.MaximizeBox = false;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
        }
Example #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (list == null || list.MasterList.Count == 0)
            {

                Data_Classes.Player.Days weekend = Data_Classes.Player.Days.Sunday | Data_Classes.Player.Days.Saturday;

                Data_Classes.Player.Days weekdays = Data_Classes.Player.Days.Monday | Data_Classes.Player.Days.Tuesday |
                    Data_Classes.Player.Days.Wednesday | Data_Classes.Player.Days.Thursday | Data_Classes.Player.Days.Friday ;

                list = new Data_Classes.PlayerList();
                List<Data_Classes.Player> lst = new List<Data_Classes.Player>();
                lst.Add(new Data_Classes.Player("supraknight", "Kyle", Data_Classes.Player.Jobs.GodOfSword, 76, weekend) { IsActive = true });
                lst.Add(new Data_Classes.Player("KillyasThief", "", Data_Classes.Player.Jobs.Thief, 73, weekend) { IsActive = false });
                lst.Add(new Data_Classes.Player("Inushi", "Sami", Data_Classes.Player.Jobs.MilitaryAdvisor, 74, weekend) { IsActive = true });
                lst.Add(new Data_Classes.Player("Over", "Tyler Evans", Data_Classes.Player.Jobs.GodOfSword, 75, All) { IsActive = true });
                lst.Add(new Data_Classes.Player("GlockMeister", "Chris", Data_Classes.Player.Jobs.General, 76, All) { IsActive = true });
                lst.Add(new Data_Classes.Player("Holyshot", "", Data_Classes.Player.Jobs.GodOfBow, 71, Data_Classes.Player.Days.Sunday |
                    Data_Classes.Player.Days.Monday | Data_Classes.Player.Days.Tuesday | Data_Classes.Player.Days.Wednesday |
                    Data_Classes.Player.Days.Friday | Data_Classes.Player.Days.Saturday) { IsActive = true });
                lst.Add(new Data_Classes.Player("Uggla2", "", Data_Classes.Player.Jobs.GodOfBow, 73, All) { IsActive = false });
                lst.Add(new Data_Classes.Player("TheBimbo", "Iselin", Data_Classes.Player.Jobs.MilitaryAdvisor, 78, All) { IsActive = true });
                lst.Add(new Data_Classes.Player("AliensExist", "", Data_Classes.Player.Jobs.GodOfSword, 73, All) { IsActive = false });
                lst.Add(new Data_Classes.Player("KnightGuys", "", Data_Classes.Player.Jobs.GodOfSword, 72, All) { IsActive = true });
                lst.Add(new Data_Classes.Player("BlueSkyHi", "Peter", Data_Classes.Player.Jobs.GodOfBow, 74, All) { IsActive = true });
                lst.Add(new Data_Classes.Player("BIBIX", "", Data_Classes.Player.Jobs.Thief, 73, All) { IsActive = false });
                lst.Add(new Data_Classes.Player("StefanK", "", Data_Classes.Player.Jobs.GodOfSword, 73, All) { IsActive = true });
                lst.Add(new Data_Classes.Player("ManTaSwe", "", Data_Classes.Player.Jobs.ChairpersonOfJoongBang, 70, All) { IsActive = true });
                lst.Add(new Data_Classes.Player("KelyaShade", "", Data_Classes.Player.Jobs.Archer, 71, All) { IsActive = true });
                lst.Add(new Data_Classes.Player("HefeWeizeN", "", Data_Classes.Player.Jobs.GodOfSword, 71, weekend) { IsActive = true });
                lst.Add(new Data_Classes.Player("Meika", "Heather", Data_Classes.Player.Jobs.ChairpersonOfJoongBang, 71, All) { IsActive = true, EmailAddress = "*****@*****.**" });
                lst.Add(new Data_Classes.Player("ImTired", "Perry the Platypus", Data_Classes.Player.Jobs.GodOfSword, 73, All) { IsActive = true });
                lst.Add(new Data_Classes.Player("CHENIER", "Rene", Data_Classes.Player.Jobs.ImperialGeneral, 79, All) { IsActive = false });
                lst.Add(new Data_Classes.Player("Thefarmerdog", "", Data_Classes.Player.Jobs.ImperialGeneral, 74, weekend) { IsActive = true });
                lst.Add(new Data_Classes.Player("Myika", "Mike the Awesomest", Data_Classes.Player.Jobs.Hermit, 69, All) { IsActive = true, EmailAddress = "*****@*****.**" });

                list.MasterList = lst;
                list.HealerList = lst.Where((x) => (x.Job == Data_Classes.Player.Jobs.MilitaryAdvisor || (x.Job == Data_Classes.Player.Jobs.ChairpersonOfJoongBang && x.Level > 70))).ToList();
            }

            list.WeekendList = list.MasterList.Where((x) => (x.AvailableDays != 0x00 && x.AvailableDays != All)).ToList();
            this.playerListSource.DataSource = list;

            count += 1;
            timer1.Stop();
            this.monthCalendar1.SelectionStart = DateTime.Now.Date.AddDays(1);
            this.monthCalendar1.SelectionStart = DateTime.Now.Date;

            BoldDates();
        }