Esempio n. 1
0
        void setTabBuyout_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                StashControl stash = getStash(sender);

                var tabName = ApplicationState.Stash[ApplicationState.CurrentLeague].GetTabNameByTabId(stash.TabNumber);

                var pricingInfo = new PricingInfo();

                if (Settings.TabsBuyouts.ContainsKey(tabName))
                {
                    pricingInfo.Update(Settings.TabsBuyouts[tabName]);
                }

                SetTabBuyoutView buyoutView = new SetTabBuyoutView(pricingInfo, tabName);
                buyoutView.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                buyoutView.Update += buyoutView_Update;
                buyoutView.ShowDialog();
            }
            catch (Exception ex)
            {
                Logger.Log("Exception in setTabBuyout_Click: " + ex.ToString());
                MessageBox.Show("Error setting tabwide buyout, error details logged to DebugInfo.log, please open a ticket at https://github.com/Stickymaddness/Procurement/issues", "Error setting tabwide buyout", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Esempio n. 2
0
 public SetBuyoutViewModel()
 {
     buyoutInfo = new PricingInfo();
     offerInfo  = new PricingInfo();
     priceInfo  = new PricingInfo();
     Notes      = string.Empty;
 }
Esempio n. 3
0
 public SetBuyoutViewModel()
 {
     
     buyoutInfo = new PricingInfo();
     offerInfo = new PricingInfo();
     priceInfo = new PricingInfo();
     Notes = string.Empty;
 }
        public SetBuyoutViewModel(Item item)
        {
            this.item = item;

            buyoutInfo = new PricingInfo();
            offerInfo  = new PricingInfo();
            priceInfo  = new PricingInfo();
            Notes      = string.Empty;
        }
        public SetTabBuyoutView(PricingInfo buyoutInfo, string tabName)
        {
            InitializeComponent();

            var vm = new SetTabBuyoutViewModel();

            if (buyoutInfo != null)
                vm.BuyoutInfo = buyoutInfo;

            this.DataContext = vm;
            this.tabName = tabName;
        }
Esempio n. 6
0
        void buyoutView_Update(PricingInfo buyoutInfo, string tabName)
        {
            if (buyoutInfo.Enabled)
            {
                Settings.TabsBuyouts[tabName] = buyoutInfo.GetSaveText();
            }
            else
            {
                Settings.TabsBuyouts.Remove(tabName);
            }

            Settings.SaveTabBuyouts();
        }
Esempio n. 7
0
        void buyoutView_Update(PricingInfo buyoutInfo, string tabName)
        {
            if (buyoutInfo.Enabled)
            {
                Settings.TabsBuyouts[tabName] = buyoutInfo.GetSaveText();
            }
            else
            {
                Settings.TabsBuyouts.Remove(tabName);
            }

            Settings.SaveTabBuyouts();

            ScreenController.Instance.InvalidateTradingScreen();
            ScreenController.Instance.UpdateTrading();
        }
Esempio n. 8
0
        void buyoutView_Update(PricingInfo buyoutInfo, string tabName)
        {
            if (buyoutInfo.Enabled)
                Settings.TabsBuyouts[tabName] = buyoutInfo.GetSaveText();
            else
                Settings.TabsBuyouts.Remove(tabName);

            Settings.SaveTabBuyouts();
        }
Esempio n. 9
0
        void setTabBuyout_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                StashControl stash = getStash(sender);

                var tabName = ApplicationState.Stash[ApplicationState.CurrentLeague].GetTabNameByTabId(stash.TabNumber);

                var pricingInfo = new PricingInfo();

                if (Settings.TabsBuyouts.ContainsKey(tabName))
                    pricingInfo.Update(Settings.TabsBuyouts[tabName]);

                SetTabBuyoutView buyoutView = new SetTabBuyoutView(pricingInfo, tabName);
                buyoutView.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                buyoutView.Update += buyoutView_Update;
                buyoutView.ShowDialog();
            }
            catch (Exception ex)
            {
                Logger.Log("Exception in setTabBuyout_Click: " + ex.ToString());
                MessageBox.Show("Error setting tabwide buyout, error details logged to DebugInfo.log, please open a ticket at https://github.com/Stickymaddness/Procurement/issues", "Error setting tabwide buyout", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
 public SetTabBuyoutViewModel()
 {
     this.buyoutInfo = new PricingInfo();
 }
 public SetTabBuyoutViewModel()
 {
     this.buyoutInfo = new PricingInfo();
 }