Пример #1
0
        internal void AddDisk(VirtualHardDisk vhd)
        {
            using (RotateWaitThreaded.Hold("Generating View for {0}", Path.GetFileNameWithoutExtension(vhd.Filename)))
            {
                if (vhd.vhdReadException != null)
                {
                    // TODO: Handle virtualDIskException

                    VhdPartitionView vhdview = new VhdPartitionView();
                    vhdview.Icon = Icon;

                    vhdview.AddDisk(vhd);
                    vhdview.remove += new VhdPartitionView.RemoveHandler(vhdview_remove);

                    // When vhdview is added, it does a hell of a lot of drawing of greenpartitionlayout for no reason.
                    flowLayoutPanel1.Controls.Add(vhdview);
                }

                else
                {
                    VhdPartitionView vhdview = new VhdPartitionView();
                    vhdview.Icon = Icon;

                    vhdview.AddDisk(vhd);
                    vhdview.remove += new VhdPartitionView.RemoveHandler(vhdview_remove);

                    // When vhdview is added, it does a hell of a lot of drawing of greenpartitionlayout for no reason.
                    flowLayoutPanel1.Controls.Add(vhdview);
                }
            }
        }
Пример #2
0
        private void ShowDetailedUsage()
        {
            using (RotateWaitThreaded.Hold("Processing MBR for {0}", vhd.Filename))
            {
                // Sorry, I know it looks like there is a MVC pattern in use, but really it's just
                // a giant f*****g mess.

                DiskUsageView       duv = new DiskUsageView();
                DiskUsageModel      dum = new DiskUsageModel(vhd.masterBootRecord.getPartitionRecords());
                DiskUsageController duc = new DiskUsageController();
                // DiskModel dm = new DiskModel(vhd.footer, vhd.dynamicHeader, vhd.blockAllocationTable, vhd.masterBootRecord);
            }
        }