예제 #1
0
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;
            NETAutoupdater.InitializeAutoupdater(AppVersion);

            if (!string.IsNullOrEmpty(Settings.Default.FilterChangeSoundFileLocation) && !FilterSoundLocationDialog.Content.Equals("Default Sound"))
            {
                Data.Player.Open(new Uri(Settings.Default.FilterChangeSoundFileLocation));
            }
            else
            {
                Data.Player.Open(new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Sounds\filterchanged.mp3")));
            }

            if (!string.IsNullOrEmpty(Settings.Default.ItemPickupSoundFileLocation) && !ItemPickupLocationDialog.Content.Equals("Default Sound"))
            {
                Data.PlayerSet.Open(new Uri(Settings.Default.ItemPickupSoundFileLocation));
            }
            else
            {
                Data.PlayerSet.Open(new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Sounds\itemsPickedUp.mp3")));
            }

            //TESTING SETTINGS RESET
            //if (Debugger.IsAttached)
            //    Properties.Settings.Default.Reset();

            // initialize stash tabs
            //DataContext = stashTabsModel;

            // Populate the league dropdown
            if (Settings.Default.MainLeague)
            {
                MainLeagueComboBox.ItemsSource = ApiAdapter.GetAllLeagueNames();
            }

            InitializeColors();
            InitializeHotkeys();
            InitializeTray();
            LoadModeVisibility();

            // add Action to MouseHook
            MouseHook.MouseAction += Coordinates.Event;
        }
예제 #2
0
        public MainWindow()
        {
            instance = this;
            //Properties.Settings.Default.Reset();
            InitializeComponent();
            DataContext = this;
            NETAutoupdater.InitializeAutoupdater(appVersion);

            //Data.InitializeBases();
            if (!string.IsNullOrEmpty(Settings.Default.FilterChangeSoundFileLocation) && !FilterSoundLocationDialog.Content.Equals("Default Sound"))
            {
                Data.Player.Open(new Uri(Settings.Default.FilterChangeSoundFileLocation));
            }
            else
            {
                //Data.Player.Open(new Uri(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"ChaosRecipeEnhancer\Sounds\filterchanged.mp3")));
                Data.Player.Open(new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Sounds\filterchanged.mp3")));
            }

            if (!string.IsNullOrEmpty(Settings.Default.ItemPickupSoundFileLocation) && !ItemPickupLocationDialog.Content.Equals("Default Sound"))
            {
                Data.PlayerSet.Open(new Uri(Settings.Default.ItemPickupSoundFileLocation));
            }
            else
            {
                //Data.PlayerSet.Open(new Uri(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"ChaosRecipeEnhancer\Sounds\itemsPickedUp.mp3")));
                Data.PlayerSet.Open(new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Sounds\itemsPickedUp.mp3")));
            }

            //TESTING SETTINGS RESET
            //if (Debugger.IsAttached)
            //    Properties.Settings.Default.Reset();

            // initialize stashtabs
            //DataContext = stashTabsModel;

            InitializeColors();
            InitializeHotkeys();
            InitializeTray();
            LoadModeVisibility();
            // add Action to MouseHook
            MouseHook.MouseAction += Coordinates.Event;

            //throw new NullReferenceException();
        }
예제 #3
0
 private void CheckForUpdates_Click(object Sender, EventArgs e)
 {
     NETAutoupdater.CheckForUpdates();
 }