protected Image UpdateIcon(SimPe.PackedFiles.Wrapper.ExtSDesc sdsc) { if (sim != null && sdsc != null) { Image img = SimListView.BuildSimPreviewImage(sdsc, GetBackgroundColor(sdsc)); bool hr = sim.HasRelationWith(sdsc); if (hr) { MakeRelationIcon(img); } return(img); } return(null); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SimPoolControl)); SteepValley.Windows.Forms.XPListViewGroup xpListViewGroup1 = new SteepValley.Windows.Forms.XPListViewGroup("Unrelated", 0); SteepValley.Windows.Forms.XPListViewGroup xpListViewGroup2 = new SteepValley.Windows.Forms.XPListViewGroup("Related", 1); this.cbhousehold = new Ambertation.Windows.Forms.FlatComboBox(); this.gp = new SimPe.PackedFiles.Wrapper.SimListView(); this.chHouse = new System.Windows.Forms.ColumnHeader(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); this.SuspendLayout(); // // cbhousehold // resources.ApplyResources(this.cbhousehold, "cbhousehold"); this.cbhousehold.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbhousehold.ForeColor = System.Drawing.SystemColors.ControlText; this.cbhousehold.Name = "cbhousehold"; this.cbhousehold.SelectedIndexChanged += new System.EventHandler(this.cbhousehold_SelectedIndexChanged); // // gp // this.gp.BackColor = System.Drawing.SystemColors.Info; this.gp.BorderStyle = System.Windows.Forms.BorderStyle.None; this.gp.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.chHouse, this.columnHeader2, this.columnHeader3, this.columnHeader4 }); resources.ApplyResources(this.gp, "gp"); this.gp.FullRowSelect = true; xpListViewGroup1.GroupIndex = 0; xpListViewGroup1.GroupText = "Unrelated"; xpListViewGroup2.GroupIndex = 1; xpListViewGroup2.GroupText = "Related"; this.gp.Groups.Add(xpListViewGroup1); this.gp.Groups.Add(xpListViewGroup2); this.gp.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; this.gp.HideSelection = false; this.gp.MultiSelect = false; this.gp.Name = "gp"; this.gp.TileColumns = new int[] { 1 }; this.gp.UseCompatibleStateImageBehavior = false; this.gp.DoubleClick += new System.EventHandler(this.gp_DoubleClick); this.gp.SelectedIndexChanged += new System.EventHandler(this.gp_SelectedIndexChanged); this.gp.MouseDown += new System.Windows.Forms.MouseEventHandler(this.gp_MouseDown); // // chHouse // resources.ApplyResources(this.chHouse, "chHouse"); // // columnHeader1 // resources.ApplyResources(this.columnHeader1, "columnHeader1"); // // columnHeader2 // resources.ApplyResources(this.columnHeader2, "columnHeader2"); // // columnHeader3 // resources.ApplyResources(this.columnHeader3, "columnHeader3"); // // columnHeader4 // resources.ApplyResources(this.columnHeader4, "columnHeader4"); // // SimPoolControl // this.Controls.Add(this.gp); this.Controls.Add(this.cbhousehold); resources.ApplyResources(this, "$this"); this.Name = "SimPoolControl"; this.ResumeLayout(false); }