public NPCViewer() { Classifications = new EditorClassifications(); Classifications.Filenames = new string[] { "npc.dat" }; FileExtensions = ""; StaticFileExtensions = ""; ConfigureForm = new Configure(); Window window = new Window(); this.Controls = new Control[window.Controls.Count]; for (int i = 0; i < window.Controls.Count; i++) this.Controls[i] = window.Controls[i]; name_label = (Label)window.Controls.Find("lblName", true)[0]; properties = (PropertyGrid)window.Controls.Find("prop_item", true)[0]; model_viewer = (ModelViewer)window.Controls.Find("modelViewer", true)[0]; properties.PropertyValueChanged += properties_PropertyValueChanged; name_label.Text = "Select an NPC"; ItemToolbox toolbox = new ItemToolbox(); ToolControls = new Control[toolbox.Controls.Count]; for (int i = 0; i < ToolControls.Length; i++) ToolControls[i] = toolbox.Controls[i]; NumericUpDown n_item = (NumericUpDown)toolbox.Controls.Find("nItem", true)[0]; n_item.ValueChanged += delegate(object sender, EventArgs e) { SelectNPC((int)n_item.Value, true); }; checkerboard = new Bitmap(32, 32); Graphics g = Graphics.FromImage(checkerboard); g.Clear(Color.White); g.FillRectangle(Brushes.LightGray, 0, 0, 16, 16); g.FillRectangle(Brushes.LightGray, 16, 16, 16, 16); last_npc = 0; initialized = false; }