Exemplo n.º 1
0
        public static eVolumeInfo ShowAndReturneVolumeInfo()
        {
            var dialog = new CreateEVolumeDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                eVolumeInfo info = new eVolumeInfo();
                info.TotalSize  = Convert.ToInt32(dialog.TotalSize.Trim());
                info.SizeType   = dialog.SizeType;
                info.Passphrase = dialog.Passphrase;
                info.Location   = dialog.eVolumeLocation;
                return(info);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        private void createEVolumeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var eVolumeInfo = CreateEVolumeDialog.ShowAndReturneVolumeInfo();

            if (eVolumeInfo != null)
            {
                //call backend Create eVolume Methods
                Console.WriteLine(String.Format("Total size: {0}-{1} Passphrase: {2} Location: {3} ", eVolumeInfo.TotalSize, eVolumeInfo.SizeType, eVolumeInfo.Passphrase, eVolumeInfo.Location));

                // (Note: this is if they give me an object to pass to them)
                //BackendObject backendObject = new BackendObject();
                //backendObject.TotalSize = eVolumeInfo.TotalSize; (for each property)
                //VFS.CreateEVolume(backendObject);

                //(Note: do this if they want indiv. parameters)
                //VFS.CreateEVolume(eVolumeInfo.TotalSize, eVolumeInfo.SizeType, .... etc.);
            }
            else
            {
                Console.WriteLine("User cancelled.");
            }
        }