示例#1
0
        public void AddRelation(TextBox textBox, GGVRBaseDataType dataSet)
        {
            TextFieldDataSet tfdsOld = this.DataTypeOfTextEdit(textBox);

            if (tfdsOld != null)
            {
                this.EditFields.Remove(tfdsOld);
                textBox.Leave -= this.CheckIfEdited;
            }

            TextFieldDataSet tfds = new TextFieldDataSet(textBox, dataSet);

            this.EditFields.Add(tfds);

            textBox.Text = dataSet.ToString();
            textBox.Tag  = dataSet;

            textBox.Leave += this.CheckIfEdited;
        }
示例#2
0
        public void SwapWith(GGVRGirl girl2)
        {
            GGVRBaseDataType[] fields1 = this.GetFields();
            GGVRBaseDataType[] fields2 = girl2.GetFields();
            for (int i = 0; i < Math.Min(fields1.Length, fields2.Length); i++)
            {
                GGVRBaseDataType f1 = fields1[i];
                GGVRBaseDataType f2 = fields2[i];
                IComparable      v1 = f1.GetValue();
                f1.AssignValue(f2.GetValue());
                f2.AssignValue(v1);
            }

            fields1 = this.GetFieldsGalData();
            fields2 = girl2.GetFieldsGalData();
            for (int i = 0; i < Math.Min(fields1.Length, fields2.Length); i++)
            {
                GGVRBaseDataType f1 = fields1[i];
                GGVRBaseDataType f2 = fields2[i];
                IComparable      v1 = f1.GetValue();
                f1.AssignValue(f2.GetValue());
                f2.AssignValue(v1);
            }
        }
示例#3
0
 public TextFieldDataSet(TextBox textBox, GGVRBaseDataType dataSet)
 {
     this.TextBox = textBox;
     this.DataSet = dataSet;
 }