예제 #1
0
        public void Update()
        {
            Preferences.Load();
            Notes = NoteView.CreateFromDirectory(Preferences.Folder);

            GenerateActions();
            GenerateContent();
        }
예제 #2
0
        public void Update()
        {
            Preferences.Load();
            Notes = NoteView.CreateFromDirectory(Preferences.Folder);

            GenerateActions();
            GenerateContent();
        }
예제 #3
0
        public void Update()
        {
            Preferences.Load();
            Notes = NoteView.CreateFromDirectory(Preferences.Folder);

            GenerateMenu();
            GenerateToolBar();

            GenerateContent();
        }
예제 #4
0
        public void Update()
        {
            Preferences.Load();
            Notes = NoteView.CreateFromDirectory(Preferences.Folder);

            GenerateMenu();
            GenerateToolBar();

            GenerateContent();
        }
예제 #5
0
        public static NoteView CreateFromDirectory(string dir)
        {
            var result = new NoteView(dir);

            if (!Directory.Exists(dir))
            {
                return(result);
            }

            string[] files = Directory.GetFiles(dir);
            if (files.Length != 0)
            {
                foreach (string file in files)
                {
                    string name = file.Replace(dir, "").Replace(".txt", "");
                    string text = File.ReadAllText(file, Encoding.UTF8);
                    result.AddNote(name, text, file);
                }
                result.ListBox.SelectedIndex = 0;
            }

            return(result);
        }
예제 #6
0
        public static NoteView CreateFromDirectory(string dir)
        {
            var result = new NoteView(dir);

            if (!Directory.Exists(dir))
                return result;

            string[] files = Directory.GetFiles(dir);
            if (files.Length != 0)
            {
                foreach (string file in files)
                {
                    string name = file.Replace(dir, "").Replace(".txt", "");
                    string text = File.ReadAllText(file, Encoding.UTF8);
                    result.AddNote(name, text, file);
                }
                result.ListBox.SelectedIndex = 0;
            }

            return result;
        }