Ejemplo n.º 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (inputOpenDialog.ShowDialog() == DialogResult.OK)
     {
         // Add the list of selected files
         foreach (string path in inputOpenDialog.FileNames)
         {
             if (T3DParser.IsValidMap(path))
             {
                 addMap(path);
             }
         }
     }
 }
Ejemplo n.º 2
0
        public void MoveVertexTest()
        {
            string textFrom   = @"             Vertex   +00000.000000,+00256.000000,-00016.000000
             Vertex   +00064.000000,+00000.000000,-00016.000000
";
            string textTo     = @"             Vertex   +00032.000000,+00128.000000,-00032.000000
             Vertex   +00064.000000,+00000.000000,-00016.000000
";
            var    vertexFrom = new Point3D(0.0, 256.0, -16.0);
            var    vertexTo   = new Point3D(32.0, 128.0, -32.0);

            string actual = T3DParser.TranslateVertex(textFrom, vertexFrom, vertexTo, 1e-3);

            Assert.AreEqual(textTo, actual);
        }
Ejemplo n.º 3
0
        private void loadState()
        {
            var settings = Properties.Settings.Default;

            // Source files
            lvwSourceFiles.Items.Clear();
            if (settings.InputFiles != null)
            {
                foreach (string path in settings.InputFiles)
                {
                    if (T3DParser.IsValidMap(path))
                    {
                        addMap(path);
                    }
                }
            }

            // Intelligence
            radOrdered.Checked       = (settings.Mode == 0);
            radShuffled.Checked      = (settings.Mode == 1);
            radSmartSubtract.Checked = (settings.Mode == 2);
            radSmartAdd.Checked      = (settings.Mode == 3);

            // Probabilities
            numSolid.Value     = settings.SolidProb;
            numSemiSolid.Value = settings.SemiSolidProb;
            numNonSolid.Value  = settings.NonSolidProb;
            numSubtract.Value  = settings.SubtractProb;
            numMover.Value     = settings.MoverProb;
            numLight.Value     = settings.LightProb;
            numOther.Value     = settings.OtherProb;

            // Excluded actors
            chkExInvis.Checked     = settings.ExcludeInvisible;
            chkExPortal.Checked    = settings.ExcludePortal;
            chkExZoneInfo.Checked  = settings.ExcludeZone;
            chkExMore.Checked      = settings.ExcludeMore;
            txtExcludeActors.Lines = settings.ExcludedActors?.Cast <string>().ToArray();
        }