public ItemFilterPopup()
 {
     // Required to initialize variables
     InitializeComponent();
     PopupUtilities.RegisterPopup(this, PopupFilter, Toggle, Close);
     FilterTree.ItemsSource = ItemFilter.FilterList.FilterList;
 }
Exemple #2
0
        public ChartPicker()
        {
            InitializeComponent();
            PopupUtilities.RegisterPopup(this, PopupChartPicker, Toggle, Close);
            Items = new ObservableCollection <ChartPickerItem>();
            Items.Add(new ChartPickerItem("Gear", "All (This is Slow to Calc)", "Head", "Neck", "Shoulders", "Back", "Chest", "Wrist", "Hands", "Waist", "Legs", "Feet", "Finger 1", "Finger 2", "Trinket 1", "Trinket 2", "Main Hand", "Off Hand", "Ranged" /*, "Projectile", "Projectile Bag"*/));
            Items.Add(new ChartPickerItem("Enchants", "All (This is Slow to Calc)", "Head", "Shoulders", "Back", "Chest", "Wrist", "Hands", "Legs", "Feet", "Finger 1", "Finger 2", "Main Hand", "Off Hand", "Ranged"));
            Items.Add(new ChartPickerItem("Tinkerings", "All (This is Slow to Calc)", "Back", "Hands", "Waist"));
            Items.Add(new ChartPickerItem("Gems", "All Normal", "Red", "Blue", "Yellow", "Meta", "Cogwheel", "Hydraulic"));
            Items.Add(new ChartPickerItem("Buffs", "All", "Food", "Elixirs and Flasks", "Scrolls", "Potion", "Raid Buffs", "Raid Debuffs", "Set Bonuses"));
            Items.Add(new ChartPickerItem("Talents and Glyphs", "Individual Talents", "Individual Talents (Full)", "Talent Specs", "Glyphs : All", "Glyphs : Prime", "Glyphs : Major", "Glyphs : Minor"));
            Items.Add(new ChartPickerItem("Races", "Races"));
            Items.Add(new ChartPickerItem("Item Sets", "Item Sets"));
            Items.Add(new ChartPickerItem("Equipped", "All", "Gear", "Enchants", "Tinkerings", "Buffs"));
            Items.Add(new ChartPickerItem("Available", "All", "Gear", "Enchants", "Tinkerings"));
            Items.Add(new ChartPickerItem("Direct Upgrades", "Gear", "Gear / Cost", "Enchants", "Tinkerings"));
            //Items.Add(new ChartPickerItem("Bosses", "All (This is Slow to Calc)", "Tier 11 10N", "Tier 11 25N", "Tier 11 10H", "Tier 11 25H")); // These charts don't work yet
            Items.Add(new ChartPickerItem("Stat Values", "Relative Stat Values"));
            Items.Add(new ChartPickerItem("Search Results", "Search Results"));
            //new ChartPickerItem("{0} Specific")

            Calculations.ModelChanged += new EventHandler(Calculations_ModelChanged);

            this.DataContext = this;

            _timer          = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromMilliseconds(150);
            _timer.Tick    += new EventHandler(_timer_Tick);
        }
Exemple #3
0
        public ClassModelPicker()
        {
            InitializeComponent();
            PopupUtilities.RegisterPopup(this, PopupClassModelPicker, Toggle, Close);
            Items = new ObservableCollection <ClassModelPickerItem>();
            Items.Add(new ClassModelPickerItem("Death Knight", "DPSDK", "TankDK"));
            Items.Add(new ClassModelPickerItem("Druid", "Bear", "Cat", "Moonkin", "Tree"));
            Items.Add(new ClassModelPickerItem("Hunter", "Hunter"));
            Items.Add(new ClassModelPickerItem("Mage", "Mage"));
            Items.Add(new ClassModelPickerItem("Paladin", "Healadin", "ProtPaladin", "Retribution"));
            Items.Add(new ClassModelPickerItem("Priest", "HealPriest", "ShadowPriest"));
            Items.Add(new ClassModelPickerItem("Rogue", "Rogue"));
            Items.Add(new ClassModelPickerItem("Shaman", "Elemental", "Enhance", "RestoSham"));
            Items.Add(new ClassModelPickerItem("Warlock", "Warlock"));
            Items.Add(new ClassModelPickerItem("Warrior", "DPSWarr", "ProtWarr"));
            //new ClassModelPickerItem("{0} Specific")

            Calculations.ModelChanged += new EventHandler(Calculations_ModelChanged);

            this.DataContext = this;

            _timer          = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromMilliseconds(150);
            _timer.Tick    += new EventHandler(_timer_Tick);
        }
Exemple #4
0
 public ItemButton()
 {
     // Required to initialize variables
     InitializeComponent();
     PopupUtilities.RegisterPopup(this, ListPopup, Close);
     PopupUtilities.RegisterPopup(this, ListPopupGem1, Close);
     PopupUtilities.RegisterPopup(this, ListPopupGem2, Close);
     PopupUtilities.RegisterPopup(this, ListPopupGem3, Close);
 }
 public ItemButtonWithEnchant()
 {
     // Required to initialize variables
     InitializeComponent();
     PopupUtilities.RegisterPopup(this, ListPopup, EnchantPopup, Close);
     ComparisonEnchantList.IsEnchantList = true;
     PopupUtilities.RegisterPopup(this, ListPopupGem1, Close);
     PopupUtilities.RegisterPopup(this, ListPopupGem2, Close);
     PopupUtilities.RegisterPopup(this, ListPopupGem3, Close);
 }
 public ItemButtonWithEnchant()
 {
     // Required to initialize variables
     InitializeComponent();
     PopupUtilities.RegisterPopup(this, ListPopup, EnchantPopup, Close);
     ComparisonListEnchant.IsEnchantList  = true;
     ComparisonListReforge.IsReforgeList  = true;
     ComparisonListTinker.IsTinkeringList = true;
     PopupUtilities.RegisterPopup(this, ListPopupGem1, Close);
     PopupUtilities.RegisterPopup(this, ListPopupGem2, Close);
     PopupUtilities.RegisterPopup(this, ListPopupGem3, Close);
     PopupUtilities.RegisterPopup(this, ReforgePopup, Close);
     PopupUtilities.RegisterPopup(this, TinkerPopup, Close);
     UpdateButtonOptions();
 }
Exemple #7
0
        public static void RegisterPopup(Control rootControl, Popup popup1, Popup popup2, Action close)
        {
#if !SILVERLIGHT
            PopupUtilities util = new PopupUtilities();
            util.rootControl              = rootControl;
            util.popup                    = popup1;
            util.popup2                   = popup2;
            util.button                   = null;
            util.Close                    = close;
            rootControl.MouseDown        += util.Control_MouseDown;
            rootControl.LostMouseCapture += util.Control_LostMouseCapture;
            popup1.Opened                += util.Popup_Opened;
            popup1.Closed                += util.Popup_Closed;
            popup2.Opened                += util.Popup_Opened;
            popup2.Closed                += util.Popup_Closed;
#endif
        }
        public static void RegisterPopup(Control rootControl, Popup popup1, Popup popup2, Action close)
        {
#if !SILVERLIGHT
            PopupUtilities util = new PopupUtilities();
            util.rootControl = rootControl;
            util.popup = popup1;
            util.popup2 = popup2;
            util.button = null;
            util.Close = close;
            rootControl.MouseDown += util.Control_MouseDown;
            rootControl.LostMouseCapture += util.Control_LostMouseCapture;
            popup1.Opened += util.Popup_Opened;
            popup1.Closed += util.Popup_Closed;
            popup2.Opened += util.Popup_Opened;
            popup2.Closed += util.Popup_Closed;
#endif
        }
Exemple #9
0
        public static void RegisterPopup(Control rootControl, Popup popup, Control button, Action close)
        {
#if !SILVERLIGHT
            PopupUtilities util = new PopupUtilities();
            util.rootControl              = rootControl;
            util.popup                    = popup;
            util.button                   = button;
            util.Close                    = close;
            rootControl.MouseDown        += util.Control_MouseDown;
            rootControl.LostMouseCapture += util.Control_LostMouseCapture;
            popup.Opened                 += util.Popup_Opened;
            popup.Closed                 += util.Popup_Closed;
            // detect and zero out silverlight margins
            //<Grid Background="#00000000" Margin="-10000,-10000,-10000,-10000" IsHitTestVisible="True" MouseLeftButtonDown="Background_MouseLeftButtonDown">
            //<Border BorderThickness="1" Width="350" Height="500" Margin="10000,10000,10000,10000" CornerRadius="0,0,4,4" BorderBrush="#CC000066" Background="#F3F3F3FF">

            Grid grid = popup.Child as Grid;
            if (grid != null)
            {
                if (grid.Margin.Left == -10000)
                {
                    grid.Margin = new Thickness();
                }
                if (grid.Children.Count > 0)
                {
                    Border border = grid.Children[0] as Border;
                    if (border != null)
                    {
                        if (border.Margin.Left == 10000)
                        {
                            border.Margin = new Thickness();
                        }
                    }
                }
            }
#endif
        }
        public static void RegisterPopup(Control rootControl, Popup popup, Control button, Action close)
        {
#if !SILVERLIGHT
            PopupUtilities util = new PopupUtilities();
            util.rootControl = rootControl;
            util.popup = popup;
            util.button = button;
            util.Close = close;
            rootControl.MouseDown += util.Control_MouseDown;
            rootControl.LostMouseCapture += util.Control_LostMouseCapture;
            popup.Opened += util.Popup_Opened;
            popup.Closed += util.Popup_Closed;
            // detect and zero out silverlight margins
            //<Grid Background="#00000000" Margin="-10000,-10000,-10000,-10000" IsHitTestVisible="True" MouseLeftButtonDown="Background_MouseLeftButtonDown">
            //<Border BorderThickness="1" Width="350" Height="500" Margin="10000,10000,10000,10000" CornerRadius="0,0,4,4" BorderBrush="#CC000066" Background="#F3F3F3FF">

            Grid grid = popup.Child as Grid;
            if (grid != null)
            {
                if (grid.Margin.Left == -10000)
                {
                    grid.Margin = new Thickness();
                }
                if (grid.Children.Count > 0)
                {
                    Border border = grid.Children[0] as Border;
                    if (border != null)
                    {
                        if (border.Margin.Left == 10000)
                        {
                            border.Margin = new Thickness();
                        }
                    }
                }
            }
#endif
        }