Example #1
0
        /// <summary>
        ///
        /// </summary>
        public FrmMainView()
        {
            InitializeComponent();
            this.cards = new CardCollector();
            this.userSuggestedSolution = new Dictionary <ABUCardBase, Solution>();

            this.Shown += new System.EventHandler(this.FrmMainView_Shown);
            this.lsvCards.ItemSelectionChanged += lstCards_ItemSelectionChanged;
            this.btnNext.Click     += btnNext_Click;
            this.btnSolution.Click += btnSolution_Click;
            this.btnCheck.Click    += btnCheck_Click;

            this.manager = MaterialSkinManager.Instance;
            this.manager.AddFormToManage(this);
            this.manager.Theme       = MaterialSkinManager.Themes.LIGHT;
            this.manager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo700, Primary.Indigo100, Accent.Pink200, TextShade.WHITE);
        }
        public MainWindow(DustUtilityPlugin plugin, Account account, bool offlineMode)
            : this()
        {
            m_plugin = plugin;

            m_account = account;

            m_cardCollector = new CardCollector(this, m_account, offlineMode);

            if (Settings.SearchParameters == null)
            {
                m_parameters = new Parameters(true);
            }
            else
            {
                m_parameters = Settings.SearchParameters.DeepClone();
            }

            if (!m_account.IsEmpty)
            {
                Title = $"{Title} [{m_account.BattleTag.Name} ({m_account.Region})]";
            }
            else
            {
            }

            if (offlineMode)
            {
                Title = $"{Title} [OFFLINE MODE]";

                switchAccountButton.IsEnabled = m_plugin.HasMultipleAccounts;
            }
            else
            {
            }

            //if (Settings.OfflineMode)
            //{
            //    historyButton.Visibility = System.Windows.Visibility.Visible;
            //}
            //else { }

            Log.WriteLine($"Account={m_account.AccountString}", LogType.Debug);
            Log.WriteLine($"OfflineMode={offlineMode}", LogType.Debug);
        }