Пример #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);
            }
        }
Пример #2
0
 public SetBuyoutViewModel()
 {
     buyoutInfo = new PricingInfo();
     offerInfo  = new PricingInfo();
     priceInfo  = new PricingInfo();
     Notes      = string.Empty;
 }
Пример #3
0
 public SetBuyoutViewModel()
 {
     
     buyoutInfo = new PricingInfo();
     offerInfo = new PricingInfo();
     priceInfo = new PricingInfo();
     Notes = string.Empty;
 }
Пример #4
0
        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;
        }
Пример #6
0
        void buyoutView_Update(PricingInfo buyoutInfo, string tabName)
        {
            if (buyoutInfo.Enabled)
            {
                Settings.TabsBuyouts[tabName] = buyoutInfo.GetSaveText();
            }
            else
            {
                Settings.TabsBuyouts.Remove(tabName);
            }

            Settings.SaveTabBuyouts();
        }
Пример #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();
        }
Пример #8
0
        void buyoutView_Update(PricingInfo buyoutInfo, string tabName)
        {
            if (buyoutInfo.Enabled)
                Settings.TabsBuyouts[tabName] = buyoutInfo.GetSaveText();
            else
                Settings.TabsBuyouts.Remove(tabName);

            Settings.SaveTabBuyouts();
        }
Пример #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();
 }
Пример #11
0
 public SetTabBuyoutViewModel()
 {
     this.buyoutInfo = new PricingInfo();
 }