public MainWindow()
        {
            try
            {
                InitializeComponent();
                Mode = ToolMode.Delete;
                galaxyDrawing.Canvas      = canvas;
                galaxyDrawing.WarningList = warningList;
                Mode = ToolMode.Draw;

                galaxyDrawing.AskForImageSource();
                var gd = new GalaxyDialog();
                if (gd.ShowDialog() == true)
                {
                    galaxyDrawing.LoadGalaxy(gd.GalaxyNumber);
                }

                galaxyDrawing.GalaxyUpdated();
                starNames      = GetTextResource("Names/stars.txt").Replace("\r\n", "\n").Split('\n').Select(x => x.Trim()).Where(x => !string.IsNullOrEmpty(x)).Distinct().ToArray();
                fictionalNames = GetTextResource("Names/names.txt").Replace("\r\n", "\n").Split('\n').Select(x => x.Trim()).Where(x => !string.IsNullOrEmpty(x)).Distinct().ToArray();
            }
            catch (Exception e)
            {
                MessageBox.Show("Error: " + e.ToString());
            }
        }
        void exportButton_Click(object sender, RoutedEventArgs e)
        {
            var gd = new GalaxyDialog();

            if (gd.ShowDialog() == true)
            {
                galaxyDrawing.SaveGalaxy(gd.GalaxyNumber);
            }
        }
Exemple #3
0
        public void AskForGalaxy()
        {
            Clear();
            var gd = new GalaxyDialog();

            if (gd.ShowDialog() == true)
            {
                LoadGalaxy(gd.GalaxyNumber);
            }
        }
		public void AskForGalaxy()
		{
			Clear();
			var gd = new GalaxyDialog();
			if (gd.ShowDialog() == true) 
			LoadGalaxy(gd.GalaxyNumber);
		}