Exemplo n.º 1
0
 public void containerNull()
 {
     container         = null;
     workFiles         = null;
     ListStubServerObj = null;
     drives            = null;
 }
Exemplo n.º 2
0
        public void containerCreate()
        {
            container = new WindsorContainer();
            container.Install(new ConfigurationCastleWindsorTest());


            ListStubServerObj = new List <IServerObj>();
            IServerObj StubServerObj = container.Resolve <IServerObj>();
            IDrives    drives        = container.Resolve <IDrives>();

            workFiles = new WorkFiles(drives);
            ListStubServerObj.Add(StubServerObj);
        }
Exemplo n.º 3
0
        public static void Beginning()
        {
            Console.Clear();

            Backup.CreateBackupFolder();

            WorkFiles type = SelectTypeOfWorkFiles();
            string    path = Backup.GetFolder(type);

            if (type == WorkFiles.Browsing)
            {
                Watch.Watching(path);
            }
            else
            {
                Backup.Recoil(path);
            }
        }
Exemplo n.º 4
0
        public static string GetFolder(WorkFiles type)
        {
            Console.WriteLine($"\nPress number of folder which you want to {type.ToString().ToLower()}?\n" +
                              $"1 - Default\n2 - Enter your folder");

            switch (Сhecking.RangeInsert(1, 2))
            {
            case 1:
                string path = Path.Combine(Directory.GetParent(Environment.CurrentDirectory).Parent.FullName, @"ExampleFolder");

                if (!File.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
                return(path);

            case 2:
                return(GetCorrectPath());

            default:
                throw new ArgumentOutOfRangeException("\nIncorrect input!");
            }
        }
Exemplo n.º 5
0
        public void AddClients(string[] FileNames)
        {
            Dictionary <int, List <ClientDay> > data = WorkFiles.OpenFiles(FileNames);

            Update(data);
        }
Exemplo n.º 6
0
        public ContainerClient()
        {
            Dictionary <int, List <ClientDay> > data = WorkFiles.GetTest();

            Update(data);
        }
Exemplo n.º 7
0
 public PitersWorkService()
 {
     _staticDataSerializer = new XmlSerializer(typeof(StaticData), new Type[] { typeof(Material), typeof(Worker), typeof(Proiority) });
     _workSerializer       = new XmlSerializer(typeof(Work), new Type[] { typeof(Material), typeof(Worker), typeof(StationWork), typeof(Proiority) });
     _workFiles            = new WorkFiles();
 }