public MainWindow() { //初始化应用状态 this.Resources["appServerItem"] = this.appServerItem = new AppServerItem(this); InitializeComponent(); //初始化下拉列表资源 this.phpSelector.DataContext = this.installedPhpList = new ObservableCollection <AppItem>(); this.nginxSelector.DataContext = this.installedNginxList = new ObservableCollection <AppItem>(); }
public override void Write(ByteArray by) { base.Write(by); ushort count = (ushort)list.Count; by.WriteUShort(count); for (int i = 0; i < count; ++i) { AppServerItem obj = list[i]; obj.Write(by); } }
public override void Read(ByteArray by) { base.Read(by); list.Clear(); ushort count = by.ReadUShort(); for (int i = 0; i < count; ++i) { AppServerItem obj = new AppServerItem(); obj.Read(by); list.Add(obj); } }