Пример #1
0
        /// <summary>
        /// Initializes a new instance of the ItemProperties class.
        /// </summary>
        public ItemProperties(MainForm instance) : base(instance.ServiceProvider)
        {
            this.Owner = instance;

            this.InitializeComponent();

            #region Apply custom font

            this.ButtonOK.Font = FontService.GetFontLight(12F);
            this.labelPrefixProperties.Font   = FontService.GetFontLight(11.25F);
            this.labelBaseItemProperties.Font = FontService.GetFontLight(11.25F);
            this.checkBoxFilterExtraInfo.Font = FontService.GetFontLight(11.25F);
            this.labelSuffixProperties.Font   = FontService.GetFontLight(11.25F);
            this.Font = FontService.GetFont(9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

            #endregion

            this.Text          = Resources.ItemPropertiesText;
            this.ButtonOK.Text = Resources.GlobalOK;
            this.labelPrefixProperties.Text   = Resources.ItemPropertiesLabelPrefixProperties;
            this.labelBaseItemProperties.Text = Resources.ItemPropertiesLabelBaseItemProperties;
            this.labelSuffixProperties.Text   = Resources.ItemPropertiesLabelSuffixProperties;
            this.checkBoxFilterExtraInfo.Text = Resources.ItemPropertiesCheckBoxLabelFilterExtraInfo;

            this.NormalizeBox     = false;
            this.DrawCustomBorder = true;
        }
        /// <summary>
        /// Initializes a new instance of the VaultMaintenanceDialog class.
        /// </summary>
        public VaultMaintenanceDialog(MainForm instance) : base(instance.ServiceProvider)
        {
            this.Owner = instance;

            this.InitializeComponent();

            #region Apply custom font

            this.targetTextBox.Font          = FontService.GetFontLight(11F);
            this.instructionsLabel.Font      = FontService.GetFontLight(11F);
            this.okayButton.Font             = FontService.GetFontLight(12F);
            this.cancelButton.Font           = FontService.GetFontLight(12F);
            this.vaultListComboBox.Font      = FontService.GetFontLight(11F);
            this.newRadioButton.Font         = FontService.GetFontLight(11.25F);
            this.selectFunctionGroupBox.Font = FontService.GetFontLight(11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.renameRadioButton.Font      = FontService.GetFontLight(11.25F);
            this.copyRadioButton.Font        = FontService.GetFontLight(11.25F);
            this.deleteRadioButton.Font      = FontService.GetFontLight(11.25F);
            this.sourceLabel.Font            = FontService.GetFontLight(11F);
            this.targetLabel.Font            = FontService.GetFontLight(11F);
            this.Font = FontService.GetFont(9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

            #endregion

            // Load the localized resources
            this.Text = Resources.MaintenanceText;
            this.copyRadioButton.Text             = Resources.MaintenanceRbCopy;
            this.deleteRadioButton.Text           = Resources.MaintenanceRbDelete;
            this.newRadioButton.Text              = Resources.MaintenanceRbNew;
            this.renameRadioButton.Text           = Resources.MaintenanceRbRename;
            this.selectFunctionGroupBox.Text      = Resources.MaintenanceGroup;
            this.selectFunctionGroupBox.ForeColor = Color.White;
            this.cancelButton.Text      = Resources.GlobalCancel;
            this.okayButton.Text        = Resources.GlobalOK;
            this.instructionsLabel.Text = Resources.MaintenanceInstructions;
            this.sourceLabel.Text       = Resources.MaintenanceSource;
            this.targetLabel.Text       = Resources.MaintenanceTarget;

            // Set options for Right to Left reading.
            if (CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft)
            {
                rightToLeftOptions = MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading;
            }

            this.DrawCustomBorder = true;

            // Load the invalid characters
            this.invalidChars = Path.GetInvalidFileNameChars();

            this.GetVaultList();
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the ResultsDialog class.
        /// </summary>
        public ResultsDialog(MainForm instance) : base(instance.ServiceProvider)
        {
            this.Owner = instance;

            this.InitializeComponent();

            #region Apply custom font

            this.resultsDataGridView.ColumnHeadersDefaultCellStyle.Font = FontService.GetFont(9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.item.DefaultCellStyle.Font          = FontService.GetFont(9F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.quality.DefaultCellStyle.Font       = FontService.GetFont(9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.containerName.DefaultCellStyle.Font = FontService.GetFont(9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.containerType.DefaultCellStyle.Font = FontService.GetFont(9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.level.DefaultCellStyle.Font         = FontService.GetFont(9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Font = FontService.GetFont(9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

            #endregion

            this.resultsList = new List <Result>();

            this.item.HeaderText          = Resources.ResultsItem;
            this.containerName.HeaderText = Resources.ResultsContainer;
            this.containerType.HeaderText = Resources.ResultsContainerType;
            this.quality.HeaderText       = Resources.ResultsQuality;
            this.level.HeaderText         = Resources.ResultsLevel;

            this.NormalizeBox     = false;
            this.DrawCustomBorder = true;

            this.FormDesignRatio = 0.0F;             //// (float)this.Height / (float)this.Width;
            ////this.FormMaximumSize = new Size(this.Width * 2, this.Height * 2);
            ////this.FormMinimumSize = new Size(
            ////Convert.ToInt32((float)this.Width * 0.4F),
            ////Convert.ToInt32((float)this.Height * 0.4F));
            this.OriginalFormSize  = this.Size;
            this.OriginalFormScale = 1.0F;
            this.LastFormSize      = this.Size;
        }
Пример #4
0
        public MainForm(
            IServiceProvider serviceProvider             // TODO Refactor : injecting service factory is anti pattern
            , ILogger <MainForm> log
            , SessionContext sessionContext
            , IPlayerService playerService
            , IVaultService vaultService
            , IStashService stashService
            , IFontService fontService
            ) : base(serviceProvider)
        {
            this.userContext   = sessionContext;
            this.playerService = playerService;
            this.vaultService  = vaultService;
            this.stashService  = stashService;

            Log = log;
            Log.LogInformation("TQVaultAE Initialization !");

            InitForm();

            #region Apply custom font & scaling

            this.exitButton.Font = FontService.GetFontLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.exitButton);
            this.characterComboBox.Font = FontService.GetFontLight(13F, UIService.Scale);
            ScaleControl(this.UIService, this.characterComboBox, false);
            this.characterLabel.Font = FontService.GetFontLight(11F, UIService.Scale);
            ScaleControl(this.UIService, this.characterLabel, false);

            this.itemText.Font = FontService.GetFontLight(11F, FontStyle.Bold, UIService.Scale);

            this.vaultListComboBox.Font = FontService.GetFontLight(13F, UIService.Scale);
            ScaleControl(this.UIService, this.vaultListComboBox, false);
            this.vaultLabel.Font = FontService.GetFontLight(11F, UIService.Scale);
            ScaleControl(this.UIService, this.vaultLabel, false);
            this.configureButton.Font = FontService.GetFontLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.configureButton);
            this.customMapText.Font = FontService.GetFont(11.25F, UIService.Scale);
            ScaleControl(this.UIService, this.customMapText, false);
            this.showVaulButton.Font = FontService.GetFontLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.showVaulButton);
            this.secondaryVaultListComboBox.Font = FontService.GetFontLight(11F, UIService.Scale);
            ScaleControl(this.UIService, this.secondaryVaultListComboBox, false);
            this.aboutButton.Font = FontService.GetFontLight(8.25F, UIService.Scale);
            ScaleControl(this.UIService, this.aboutButton);
            this.titleLabel.Font = FontService.GetFontLight(24F, UIService.Scale);
            ScaleControl(this.UIService, this.titleLabel);
            this.searchButton.Font = FontService.GetFontLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.searchButton);
            ScaleControl(this.UIService, this.tableLayoutPanelMain);

            #endregion

            if (TQDebug.DebugEnabled)
            {
                // Write this version into the debug file.
                Log.LogDebug(
                    $@"Current TQVault Version: {this.currentVersion}
Debug Levels
{nameof(TQDebug.ArcFileDebugLevel)}: {TQDebug.ArcFileDebugLevel}
{nameof(TQDebug.DatabaseDebugLevel)}: {TQDebug.DatabaseDebugLevel}
{nameof(TQDebug.ItemAttributesDebugLevel)}: {TQDebug.ItemAttributesDebugLevel}
{nameof(TQDebug.ItemDebugLevel)}: {TQDebug.ItemDebugLevel}
");
            }

            // Process the mouse scroll wheel to cycle through the vaults.
            this.MouseWheel += new MouseEventHandler(this.MainFormMouseWheel);
        }