Exemplo n.º 1
0
        public PropertiesForm(ADBFile myFile, Image img)
        {
            InitializeComponent();
            IsChangeValue             = false;
            CountFilesInt             = 0;
            isOneFile                 = true;
            oneFile                   = myFile;
            FM                        = new FileManager(myFile.device);
            TypeFile                  = getTypeFile(myFile);
            Location                  = myFile.DirectoryName;
            pictureBox_iconFile.Image = img;
            label_locationValue.Text  = Location.DecodingText().Replace(@"\", "");

            label_sizeValue.Text = label_countValue.Text = "•••";

            backgroundWorker_getSizeFile.RunWorkerAsync();

            textBox_name.Text    = myFile.Name.Replace(@"\", string.Empty).DecodingText();
            tmpName              = textBox_name.Text;
            label_typeValue.Text = TypeFile.DecodingText();

            checkBox_IsHidden.Visible = true;

            if (tmpName[0] == '.')
            {
                checkBox_IsHidden.Checked = true;
            }
            else
            {
                checkBox_IsHidden.Checked = false;
            }
        }
Exemplo n.º 2
0
 private string messageForDelete()
 {
     if (listView_files.SelectedItems.Count == 1)
     {
         ADBFile tmpfile = ReturnAdbFileFromLVSelectItem(listView_files.SelectedItems[0]);
         return("are you sure Delete" + " \"" + tmpfile.Name.DecodingText().Replace("\\", "") + " \"  ?\nSize: " + tmpfile.GetLengthDouble().humanReadable());
     }
     else
     {
         return("are you sure Delete  \" " + listView_files.SelectedItems.Count.ToString() + " \"  File & Directory ?");
     }
 }
Exemplo n.º 3
0
 private string getTypeFile(ADBFile onefile)
 {
     if (onefile.GetTag() == 'd')
     {
         return("Directory");
     }
     else
     {
         if (string.IsNullOrEmpty(onefile.Extension))
         {
             return("unknownFile");
         }
         return(onefile.Extension);
     }
 }
Exemplo n.º 4
0
        private void setLabelFile()
        {
            tmpAdbFile      = ReturnAdbFileFromLVSelectItem(ListViewSI);
            label_name.Text = "Name: " + tmpAdbFile.Name.nickName().DecodingText();


            if (IsShowSize)
            {
                if (backgroundWorker_ProccessSize.IsBusy)
                {
                    backgroundWorker_ProccessSize.CancelAsync();
                }
                if (!backgroundWorker_ProccessSize.IsBusy)
                {
                    backgroundWorker_ProccessSize.RunWorkerAsync();
                }
            }
        }