Beispiel #1
0
 private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     SLDConnect = null;
     SwApp      = null;
     SwModel    = null;
     MyShaft    = null;
     GC.Collect();
 }
Beispiel #2
0
        public MainWindow() // components initialization
        {
            InitializeComponent();
            Profile_type.SelectedIndex      = 0;
            Profile_R2.Enabled              = false;
            S_operation_type.SelectedIndex  = 0;
            E_operation_type.SelectedIndex  = 0;
            Key_seating_type.SelectedIndex  = 0;
            Seating_operation.SelectedIndex = 0;
            Key_profile_type.SelectedIndex  = 0;
            Splined_Type.SelectedIndex      = 0;
            Splined_Method.SelectedIndex    = 0;
            S_value.Enabled           = false;
            E_value.Enabled           = false;
            btnRemove_Stage.Enabled   = false;
            Key_profile_width.Enabled = false;

            Seating_width.Maximum  = Profile_R1.Value;
            Seating_length.Maximum = Profile_legth.Value;
            set_offset_range();
            set_key_width();
            draw_preview();
            Node_down.Enabled = false;
            Node_up.Enabled   = false;

            Splined_Radius.Maximum     = Profile_R1.Value * (decimal)0.98;
            Splined_Arc_Length.Maximum = (decimal)0.9 * Splined_Length.Value;
            Splined_Width.Maximum      = Profile_R1.Value * (decimal)0.8;

            set_splined_array();

            Theard_Use.SelectedIndex  = 0;
            Theard_Type.SelectedIndex = 0;
            Theard_CW.Checked         = false;
            Theard_Fit.Checked        = false;
            Theard_Fit.Enabled        = false;
            Theard_CW.Enabled         = false;
            set_theard_range();
            set_theard_pinch_range();

            SLDConnect = new SolidWorksConnector();
        }