Пример #1
0
        private void ButtonFileLoad_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                wrapPanelTop_.Children.Clear();

                if (!Directory.Exists(FileControl.topFolderPath_))
                {
                    MessageBox.Show("保存データはありません");
                    return;
                }
                var files = Directory.GetFiles(FileControl.topFolderPath_);
                foreach (var path in files)
                {
                    string data = "";
                    FileControl.LoadFile(ref data, path);

                    var taskList = new TaskList.TaskListM();
                    taskList.Margin = new Thickness(3);
                    taskList.SetString(data);
                    taskList.TaskListDeleteEvent += TaskListDelete;

                    wrapPanelTop_.Children.Add(taskList);
                }
            }catch
            {
            }
        }
Пример #2
0
        private void ButtonFileSave_Click(object sender, RoutedEventArgs e)
        {
            int i = 1;  //添付番号をファイル名にする

            foreach (var element in wrapPanelTop_.Children)
            {
                var taskList = (TaskList.TaskListM)element;

                FileControl.SaveFile(taskList.GetString(), i.ToString() + ".txt");
                i++;
            }
        }