Example #1
0
        private void btnKreirajFolder_Click(object sender, EventArgs e)
        {
            frmUnosFoldera formaUnosFoldera = new frmUnosFoldera();

            if (formaUnosFoldera.ShowDialog() == DialogResult.OK)
            {
            }

            if (Properties.Settings.Default.folderPostoji)
            {
                btnKreirajFolder.Enabled = false;
                btnPromjeniIme.Enabled   = true;
            }
        }
Example #2
0
        private void btnPromjeniIme_Click(object sender, EventArgs e)
        {
            frmUnosFoldera formaUnosFoldera = new frmUnosFoldera(server);
            string         prethodnoIme     = Properties.Settings.Default.nazivFoldera;

            if (formaUnosFoldera.ShowDialog() == DialogResult.OK)
            {
            }

            if (prethodnoIme != Properties.Settings.Default.nazivFoldera)
            {
                try
                {
                    if (server.RenameFile("\\D\\Danijela", "\\B\\Branimir"))
                    {
                        MessageBox.Show("Uspješno ste preimenovali folder u " + Properties.Settings.Default.nazivFoldera + " i premjestili sve fajlove.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "Greška");
                }
            }
        }