コード例 #1
0
        /// <summary>
        /// open the combat history
        /// </summary>
        /// <param name="who"></param>
        private void ShowDeathLog(WhoDied who)
        {
            Rectangle rect     = new Rectangle(this.Location, this.Size);
            DeathLog  deathLog = new DeathLog(who, encounterData, rect);

            deathLog.Show();
        }
コード例 #2
0
        /// <summary>
        /// double click opens the cause of death window
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int     index   = listBox1.SelectedIndex;
            WhoDied whoDied = (WhoDied)listBox1.Items[index];

            ShowDeathLog(whoDied);
        }
コード例 #3
0
ファイル: DeathLog.cs プロジェクト: jeffjl74/ACT_DeathCount
        /// <summary>
        /// Form constructor
        /// </summary>
        /// <param name="who">Decriptive class for who died</param>
        /// <param name="encounterData">ACT encounter data that includes the death</param>
        /// <param name="rect">Rectangle of the parent form. This form will be placed to its right</param>
        public DeathLog(WhoDied who, EncounterData encounterData, Rectangle rect)
        {
            InitializeComponent();

            whoDied    = who;
            ed         = encounterData;
            parentRect = rect;
        }
コード例 #4
0
        /// <summary>
        /// main form wants to add a death to the list
        /// </summary>
        /// <param name="dd"></param>
        public void AddDeath(WhoDied dd)
        {
            QueueArgs arg = new QueueArgs {
                type = OverlayCommand.DEATH, count = dd.deathCount, who = dd.who, index = dd.killedAtIndex
            };

            encounterData = dd.ed;
            queueArgs.Enqueue(arg);
            dataSignal.Set();
        }
コード例 #5
0
        /// <summary>
        /// activated from the Consumer() thread, runs on the UI thread
        /// </summary>
        /// <param name="o"></param>
        private void UpdateForm(object o)
        {
            QueueArgs w = o as QueueArgs;

            if (w != null)
            {
                textBoxDeaths.Text = w.count.ToString();
                WhoDied whoDied = new WhoDied {
                    who = w.who, killedAtIndex = w.index, deathCount = w.count, ed = encounterData
                };
                listBox1.Items.Insert(0, whoDied);
            }
        }