예제 #1
0
        private void btnLoadSTL_Click(object sender, EventArgs e)
        {
            String         fullFilePath    = "";
            OpenFileDialog openFileDialog1 = new OpenFileDialog
            {
                InitialDirectory = @"C:\",
                Title            = "Browse Text Files",

                CheckFileExists = true,
                CheckPathExists = true,

                DefaultExt       = "stl",
                Filter           = "stl files (*.stl)|*.stl",
                FilterIndex      = 2,
                RestoreDirectory = true,

                ReadOnlyChecked = true,
                ShowReadOnly    = true
            };

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                fullFilePath       = openFileDialog1.FileName;
                elementHost1.Child = new UserControl1(fullFilePath);
                mainForm.renameCurrentTab(openFileDialog1.SafeFileName);
                //userControl.changeSTLModel(@"C:\Users\Johnathon\Desktop\DAF CF met trailer.STL");
            }
        }
예제 #2
0
        private void btnLoadSTL_Click(object sender, EventArgs e)
        {
            String         fullFilePath    = "";
            OpenFileDialog openFileDialog1 = new OpenFileDialog
            {
                InitialDirectory = @"C:\",
                Title            = "Browse Text Files",

                CheckFileExists = true,
                CheckPathExists = true,

                DefaultExt       = "stl",
                Filter           = "stl files (*.stl)|*.stl",
                FilterIndex      = 2,
                RestoreDirectory = true,

                ReadOnlyChecked = true,
                ShowReadOnly    = true
            };

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                fullFilePath = openFileDialog1.FileName;
                mainForm.renameCurrentTab(openFileDialog1.SafeFileName);
            }
        }