Beispiel #1
0
        public FormSettings(string _dataPath)
        {
            dataPath = _dataPath;
            InitializeComponent();

            mainFormPanelCheckboxes = new Dictionary <string, CheckBox>()
            {
                { "qth1_2", checkBoxViewQth1_2 },
                { "qth3Loc", checkBoxViewQth3Loc },
                { "qsoComments", checkBoxViewQsoComments },
                { "statFilter", checkBoxViewStatFilter },
                { "cwMacros", checkBoxViewCwMacro },
                { "callsignId", checkBoxViewCallsignId }
            };

            updateIntervalRadioButtons = new Dictionary <int, RadioButton>()
            {
                { 10 * 1000, radioButtonUpdInterval10s },
                { 60 * 1000, radioButtonUpdInterval1m }
            };

            foreach (SerialDeviceInfo sp in serialDevices)
            {
                comboBoxPort.Items.Add(sp.caption);
                int w = TextRenderer.MeasureText(sp.caption, comboBoxPort.Font).Width;
                if (comboBoxPort.DropDownWidth < w)
                {
                    comboBoxPort.DropDownWidth = w;
                }
            }

            int pinCount = 0;

            foreach (string pinFunction in TransceiverController.PIN_FUNCTIONS)
            {
                TransceiverPinSettings tpsControl = new TransceiverPinSettings(pinFunction);
                transceiverPinSettings.Add(tpsControl);
                panelTransceiverSerial.Controls.Add(tpsControl);
                tpsControl.Location       = new Point(1, 25 + (pinCount++) * (tpsControl.Height + 2));
                tpsControl.pinChanged    += transceiverPinChanged;
                tpsControl.invertChanged += transceiverPinInvertChanged;
                tpsControl.testMouseDown += testPinMouseDown;
                tpsControl.testMouseUp   += testPinMouseUp;
            }

            for (int field = 0; field < TnxlogConfig.QthFieldCount; field++)
            {
                LabelTextBox ltb = new LabelTextBox();
                qthFieldAdifContols.Add(ltb);
                groupBoxAdifFields.Controls.Add(ltb);
                ltb.Location = new Point(1, 14 + field * (ltb.Height + 2));
            }
            ltbComment = new LabelTextBox();
            qthFieldAdifContols.Add(ltbComment);
            groupBoxAdifFields.Controls.Add(ltbComment);
            ltbComment.Location  = new Point(1, 14 + TnxlogConfig.QthFieldCount * (ltbComment.Height + 2));
            ltbComment.labelText = "Comment";
        }
Beispiel #2
0
 public FormAdifImportDialog()
 {
     InitializeComponent();
     for (int field = 0; field < TnxlogConfig.QthFieldCount; field++)
     {
         LabelTextBox ltb = new LabelTextBox();
         qthFieldAdifContols.Add(ltb);
         groupBoxAdifFields.Controls.Add(ltb);
         ltb.Location = new Point(1, 14 + field * (ltb.Height + 2));
     }
     ltbComment = new LabelTextBox();
     qthFieldAdifContols.Add(ltbComment);
     groupBoxAdifFields.Controls.Add(ltbComment);
     ltbComment.Location  = new Point(1, 14 + TnxlogConfig.QthFieldCount * (ltbComment.Height + 2));
     ltbComment.labelText = "Comment";
 }