Exemple #1
0
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        // Property
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        // Constructor Method
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// コンストラクタメソッド
        /// </summary>
        /// <param name="DataTable">Armor Data Table</param>
        /// <param name="ElementDataTable">Element Data Table</param>
        public FormArmor(__table_armorDataTable DataTable, __table_elementDataTable ElementDataTable)
        {
            InitializeComponent();

            // 割り当て。編集がリアルタイムに適応されるようになる
            ArmorDataTable = DataTable;

            // コンボボックスの設定
            element1DataGridViewComboBoxColumn.DataSource    = ElementDataTable.Copy();
            element1DataGridViewComboBoxColumn.ValueMember   = "ElementID";
            element1DataGridViewComboBoxColumn.DisplayMember = "ElementName";

            element2DataGridViewComboBoxColumn.DataSource    = ElementDataTable.Copy();
            element2DataGridViewComboBoxColumn.ValueMember   = "ElementID";
            element2DataGridViewComboBoxColumn.DisplayMember = "ElementName";
        }        // End Method
Exemple #2
0
        }        // End Method

        #endregion

        //----------------------------------------------------------------------------------------------------
        #region Armor
        /// <summary>
        /// DataTableの設定をします。外部から引数を利用することでコントロール側に持ってこれることが判明。
        /// </summary>
        /// <param name="TableUnitDataTable">Unit Data Table</param>
        /// <param name="TableArmorDataTable">Armor Data Table</param>
        public void SetDataBindings(__table_unitDataTable TableUnitDataTable, __table_armorDataTable TableArmorDataTable)
        {
            // コンボボックスの設定
            comboDropTable.DataSource    = TableArmorDataTable.Copy();
            comboDropTable.DisplayMember = "ArmorName";
            comboDropTable.ValueMember   = "ArmorID";

            // データバインドの設定

            comboDropTable.DataBindings.Add(new Binding("SelectedValue", TableUnitDataTable, "Item5", true));
            numericDropRate.DataBindings.Add(new Binding("Value", TableUnitDataTable, "Per5", true));

            //----------------------------------------------------------------------------------------------------
            // デザイナーの設定

            Anchor = (AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left);
        }        // End Method
        }        // End Method

        /// <summary>
        /// バインド項目を再読み込みします。
        /// </summary>
        /// <param name="TableWeaponDataTable">Weapon Data Table</param>
        /// <param name="TableShieldDataTable">Shield Data Table</param>
        /// <param name="TableHelmetDataTable">Helmet Data Table</param>
        /// <param name="TableGauntletDataTable">Gauntlet Data Table</param>
        /// <param name="TableArmorDataTable">Armor Data Table</param>
        /// <param name="TableAccessoryDataTable">Accessory Data Table</param>
        public void ReloadDataTable(__table_weaponDataTable TableWeaponDataTable, __table_shieldDataTable TableShieldDataTable, __table_helmetDataTable TableHelmetDataTable, __table_gauntletDataTable TableGauntletDataTable, __table_armorDataTable TableArmorDataTable, __table_accessoryDataTable TableAccessoryDataTable)
        {
            dropInfoParts1.ReloadBindings(TableWeaponDataTable);
            dropInfoParts2.ReloadBindings(TableShieldDataTable);
            dropInfoParts3.ReloadBindings(TableHelmetDataTable);
            dropInfoParts4.ReloadBindings(TableGauntletDataTable);
            dropInfoParts5.ReloadBindings(TableArmorDataTable);
            dropInfoParts6.ReloadBindings(TableAccessoryDataTable);
        }        // End Method
        }        // End Method

        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        // Pubilc Method
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// DataTableの設定をします。外部から引数を利用することでコントロール側に持ってこれることが判明。
        /// </summary>
        /// <param name="TableUnitDataTable">Unit Data Table</param>
        /// <param name="TableWeaponDataTable">Weapon Data Table</param>
        /// <param name="TableShieldDataTable">Shield Data Table</param>
        /// <param name="TableHelmetDataTable">Helmet Data Table</param>
        /// <param name="TableGauntletDataTable">Gauntlet Data Table</param>
        /// <param name="TableArmorDataTable">Armor Data Table</param>
        /// <param name="TableAccessoryDataTable">Accessory Data Table</param>
        public void SetDataBindings(__table_unitDataTable TableUnitDataTable, __table_weaponDataTable TableWeaponDataTable, __table_shieldDataTable TableShieldDataTable, __table_helmetDataTable TableHelmetDataTable, __table_gauntletDataTable TableGauntletDataTable, __table_armorDataTable TableArmorDataTable, __table_accessoryDataTable TableAccessoryDataTable)
        {
            // データバインドの設定
            // オーバーロードを利用して大体コピペで済むように
            dropInfoParts1.SetDataBindings(TableUnitDataTable, TableWeaponDataTable);
            dropInfoParts2.SetDataBindings(TableUnitDataTable, TableShieldDataTable);
            dropInfoParts3.SetDataBindings(TableUnitDataTable, TableHelmetDataTable);
            dropInfoParts4.SetDataBindings(TableUnitDataTable, TableGauntletDataTable);
            dropInfoParts5.SetDataBindings(TableUnitDataTable, TableArmorDataTable);
            dropInfoParts6.SetDataBindings(TableUnitDataTable, TableAccessoryDataTable);

            //----------------------------------------------------------------------------------------------------
            // デザイナーの設定

            Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left);
        }        // End Method