ManyWork
  • Войти в систему
  • Зарегистрироваться
  • Проекты
  • Услуги
  • Фрилансеры
  • Команды
  • Курсы
  • Форум
  • Контакты
    • Стиль заголовка
    • Светлый Темный
    • Стиль страницы
    • Фон Обычный
    • Main Layout
    • Цветовая схема
    • по умолчанию
  • Партнерская программа обновление
  • Опубликовать задание

Подсистема управления файлами
Автор Сео [seomw]

  • Главная
  • Форум
  • Прочее
  • Фриланс
  • Подсистема управления файлами
Создано 02.02.2017 в 08:31
malek49 02.02.2017 в 08:31
avatar
постов

hljs.initHighlightingOnLoad(); Есть листинг программы
Нужно реализовать за оплату, кому это не так тяжело, об оплате обговорим отдельно.
Ниже только част листинга
в файле полностью листинг и как должны выглядить программа


using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Курсовой_проект
{
public class VirtualBlock
{
public char[] elem = new char[10];
public VirtualBlock()
{
for (int i = 0; i < 10; i++)
{
elem[i] = '~';
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Курсовой_проект
{
public class VirtualFile
{
public string name = "";
public LinkedList<VirtualBlock> Block;
public VirtualFile(string filename)
{
name = filename;
Block = new LinkedList<VirtualBlock>();
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Курсовой_проект
{
public partial class CreateFile : Form
{
string[] names;
public CreateFile(string[]filenames)
{
names = new string[filenames.Length];
for (int i = 0; i < names.Length; i++)
names[i] = filenames[i];
InitializeComponent();
}

private void CreateFile_FormClosing(object sender, FormClosingEventArgs e)
{
string caption = "Создание файла";
string message = "Сохранить внесённые изменения?";
DialogResult DR = MessageBox.Show(message, caption, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if (DR == DialogResult.Yes)
{
if (textBox1.Text == "")
{
caption = "Неверное имя файла";
message = "Имя файла не может быть пустым!";
MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
e.Cancel = true;
}
else
{
char[] symbols = { '/', '?', '*', ':', '>', '<', '"', '|', '\' };
bool error = false;
for (int i = 0; i < symbols.Length; i++)
{
if (textBox1.Text.Contains(symbols[i]))
{
caption = "Неверное имя файла";
message = "Имя файла не может содержать символ " + symbols[i];
MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
e.Cancel = true;
error = true;
break;
}
}
if (error == false)
{
bool exists = false;
for (int n = 0; n < names.Length; n++)
{
if (textBox1.Text == names[n])
{
exists = true;
break;
}
}
if (exists == true)
{
caption = "Неверное имя файла";
message = "Файл с таким именем уже существует";
MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
e.Cancel = true;
}
else
this.DialogResult = DialogResult.Yes;
}
}
}
else
{
if (DR == DialogResult.No)
this.DialogResult = DialogResult.No;
else
{
this.DialogResult = DialogResult.Cancel;
e.Cancel = true;
}
}
}

}
}

MansMI 02.02.2017 в 08:31
avatar
постов

mansmi@rambler.ru пишите

hidforce 02.02.2017 в 08:31
avatar
постов

illusion_of_exist@mail.ru

Тема закрыта!

  • Prev
  • 1
  • 2
  • 3
  • ...
  • 10
  • Next
© MANYWORK.RU

Settings

Vital Info

Admin

Password Update