public FileRenameDialog(RegistryFileManager files, string fileName)
        {
            InitializeComponent();

            Files    = files;
            FileName = fileName;

            tbNewName.Text = fileName;
        }
Exemplo n.º 2
0
        private void Files_FileAddEnd(RegistryFileManager sender, string fileName, Exception ex)
        {
            if (InvokeRequired)
            {
                Invoke(new Action(() => Files_FileAddEnd(sender, fileName, ex)));
                return;
            }

            BasicEndHandler(ex);

            if (ex == null)
            {
                ListViewItem i = new ListViewItem();
                i.Text = fileName;

                listView1.Items.Add(i);
            }
        }
Exemplo n.º 3
0
        private void Files_FileRemoveEnd(RegistryFileManager sender, string fileName, Exception exception = null)
        {
            if (InvokeRequired)
            {
                Invoke(new Action(() => Files_FileRemoveEnd(sender, fileName, exception)));
                return;
            }

            BasicEndHandler(exception);

            if (exception == null)
            {
                foreach (var thing in listView1.Items)
                {
                    var item = thing as ListViewItem;

                    if (item.Text == fileName)
                    {
                        listView1.Items.Remove(item);
                        break;
                    }
                }
            }
        }
Exemplo n.º 4
0
 private void Files_FileRemoveBegin(RegistryFileManager sender, string fileName)
 => BasicBeginHandler();
Exemplo n.º 5
0
 private void Files_FileCopyRegToLocalBegin(RegistryFileManager sender, string fileName, string localPath)
 => BasicBeginHandler(true);
Exemplo n.º 6
0
 private void Files_FileCopyRegToLocalEnd(RegistryFileManager sender, string fileName, string localPath, Exception ex = null)
 => BasicEndHandler(ex);
Exemplo n.º 7
0
 private void Files_FileAddStart(RegistryFileManager sender, string fileName)
 => SetCursor(Cursors.AppStarting);