Esempio n. 1
0
 /* Interface Implementation */
 public void ClearForm()
 {
     nameEntry.Text = String.Empty;
     returnTypeEntry.Text = String.Empty;
     responseMethodEntry.Text = String.Empty;
     parameterTableModel = new ParameterTableModel ();
     TreeStore treeStore = new TreeStore (typeof (string));
     viewToResponseCombo.Model = treeStore;
 }
Esempio n. 2
0
        internal MethodView()
        {
            newMethodForm = new Glade.XML (null, "MainComponentBuilderForm.glade", "newMethodDialog", null);
            newMethodForm.Autoconnect (this);

            parametersTreeView.AppendColumn ("Type", new CellRendererText (), "text", 0);
            parametersTreeView.AppendColumn ("Variable Name", new CellRendererText (), "text", 1);
            parameterTableModel = new ParameterTableModel ();
            parametersTreeView.Model = parameterTableModel.ListStore;
        }
Esempio n. 3
0
 private void OnDeleteParameterClicked(object sender, EventArgs args)
 {
     TreeIter iter;
     if (parametersTreeView.Selection.GetSelected (out iter)) {
         string typeName = parameterTableModel.ListStore.GetValue (iter, 0).ToString ();
         string varName = parameterTableModel.ListStore.GetValue (iter, 1).ToString ();
         ParameterDTO auxParameterDTO = null;
         foreach (ParameterDTO parameterDTO in parameterTableModel.ListModel) {
             if (parameterDTO.TypeName.Equals (typeName)) {
                 if (parameterDTO.VarName.Equals (varName)) {
                     auxParameterDTO = parameterDTO;
                     break;
                 }
             }
         }
         if (auxParameterDTO != null) {
             parameterTableModel.ListModel.Remove (auxParameterDTO);
             parameterTableModel = new ParameterTableModel (parameterTableModel.ListModel);
             parametersTreeView.Model = parameterTableModel.ListStore;
         }
     }
 }