Exemple #1
0
        public FrmEditWeapon(GundamFile gundanFile, GundamInfo gundamInfo)
        {
            InitializeComponent();
            tslblFile.Text = gundanFile.FileName;

            this.gundamFile = gundanFile;
            this.gundamInfo = gundamInfo;
        }
Exemple #2
0
        public void bindAll()
        {
            this.gundamFile = new GundamFile();
            tslblFile.Text  = gundamFile.FileName;

            head = ZipHelper.ZipDeCompressToDic(GGCRStaticConfig.PATH + "\\images\\schips.txd");

            cboE1.DataSource    = GGCRUtil.ListGundamEarth();
            cboE1.DisplayMember = "Value";
            cboE1.ValueMember   = "Key";
            cboE2.DataSource    = GGCRUtil.ListGundamEarth();
            cboE2.DisplayMember = "Value";
            cboE2.ValueMember   = "Key";
            cboE3.DataSource    = GGCRUtil.ListGundamEarth();
            cboE3.DisplayMember = "Value";
            cboE3.ValueMember   = "Key";
            cboE4.DataSource    = GGCRUtil.ListGundamEarth();
            cboE4.DisplayMember = "Value";
            cboE4.ValueMember   = "Key";
            cboE5.DataSource    = GGCRUtil.ListGundamEarth();
            cboE5.DisplayMember = "Value";
            cboE5.ValueMember   = "Key";

            cboSize.DataSource    = GGCRUtil.ListGundamSize();
            cboSize.DisplayMember = "Value";
            cboSize.ValueMember   = "Key";

            cboEarthSize.DataSource    = GGCRUtil.ListEarthSize();
            cboEarthSize.DisplayMember = "Value";
            cboEarthSize.ValueMember   = "Key";

            cboSkill1.DataSource = GGCRUtil.ListGundamAbility();
            cboSkill2.DataSource = GGCRUtil.ListGundamAbility();
            cboSkill3.DataSource = GGCRUtil.ListGundamAbility();
            cboSkill4.DataSource = GGCRUtil.ListGundamAbility();
            cboSkill5.DataSource = GGCRUtil.ListGundamAbility();

            cboSkill1.DisplayMember = "Value";
            cboSkill2.DisplayMember = "Value";
            cboSkill3.DisplayMember = "Value";
            cboSkill4.DisplayMember = "Value";
            cboSkill5.DisplayMember = "Value";

            cboSkill1.ValueMember = "Key";
            cboSkill2.ValueMember = "Key";
            cboSkill3.ValueMember = "Key";
            cboSkill4.ValueMember = "Key";
            cboSkill5.ValueMember = "Key";
        }
Exemple #3
0
        private void loadData()
        {
            this.gundamFile = new GundamFile();
            stFile.Text     = this.gundamFile.FileName;


            List <MachineConvertInfo> allConverts = gundamFile.ListConvert();

            this.actions = GGCRUtil.ListConvertAction();

            foreach (MachineConvertInfo c in allConverts)
            {
                bool find = false;
                foreach (KeyValuePair <string, string> kv in actions)
                {
                    if (kv.Key == c.Action.ToString())
                    {
                        find = true;
                        break;
                    }
                }
                if (!find)
                {
                    GGCRUtil.AddConvertAction(c.Action, "未知" + c.Action);
                    this.actions = GGCRUtil.ListConvertAction();
                }
            }
            cboAction.DataSource    = actions;
            cboAction.DisplayMember = "Value";
            cboAction.ValueMember   = "Key";

            this.gundams = gundamFile.ListMachines();

            foreach (GundamInfo g in gundams)
            {
                if (g.UUID == this.fromUuid)
                {
                    this.gundam = g;
                    break;
                }
            }

            fromSource.DataSource = this.gundams;

            toSource.DataSource = this.gundams;

            cboTo.DataSource    = toSource.DataSource;
            cboTo.ValueMember   = "UUID";
            cboTo.DisplayMember = "UnitName";

            cboFrom.DataSource    = fromSource;
            cboFrom.ValueMember   = "UUID";
            cboFrom.DisplayMember = "UnitName";


            if (this.gundam != null)
            {
                this.converts = new List <MachineConvertInfo>();

                foreach (MachineConvertInfo c in allConverts)
                {
                    if (c.From == gundam.UUID || c.To == gundam.UUID)
                    {
                        this.converts.Add(c);
                    }
                }
            }
            else
            {
                this.converts = allConverts;
            }

            lsMain.DataSource = this.converts;
        }