I've been able to get a jsonarray from a json string, but don't know how to put it in a Hashmap with a String that shows the type of cargo and an Integer showing the amount.
The string:
"cargo":[
{"type":"Coals","amount":75309},
{"type":"Chemicals","amount":54454},
{"type":"Food","amount":31659},
{"type":"Oil","amount":18378}
]
Run Code Online (Sandbox Code Playgroud) 我为我的mdi孩子制作了一个自定义边框.Mdi子表单属性:
首先,当我将Windowstate的属性设置为Normal时,我的mdi孩子将不会显示,我猜它的大小为0;然后是0.我尝试在Form_Load方法中设置大小,但仍然没有改变.当我将FormBorderStyle更改为FixedSingle时,我可以看到非常小的形式,只需要足够的空间来双击标题栏.然后表格真的最大化了.
我只是不明白,这一切都让人很困惑.并且由于windowstate最大化,我无法使用函数在屏幕上拖动表单,因为它认为它已经最大化了....

我一直在学习Angular 2的教程,一切顺利,直到我不得不将appcomponent拆分为heroescomponent和appcomponent.
这里的任何人有同样的问题或者可以看到问题吗?
app.component.ts
import { Component } from 'angular2/core';
import { HeroService } from './hero.service';
import { HeroesComponent } from './heroes.component';
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from 'angular2/router';
import {DashboardComponent} from './dashboard.component';
import {HeroDetailComponent} from "./hero-detail.component";
@Component({
selector: 'my-app',
template: `
<h1>{{title}}</h1>
<nav
<a [routerLink]="['Dashboard']">Dashboard</a>
<a [routerLink]="['Heroes']">Heroes</a>
</nav>
<router-outlet></router-outlet>
`,
styleUrls: ['app/app.component.css'],
directives: [ROUTER_DIRECTIVES],
providers: [
ROUTER_PROVIDERS,
HeroService
]
})
@RouteConfig([
{
path: '/heroes',
name: 'Heroes',
component: HeroesComponent
},
{
path: '/dashboard',
name: 'Dashboard',
component: DashboardComponent,
useAsDefault: true
},
{ …Run Code Online (Sandbox Code Playgroud)