private void Form1_Load(object sender, EventArgs e) { const string slow = "ヽ( ´。㉨°)ノ Ƹ̴Ӂ̴Ʒ~ ღ ( ヽ( ´。㉨°)ノ ༼ つ´º㉨º ༽つ ) (」゚ペ)」ヽ( ´。㉨°)ノ Ƹ̴Ӂ̴Ʒ~ ღ ( ヽ( ´。㉨°)ノ ༼ つ´º㉨º ༽つ ) (」゚ペ)」"; ListView lv = new BufferedListView(); // new ListView(); //new ListViewWithLessSuck(); lv.Dock = DockStyle.Fill; lv.View = View.Details; for (int i = 0; i < 2; i++) lv.Columns.Add("Title " + i, 500); for (int i = 0; i < 10; i++) { var lvi = lv.Items.Add(slow); lvi.SubItems.Add(slow); } Controls.Add(lv); //SendMessage(lv.Handle, LVM_SETTEXTBKCOLOR, IntPtr.Zero, unchecked((IntPtr)(int)0xFFFFFF)); }
void InitializeComponents() { SuspendLayout(); // // appContainer // appContainer = new Panel { Dock = DockStyle.Fill, BorderStyle = BorderStyle.None, Visible = false, }; appContainer.SuspendLayout(); // // statusBar // statusBar = new StatusStrip() { Dock = DockStyle.Bottom, Size = new Size(400, 32), SizingGrip = true, Stretch = true, AutoSize = false }; statusBar.Items.Add(statusLabel = new ToolStripStatusLabel() { Spring = true, Text = "Ready", TextAlign = ContentAlignment.MiddleLeft }); // // toolStrip // toolStrip = new BlackToolStrip(); var mainMenuButton = toolStrip.AddMenuItem(Program.BarsImage); mainMenuButton.DropDownOpening += (sender, args) => { mainMenuButton.DropDownItems.Clear(); mainMenuButton.DropDownItems.AddRange(MainMenu()); }; toolStrip.Items.Add(gameStatusLabel = new ToolStripLabel() { AutoSize = false, Height = toolStrip.Height, Width = 382 /* 314 */, TextAlign = ContentAlignment.MiddleLeft, BackColor = Color.White }); //toolStrip.AddMenuItem(Program.BarsImage); toolStrip.Items.Add(new ToolStripSeparator()); toolStrip.NextAlignment = ToolStripItemAlignment.Right; progressBar = toolStrip.AddProgressBar(); discardButton = toolStrip.AddButton(Program.TrashImage, "Discard", DiscardChanges); applyButton = toolStrip.AddButton(Program.SaveImage, "Apply", ApplyChanges); changesLabel = toolStrip.AddLabel(); progressBar.Visible = false; // // splitContainer // splitContainer = new SplitContainer { BackColor = SystemColors.Control, Dock = DockStyle.Fill, Location = new Point(0, 0), Name = "splitContainer", FixedPanel = FixedPanel.Panel1, Size = new Size(1422, 1006), SplitterDistance = 450, TabIndex = 0, }; splitContainer.BeginInit(); splitContainer.Panel1.SuspendLayout(); splitContainer.Panel2.SuspendLayout(); splitContainer.SuspendLayout(); splitContainer.Panel1.DockPadding.All = 9; // // folderTreeView // folderTreeView = new BufferedTreeView { BackColor = SystemColors.Control, BorderStyle = BorderStyle.None, Dock = DockStyle.Fill, Font = new Font("Tahoma", 9.0F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))), Name = "folderTreeView", Size = new Size(474, 1006), TabIndex = 0, ItemHeight = 40, FullRowSelect = true, HideSelection = false, DrawMode = TreeViewDrawMode.OwnerDrawText, ImageList = new ImageList { ImageSize = new Size(32, 20), ColorDepth = ColorDepth.Depth32Bit } }; folderTreeView.ImageList.Images.Add(Program.FolderIconSmall); folderTreeView.AfterSelect += FolderTreeView_AfterSelect; folderTreeView.NodeMouseClick += FolderTreeView_MouseClick; folderTreeView.DrawNode += FolderTreeView_DrawNode; splitContainer.Panel1.Controls.Add(folderTreeView); // // imageListView // imageListView = new BufferedListView { BackColor = SystemColors.ControlDark, BorderStyle = BorderStyle.None, Dock = DockStyle.Fill, Location = new Point(0, 0), Name = "imageListView", Size = new Size(944, 1006), TabIndex = 0, View = View.LargeIcon, LargeImageList = new ImageList { ImageSize = new Size(200, 200), ColorDepth = ColorDepth.Depth32Bit } }; imageListView.SelectedIndexChanged += ImageListView_SelectedIndexChanged; imageListView.DoubleClick += ImageListView_DoubleClick; imageListView.MouseClick += ImageListView_MouseClick; imageListView.ItemDrag += ImageListView_ItemDrag; splitContainer.Panel2.Controls.Add(imageListView); // // DragInstructions // dragInstructions = new Panel() { Dock = DockStyle.Fill }; instructionsLabel = new Label() { Dock = DockStyle.Fill, Font = new Font("Tahoma", 20), TextAlign = ContentAlignment.MiddleCenter, }; instructionsLabel.Paint += InstructionsLabel_Paint; dragInstructions.Controls.Add(instructionsLabel); // // ExplorerForm // AutoScaleDimensions = new SizeF(12F, 25F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(1522, 1006); appContainer.Controls.Add(splitContainer); appContainer.Controls.Add(statusBar); appContainer.Controls.Add(toolStrip); Controls.Add(appContainer); Controls.Add(dragInstructions); Name = "ExplorerForm"; Text = "SOR4 Explorer"; DoubleBuffered = true; AllowDrop = true; Icon = Program.Icon; FormClosing += ExplorerForm_FormClosing; DragDrop += ExplorerForm_DragDrop; DragEnter += ExplorerForm_DragEnter; splitContainer.Panel1.ResumeLayout(false); splitContainer.Panel2.ResumeLayout(false); splitContainer.EndInit(); splitContainer.ResumeLayout(false); appContainer.ResumeLayout(false); ResumeLayout(false); }