コード例 #1
0
 public void ClearForm()
 {
     componentNameEntry.Text = String.Empty;
     exceptionManagerEntry.Text = String.Empty;
     viewTableModel = new ViewTableModel ();
     viewsTreeView.Model = viewTableModel.ListStore;
     methodTableModel = new MethodTableModel ();
     methodsTreeView.Model = methodTableModel.ListStore;
 }
コード例 #2
0
        internal ComponentView()
        {
            componentView = new Glade.XML (null, "MainComponentBuilderForm.glade", "table5", null);
            componentView.Autoconnect (this);

            //

            viewsTreeView.AppendColumn ("View Type Name", new CellRendererText (), "text", 0);

            methodsTreeView.AppendColumn ("Method Name", new CellRendererText (), "text", 0);
            methodsTreeView.AppendColumn ("Return Type", new CellRendererText (), "text", 1);
            methodsTreeView.AppendColumn ("View To Reponse", new CellRendererText (), "text", 2);
            methodsTreeView.AppendColumn ("Response Method", new CellRendererText (), "text", 3);
            methodsTreeView.AppendColumn ("Parameters", new CellRendererText (), "text", 4);

            //Vamos a instanciar también los modelos de las vistas.

            viewTableModel = new ViewTableModel ();
            viewsTreeView.Model = viewTableModel.ListStore;
            methodTableModel = new MethodTableModel ();
            methodsTreeView.Model = methodTableModel.ListStore;
            actionState = ActionState.None;
        }
コード例 #3
0
 private void OnDeleteMethodClicked(object sender, EventArgs args)
 {
     TreeIter iter;
     if (methodsTreeView.Selection.GetSelected (out iter)) {
         string methodName = methodTableModel.ListStore.GetValue (iter, 0).ToString ();
         MethodDTO auxMethodDTO = null;
         foreach (MethodDTO methodDTO in methodTableModel.ListModel) {
             if (methodDTO.MethodName.Equals (methodName)) {
                 auxMethodDTO = methodDTO;
                 break;
             }
         }
         if (auxMethodDTO != null) {
             methodTableModel.ListModel.Remove (auxMethodDTO);
             methodTableModel = new MethodTableModel (methodTableModel.ListModel);
             methodsTreeView.Model = methodTableModel.ListStore;
         }
     }
 }
コード例 #4
0
 /* Interface Implementation */
 public void LoadDataForm(IDataTransferObject dto)
 {
     if (dto is ComponentDTO) {
         ComponentDTO componentDTO = (ComponentDTO) dto;
         this.componentDTO = componentDTO;
         componentNameEntry.Text = componentDTO.ComponentName;
         exceptionManagerEntry.Text = componentDTO.ClassExceptionManager;
         viewTableModel = new ViewTableModel (componentDTO.ViewCollection);
         viewsTreeView.Model = viewTableModel.ListStore;
         methodTableModel = new MethodTableModel (componentDTO.MethodCollection);
         methodsTreeView.Model = methodTableModel.ListStore;
     }
 }