Example #1
0
        public FormSlices(Form1 form, Nodes nodes, DataToRender dataToRender, DeviceContext context)
        {
            this.form = form;
            this.nodes = nodes;
            this.dataToRender = dataToRender;
            InitializeComponent();

            if (!dataToRender.pathToVtk)
            {
                trackBar1.Enabled = false;
                trackBar2.Enabled = false;
                trackBar3.Enabled = false;
                checkBoxXY.Enabled = false;
                checkBoxXZ.Enabled = false;
                checkBoxYZ.Enabled = false;
                DisableOkolie();
                form.StatusInfo = "Set the path to vtk files to enable full functionality!";
            }
            else
            {
                this.SetForSlices();
            }
            checkBox1.Checked = dataToRender.okolie;
            DisableButton2();
            DisableButton3();
            SetComboBox();
        }
Example #2
0
        public Form1()
        {
            InitializeComponent();
            Text = String.Format("{0} {1}", AboutBox1.AssemblyTitle, AboutBox1.AssemblyVersion);
            this.pathOfVtk = Directory.GetCurrentDirectory();

            GraphicsInitialization();
            EffectsInitialization();

            nodes = new Nodes();
            dataToRender = new DataToRender(this);
 
            Rotation = Matrix.RotationX(angleY) * Matrix.RotationY(angleX);
            viewMatrix = Matrix.LookAtRH(new Vector3(0, 0, -3.5f), new Vector3(0, 0, 0), new Vector3(0, 1, 0));

            aTimer = new System.Timers.Timer();
            aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
            aTimer.Interval = 800;
            aTimer.Enabled = true;

            colorDialog = new ColorDialog();
            colorDialog.Color = System.Drawing.Color.Red;
            StatusInfo = "No data loaded";
            toolStripProgressBar1.Value = 0;
            bielePozadieToolStripMenuItem.Checked = false;
            panel1.Resize += (sender, args) => resized = true;

            Configuration.EnableObjectTracking = false;
            resized = true;
            render = true;
        }