void BytesToolStripMenuItemClick(object sender, EventArgs e) //listView > Sizes > Bytes { bytesToolStripMenuItem.Checked = true; perKilobyteToolStripMenuItem.Checked = false; perKilobyteToolStripMenuItem1.Checked = false; szMod = sizeModifier.Bytes; }
void PerKilobyteToolStripMenuItem1Click(object sender, EventArgs e) //listView > Sizes > 1024b { bytesToolStripMenuItem.Checked = false; perKilobyteToolStripMenuItem.Checked = false; perKilobyteToolStripMenuItem1.Checked = true; szMod = sizeModifier.Thousand24; }
void initialInit() //initialization process { currentDirInArchive = "/"; try{ comboBox1.SelectedIndex = 0; }catch (Exception ex) { //if it fails somehow, do not call MessageBox.Show } hasArchiveChanged = false; files = new string[] {}; directories = new string[] {}; szMod = sizeModifier.Thousand24; imagesSmall = new ImageList(); imagesLarge = new ImageList(); ResourceManager rm = new ResourceManager("nwzip.MainForm", typeof(MainForm).Assembly); imagesSmall.Images.Add("binary-unknown", (Bitmap)rm.GetObject("binary-unknown16")); imagesSmall.Images.Add("folder", (Bitmap)rm.GetObject("folder16")); imagesLarge.Images.Add("binary-unknown", (Bitmap)rm.GetObject("binary-unknown64")); imagesLarge.Images.Add("folder", (Bitmap)rm.GetObject("folder64")); imagesSmall.ImageSize = new Size(16, 16); imagesLarge.ImageSize = new Size(64, 64); listView1.SmallImageList = imagesSmall; listView1.LargeImageList = imagesLarge; filesTypes = new Dictionary <string, string>(); }