Esempio n. 1
0
        public Form3(string ar, string tag, string watido)
        {
            iDo             = watido;
            MaximizeBox     = false;
            FormBorderStyle = FormBorderStyle.Fixed3D;
            InitializeComponent();
            fi = new WorkWithFiles();
            ImageList imageListSmall = new ImageList();

            imageListSmall.Images.Add(Bitmap.FromFile("C:\\file.ico"));
            imageListSmall.Images.Add(Bitmap.FromFile("C:\\papka.ico"));
            imageListSmall.Images.Add(Bitmap.FromFile("C:\\Hard-Drive.png"));
            imageListSmall.ImageSize = new Size(32, 32);
            listView1.LargeImageList = imageListSmall;
            fi = new WorkWithFiles();
            if (tag == "file")
            {
                fi.setP(Path.GetDirectoryName(ar));
            }
            else
            {
                fi.obnull();
            }
            updateList();
        }
Esempio n. 2
0
        public Form3()
        {
            MaximizeBox     = false;
            FormBorderStyle = FormBorderStyle.Fixed3D;
            InitializeComponent();
            fi = new WorkWithFiles();
            ImageList imageListSmall = new ImageList();

            imageListSmall.Images.Add(Bitmap.FromFile("C:\\file.ico"));
            imageListSmall.Images.Add(Bitmap.FromFile("C:\\papka.ico"));
            imageListSmall.Images.Add(Bitmap.FromFile("C:\\Hard-Drive.png"));
            imageListSmall.ImageSize = new Size(32, 32);
            listView1.LargeImageList = imageListSmall;
        }
Esempio n. 3
0
        public Form1()
        {
            w = new FileSystemWatcher();
            InitializeComponent();

            Presenter pres = new Presenter(this);


            visitor      = new Md5Hash();
            CesarCrypt   = new crypt();
            CesarEncrypt = new encrypt();

            asyncArch   = new asyncTaskZip();
            taskArch    = new taskZip();
            foreachArch = new foreachZip();
            regArch     = new regularZip();

            s = new Strategy(new defaultSearch());

            fi = new WorkWithFiles();
            ImageList imageListSmall = new ImageList();

            imageListSmall.Dispose();
            imageListSmall.Images.Add(Bitmap.FromFile("C:\\file.ico"));
            imageListSmall.Images.Add(Bitmap.FromFile("C:\\papka.ico"));
            imageListSmall.Images.Add(Bitmap.FromFile("C:\\intro-external-drive.png"));
            imageListSmall.Images.Add(Bitmap.FromFile("C:\\zip.png"));
            imageListSmall.ImageSize = new Size(32, 32);
            listView1.LargeImageList = imageListSmall;
            var drives = FolderMethods.getDrInfo();

            foreach (var i in drives)
            {
                ListViewItem lvi = new ListViewItem();
                lvi.ImageIndex = 2;
                lvi.Text       = i.Name;
                lvi.Tag        = "directory";
                listView1.Items.Add(lvi);
            }
            contextMenu = new System.Windows.Forms.ContextMenu();
            menuItem1   = new MenuItem("&Copy", new EventHandler(menu1_click));
            menuItem2   = new MenuItem("&Cut", new EventHandler(menu3_click));
            menuItem3   = new MenuItem("&Delete", new EventHandler(menu2_click));
            menuItem4   = new MenuItem("&Rename", new EventHandler(menu4_click));
            menuItem5   = new MenuItem("&Archive", new EventHandler(menu5_click));
            menuItem6   = new MenuItem("&Archive parralelfreach", new EventHandler(menu6_click));
            menuItem7   = new MenuItem("&Archive parralelTask", new EventHandler(menu7_click));
            menuItem8   = new MenuItem("&Archive Task async", new EventHandler(menu8_click));
            menuItem9   = new MenuItem("&Statictic", new EventHandler(menu9_click));
            menuItem10  = new MenuItem("&MD5 hash", new EventHandler(menu10_click));
            contextMenu.MenuItems.Add(menuItem1);
            contextMenu.MenuItems.Add(menuItem2);
            contextMenu.MenuItems.Add(menuItem3);
            contextMenu.MenuItems.Add(menuItem4);
            contextMenu.MenuItems.Add(menuItem5);
            contextMenu.MenuItems.Add(menuItem6);
            contextMenu.MenuItems.Add(menuItem7);
            contextMenu.MenuItems.Add(menuItem8);
            contextMenu.MenuItems.Add(menuItem9);
            contextMenu.MenuItems.Add(menuItem10);
            richTextBox2.Text = "eat";
        }