Exemple #1
0
        public Generation()
        {
            InitializeComponent();
            settings = ((App)Application.Current).GetSettings();
            //Initialize 2dArray to hold system position data
            Write("Generating 2D Array");


            sysmap = CreateJaggedArray <uint[][]>(Convert.ToInt32(settings.Img_Xres), Convert.ToInt32(settings.Img_Xres));

            task = Task.Factory.StartNew(() => ParseJSON());
        }
Exemple #2
0
        private void StartImageCalculation(object sender, MouseButtonEventArgs e)
        {
            if (!allowstart)
            {
                MessageBox.Show("Error: Either input or output are not defined yet");
            }
            else
            {
                #region Prepare Image Generation. Create a Settings Object and populate it
                // Get all settings, store them in App Superclass
                classes.Settings settings = new classes.Settings();
                if (outputrenderingtype == 0 || outputrenderingtype > 7)
                {
                    settings.Rendering = 1;
                }
                else
                {
                    settings.Rendering = outputrenderingtype;
                }
                settings.Path_json            = pathtoinput;
                settings.Path_output          = pathtooutput;
                settings.Img_Xres             = (xres.Value != null) ? (uint)xres.Value : 10000;
                settings.Img_Yres             = (xres.Value != null) ? (uint)yres.Value : 10000;
                settings.Img_X_offset         = (xoffset.Value != null)?(int)xoffset.Value:5000;
                settings.Img_Y_offset         = (yoffset.Value != null)?(int)yoffset.Value:2000;
                settings.Ly_to_px             = (lyppx.Value != null)?(int)lyppx.Value:10;
                settings.Systems_per_ColorVal = (syspval.Value != null)?(int)syspval.Value:1;

                settings.Axial5kly   = (bool)ax5kly.IsChecked;
                settings.Axial10kly  = (bool)ax10kly.IsChecked;
                settings.Radial5kly  = (bool)rad5kly.IsChecked;
                settings.Radial10kly = (bool)rad10kly.IsChecked;
                settings.Scaling     = (bool)scaling.IsChecked;
                settings.ColorTable  = (bool)colortable.IsChecked;
                settings.EDSMIcon    = (bool)edsmicon.IsChecked;
                ((App)Application.Current).PassSettings(settings);
                (((App)Application.Current).GetMainWindow()).ChangeUI(new pages.Generation());
                #endregion
            }
        }