Beispiel #1
0
        private void wrapper_Load(object sender, EventArgs e)
        {
            // Add the calculator control
            if (Settings.showCalculator == 1)
            {
                // Add filament control
                ConverteC          = new ConverterControl();
                ConverteC.Location = new System.Drawing.Point(3, 3);
                ConverteC.Name     = "ConverteC";
                ConverteC.Size     = new System.Drawing.Size(427, 176);
                ConverteC.TabIndex = 0;
                this.Controls.Add(ConverteC);
            }


            // Add the filament contol
            filamentC = new FilamentControl();
            filamentC.Connect(host);
            filamentC.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                      | System.Windows.Forms.AnchorStyles.Left)
                                                                     | System.Windows.Forms.AnchorStyles.Right)));

            if (Settings.showCalculator == 1)
            {
                // if calculator control is show sets the right height
                filamentC.Location = new System.Drawing.Point(3, 200);
                filamentC.Size     = new System.Drawing.Size(this.Width - 4, this.Height - 200);
                // Add a event for get data from listview and add to calculator control
                filamentC.listView_filament.MouseDoubleClick += listView_filament_MouseDoubleClick;
            }
            else
            {
                filamentC.Location = new System.Drawing.Point(3, 3);
                filamentC.Size     = new System.Drawing.Size(this.Width - 4, this.Height);
            }

            filamentC.Name     = "filamentC";
            filamentC.TabIndex = 0;
            this.Controls.Add(filamentC);
        }
        /// <summary>
        /// COSTRUCTOR open only calculator
        /// </summary>
        public External_form()
        {
            InitializeComponent();

            this.Text = Trans.T("FI_FORMTITLECALC");
            // 430; 180
            this.Size            = new System.Drawing.Size(460, 230);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;


            // Add converter control
            ConverteC        = new ConverterControl();
            ConverteC.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                      | System.Windows.Forms.AnchorStyles.Left)
                                                                     | System.Windows.Forms.AnchorStyles.Right)));

            // ConverteC.Associated3DView = null;
            ConverteC.Location = new System.Drawing.Point(3, 3);
            ConverteC.Name     = "ConverteC";
            ConverteC.Size     = new System.Drawing.Size(427, 176);
            ConverteC.TabIndex = 0;
            this.Controls.Add(ConverteC);
        }