Example #1
0
        private void OpenImg()
        {
            OpenFileDialog imgOpenDialog = new OpenFileDialog();

            imgOpenDialog.Filter          = "Image files (*.img)|*.img";
            imgOpenDialog.FilterIndex     = 0;
            imgOpenDialog.CheckFileExists = true;
            imgOpenDialog.Multiselect     = false;

            if (imgOpenDialog.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            try
            {
                _rawImageSource = new RawImageSource(imgOpenDialog.FileName);
                _bobFs          = BobFs.Mount(_rawImageSource);
                Text            = $"WinBobFS - {imgOpenDialog.SafeFileName}";
            }
            catch (Exception)
            {
                MessageBox.Show(this, "BobFS image is not valid.", "WinBobFS", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            PopulateExplorerTree();
            PopulateExplorerList(_bobFs.Root);

            NewFileButton.Enabled      = true;
            NewDirectoryButton.Enabled = true;
            //NewLinkButton.Enabled = true;
            //InfoButton.Enabled = true;
            ImportButton.Enabled   = true;
            ExplorerList.AllowDrop = true;
        }
Example #2
0
        private void NewImg()
        {
            _rawImageSource = new RawImageSource();
            _bobFs          = BobFs.Mkfs(_rawImageSource);
            Text            = $"WinBobFS - <New>";

            PopulateExplorerTree();
            PopulateExplorerList(_bobFs.Root);

            NewFileButton.Enabled      = true;
            NewDirectoryButton.Enabled = true;
            ImportButton.Enabled       = true;
            ExplorerList.AllowDrop     = true;
        }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RawImageSource obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
        public void Test2()
        {
            RawImageSource ris = new RawImageSource();

            ris.Dispose();
        }