Esempio n. 1
0
        private void переименоватьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var newFileName = "";

            FileNameText.Show();
            newFileName = FileNameText.Text;
            while (true)
            {
                try
                {
                    if (!isFile)
                    {
                        Directory.Move(filePath + currentFileName, filePath + "/" + newFileName);
                    }
                    else
                    {
                        File.Move(filePath + currentFileName, filePath + "/" + newFileName);
                    }
                    break;
                }
                catch (Exception)
                {
                    break;
                }
            }
            isFile = false;
            LoadFilesAndDirectories();
            FileNameText.Clear();
            FileNameText.Hide();
        }
Esempio n. 2
0
        private void папкуToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var fileName = "";

            try
            {
                fileName = FileNameText.Text;


                DirectoryInfo directory = new DirectoryInfo(filePath + "/" + fileName);

                if (!directory.Exists)
                {
                    directory.Create();
                }

                FileNameText.Clear();
                FileNameText.Hide();
                LoadFilesAndDirectories();
            }
            catch (Exception)
            {
                return;
            }
        }
Esempio n. 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (pictureBox1.Image != null && FileNameText.Text != "")
     {
         NowFrame.Save(string.Format(FuncClass.Check_path($@"IDSCut\{DirText.Text}\") + "{0}.jpg", FileNameText.Text, System.Drawing.Imaging.ImageFormat.Png));
         MessageBox.Show("Save");
         FileNameText.Clear();
     }
 }
Esempio n. 4
0
        void ReleaseDesignerOutlets()
        {
            if (BackgroundButton != null)
            {
                BackgroundButton.Dispose();
                BackgroundButton = null;
            }

            if (BackgroundView != null)
            {
                BackgroundView.Dispose();
                BackgroundView = null;
            }

            if (ButtonView != null)
            {
                ButtonView.Dispose();
                ButtonView = null;
            }

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

            if (FileNameText != null)
            {
                FileNameText.Dispose();
                FileNameText = null;
            }

            if (FileTableView != null)
            {
                FileTableView.Dispose();
                FileTableView = null;
            }

            if (OKButton != null)
            {
                OKButton.Dispose();
                OKButton = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (TitleView != null)
            {
                TitleView.Dispose();
                TitleView = null;
            }
        }
Esempio n. 5
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (pictureBox2.Image != null && FileNameText.Text != "")
     {
         newRec.Save(string.Format(FuncClass.Check_path($@"IDSCut\{DirText.Text}\") + "{0}.jpg", FileNameText.Text, System.Drawing.Imaging.ImageFormat.Png));
         if (!Directory.Exists($@"IDSCut\{DirText.Text}"))
         {
             Directory.CreateDirectory($@"IDSCut\{DirText.Text}");
         }
         using (StreamWriter sw = new StreamWriter(FuncClass.Check_path($@"IDSCut\{DirText.Text}") + $"{FileNameText.Text}.txt"))
         {
             foreach (var item in CutRange)
             {
                 sw.WriteLine(item);
             }
             sw.Close();
         }
         pictureBox1.Refresh();
         MessageBox.Show("Save");
         FileNameText.Clear();
     }
 }
Esempio n. 6
0
        private void файлToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var fileName = "";

            try
            {
                fileName = FileNameText.Text;
                FileInfo file = new FileInfo(filePath + "/" + fileName + ".txt");

                if (!file.Exists)
                {
                    file.Create().Close();
                }

                FileNameText.Clear();
                FileNameText.Hide();
                LoadFilesAndDirectories();
            }
            catch (Exception)
            {
                return;
            }
        }
Esempio n. 7
0
 private void Form1_Load(object sender, EventArgs e)
 {
     LoadDrives();
     FileNameText.Hide();
 }
Esempio n. 8
0
 private void создатьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FileNameText.Show();
 }