Beispiel #1
0
        /// Button "Rename"
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            ListViewItem item;
            if ((LeftList.SelectedItems.Count != 0))
            {
                item = LeftList.SelectedItems[0];

                DialogBox.format = Navigator.ReturnFormat(item.Text);
                DialogBox.way=LeftPath;
                DialogBox CreateFile = new DialogBox();
                lastname = item.Text;
                createThing = 6;
                CreateFile.Show();

                if (DialogBox.done == true)
                {
                    try
                    {
                        Navigator.GetFiles(ref LeftPath, LeftList);
                        Navigator.GetFiles(ref RightPath, RightList);
                    }
                    catch (DirectoryNotFoundException)
                    {
                        string path = "C:\\";
                        Navigator.GetFiles(ref path, LeftList);
                        Navigator.GetFiles(ref path, RightList);
                    }
                    DialogBox.done = false;
                }
            }
            else if (RightList.SelectedItems.Count != 0)
            {
                item = RightList.SelectedItems[0];

                DialogBox.format = Navigator.ReturnFormat(item.Text);
                DialogBox.way = RightPath;
                DialogBox CreateFile = new DialogBox();
                lastname = item.Text;
                createThing = 6;
                CreateFile.Show();

                if (DialogBox.done == true)
                {
                    try
                    {
                        Navigator.GetFiles(ref LeftPath, LeftList);
                        Navigator.GetFiles(ref RightPath, RightList);
                    }
                    catch (DirectoryNotFoundException)
                    {
                        string path = "C:\\";
                        Navigator.GetFiles(ref path, LeftList);
                        Navigator.GetFiles(ref path, RightList);
                    }
                    DialogBox.done = false;
                }
            }
            else
            {
                MessageBox.Show("You haven't choosen a file", "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
 private void toolStripMenuItem4_Click_1(object sender, EventArgs e)
 {
     DialogBox CreateFile = new DialogBox();
     DialogBox.way = LeftPath;
     createThing = 4;
     CreateFile.Show();
 }
Beispiel #3
0
        /// Button "Rename"
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            ListViewItem item;

            if ((LeftList.SelectedItems.Count != 0))
            {
                item = LeftList.SelectedItems[0];

                DialogBox.format = Navigator.ReturnFormat(item.Text);
                DialogBox.way    = LeftPath;
                DialogBox CreateFile = new DialogBox();
                lastname    = item.Text;
                createThing = 6;
                CreateFile.Show();


                if (DialogBox.done == true)
                {
                    try
                    {
                        Navigator.GetFiles(ref LeftPath, LeftList);
                        Navigator.GetFiles(ref RightPath, RightList);
                    }
                    catch (DirectoryNotFoundException)
                    {
                        string path = "C:\\";
                        Navigator.GetFiles(ref path, LeftList);
                        Navigator.GetFiles(ref path, RightList);
                    }
                    DialogBox.done = false;
                }
            }
            else if (RightList.SelectedItems.Count != 0)
            {
                item = RightList.SelectedItems[0];

                DialogBox.format = Navigator.ReturnFormat(item.Text);
                DialogBox.way    = RightPath;
                DialogBox CreateFile = new DialogBox();
                lastname    = item.Text;
                createThing = 6;
                CreateFile.Show();


                if (DialogBox.done == true)
                {
                    try
                    {
                        Navigator.GetFiles(ref LeftPath, LeftList);
                        Navigator.GetFiles(ref RightPath, RightList);
                    }
                    catch (DirectoryNotFoundException)
                    {
                        string path = "C:\\";
                        Navigator.GetFiles(ref path, LeftList);
                        Navigator.GetFiles(ref path, RightList);
                    }
                    DialogBox.done = false;
                }
            }
            else
            {
                MessageBox.Show("You haven't choosen a file", "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
            }
        }