Exemplo n.º 1
0
 private void bEdit_Click(object sender, EventArgs e)
 {
     if (this.lbKeys.SelectedIndex >= 0)
     {
         MetaValue       value        = this.dictionaryKeys[this.lbKeys.SelectedIndex];
         ManagerInstance formInstance = new ManagerInstance(this.repository, value.Type, value);
         formInstance.Text = value.Type.GetNameWithModule();
         formInstance.ShowDialog();
         this.dictionaryKeys[this.lbKeys.SelectedIndex] = formInstance.Value;
         this.RefreshData();
     }
 }
Exemplo n.º 2
0
 private void bEdit_Click(object sender, EventArgs e)
 {
     if (this.lbKeys.SelectedIndex >= 0)
     {
         MetaValue value = this.dictionaryKeys[this.lbKeys.SelectedIndex];
         ManagerInstance formInstance = new ManagerInstance(this.repository, value.Type, value);
         formInstance.Text = value.Type.GetNameWithModule();
         formInstance.ShowDialog();
         this.dictionaryKeys[this.lbKeys.SelectedIndex] = formInstance.Value;
         this.RefreshData();
     }
 }
Exemplo n.º 3
0
 private void vlButtonManage_Click(object sender, EventArgs e)
 {
     Button button = (Button)sender;
     ManagerInstance formInstance;
     ManagerList formList;
     ManagerDictionary formDictionary;
     MetaInstanceVariable metaInstanceVariable;
     switch (this.value.Type.CategoryType)
     {
         case ECategoryType.Integral:
             // can't happen
             break;
         case ECategoryType.Enum:
             // can't happen (for now)
             break;
         case ECategoryType.Class:
             for (int i = 0; i < this.value.Instance.InstanceVariables.Count; i++)
             {
                 metaInstanceVariable = this.value.Instance.InstanceVariables[i];
                 if (button.Name == metaInstanceVariable.ToString())
                 {
                     MetaValue value = metaInstanceVariable.Value;
                     switch (value.Type.CategoryType)
                     {
                         case ECategoryType.Integral:
                             // can't happen
                             break;
                         case ECategoryType.Class:
                             formInstance = new ManagerInstance(this.repository, value.Type, value, metaInstanceVariable.Variable.Nullable);
                             formInstance.Text = metaInstanceVariable.ToString();
                             formInstance.ShowDialog();
                             metaInstanceVariable.Value = formInstance.Value;
                             break;
                         case ECategoryType.List:
                             formList = new ManagerList(this.repository, value.Type.SubType1, value.List);
                             formList.Text = metaInstanceVariable.ToString();
                             formList.ShowDialog();
                             value.List = formList.ListValues;
                             break;
                         case ECategoryType.Dictionary:
                             formDictionary = new ManagerDictionary(this.repository, value.Type.SubType1, value.Type.SubType2, value.Dictionary);
                             formDictionary.Text = metaInstanceVariable.ToString();
                             formDictionary.ShowDialog();
                             value.Dictionary = formDictionary.DictionaryValues;
                             break;
                     }
                     this.RefreshData();
                     break;
                 }
             }
             break;
         case ECategoryType.List:
             formList = new ManagerList(this.repository, this.value.Type.SubType1, this.value.List);
             formList.Text = this.value.Type.GetNameWithModule();
             formList.ShowDialog();
             this.value.List = formList.ListValues;
             break;
         case ECategoryType.Dictionary:
             formList = new ManagerList(this.repository, this.value.Type.SubType1, this.value.List);
             formList.Text = this.value.Type.GetNameWithModule();
             formList.ShowDialog();
             this.value.List = formList.ListValues;
             break;
     }
 }
Exemplo n.º 4
0
        private void vlButtonManage_Click(object sender, EventArgs e)
        {
            Button               button = (Button)sender;
            ManagerInstance      formInstance;
            ManagerList          formList;
            ManagerDictionary    formDictionary;
            MetaInstanceVariable metaInstanceVariable;

            switch (this.value.Type.CategoryType)
            {
            case ECategoryType.Integral:
                // can't happen
                break;

            case ECategoryType.Enum:
                // can't happen (for now)
                break;

            case ECategoryType.Class:
                for (int i = 0; i < this.value.Instance.InstanceVariables.Count; i++)
                {
                    metaInstanceVariable = this.value.Instance.InstanceVariables[i];
                    if (button.Name == metaInstanceVariable.ToString())
                    {
                        MetaValue value = metaInstanceVariable.Value;
                        switch (value.Type.CategoryType)
                        {
                        case ECategoryType.Integral:
                            // can't happen
                            break;

                        case ECategoryType.Class:
                            formInstance      = new ManagerInstance(this.repository, value.Type, value, metaInstanceVariable.Variable.Nullable);
                            formInstance.Text = metaInstanceVariable.ToString();
                            formInstance.ShowDialog();
                            metaInstanceVariable.Value = formInstance.Value;
                            break;

                        case ECategoryType.List:
                            formList      = new ManagerList(this.repository, value.Type.SubType1, value.List);
                            formList.Text = metaInstanceVariable.ToString();
                            formList.ShowDialog();
                            value.List = formList.ListValues;
                            break;

                        case ECategoryType.Dictionary:
                            formDictionary      = new ManagerDictionary(this.repository, value.Type.SubType1, value.Type.SubType2, value.Dictionary);
                            formDictionary.Text = metaInstanceVariable.ToString();
                            formDictionary.ShowDialog();
                            value.Dictionary = formDictionary.DictionaryValues;
                            break;
                        }
                        this.RefreshData();
                        break;
                    }
                }
                break;

            case ECategoryType.List:
                formList      = new ManagerList(this.repository, this.value.Type.SubType1, this.value.List);
                formList.Text = this.value.Type.GetNameWithModule();
                formList.ShowDialog();
                this.value.List = formList.ListValues;
                break;

            case ECategoryType.Dictionary:
                formList      = new ManagerList(this.repository, this.value.Type.SubType1, this.value.List);
                formList.Text = this.value.Type.GetNameWithModule();
                formList.ShowDialog();
                this.value.List = formList.ListValues;
                break;
            }
        }