Ejemplo n.º 1
0
        public MainWindow()
        {
            MethodTreeModel = new RootViewModel();
            InitializeComponent();
            selectClient = new SelectClient();
            selectClient.Source.Loaded += Source_Loaded;
            var empty = new EmptyMethodViewModel();

            ResultBlock.DataContext            = empty;
            HelpBlock.DataContext              = empty;
            paramview.Source                   = MethodTreeModel.GlobalParameters;
            controllersAndCommands.DataContext = MethodTreeModel.Controllers;

            var conn = new IsopClient(new JsonHttpClient(), ConfigurationManager.AppSettings["server_url"]);

            InitFromClient(new JsonClient(conn), _ =>
            {
                var assemblies = new LoadAssemblies().LoadFrom(ExecutionAssembly.Path()).ToArray();
                var build      = new Build();
                foreach (var assembly in assemblies)
                {
                    build.ConfigurationFrom(assembly);
                }
                InitFromClient(new BuildClient(build));
            });
        }
Ejemplo n.º 2
0
 private void SelectedMethodChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
 {
     if (e.NewValue is MethodViewModel)
     {
         MethodTreeModel.CurrentMethod = (MethodViewModel)e.NewValue;
         methodview.DataContext        = e.NewValue;
         methodview.Source             = MethodTreeModel.CurrentMethod.Parameters;
         ResultBlock.DataContext       = MethodTreeModel.CurrentMethod;
         HelpBlock.DataContext         = MethodTreeModel.CurrentMethod;
     }
     else
     {
         var empty = new EmptyMethodViewModel();
         ResultBlock.DataContext = empty;
         HelpBlock.DataContext   = empty;
     }
 }
Ejemplo n.º 3
0
        public MainWindow()
        {
            MethodTreeModel = new RootViewModel();
            InitializeComponent();
            selectClient = new SelectClient();
            selectClient.Source.Loaded += Source_Loaded;
            var empty = new EmptyMethodViewModel();
            ResultBlock.DataContext = empty;
            HelpBlock.DataContext = empty;
            paramview.Source = MethodTreeModel.GlobalParameters;
            controllersAndCommands.DataContext = MethodTreeModel.Controllers;

            var conn = new IsopClient(new JsonHttpClient(), ConfigurationManager.AppSettings["server_url"]);
            InitFromClient(new JsonClient(conn), _ =>
            {
                var assemblies = new LoadAssemblies().LoadFrom(ExecutionAssembly.Path()).ToArray();
                var build = new Build();
                foreach (var assembly in assemblies)
                {
                    build.ConfigurationFrom(assembly);
                }
                InitFromClient(new BuildClient(build));
            });
        }
Ejemplo n.º 4
0
 private void SelectedMethodChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
 {
     if (e.NewValue is MethodViewModel)
     {
         MethodTreeModel.CurrentMethod = (MethodViewModel)e.NewValue;
         methodview.DataContext = e.NewValue;
         methodview.Source = MethodTreeModel.CurrentMethod.Parameters;
         ResultBlock.DataContext = MethodTreeModel.CurrentMethod;
         HelpBlock.DataContext = MethodTreeModel.CurrentMethod;
     }
     else
     {
         var empty = new EmptyMethodViewModel();
         ResultBlock.DataContext = empty;
         HelpBlock.DataContext = empty;
     }
 }