Ejemplo n.º 1
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.closeBtn.Text = resources.GetString("Close");
            this.Text          = resources.GetString("LootSplitterResult");
        }
Ejemplo n.º 2
0
        private void ButtonSearch_Click(object sender, EventArgs e)
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            selectedWorld = (comboBoxWorlds.SelectedItem as dynamic).Value.ToString();

            if (String.IsNullOrEmpty(selectedWorld))
            {
                return;
            }

            try
            {
                tableDeath.DataSource        = null;
                ButtonSearch.Text            = resources.GetString("Loading");
                this.tableDeath.EmptyListMsg = resources.GetString("Loading");
                ButtonSearch.Enabled         = false;

                var t = new Thread(GetCharacterDeaths)
                {
                    IsBackground = true
                };
                t.Start();
            }
            catch
            {
                MessageBox.Show(resources.GetString("UnableToConnectInternet"));

                ButtonSearch.Enabled         = true;
                ButtonSearch.Text            = resources.GetString("Search");
                this.tableDeath.EmptyListMsg = resources.GetString("SelectWorldAndStart");
            }
        }
Ejemplo n.º 3
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.continueBtn.Text = resources.GetString("Continue");
            this.Text             = resources.GetString("LootSplitterStepTwo");
        }
Ejemplo n.º 4
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.closeBtn.Text = resources.GetString("Close");
            this.Text          = resources.GetString("PlayerAlert");
        }
Ejemplo n.º 5
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.closeBtn.Text       = resources.GetString("Close");
            this.Text                = resources.GetString("Saved");
            this.savedSuccefull.Text = resources.GetString("SuccefullSavedConfig");
        }
Ejemplo n.º 6
0
        private void InsertCharacterOnTableFinish()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            tablePlayers.DataSource = UpdatePlayerTable();
            buttonAddPlayer.Enabled = true;
            buttonAddPlayer.Text    = resources.GetString("AddPlayer");
        }
Ejemplo n.º 7
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.closeBtn.Text      = resources.GetString("Close");
            this.labelHowToUse.Text = resources.GetString("HowToUseReadMe");
            this.Text = resources.GetString("HowToUse");
        }
Ejemplo n.º 8
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.sourceCodeIn.Text = resources.GetString("AboutSourceCodeIn");
            this.closeBtn.Text     = resources.GetString("Close");
            this.Text = resources.GetString("About");
        }
Ejemplo n.º 9
0
        private DataTable UpdatePlayerTable()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            var table = new DataTable("TablePlayers");

            table.Columns.Add("Player");
            table.Columns.Add("Level");
            table.Columns.Add("World");
            table.Columns.Add("Voc");
            table.Columns.Add("IsOnline");
            table.Columns.Add("LastOnlineDate");
            table.Columns.Add("RemovePlayer");

            // remove undesired players
            if (_charactersToRemove.Any())
            {
                foreach (var characterToRemove in _charactersToRemove)
                {
                    _charactersOnTable.RemoveAll(x => x.Name == characterToRemove.Name);
                    _charactersOnTableOld.RemoveAll(x => x.Name == characterToRemove.Name);
                }

                _charactersToRemove = new List <CharacterDTO>();
            }

            // update table
            foreach (var character in _charactersOnTable)
            {
                if (character.IsOnline)
                {
                    table.Rows.Add(
                        character.Name,
                        character.Level,
                        character.World,
                        character.Vocation.GetVocationName(),
                        resources.GetString("Online"),
                        resources.GetString("Now"),
                        resources.GetString("Remove"));
                }
                else
                {
                    table.Rows.Add(
                        character.Name,
                        character.Level,
                        character.World,
                        character.Vocation.GetVocationName(),
                        resources.GetString("Offline"),
                        character.LastLogin,
                        resources.GetString("Remove"));
                }
            }

            UserSettings.RememberVipList(_charactersOnTable.Select(x => x.Name));

            return(table);
        }
Ejemplo n.º 10
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.language.Text          = resources.GetString("LanguageStr");
            this.saveConfiguration.Text = resources.GetString("Save");
            this.cancelButton.Text      = resources.GetString("Cancel");
            this.Text = resources.GetString("Settings");
        }
Ejemplo n.º 11
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.cancelBtn.Text           = resources.GetString("Cancel");
            this.continueBtn.Text         = resources.GetString("Continue");
            this.labelPlayerQuantity.Text = resources.GetString("InsertPlayerQuantity");
            this.labelInsertLootText.Text = resources.GetString("InsertPlayerLoot");
            this.Text = resources.GetString("LootSplitterStepOne");
        }
Ejemplo n.º 12
0
        private void Finish()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            tableDeath.DataSource        = DataTableDeathCharacters();
            ButtonSearch.Enabled         = true;
            ButtonSearch.Text            = resources.GetString("Search");
            this.tableDeath.EmptyListMsg = resources.GetString("SelectWorldAndStart");
            progressBar.Value            = 100;
        }
Ejemplo n.º 13
0
        private void ManageTableRefresh()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.buttonAddPlayer.Enabled   = false;
            this.buttonAddPlayer.Text      = resources.GetString("Loading");
            this.tablePlayers.EmptyListMsg = resources.GetString("Loading");

            _timerHelper.TimerEvent += (timer, state) => TableRefreshTimer();
            _timerHelper.Start(20000, true);
        }
Ejemplo n.º 14
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.helpToolStripMenuItem.Text     = resources.GetString("Help");
            this.aboutToolStripMenuItem.Text    = resources.GetString("About");
            this.howToUseToolStripMenuItem.Text = resources.GetString("HowToUse");
            this.optionsToolStripMenuItem.Text  = resources.GetString("Options");
            this.labelChooseOption.Text         = resources.GetString("ChooseOneBellowTools");
            this.buttonLootSplitter.Text        = resources.GetString("ButtonLootSplitter");
            this.buttonPlayersDeaths.Text       = resources.GetString("ButtonLastPlayersDeath");
            this.buttonPlayersAlert.Text        = resources.GetString("PlayerAlert");
        }
Ejemplo n.º 15
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.labelHowItWorks.Text       = resources.GetString("HowItWorksLastDeaths");
            this.labelSelectWorld.Text      = resources.GetString("SelectWorld");
            this.tableDeath.EmptyListMsg    = resources.GetString("SelectWorldAndStart");
            this.ButtonSearch.Text          = resources.GetString("Search");
            this.colPlayerName.Text         = resources.GetString("Player");
            this.colPlayerVocation.Text     = resources.GetString("Voc");
            this.colPlayerDeathDate.Text    = resources.GetString("Date");
            this.colPlayerDeathMessage.Text = resources.GetString("Message");
            this.Text = resources.GetString("LastPlayersDeaths");
        }
Ejemplo n.º 16
0
        private void InsertCharacterOnTable()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            lock (stateLock)
            {
                // does not allow add a character on table when refresh list
                while (updateTableThread != null &&
                       updateTableThread.ThreadState != ThreadState.Stopped &&
                       updateTableThread.ThreadState != ThreadState.Unstarted)
                {
                    Thread.Sleep(1000);
                }

                var character = default(CharacterDTO);

                if (_charactersOnTable.All(x => x.Name.ToLower().Trim() != this.textBoxPlayerName.Text.ToLower().Trim()))
                {
                    try
                    {
                        character          = _requestService.GetCharacterInformation(this.textBoxPlayerName.Text);
                        character.IsOnline = _requestService.GetOnlineCharacters(character.World).Any(x => x.Name.ToLower() == character.Name.ToLower());

                        _charactersOnTable.Add(character);
                    }
                    catch (OfflineWorldException)
                    {
                        character.IsOnline = false;

                        _charactersOnTable.Add(character);
                    }
                    catch (InvalidCharacterException)
                    {
                        var message = resources.GetString("InvalidCharacterName");
                        MessageBox.Show(message);
                    }
                    catch (Exception)
                    {
                        var message = resources.GetString("UnableToConnectTibiaWebsite");
                        MessageBox.Show(message);
                    }
                }
            }

            Invoke(new MethodInvoker(InsertCharacterOnTableFinish));
        }
Ejemplo n.º 17
0
        private void LoadTexts()
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.labelHowItWorks.Text       = resources.GetString("HowItWorksLastDeaths");
            this.labelInsertPlayerName.Text = resources.GetString("InsertPlayerName");
            this.tablePlayers.EmptyListMsg  = resources.GetString("EmptyList");
            this.buttonAddPlayer.Text       = resources.GetString("AddPlayer");
            this.colPlayerName.Text         = resources.GetString("Player");
            this.colLevel.Text          = resources.GetString("Level");
            this.colWorld.Text          = resources.GetString("World");
            this.colPlayerVocation.Text = resources.GetString("Voc");
            this.colIsOnline.Text       = resources.GetString("Online");
            this.colLastOnlineDate.Text = resources.GetString("LastLogin");
            this.colRemovePlayer.Text   = resources.GetString("RemovePlayer");
            this.Text = resources.GetString("PlayerAlert");
        }
Ejemplo n.º 18
0
        private void ManageWorlds()
        {
            try
            {
                object[] worlds = _requestService
                                  .GetAllWorlds()
                                  .Select(x => new { Text = x, Value = x })
                                  .ToArray();

                this.comboBoxWorlds.DataSource    = worlds;
                this.comboBoxWorlds.SelectedIndex = 0;
            }
            catch
            {
                var resources = new SingleAssemblyResourceManager(typeof(Language));
                MessageBox.Show(resources.GetString("UnableToConnectInternet"));
            }
        }
Ejemplo n.º 19
0
        private void GetCharacterDeaths()
        {
            var updateCounterDelegate = new MethodInvoker(UpdateCount);

            lock (stateLock)
            {
                numPlayersOnline = 0;
                numPlayerCount   = 0;
            }
            Invoke(updateCounterDelegate);

            lock (stateLock)
            {
                try
                {
                    characters = _requestService.GetOnlineCharacters(selectedWorld).ToList();
                }
                catch (OfflineWorldException)
                {
                    var resources = new SingleAssemblyResourceManager(typeof(Language));
                    MessageBox.Show(resources.GetString("SelectedWorldIsOffline"));

                    Invoke(new MethodInvoker(Finish));
                    return;
                }

                numPlayersOnline = characters.Count;
            }

            // I tested a parallel for. Does not worth.
            for (var i = 0; i < characters.Count; i++)
            {
                lock (stateLock)
                {
                    characters[i] = _requestService.GetCharacterInformation(characters[i].Name);
                    numPlayerCount++;
                }

                Invoke(updateCounterDelegate);
            }

            Invoke(new MethodInvoker(Finish));
        }
Ejemplo n.º 20
0
        private void CreatePlayerDetectedAlert(CharacterDTO character)
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            if (character.IsOnline)
            {
                this.playerDetectedLabel.Text = String.Format(
                    resources.GetString("PlayerDetectedOnline"),
                    character.Name);
            }
            else
            {
                this.playerDetectedLabel.Text = String.Format(
                    resources.GetString("PlayerDetectedOffline"),
                    character.Name);
            }

            this.Show();
            FlashWindow.Flash(this);
        }
Ejemplo n.º 21
0
        private void buttonAddPlayer_Click(object sender, EventArgs e)
        {
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            if (String.IsNullOrEmpty(this.textBoxPlayerName.Text))
            {
                return;
            }

            if (_charactersOnTable.Any(x => x.Name.ToLower() == this.textBoxPlayerName.Text.ToLower()))
            {
                if (_charactersToRemove.Any(x => x.Name.ToLower() == this.textBoxPlayerName.Text.ToLower()))
                {
                    _charactersToRemove.RemoveAll(x => x.Name.ToLower() == this.textBoxPlayerName.Text.ToLower());
                }
                else
                {
                    MessageBox.Show(resources.GetString("CharacterIsAlreadyInTable"));
                    return;
                }
            }

            try
            {
                this.buttonAddPlayer.Enabled = false;
                this.buttonAddPlayer.Text    = resources.GetString("Loading");

                addCharacterThread = new Thread(InsertCharacterOnTable)
                {
                    IsBackground = true
                };
                addCharacterThread.Start();
            }
            catch (InvalidCharacterException)
            {
                MessageBox.Show(resources.GetString("InvalidCharacterName"));

                this.buttonAddPlayer.Enabled = true;
                this.buttonAddPlayer.Text    = resources.GetString("AddPlayer");
            }
        }
Ejemplo n.º 22
0
        private void TableRefreshFinish()
        {
            // update players value on table
            tablePlayers.DataSource = UpdatePlayerTable();

            // alert user if a player online status changed
            foreach (var updatedCharacter in _charactersOnTable)
            {
                if (_charactersOnTableOld.Single(x => x.Name == updatedCharacter.Name).IsOnline != updatedCharacter.IsOnline)
                {
                    var playerDetectedForm = _formOpener.GetModelessForm <PlayerDetected>();
                    playerDetectedForm.InitializeForm(updatedCharacter);
                }
            }

            var resources = new SingleAssemblyResourceManager(typeof(Language));

            this.buttonAddPlayer.Enabled   = true;
            this.buttonAddPlayer.Text      = resources.GetString("AddPlayer");
            this.tablePlayers.EmptyListMsg = resources.GetString("EmptyList");
        }
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent(List <ItemResultDTO> listItems, int players)
        {
            UpdatedItemList = new List <ItemResultDTO>();
            var resources = new SingleAssemblyResourceManager(typeof(Language));

            for (var i = 0; i < listItems.Count; i++)
            {
                var numericBoxItem = new System.Windows.Forms.NumericUpDown();
                var labelItem      = new System.Windows.Forms.Label();
                var itemImage      = new System.Windows.Forms.PictureBox();
                this.SuspendLayout();

                //
                // Item Image
                //
                itemImage.ImageLocation = _pathHelper.GetItemImagePath(listItems[i]);
                itemImage.SizeMode      = PictureBoxSizeMode.AutoSize;
                itemImage.Location      = new System.Drawing.Point(8, (i * 50) + 14);

                //
                // Numeric Up Down Item Value
                //
                numericBoxItem.Minimum  = 0;
                numericBoxItem.Maximum  = int.MaxValue;
                numericBoxItem.Location = new System.Drawing.Point(53, (i * 50) + 30);
                numericBoxItem.Name     = listItems[i].Item.Name.Replace(" ", "");
                numericBoxItem.Size     = new System.Drawing.Size(100, 20);
                numericBoxItem.TabIndex = 0;
                if (listItems[i].Value.HasValue && listItems[i].Value.Value != 0)
                {
                    numericBoxItem.Text = listItems[i].Value.Value.ToString();
                }

                UpdatedItemList.Add(listItems[i]);

                //
                // label Item
                //
                labelItem.AutoSize = true;
                labelItem.Location = new System.Drawing.Point(50, (i * 50) + 14);
                labelItem.Name     = i.ToString() + "in";
                labelItem.Size     = new System.Drawing.Size(30, 13);
                labelItem.TabIndex = 1;
                labelItem.Text     = String.Format(resources.GetString("ValueOfItem"), listItems[i].Item.Name);

                this.Controls.Add(itemImage);
                this.Controls.Add(numericBoxItem);
                this.Controls.Add(labelItem);

                this.ResumeLayout(false);
            }

            UpdatedMemberList = new List <MemberDTO>();
            var countplayers = 0;

            while (players > countplayers)
            {
                var member = new MemberDTO();
                UpdatedMemberList.Add(member);

                var numericBoxItem = new System.Windows.Forms.NumericUpDown();
                var labelPlayer    = new System.Windows.Forms.Label();
                this.SuspendLayout();

                numericBoxItem.Minimum  = 0;
                numericBoxItem.Maximum  = int.MaxValue;
                numericBoxItem.Location = new System.Drawing.Point(303, (countplayers * 50) + 30);
                numericBoxItem.Name     = "member" + countplayers.ToString();
                numericBoxItem.Size     = new System.Drawing.Size(100, 20);
                numericBoxItem.TabIndex = 3;

                labelPlayer.AutoSize = true;
                labelPlayer.Location = new System.Drawing.Point(300, (countplayers * 50) + 14);
                labelPlayer.Name     = countplayers.ToString() + "lp";
                labelPlayer.Size     = new System.Drawing.Size(35, 13);
                labelPlayer.TabIndex = 2;
                labelPlayer.Text     = String.Format(resources.GetString("MoneySpentPlayerNun"), (countplayers + 1).ToString());

                this.Controls.Add(numericBoxItem);
                this.Controls.Add(labelPlayer);

                this.ResumeLayout(false);
                countplayers++;
            }

            continueBtn = new System.Windows.Forms.Button();
            this.SuspendLayout();

            var higherYSize = Math.Max(countplayers + 1, listItems.Count); //+1 button, same column
            var YScreenSize = Math.Min(higherYSize * 50 + 15, 600);

            continueBtn.Location = new System.Drawing.Point(303, (countplayers * 50) + 28);
            continueBtn.Name     = "continueBtn";
            continueBtn.Size     = new System.Drawing.Size(75, 23);
            continueBtn.TabIndex = 0;
            continueBtn.Text     = resources.GetString("Continue");
            continueBtn.UseVisualStyleBackColor = true;
            continueBtn.Click += new System.EventHandler(this.continueBtn_Click);
            this.Controls.Add(continueBtn);

            this.MaximizeBox     = false;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.AutoScroll      = true;
            this.ClientSize      = new System.Drawing.Size(460, YScreenSize);
            this.Name            = "Form2";

            this.ResumeLayout(false);
            this.PerformLayout();
        }
Ejemplo n.º 24
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent(GroupCalculatorResultDTO data)
        {
            var       resources         = new SingleAssemblyResourceManager(typeof(Language));
            const int boxTableSeparator = 50;

            string textHeader,
                   textIndividualProfit,
                   textTotalValueObtained,
                   textTotalWaste;

            switch (data.TotalBalance)
            {
            case Domain.Enums.TotalBalance.Profit:
                textHeader           = String.Format(resources.GetString("TotalProfit"), data.TotalBalanceValue.ToString());
                textIndividualProfit = String.Format(resources.GetString("IndividualProfit"), data.MemberBalanceValue.ToString());
                break;

            case Domain.Enums.TotalBalance.Waste:
                textHeader           = String.Format(resources.GetString("TotalWaste"), data.TotalBalanceValue.ToString());
                textIndividualProfit = String.Format(resources.GetString("IndividualWaste"), data.MemberBalanceValue.ToString());
                break;

            default:
                textHeader           = resources.GetString("HuntPaid");
                textIndividualProfit = string.Empty;
                break;
            }

            textTotalValueObtained = String.Format(resources.GetString("TotalValueObtained"), data.TotalValue);
            textTotalWaste         = String.Format(resources.GetString("TotalValueSpent"), data.TotalWaste);


            var labelItem = new Label();

            this.SuspendLayout();

            labelItem.AutoSize = true;
            labelItem.Location = new Point(9, position + 14);
            position          += 60;
            labelItem.Name     = "Status";
            labelItem.Size     = new Size(30, 13);
            labelItem.TabIndex = 1;
            labelItem.Text     = textHeader +
                                 "\r\n" + textIndividualProfit +
                                 "\r\n" + textTotalValueObtained +
                                 "\r\n" + textTotalWaste;

            this.Controls.Add(labelItem);

            foreach (var member in data.Members)
            {
                var groupBoxPlayer = new GroupBox();
                groupBoxPlayer.SuspendLayout();

                var tableWidth = 0;
                var table      = new DataListView();
                ((System.ComponentModel.ISupportInitialize)(table)).BeginInit();

                var colImage    = new OLVColumn();
                var colName     = new OLVColumn();
                var colQuantity = new OLVColumn();
                var colValue    = new OLVColumn();
                var imgRender   = new ImageRenderer();

                //
                // groupBoxPlayer
                //
                groupBoxPlayer.Anchor =
                    ((AnchorStyles.Top
                      | AnchorStyles.Left)
                     | AnchorStyles.Right);
                groupBoxPlayer.Location = new Point(9, position + 20);
                groupBoxPlayer.Name     = "groupBoxPlayer";
                groupBoxPlayer.TabIndex = 20;
                groupBoxPlayer.TabStop  = false;
                groupBoxPlayer.Text     = String.Format(resources.GetString("ItensToPlayerWasted"), member.Waste.ToString());
                groupBoxPlayer.Controls.Add(table);

                //
                // Table
                //
                table.AllColumns.Add(colImage);
                table.AllColumns.Add(colName);
                table.AllColumns.Add(colQuantity);
                table.AllColumns.Add(colValue);
                table.AllowColumnReorder = true;
                table.AllowDrop          = true;
                table.Anchor             =
                    ((AnchorStyles.Top
                      | AnchorStyles.Left)
                     | AnchorStyles.Right);
                table.CellEditActivation   = ObjectListView.CellEditActivateMode.SingleClick;
                table.CellEditUseWholeCell = false;
                table.Columns.AddRange(new ColumnHeader[]
                {
                    colImage,
                    colName,
                    colQuantity,
                    colValue
                });
                table.Cursor = Cursors.Default;

                table.DataSource   = null;
                table.EmptyListMsg = resources.GetString("EmptyPlayerItemList");
                // todo: search for a better font lol
                table.EmptyListMsgFont                 = new Font("Comic Sans MS", 14.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
                table.FullRowSelect                    = true;
                table.GridLines                        = true;
                table.GroupWithItemCountFormat         = resources.GetString("XItems");
                table.GroupWithItemCountSingularFormat = resources.GetString("OneItem");
                table.HideSelection                    = false;
                table.SelectedBackColor                = Color.CornflowerBlue;
                table.SelectedForeColor                = Color.MidnightBlue;
                table.Location  = new Point(24, position + boxTableSeparator);
                table.Name      = "olvData" + position;
                table.RowHeight = 32;
                table.SelectColumnsOnRightClickBehaviour = ObjectListView.ColumnSelectBehaviour.Submenu;
                table.ShowCommandMenuOnRightClick        = true;
                table.ShowGroups                      = false;
                table.ShowImagesOnSubItems            = true;
                table.ShowItemToolTips                = true;
                table.TabIndex                        = 0;
                table.UseCellFormatEvents             = true;
                table.UseCompatibleStateImageBehavior = false;
                table.UseFilterIndicator              = true;
                table.UseFiltering                    = true;
                table.UseHotItem                      = true;
                table.UseTranslucentHotItem           = true;
                table.View = View.Details;
                //
                // colImage
                //
                colImage.AspectName               = "colImage";
                colImage.ButtonPadding            = new Size(10, 10);
                colImage.IsTileViewColumn         = true;
                colImage.Text                     = String.Empty;
                colImage.UseInitialLetterForGroup = true;
                colImage.Width                    = 32;
                colImage.WordWrap                 = false;
                colImage.IsEditable               = false;
                colImage.Searchable               = false;
                colImage.Sortable                 = false;
                colImage.UseFiltering             = false;
                colImage.Groupable                = false;
                colImage.Renderer                 = imgRender;
                tableWidth += 32;
                //
                // colName
                //
                colName.AspectName       = "colName";
                colName.ButtonPadding    = new Size(10, 10);
                colName.IsTileViewColumn = true;
                colName.Text             = resources.GetString("Name");
                colName.Width            = 230;
                colName.IsEditable       = false;
                tableWidth += 230;
                //
                // colQuantity
                //
                colQuantity.AspectName       = "colQuantity";
                colQuantity.ButtonPadding    = new Size(10, 10);
                colQuantity.IsTileViewColumn = true;
                colQuantity.Text             = resources.GetString("Quantity");
                colQuantity.Width            = 70;
                colQuantity.IsEditable       = false;
                tableWidth += 70;
                //
                // colValue
                //
                colValue.AspectName       = "colValue";
                colValue.ButtonPadding    = new Size(10, 10);
                colValue.IsTileViewColumn = true;
                colValue.Text             = resources.GetString("Value");
                colValue.Width            = 80;
                colValue.IsEditable       = false;
                tableWidth += 80;
                //
                // Fill member table
                //
                var memberDataTable = DataTableByMember(member);
                // unsplitted items
                if (data.ItemsUnsplited != null && data.ItemsUnsplited.Any() && member.MoneyRecived - member.Items.Select(y => y.Value * y.Quantity).Sum() > 0)
                {
                    var value = member.MoneyRecived - member.Items.Select(y => y.Value * y.Quantity).Sum();

                    memberDataTable.Rows.Add(
                        _pathHelper.DefaultImgPath,
                        resources.GetString("AditionalValueByUnsplitedItems"),
                        1,
                        value);
                }
                // if the waste is so large that a member needs to pay to another
                else if (data.Members.Any(x => x.MoneyRecived < 0))
                {
                    if (member.MoneyRecived < 0)
                    {
                        memberDataTable.Rows.Add(
                            _pathHelper.DefaultImgPath,
                            resources.GetString("ValueMemberNeedToPayToAnother"),
                            1,
                            member.MoneyRecived);
                    }
                    else if (member.MoneyRecived - member.Items.Select(y => y.Value * y.Quantity).Sum() > 0)
                    {
                        var value = member.MoneyRecived - member.Items.Select(y => y.Value * y.Quantity).Sum();

                        memberDataTable.Rows.Add(
                            _pathHelper.DefaultImgPath,
                            resources.GetString("ValueMemberNeedToReciveAnother"),
                            1,
                            value);
                    }
                }


                table.DataSource = memberDataTable;
                //
                // Finally
                //
                var tableHeight = memberDataTable.Rows.Count > 0
                    ? ((memberDataTable.Rows.Count + 1) * 32) + 10
                    : 64 + 10;
                var groupBoxheight = tableHeight + 50;
                position += groupBoxheight + 10;

                groupBoxPlayer.Size = new Size(400 + boxTableSeparator, groupBoxheight);
                table.Size          = new Size(tableWidth + 10, tableHeight);
                this.Controls.Add(groupBoxPlayer);
                this.Controls.Add(table);
                groupBoxPlayer.ResumeLayout(false);
                groupBoxPlayer.PerformLayout();
                groupBoxPlayer.SendToBack();
                ((System.ComponentModel.ISupportInitialize)(table)).EndInit();
            }
            //
            // Unsplited Items
            //
            if (data.ItemsUnsplited != null && data.ItemsUnsplited.Any())
            {
                var groupBoxPlayer = new GroupBox();
                groupBoxPlayer.SuspendLayout();

                var tableWidth = 0;
                var table      = new DataListView();
                ((System.ComponentModel.ISupportInitialize)(table)).BeginInit();

                var colImage    = new OLVColumn();
                var colName     = new OLVColumn();
                var colQuantity = new OLVColumn();
                var colValue    = new OLVColumn();
                var imgRender   = new ImageRenderer();

                //
                // groupBoxPlayer
                //
                groupBoxPlayer.Anchor =
                    ((AnchorStyles.Top
                      | AnchorStyles.Left)
                     | AnchorStyles.Right);
                groupBoxPlayer.Location = new Point(9, position + 20);
                groupBoxPlayer.Name     = "groupBoxPlayer";
                groupBoxPlayer.TabIndex = 20;
                groupBoxPlayer.TabStop  = false;
                groupBoxPlayer.Text     = resources.GetString("ItemsUnsplited");
                groupBoxPlayer.Controls.Add(table);

                //
                // Table
                //
                table.AllColumns.Add(colImage);
                table.AllColumns.Add(colName);
                table.AllColumns.Add(colQuantity);
                table.AllColumns.Add(colValue);
                table.AllowColumnReorder = true;
                table.AllowDrop          = true;
                table.Anchor             =
                    ((AnchorStyles.Top
                      | AnchorStyles.Left)
                     | AnchorStyles.Right);
                table.CellEditActivation   = ObjectListView.CellEditActivateMode.SingleClick;
                table.CellEditUseWholeCell = false;
                table.Columns.AddRange(new ColumnHeader[]
                {
                    colImage,
                    colName,
                    colQuantity,
                    colValue
                });
                table.Cursor = Cursors.Default;

                table.DataSource   = null;
                table.EmptyListMsg = resources.GetString("EmptyPlayerItemList");
                // todo: search for a better font lol
                table.EmptyListMsgFont                 = new Font("Comic Sans MS", 14.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
                table.FullRowSelect                    = true;
                table.GridLines                        = true;
                table.GroupWithItemCountFormat         = resources.GetString("XItems");
                table.GroupWithItemCountSingularFormat = resources.GetString("OneItem");
                table.HideSelection                    = false;
                table.SelectedBackColor                = Color.CornflowerBlue;
                table.SelectedForeColor                = Color.MidnightBlue;
                table.Location  = new Point(24, position + boxTableSeparator);
                table.Name      = "olvData" + position;
                table.RowHeight = 32;
                table.SelectColumnsOnRightClickBehaviour = ObjectListView.ColumnSelectBehaviour.Submenu;
                table.ShowCommandMenuOnRightClick        = true;
                table.ShowGroups                      = false;
                table.ShowImagesOnSubItems            = true;
                table.ShowItemToolTips                = true;
                table.TabIndex                        = 0;
                table.UseCellFormatEvents             = true;
                table.UseCompatibleStateImageBehavior = false;
                table.UseFilterIndicator              = true;
                table.UseFiltering                    = true;
                table.UseHotItem                      = true;
                table.UseTranslucentHotItem           = true;
                table.View = View.Details;
                //
                // colImage
                //
                colImage.AspectName               = "colImage";
                colImage.ButtonPadding            = new Size(10, 10);
                colImage.IsTileViewColumn         = true;
                colImage.Text                     = String.Empty;
                colImage.UseInitialLetterForGroup = true;
                colImage.Width                    = 32;
                colImage.WordWrap                 = false;
                colImage.IsEditable               = false;
                colImage.Searchable               = false;
                colImage.Sortable                 = false;
                colImage.UseFiltering             = false;
                colImage.Groupable                = false;
                colImage.Renderer                 = imgRender;
                tableWidth += 32;
                //
                // colName
                //
                colName.AspectName       = "colName";
                colName.ButtonPadding    = new Size(10, 10);
                colName.IsTileViewColumn = true;
                colName.Text             = resources.GetString("Name");
                colName.Width            = 230;
                colName.IsEditable       = false;
                tableWidth += 230;
                //
                // colQuantity
                //
                colQuantity.AspectName       = "colQuantity";
                colQuantity.ButtonPadding    = new Size(10, 10);
                colQuantity.IsTileViewColumn = true;
                colQuantity.Text             = resources.GetString("Quantity");
                colQuantity.Width            = 70;
                colQuantity.IsEditable       = false;
                tableWidth += 70;
                //
                // colValue
                //
                colValue.AspectName       = "colValue";
                colValue.ButtonPadding    = new Size(10, 10);
                colValue.IsTileViewColumn = true;
                colValue.Text             = resources.GetString("Value");
                colValue.Width            = 80;
                colValue.IsEditable       = false;
                tableWidth += 80;
                //
                // Fill member table
                //
                var memberDataTable = DataTableByUnsplitted(data.ItemsUnsplited);
                table.DataSource = memberDataTable;
                //
                // Finally
                //
                var tableHeight = memberDataTable.Rows.Count > 0
                    ? ((memberDataTable.Rows.Count + 1) * 32) + 10
                    : 64 + 10;
                var groupBoxheight = tableHeight + 50;
                position += groupBoxheight + 10;

                groupBoxPlayer.Size = new Size(400 + boxTableSeparator, groupBoxheight);
                table.Size          = new Size(tableWidth + 10, tableHeight);
                this.Controls.Add(groupBoxPlayer);
                this.Controls.Add(table);
                groupBoxPlayer.ResumeLayout(false);
                groupBoxPlayer.PerformLayout();
                groupBoxPlayer.SendToBack();
                ((System.ComponentModel.ISupportInitialize)(table)).EndInit();
            }
            //
            // Close Btn
            //
            this.closeBtn          = new Button();
            this.closeBtn.Anchor   = (AnchorStyles.Top | AnchorStyles.Right);
            this.closeBtn.Location = new Point(385, 30);
            this.closeBtn.Name     = "closeBtn";
            this.closeBtn.Size     = new Size(75, 23);
            this.closeBtn.TabIndex = 1;
            this.closeBtn.Text     = "Close";
            this.closeBtn.UseVisualStyleBackColor = true;
            this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
            //
            // Window
            //
            var YScreenSize = Math.Min(position + 10, 600);

            this.components    = new System.ComponentModel.Container();
            this.AutoScaleMode = AutoScaleMode.Font;
            this.Text          = resources.GetString("LootSplitterResult");
            this.Controls.Add(closeBtn);
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScroll          = true;
            this.ClientSize          = new System.Drawing.Size(470, YScreenSize);
            this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            this.Name = "LootSplitterResult";

            this.ResumeLayout(false);
            this.PerformLayout();
        }