Ejemplo n.º 1
0
        /// <summary>
        /// Sets the implant name for the given slot and the provided set.
        /// </summary>
        /// <param name="set"></param>
        /// <param name="slot"></param>
        /// <param name="implantName"></param>
        /// <returns></returns>
        private void SetImplant(SerializableSettingsImplantSet set, ImplantSlots slot, Implant implant)
        {
            // Set may be null when the user is editing the phantom line
            if (set == null) return;

            // Invoke the property setter with the matching name through reflection
            typeof(SerializableSettingsImplantSet).GetProperty(slot.ToString()).SetValue(set, implant.Name, null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// When the mouse moves over one of the items of the combobox dropdown, we display a tooltip on the right of the dropdown.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="item"></param>
        /// <param name="point"></param>
        void combo_DropDownMouseMove(object sender, object item, Point point)
        {
            var implant = (Implant)item;
            //if (toolTip.Active && m_lastImplant == implant) return;

            var control = (Control)sender;
            point.X = control.ClientRectangle.Right + 20;
            point.Y = control.ClientRectangle.Top;

            m_fakeToolTip.Location = control.PointToScreen(point);
            m_fakeToolTip.Implant = implant;
            m_fakeToolTip.ShowInactiveTopmost();
            m_lastImplant = implant;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// When the mouse moves over the implants combos (used for writable sets), we display a tooltip on the right of the combo.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void combo_MouseMove(object sender, MouseEventArgs e)
        {
            var combo = (DropDownMouseMoveComboBox)sender;
            var implant = combo.SelectedItem as Implant;
            if (implant == null) return;

            if (m_fakeToolTip.Visible && m_fakeToolTip.Implant == implant) return;

            Point point = new Point();
            point.X = combo.Width + 5;
            point.Y = 1;

            m_fakeToolTip.Location = combo.PointToScreen(point);
            m_fakeToolTip.Implant = implant;
            m_fakeToolTip.ShowInactiveTopmost();
            m_lastImplant = implant;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// When the combo box's dropdown is closed, we hide the implant.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void combo_DropDownClosed(object sender, EventArgs e)
 {
     m_fakeToolTip.Hide();
     m_lastImplant = null;
 }