Beispiel #1
0
        public void LoadData(Window parent)
        {
            var fileTypes = new Dictionary <String, String>()
            {
                { "txt", "Text Document" }, { "*", "All Files" }
            };

            var loadMenu = new LoadMenu(fileTypes, parent);

            if (loadMenu.DataLoaded) //Data Load was successful
            {
                parent.ExitWindow();

                textArea.SetText(loadMenu.Data);
                fileLabel.SetText(' ' + loadMenu.FileNameLoaded + ' ');

                Draw();

                FileInfo.Filename   = loadMenu.FileNameLoaded;
                FileInfo.Path       = loadMenu.PathOfLoaded;
                FileInfo.HasChanged = false;

                SelectItemByID("textArea");
            }
        }
Beispiel #2
0
        public void LoadData(Window parent)
        {
            var loadMenu = new LoadMenu(parent);

            if (loadMenu.DataLoaded) //Data Load was successful
            {
                parent.ExitWindow();

                textArea.SetText(loadMenu.Data);
                fileLabel.SetText(' ' + loadMenu.FileNameLoaded + ' ');

                Draw();

                FileInfo.Filename   = loadMenu.FileNameLoaded;
                FileInfo.Path       = loadMenu.PathOfLoaded;
                FileInfo.HasChanged = false;
            }
        }