protected override void InitializeControls() { this.Chart = new FlexRadar() { Dock = DockStyle.Fill }; _cbChartType = ControlFactory.EnumBasedCombo(typeof(RadarChartType), "Chart Type"); _cbChartType.SelectedIndexChanged += (s, e) => (this.Chart as FlexRadar).ChartType = (RadarChartType)Enum.Parse(typeof(RadarChartType), _cbChartType.SelectedItem.ToString()); _cbStacking = ControlFactory.EnumBasedCombo(typeof(Stacking), "Stacking"); _cbStacking.SelectedIndexChanged += (s, e) => (this.Chart as FlexRadar).Stacking = (Stacking)Enum.Parse(typeof(Stacking), _cbStacking.SelectedItem.ToString()); _cbPalette = ControlFactory.EnumBasedCombo(typeof(Palette), "Palette"); _cbPalette.SelectedIndexChanged += (s, e) => (this.Chart as FlexRadar).Palette = (Palette)Enum.Parse(typeof(Palette), _cbPalette.SelectedItem.ToString()); _lStartAngle = new LabelEx("Start Angle:"); _udStartAngle = new NumericUpDownEx() { Minimum = -360, Maximum = 360, Increment = 45, Value = 0 }; _udStartAngle.ValueChanged += (s, e) => (this.Chart as FlexRadar).StartAngle = (double)_udStartAngle.Value; _chbReverse = new CheckBoxEx("Reverse"); _chbReverse.CheckedChanged += (s, e) => (this.Chart as FlexRadar).Reversed = _chbReverse.Checked; this.pnlControls.Controls.Add(_cbChartType); this.pnlControls.Controls.Add(_cbStacking); this.pnlControls.Controls.Add(_cbPalette); this.pnlControls.Controls.Add(_lStartAngle); this.pnlControls.Controls.Add(_udStartAngle); this.pnlControls.Controls.Add(_chbReverse); }
protected override void InitializeControls() { this.Chart = new FlexRadar() { Dock = DockStyle.Fill }; _lKValue = new LabelEx("k =") { Margin = new Padding(5, 5, 0, 5) }; _udKValue = new NumericUpDownEx() { Minimum = 0, Maximum = 10, Increment = 1, Value = (decimal)_kValue, Margin = new Padding(0, 5, 0, 5) }; _udKValue.ValueChanged += (s, e) => (this.Chart as FlexRadar).DataSource = DataService.GetSineCosineData((double)_udKValue.Value, (double)_udAValue.Value); _lAValue = new LabelEx("a =") { Margin = new Padding(5, 5, 0, 5) }; _udAValue = new NumericUpDownEx() { Minimum = 0, Maximum = 5, Increment = 0.1M, DecimalPlaces = 1, Value = (decimal)_aValue, Margin = new Padding(0, 5, 0, 5) }; _udAValue.ValueChanged += (s, e) => (this.Chart as FlexRadar).DataSource = DataService.GetSineCosineData((double)_udKValue.Value, (double)_udAValue.Value); this.pnlControls.Controls.Add(_lKValue); this.pnlControls.Controls.Add(_udKValue); this.pnlControls.Controls.Add(_lAValue); this.pnlControls.Controls.Add(_udAValue); }
protected override void InitializeControls() { flexChart1 = new FlexChart(); this.Chart = flexChart1; _lBinWidth = new LabelEx("Bin Width :"); _udBinWidth = new NumericUpDownEx() { Minimum = (decimal)0.1, Maximum = 2, Increment = (decimal)0.1, DecimalPlaces = 1 }; _udBinWidth.ValueChanged += (s, e) => { _histogramSeries.BinWidth = (double)_udBinWidth.Value; }; _cbAppearance = ControlFactory.EnumBasedCombo(typeof(HistogramAppearance), "Appearance"); _cbAppearance.Width = 160; _cbAppearance.SelectedIndexChanged += (s, e) => { _histogramSeries.HistogramAppearance = (HistogramAppearance)Enum.Parse(typeof(HistogramAppearance), _cbAppearance.SelectedItem.ToString()); }; _chbNormalCurve = new CheckBoxEx("Normal Curve"); _chbNormalCurve.CheckedChanged += (s, e) => { _histogramSeries.NormalCurve.Visible = _chbNormalCurve.Checked; }; _chbCumulative = new CheckBoxEx("Cumulative"); _chbCumulative.CheckedChanged += (s, e) => { _histogramSeries.CumulativeMode = _chbCumulative.Checked; }; this.pnlControls.Controls.Add(_lBinWidth); this.pnlControls.Controls.Add(_udBinWidth); this.pnlControls.Controls.Add(_cbAppearance); this.pnlControls.Controls.Add(_chbNormalCurve); this.pnlControls.Controls.Add(_chbCumulative); }
protected override void InitializeControls() { this.Chart = new C1.Win.Chart.TreeMap() { Dock = DockStyle.Fill }; _cbChartType = ControlFactory.EnumBasedCombo(typeof(TreeMapType), "Chart Type"); _cbChartType.SelectedIndexChanged += (s, e) => (this.Chart as C1.Win.Chart.TreeMap).ChartType = (TreeMapType)Enum.Parse(typeof(TreeMapType), _cbChartType.SelectedItem.ToString()); _cbPalette = ControlFactory.EnumBasedCombo(typeof(Palette), "Palette"); _cbPalette.SelectedIndexChanged += (s, e) => (this.Chart as C1.Win.Chart.TreeMap).Palette = (Palette)Enum.Parse(typeof(Palette), _cbPalette.SelectedItem.ToString()); _chbLabel = new CheckBoxEx("Labels") { Checked = true }; _chbLabel.CheckedChanged += (s, e) => (this.Chart as C1.Win.Chart.TreeMap).DataLabel.Position = _chbLabel.Checked ? LabelPosition.Center : LabelPosition.None; _lMaxDepth = new LabelEx("MaxDepth"); _udMaxDepth = new NumericUpDownEx { Minimum = 1, Maximum = 4, Increment = 1, Value = 2 }; _udMaxDepth.ValueChanged += (s, e) => (this.Chart as C1.Win.Chart.TreeMap).MaxDepth = (int)_udMaxDepth.Value; this.pnlControls.Controls.Add(_cbChartType); this.pnlControls.Controls.Add(_cbPalette); this.pnlControls.Controls.Add(_chbLabel); this.pnlControls.Controls.Add(_lMaxDepth); this.pnlControls.Controls.Add(_udMaxDepth); }
protected override void InitializeControls() { flexChart1 = new FlexChart(); this.Chart = flexChart1; _cbChartType = ChartControlFactory.BasicChartTypesCombo(); _cbChartType.SelectedIndexChanged += (s, e) => { flexChart1.ChartType = (ChartType)Enum.Parse(typeof(ChartType), _cbChartType.SelectedValue.ToString()); }; _cbLabelPosition = ControlFactory.EnumBasedCombo(typeof(LabelPosition), "Label Position"); _cbLabelPosition.SelectedIndexChanged += (s, e) => { flexChart1.DataLabel.Position = (LabelPosition)Enum.Parse(typeof(LabelPosition), _cbLabelPosition.SelectedValue.ToString()); }; _chbLabelBorder = new CheckBoxEx("Label Border"); _chbLabelBorder.CheckedChanged += (s, e) => { flexChart1.DataLabel.Border = _chbLabelBorder.Checked; }; _chbConnectingLine = new CheckBoxEx("Connecting Line"); _chbConnectingLine.CheckedChanged += (s, e) => { flexChart1.DataLabel.ConnectingLine = _chbConnectingLine.Checked; }; _lLabelAngle = new LabelEx("Angle :"); _udLabelAngle = new NumericUpDownEx { Minimum = -90, Maximum = 90, Value = 0, Increment = 30, Width = 40 }; _udLabelAngle.ValueChanged += (s, e) => { flexChart1.DataLabel.Angle = (int)_udLabelAngle.Value; }; this.pnlControls.Controls.Add(_cbChartType); this.pnlControls.Controls.Add(_cbLabelPosition); this.pnlControls.Controls.Add(_chbLabelBorder); this.pnlControls.Controls.Add(_chbConnectingLine); this.pnlControls.Controls.Add(_lLabelAngle); this.pnlControls.Controls.Add(_udLabelAngle); }
protected override void InitializeControls() { fpie = new FlexPie() { Dock = DockStyle.Fill }; Chart = fpie; pnlControls.Controls.Add(new LabelEx("Inner Radius")); var numInnerRadius = new NumericUpDownEx() { Minimum = 0, Maximum = 0.9M, Increment = 0.1M, DecimalPlaces = 1, Value = 0 }; numInnerRadius.ValueChanged += (s, a) => fpie.InnerRadius = (double)numInnerRadius.Value; pnlControls.Controls.Add(numInnerRadius); pnlControls.Controls.Add(new LabelEx("Offset")); var numOffset = new NumericUpDownEx() { Minimum = 0, Maximum = 1, Increment = 0.1M, DecimalPlaces = 1, Value = 0 }; numOffset.ValueChanged += (s, a) => fpie.Offset = (double)numOffset.Value; pnlControls.Controls.Add(numOffset); var cbLabels = new CheckBoxEx("Show Labels"); cbLabels.CheckedChanged += (s, a) => fpie.DataLabel.Position = cbLabels.Checked ? PieLabelPosition.Center : PieLabelPosition.None; pnlControls.SetFlowBreak(cbLabels, true); pnlControls.Controls.Add(cbLabels); var btnNew = new ButtonEx("New Data"); btnNew.Click += (s, a) => NewData(); pnlControls.Controls.Add(btnNew); var btnUpdate = new ButtonEx("Update"); btnUpdate.Click += (s, a) => UpdateData(); pnlControls.Controls.Add(btnUpdate); var btnAddPoint = new ButtonEx("+ Point"); btnAddPoint.Click += (s, a) => AddPoint(); pnlControls.Controls.Add(btnAddPoint); var btnRemovePoint = new ButtonEx("- Point"); btnRemovePoint.Click += (s, a) => RemovePoint(); pnlControls.Controls.Add(btnRemovePoint); }
protected override void InitializeControls() { flexChart1 = new FlexChart(); this.Chart = flexChart1; //Init ShowEquation CheckBox _chbShowEquation = new CheckBoxEx("Show Equation") { Checked = true }; _chbShowEquation.CheckedChanged += (s, e) => { _slEquationLabel.Visible = _chbShowEquation.Checked; //change ShowEquation label text if (_chbShowEquation.Checked) { _slEquationLabel.Text = GetEquationString(_trendLine); } }; //Init Fit Type ComboBox _cbFitType = ControlFactory.EnumBasedCombo(typeof(FitType), "FitType"); _cbFitType.SelectedIndexChanged += (s, e) => { _trendLine.FitType = (FitType)Enum.Parse(typeof(FitType), _cbFitType.SelectedItem.ToString()); _lOrder.Visible = _udOrder.Visible = _trendLine.FitType == FitType.Fourier || _trendLine.FitType == FitType.Polynom; }; //Init Order _lOrder = new LabelEx("Order :") { Visible = false }; _udOrder = new NumericUpDownEx() { Minimum = 2, Maximum = 9, Value = 4, Increment = 1, Visible = false }; _udOrder.ValueChanged += (s, e) => { _trendLine.Order = (int)_udOrder.Value; }; //Init Equation SuperLabel _slEquationLabel = new C1SuperLabel() { AutoSize = true, UseMnemonic = true }; this.pnlControls.Controls.Add(_chbShowEquation); this.pnlControls.Controls.Add(_cbFitType); this.pnlControls.Controls.Add(_lOrder); this.pnlControls.Controls.Add(_udOrder); this.flexChart1.Controls.Add(_slEquationLabel); }
protected override void InitializeControls() { flexChart1 = new FlexChart(); this.Chart = flexChart1; _tbVisibilityLevel = new LabelEx("Group Visibility Level"); _udVisibilityLevel = new NumericUpDownEx() { Minimum = -4, Maximum = 4, Value = 1, Increment = 1 }; _udVisibilityLevel.ValueChanged += (s, e) => { flexChart1.AxisX.GroupVisibilityLevel = (int)_udVisibilityLevel.Value; }; this.pnlControls.Controls.Add(_tbVisibilityLevel); this.pnlControls.Controls.Add(_udVisibilityLevel); }
protected override void InitializeControls() { //Sunburst chart this.Chart = new C1.Win.Chart.Sunburst { Dock = DockStyle.Fill }; //Inner Radius _lInnerRad = new LabelEx("Inner Radius"); _udInnerRad = new NumericUpDownEx { Minimum = 0, Maximum = 1, Increment = (decimal)0.1, Value = 0, DecimalPlaces = 1 }; _udInnerRad.ValueChanged += (s, e) => (this.Chart as C1.Win.Chart.Sunburst).InnerRadius = (double)_udInnerRad.Value; //Offset _lOffset = new LabelEx("Offset"); _udOffset = new NumericUpDownEx { Minimum = 0, Maximum = 1, Increment = (decimal)0.1, Value = 0, DecimalPlaces = 1 }; _udOffset.ValueChanged += (s, e) => (this.Chart as C1.Win.Chart.Sunburst).Offset = (double)_udOffset.Value; //Start Angle _lStartAngle = new LabelEx("Start Angle"); _udStartAngle = new NumericUpDownEx { Minimum = 0, Maximum = 360, Increment = 45, Value = 0 }; _udStartAngle.ValueChanged += (s, e) => (this.Chart as C1.Win.Chart.Sunburst).StartAngle = (double)_udStartAngle.Value; //Palette _cbPalette = ControlFactory.EnumBasedCombo(typeof(Palette), "Palette"); _cbPalette.SelectedIndexChanged += (s, e) => (this.Chart as C1.Win.Chart.Sunburst).Palette = (Palette)Enum.Parse(typeof(Palette), _cbPalette.SelectedItem.ToString()); //Reversed _chbReverse = new CheckBoxEx("Reversed"); _chbReverse.CheckedChanged += (s, e) => (this.Chart as C1.Win.Chart.Sunburst).Reversed = _chbReverse.Checked; this.pnlControls.Controls.Add(_lInnerRad); this.pnlControls.Controls.Add(_udInnerRad); this.pnlControls.Controls.Add(_lOffset); this.pnlControls.Controls.Add(_udOffset); this.pnlControls.Controls.Add(_lStartAngle); this.pnlControls.Controls.Add(_udStartAngle); this.pnlControls.Controls.Add(_cbPalette); this.pnlControls.Controls.Add(_chbReverse); }
protected override void InitializeControls() { flexChart1 = new FlexChart(); this.Chart = flexChart1; _lStaggeredLines = new LabelEx("Staggered Lines :"); _udStaggeredLines = new NumericUpDownEx { Minimum = 1, Maximum = 4, Value = 2 }; _udStaggeredLines.ValueChanged += (s, e) => { flexChart1.AxisX.StaggeredLines = (int)_udStaggeredLines.Value; }; _cbOverlapping = ControlFactory.EnumBasedCombo(typeof(OverlappingLabels), "Overlapping"); _cbOverlapping.SelectedIndexChanged += (s, e) => { flexChart1.AxisX.OverlappingLabels = (OverlappingLabels)Enum.Parse(typeof(OverlappingLabels), _cbOverlapping.SelectedValue.ToString()); }; this.pnlControls.Controls.Add(_lStaggeredLines); this.pnlControls.Controls.Add(_udStaggeredLines); this.pnlControls.Controls.Add(_cbOverlapping); }
protected override void InitializeControls() { flexChart1 = new FlexChart(); this.Chart = flexChart1; _lLabelsGap = new LabelEx("DataLabels Gap :"); _udLabelsGap = new NumericUpDownEx { Minimum = 0, Maximum = 15, Increment = 1, Value = 10 }; _udLabelsGap.ValueChanged += (s, e) => { flexChart1.Invalidate(); }; _chblabelBorder = new CheckBoxEx("Label Border"); _chblabelBorder.CheckedChanged += (s, e) => { this.flexChart1.DataLabel.Border = _chblabelBorder.Checked; }; this.pnlControls.Controls.Add(_lLabelsGap); this.pnlControls.Controls.Add(_udLabelsGap); this.pnlControls.Controls.Add(_chblabelBorder); }
protected override void InitializeControls() { this.Chart = new C1.Win.Chart.Sunburst { Dock = DockStyle.Fill }; //Selected Item Offset _lOffset = new LabelEx("Selected Item Offset"); _udOffset = new NumericUpDownEx { Minimum = 0, Maximum = 1, Increment = (decimal)0.1, Value = 0, DecimalPlaces = 1 }; _udOffset.ValueChanged += (s, e) => (this.Chart as C1.Win.Chart.Sunburst).SelectedItemOffset = (double)_udOffset.Value; //Selected Item Position _cbSelItemPos = ControlFactory.EnumBasedCombo(typeof(Position), "Selected Item Position"); _cbSelItemPos.Width = 160; _cbSelItemPos.SelectedIndexChanged += (s, e) => (this.Chart as C1.Win.Chart.Sunburst).SelectedItemPosition = (Position)Enum.Parse(typeof(Position), _cbSelItemPos.SelectedItem.ToString()); this.pnlControls.Controls.Add(_lOffset); this.pnlControls.Controls.Add(_udOffset); this.pnlControls.Controls.Add(_cbSelItemPos); }
protected override void InitializeControls() { flexChart1 = new FlexChart(); this.Chart = flexChart1; _cbPalette = ControlFactory.EnumBasedCombo(typeof(Palette), "Palette"); _cbPalette.SelectedIndexChanged += (s, e) => this.flexChart1.Palette = (Palette)Enum.Parse(typeof(Palette), _cbPalette.SelectedItem.ToString()); _cbFunnelType = ControlFactory.EnumBasedCombo(typeof(FunnelChartType), "Funnel Type"); _cbFunnelType.SelectedIndexChanged += (s, e) => { this.flexChart1.Options.FunnelType = (FunnelChartType)Enum.Parse(typeof(FunnelChartType), _cbFunnelType.SelectedItem.ToString()); _udNeckWidth.Enabled = _udNeckHeight.Enabled = this.flexChart1.Options.FunnelType == FunnelChartType.Default; }; _lNeckHeight = new LabelEx("Neck Height: "); _lNeckWidth = new LabelEx("Neck Width: "); _udNeckHeight = new NumericUpDownEx() { Minimum = 0M, Maximum = 1M, Increment = 0.1M, DecimalPlaces = 1 }; _udNeckHeight.ValueChanged += (s, e) => this.flexChart1.Options.FunnelNeckHeight = (double)_udNeckHeight.Value; _udNeckWidth = new NumericUpDownEx() { Minimum = 0M, Maximum = 1M, Increment = 0.1M, DecimalPlaces = 1 }; _udNeckWidth.ValueChanged += (s, e) => this.flexChart1.Options.FunnelNeckWidth = (double)_udNeckWidth.Value; this.pnlControls.Controls.Add(_cbPalette); this.pnlControls.Controls.Add(_cbFunnelType); this.pnlControls.Controls.Add(_lNeckHeight); this.pnlControls.Controls.Add(_udNeckHeight); this.pnlControls.Controls.Add(_lNeckWidth); this.pnlControls.Controls.Add(_udNeckWidth); }
protected override void InitializeControls() { this.Chart = new C1.Win.Chart.TreeMap() { Dock = DockStyle.Fill }; //Init MaxDepth Label and Numeric Box _lMaxDepth = new LabelEx("Max Depth :"); _udMaxDepth = new NumericUpDownEx { Minimum = 1, Maximum = 4, Value = 2, Increment = 1 }; _udMaxDepth.ValueChanged += (s, e) => { (this.Chart as C1.Win.Chart.TreeMap).MaxDepth = (int)_udMaxDepth.Value; }; this.pnlControls.Controls.Add(_lMaxDepth); this.pnlControls.Controls.Add(_udMaxDepth); //Init Color's Dictionary _colorDict = new Dictionary <string, SolidBrush>(); _colorDict.Add("Title", new SolidBrush(Color.FromArgb(140, Color.Green))); _colorDict.Add("LeafPos", new SolidBrush(Color.FromArgb(90, Color.Green))); _colorDict.Add("LeafNeg", new SolidBrush(Color.FromArgb(120, Color.Red))); _colorDict.Add("Border", new SolidBrush(Color.Black)); }
private void InitializeComponent() { this.components = (IContainer) new Container(); ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(SequencerViewControl)); this.errorProvider = new ErrorProvider(this.components); this.lblTimer2Value = new Label(); this.btnSequencerStop = new Button(); this.btnSequencerStart = new Button(); this.label1 = new Label(); this.label22 = new Label(); this.cBoxTimer1Resolution = new ComboBox(); this.cBoxSeqLowPowerMode = new ComboBox(); this.cBoxFromStart = new ComboBox(); this.cBoxSeqLowPowerState = new ComboBox(); this.cBoxFromIdle = new ComboBox(); this.cBoxFromTransmit = new ComboBox(); this.cBoxFromReceive = new ComboBox(); this.cBoxFromRxTimeout = new ComboBox(); this.cBoxFromPacketReceived = new ComboBox(); this.cBoxSeqTimer2Resolution = new ComboBox(); this.label2 = new Label(); this.label3 = new Label(); this.label4 = new Label(); this.label5 = new Label(); this.label6 = new Label(); this.label7 = new Label(); this.label8 = new Label(); this.label9 = new Label(); this.lblTimer1Value = new Label(); this.label11 = new Label(); this.label12 = new Label(); this.label10 = new Label(); this.label13 = new Label(); this.label14 = new Label(); this.label15 = new Label(); this.label16 = new Label(); this.label17 = new Label(); this.label18 = new Label(); this.label19 = new Label(); this.label20 = new Label(); this.nudSeqTimer2Coefficient = new NumericUpDownEx(); this.nudSeqTimer1Coefficient = new NumericUpDownEx(); this.ledSequencerModeStatus = new Led(); this.toolTip1 = new ToolTip(this.components); ((ISupportInitialize)this.errorProvider).BeginInit(); this.nudSeqTimer2Coefficient.BeginInit(); this.nudSeqTimer1Coefficient.BeginInit(); this.SuspendLayout(); this.errorProvider.ContainerControl = (ContainerControl)this; this.lblTimer2Value.BackColor = Color.Transparent; this.lblTimer2Value.BorderStyle = BorderStyle.Fixed3D; this.errorProvider.SetIconPadding((Control)this.lblTimer2Value, 30); this.lblTimer2Value.Location = new Point(502, 391); this.lblTimer2Value.Margin = new Padding(3); this.lblTimer2Value.Name = "lblTimer2Value"; this.lblTimer2Value.Size = new Size(98, 20); this.lblTimer2Value.TabIndex = 35; this.lblTimer2Value.Text = "0"; this.lblTimer2Value.TextAlign = ContentAlignment.MiddleLeft; this.btnSequencerStop.Location = new Point(447, 75); this.btnSequencerStop.Name = "btnSequencerStop"; this.btnSequencerStop.Size = new Size(89, 23); this.btnSequencerStop.TabIndex = 2; this.btnSequencerStop.Text = "Stop"; this.btnSequencerStop.UseVisualStyleBackColor = true; this.btnSequencerStop.Click += new EventHandler(this.btnSequencerStop_Click); this.btnSequencerStart.Location = new Point(352, 75); this.btnSequencerStart.Name = "btnSequencerStart"; this.btnSequencerStart.Size = new Size(89, 23); this.btnSequencerStart.TabIndex = 1; this.btnSequencerStart.Text = "Start"; this.btnSequencerStart.UseVisualStyleBackColor = true; this.btnSequencerStart.Click += new EventHandler(this.btnSequencerStart_Click); this.label1.AutoSize = true; this.label1.Location = new Point(194, 320); this.label1.Margin = new Padding(3); this.label1.Name = "label1"; this.label1.Size = new Size(90, 13); this.label1.TabIndex = 19; this.label1.Text = "Timer 1 resolution"; this.label22.AutoSize = true; this.label22.Location = new Point(307, 343); this.label22.Name = "label22"; this.label22.Size = new Size(18, 13); this.label22.TabIndex = 22; this.label22.Text = "µs"; this.cBoxTimer1Resolution.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxTimer1Resolution.FormattingEnabled = true; this.cBoxTimer1Resolution.Items.AddRange(new object[4] { (object)"OFF", (object)"64", (object)"4'100", (object)"262'000" }); this.cBoxTimer1Resolution.Location = new Point(177, 339); this.cBoxTimer1Resolution.Name = "cBoxTimer1Resolution"; this.cBoxTimer1Resolution.Size = new Size(124, 21); this.cBoxTimer1Resolution.TabIndex = 21; this.cBoxTimer1Resolution.SelectedIndexChanged += new EventHandler(this.cBoxTimer1Resolution_SelectedIndexChanged); this.cBoxSeqLowPowerMode.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxSeqLowPowerMode.FormattingEnabled = true; this.cBoxSeqLowPowerMode.Items.AddRange(new object[2] { (object)"Standby", (object)"Sleep" }); this.cBoxSeqLowPowerMode.Location = new Point(352, 104); this.cBoxSeqLowPowerMode.Name = "cBoxSeqLowPowerMode"; this.cBoxSeqLowPowerMode.Size = new Size(124, 21); this.cBoxSeqLowPowerMode.TabIndex = 4; this.cBoxSeqLowPowerMode.SelectedIndexChanged += new EventHandler(this.cBoxSeqLowPowerMode_SelectedIndexChanged); this.cBoxFromStart.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxFromStart.FormattingEnabled = true; this.cBoxFromStart.Items.AddRange(new object[4] { (object)"To LowPowerSelection ", (object)"To Rx", (object)"To Tx", (object)"To Tx on FifoLevel" }); this.cBoxFromStart.Location = new Point(352, 131); this.cBoxFromStart.Name = "cBoxFromStart"; this.cBoxFromStart.Size = new Size(124, 21); this.cBoxFromStart.TabIndex = 6; this.cBoxFromStart.SelectedIndexChanged += new EventHandler(this.cBoxFromStart_SelectedIndexChanged); this.cBoxSeqLowPowerState.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxSeqLowPowerState.FormattingEnabled = true; this.cBoxSeqLowPowerState.Items.AddRange(new object[2] { (object)"Sequencer OFF", (object)"Idle" }); this.cBoxSeqLowPowerState.Location = new Point(352, 158); this.cBoxSeqLowPowerState.Name = "cBoxSeqLowPowerState"; this.cBoxSeqLowPowerState.Size = new Size(124, 21); this.cBoxSeqLowPowerState.TabIndex = 8; this.cBoxSeqLowPowerState.SelectedIndexChanged += new EventHandler(this.cBoxSeqLowPowerState_SelectedIndexChanged); this.cBoxFromIdle.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxFromIdle.FormattingEnabled = true; this.cBoxFromIdle.Items.AddRange(new object[2] { (object)"To Tx", (object)"To Rx" }); this.cBoxFromIdle.Location = new Point(352, 185); this.cBoxFromIdle.Name = "cBoxFromIdle"; this.cBoxFromIdle.Size = new Size(124, 21); this.cBoxFromIdle.TabIndex = 10; this.cBoxFromIdle.SelectedIndexChanged += new EventHandler(this.cBoxFromIdle_SelectedIndexChanged); this.cBoxFromTransmit.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxFromTransmit.FormattingEnabled = true; this.cBoxFromTransmit.Items.AddRange(new object[2] { (object)"To LowPowerSelection", (object)"To Rx" }); this.cBoxFromTransmit.Location = new Point(352, 212); this.cBoxFromTransmit.Name = "cBoxFromTransmit"; this.cBoxFromTransmit.Size = new Size(124, 21); this.cBoxFromTransmit.TabIndex = 12; this.cBoxFromTransmit.SelectedIndexChanged += new EventHandler(this.cBoxFromTransmit_SelectedIndexChanged); this.cBoxFromReceive.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxFromReceive.FormattingEnabled = true; this.cBoxFromReceive.Items.AddRange(new object[8] { (object)"Unused", (object)"To PacketReceived on PayloadReady", (object)"To LowPowerSelection on PayloadReady", (object)"To PacketReceived on CrcOk", (object)"To Sequencer OFF on RSSI", (object)"To Sequencer OFF on SyncAddress", (object)"To Sequencer OFF on PreambleDetect", (object)"Unused" }); this.cBoxFromReceive.Location = new Point(352, 239); this.cBoxFromReceive.Name = "cBoxFromReceive"; this.cBoxFromReceive.Size = new Size(124, 21); this.cBoxFromReceive.TabIndex = 14; this.cBoxFromReceive.SelectedIndexChanged += new EventHandler(this.cBoxFromReceive_SelectedIndexChanged); this.cBoxFromRxTimeout.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxFromRxTimeout.FormattingEnabled = true; this.cBoxFromRxTimeout.Items.AddRange(new object[4] { (object)"To Rx on RxRestart", (object)"To Tx", (object)"To LowPowerSelection", (object)"To Sequencer OFF" }); this.cBoxFromRxTimeout.Location = new Point(352, 266); this.cBoxFromRxTimeout.Name = "cBoxFromRxTimeout"; this.cBoxFromRxTimeout.Size = new Size(124, 21); this.cBoxFromRxTimeout.TabIndex = 16; this.cBoxFromRxTimeout.SelectedIndexChanged += new EventHandler(this.cBoxFromRxTimeout_SelectedIndexChanged); this.cBoxFromPacketReceived.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxFromPacketReceived.FormattingEnabled = true; this.cBoxFromPacketReceived.Items.AddRange(new object[5] { (object)"To Sequencer OFF", (object)"To Tx on FifoEmpty", (object)"To LowPowerSelection", (object)"To Rx via FsRx on frequency change", (object)"To Rx" }); this.cBoxFromPacketReceived.Location = new Point(352, 293); this.cBoxFromPacketReceived.Name = "cBoxFromPacketReceived"; this.cBoxFromPacketReceived.Size = new Size(124, 21); this.cBoxFromPacketReceived.TabIndex = 18; this.cBoxFromPacketReceived.SelectedIndexChanged += new EventHandler(this.cBoxFromPacketReceived_SelectedIndexChanged); this.cBoxSeqTimer2Resolution.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxSeqTimer2Resolution.FormattingEnabled = true; this.cBoxSeqTimer2Resolution.Items.AddRange(new object[4] { (object)"OFF", (object)"64", (object)"4'100", (object)"262'000" }); this.cBoxSeqTimer2Resolution.Location = new Point(177, 391); this.cBoxSeqTimer2Resolution.Name = "cBoxSeqTimer2Resolution"; this.cBoxSeqTimer2Resolution.Size = new Size(124, 21); this.cBoxSeqTimer2Resolution.TabIndex = 30; this.cBoxSeqTimer2Resolution.SelectedIndexChanged += new EventHandler(this.cBoxSeqTimer2Resolution_SelectedIndexChanged); this.label2.AutoSize = true; this.label2.Location = new Point(307, 395); this.label2.Name = "label2"; this.label2.Size = new Size(18, 13); this.label2.TabIndex = 31; this.label2.Text = "µs"; this.label3.AutoSize = true; this.label3.Location = new Point(194, 372); this.label3.Margin = new Padding(3); this.label3.Name = "label3"; this.label3.Size = new Size(90, 13); this.label3.TabIndex = 28; this.label3.Text = "Timer 2 resolution"; this.label4.AutoSize = true; this.label4.Location = new Point(367, 320); this.label4.Margin = new Padding(3); this.label4.Name = "label4"; this.label4.Size = new Size(94, 13); this.label4.TabIndex = 20; this.label4.Text = "Timer 1 coefficient"; this.label5.AutoSize = true; this.label5.Location = new Point(367, 372); this.label5.Margin = new Padding(3); this.label5.Name = "label5"; this.label5.Size = new Size(94, 13); this.label5.TabIndex = 29; this.label5.Text = "Timer 2 coefficient"; this.label6.AutoSize = true; this.label6.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte)0); this.label6.Location = new Point(331, 343); this.label6.Name = "label6"; this.label6.Size = new Size(15, 13); this.label6.TabIndex = 23; this.label6.Text = "X"; this.label7.AutoSize = true; this.label7.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte)0); this.label7.Location = new Point(331, 395); this.label7.Name = "label7"; this.label7.Size = new Size(15, 13); this.label7.TabIndex = 32; this.label7.Text = "X"; this.label8.AutoSize = true; this.label8.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte)0); this.label8.Location = new Point(482, 343); this.label8.Name = "label8"; this.label8.Size = new Size(14, 13); this.label8.TabIndex = 25; this.label8.Text = "="; this.label9.AutoSize = true; this.label9.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte)0); this.label9.Location = new Point(482, 395); this.label9.Name = "label9"; this.label9.Size = new Size(14, 13); this.label9.TabIndex = 34; this.label9.Text = "="; this.lblTimer1Value.BackColor = Color.Transparent; this.lblTimer1Value.BorderStyle = BorderStyle.Fixed3D; this.lblTimer1Value.Location = new Point(502, 339); this.lblTimer1Value.Margin = new Padding(3); this.lblTimer1Value.Name = "lblTimer1Value"; this.lblTimer1Value.Size = new Size(98, 20); this.lblTimer1Value.TabIndex = 26; this.lblTimer1Value.Text = "0"; this.lblTimer1Value.TextAlign = ContentAlignment.MiddleLeft; this.label11.AutoSize = true; this.label11.Location = new Point(606, 343); this.label11.Name = "label11"; this.label11.Size = new Size(18, 13); this.label11.TabIndex = 27; this.label11.Text = "µs"; this.label12.AutoSize = true; this.label12.Location = new Point(606, 395); this.label12.Name = "label12"; this.label12.Size = new Size(18, 13); this.label12.TabIndex = 36; this.label12.Text = "µs"; this.label10.AutoSize = true; this.label10.Location = new Point(174, 80); this.label10.Name = "label10"; this.label10.Size = new Size(62, 13); this.label10.TabIndex = 0; this.label10.Text = "Sequencer:"; this.label13.AutoSize = true; this.label13.Location = new Point(174, 107); this.label13.Name = "label13"; this.label13.Size = new Size(56, 13); this.label13.TabIndex = 3; this.label13.Text = "Idle mode:"; this.label14.AutoSize = true; this.label14.Location = new Point(174, 134); this.label14.Name = "label14"; this.label14.Size = new Size(102, 13); this.label14.TabIndex = 5; this.label14.Text = "Transition from start:"; this.label15.AutoSize = true; this.label15.Location = new Point(174, 161); this.label15.Name = "label15"; this.label15.Size = new Size(107, 13); this.label15.TabIndex = 7; this.label15.Text = "Low power selection:"; this.label16.AutoSize = true; this.label16.Location = new Point(174, 188); this.label16.Name = "label16"; this.label16.Size = new Size(98, 13); this.label16.TabIndex = 9; this.label16.Text = "Transition from idle:"; this.label17.AutoSize = true; this.label17.Location = new Point(174, 215); this.label17.Name = "label17"; this.label17.Size = new Size(118, 13); this.label17.TabIndex = 11; this.label17.Text = "Transition from transmit:"; this.label18.AutoSize = true; this.label18.Location = new Point(174, 242); this.label18.Name = "label18"; this.label18.Size = new Size(117, 13); this.label18.TabIndex = 13; this.label18.Text = "Transition from receive:"; this.label19.AutoSize = true; this.label19.Location = new Point(174, 269); this.label19.Name = "label19"; this.label19.Size = new Size(132, 13); this.label19.TabIndex = 15; this.label19.Text = "Transition from Rx timeout:"; this.label20.AutoSize = true; this.label20.Location = new Point(174, 296); this.label20.Name = "label20"; this.label20.Size = new Size(159, 13); this.label20.TabIndex = 17; this.label20.Text = "Transition from packet received:"; this.nudSeqTimer2Coefficient.Location = new Point(352, 391); NumericUpDownEx numericUpDownEx1 = this.nudSeqTimer2Coefficient; int[] bits1 = new int[4]; bits1[0] = (int)byte.MaxValue; Decimal num1 = new Decimal(bits1); numericUpDownEx1.Maximum = num1; this.nudSeqTimer2Coefficient.Name = "nudSeqTimer2Coefficient"; this.nudSeqTimer2Coefficient.Size = new Size(124, 20); this.nudSeqTimer2Coefficient.TabIndex = 33; this.nudSeqTimer2Coefficient.ThousandsSeparator = true; this.nudSeqTimer2Coefficient.ValueChanged += new EventHandler(this.nudSeqTimer2Coefficient_ValueChanged); this.nudSeqTimer1Coefficient.Location = new Point(352, 339); NumericUpDownEx numericUpDownEx2 = this.nudSeqTimer1Coefficient; int[] bits2 = new int[4]; bits2[0] = (int)byte.MaxValue; Decimal num2 = new Decimal(bits2); numericUpDownEx2.Maximum = num2; this.nudSeqTimer1Coefficient.Name = "nudSeqTimer1Coefficient"; this.nudSeqTimer1Coefficient.Size = new Size(124, 20); this.nudSeqTimer1Coefficient.TabIndex = 24; this.nudSeqTimer1Coefficient.ThousandsSeparator = true; this.nudSeqTimer1Coefficient.ValueChanged += new EventHandler(this.nudSeqTimer1Coefficient_ValueChanged); this.ledSequencerModeStatus.BackColor = Color.Transparent; this.ledSequencerModeStatus.LedColor = Color.Green; this.ledSequencerModeStatus.LedSize = new Size(11, 11); this.ledSequencerModeStatus.Location = new Point(542, 79); this.ledSequencerModeStatus.Name = "ledSequencerModeStatus"; this.ledSequencerModeStatus.Size = new Size(15, 15); this.ledSequencerModeStatus.TabIndex = 37; this.ledSequencerModeStatus.Text = "Sequencer mode status"; this.toolTip1.SetToolTip((Control)this.ledSequencerModeStatus, componentResourceManager.GetString("ledSequencerModeStatus.ToolTip")); this.AutoScaleDimensions = new SizeF(6f, 13f); this.AutoScaleMode = AutoScaleMode.Font; this.Controls.Add((Control)this.ledSequencerModeStatus); this.Controls.Add((Control)this.lblTimer2Value); this.Controls.Add((Control)this.btnSequencerStop); this.Controls.Add((Control)this.lblTimer1Value); this.Controls.Add((Control)this.btnSequencerStart); this.Controls.Add((Control)this.nudSeqTimer2Coefficient); this.Controls.Add((Control)this.nudSeqTimer1Coefficient); this.Controls.Add((Control)this.label5); this.Controls.Add((Control)this.label4); this.Controls.Add((Control)this.label3); this.Controls.Add((Control)this.label20); this.Controls.Add((Control)this.label19); this.Controls.Add((Control)this.label18); this.Controls.Add((Control)this.label17); this.Controls.Add((Control)this.label16); this.Controls.Add((Control)this.label15); this.Controls.Add((Control)this.label14); this.Controls.Add((Control)this.label13); this.Controls.Add((Control)this.label10); this.Controls.Add((Control)this.label1); this.Controls.Add((Control)this.label2); this.Controls.Add((Control)this.label7); this.Controls.Add((Control)this.label9); this.Controls.Add((Control)this.label8); this.Controls.Add((Control)this.label6); this.Controls.Add((Control)this.label12); this.Controls.Add((Control)this.label11); this.Controls.Add((Control)this.label22); this.Controls.Add((Control)this.cBoxFromPacketReceived); this.Controls.Add((Control)this.cBoxFromRxTimeout); this.Controls.Add((Control)this.cBoxFromReceive); this.Controls.Add((Control)this.cBoxFromTransmit); this.Controls.Add((Control)this.cBoxFromIdle); this.Controls.Add((Control)this.cBoxSeqLowPowerState); this.Controls.Add((Control)this.cBoxFromStart); this.Controls.Add((Control)this.cBoxSeqLowPowerMode); this.Controls.Add((Control)this.cBoxSeqTimer2Resolution); this.Controls.Add((Control)this.cBoxTimer1Resolution); this.Name = "SequencerViewControl"; this.Size = new Size(799, 493); ((ISupportInitialize)this.errorProvider).EndInit(); this.nudSeqTimer2Coefficient.EndInit(); this.nudSeqTimer1Coefficient.EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
public KnowledgeSkillControl(KnowledgeSkill skill) { if (skill == null) { return; } _objGraphics = CreateGraphics(); _skill = skill; _tmrNameChangeTimer = new Timer { Interval = 1000 }; _tmrNameChangeTimer.Tick += NameChangeTimer_Tick; InitializeComponent(); KnowledgeSkillControl_DpiChangedAfterParent(null, EventArgs.Empty); this.UpdateLightDarkMode(); this.TranslateWinForm(); SuspendLayout(); lblModifiedRating.DoOneWayDataBinding("Text", _skill, nameof(KnowledgeSkill.DisplayPool)); lblModifiedRating.DoOneWayDataBinding("ToolTipText", _skill, nameof(KnowledgeSkill.PoolToolTip)); cmdDelete.DoOneWayDataBinding("Visible", _skill, nameof(Skill.AllowDelete)); cboType.BeginUpdate(); cboType.DataSource = null; cboType.DisplayMember = nameof(ListItem.Name); cboType.ValueMember = nameof(ListItem.Value); cboType.DataSource = KnowledgeSkill.KnowledgeTypes; cboType.DoDatabinding("SelectedValue", _skill, nameof(KnowledgeSkill.Type)); cboType.DoOneWayDataBinding("Enabled", _skill, nameof(Skill.AllowTypeChange)); cboType.EndUpdate(); lblName.DoOneWayNegatableDatabinding("Visible", _skill, nameof(Skill.AllowNameChange)); lblName.DoOneWayDataBinding("Text", _skill, nameof(KnowledgeSkill.WriteableName)); lblName.DoOneWayDataBinding("ForeColor", _skill, nameof(Skill.PreferredColor)); cboName.BeginUpdate(); cboName.DoOneWayDataBinding("Visible", _skill, nameof(Skill.AllowNameChange)); cboName.DataSource = null; cboName.DisplayMember = nameof(ListItem.Name); cboName.ValueMember = nameof(ListItem.Value); cboName.DataSource = KnowledgeSkill.DefaultKnowledgeSkills; cboName.SelectedIndex = -1; cboName.Text = _skill.WriteableName; cboName.EndUpdate(); _blnUpdatingName = false; if (_skill.CharacterObject.Created) { lblRating = new Label { Anchor = AnchorStyles.Right, AutoSize = true, MinimumSize = new Size((int)(25 * _objGraphics.DpiX / 96.0f), 0), Name = "lblRating", Text = "00", TextAlign = ContentAlignment.MiddleCenter }; btnCareerIncrease = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Image = Resources.add, Margin = new Padding(3, 0, 3, 0), Name = "btnCareerIncrease", Padding = new Padding(1), UseVisualStyleBackColor = true }; btnCareerIncrease.Click += btnCareerIncrease_Click; lblRating.DoOneWayNegatableDatabinding("Visible", _skill, nameof(KnowledgeSkill.IsNativeLanguage)); lblRating.DoOneWayDataBinding("Text", _skill, nameof(Skill.Rating)); btnCareerIncrease.DoOneWayDataBinding("Visible", _skill, nameof(KnowledgeSkill.AllowUpgrade)); btnCareerIncrease.DoOneWayDataBinding("Enabled", _skill, nameof(Skill.CanUpgradeCareer)); btnCareerIncrease.DoOneWayDataBinding("ToolTipText", _skill, nameof(Skill.UpgradeToolTip)); lblRating.UpdateLightDarkMode(); lblRating.TranslateWinForm(); btnCareerIncrease.UpdateLightDarkMode(); btnCareerIncrease.TranslateWinForm(); tlpMain.Controls.Add(lblRating, 1, 0); tlpMain.Controls.Add(btnCareerIncrease, 2, 0); lblSpec = new Label { Anchor = AnchorStyles.Left, AutoSize = true, Name = "lblSpec", Text = "[SPEC]", TextAlign = ContentAlignment.MiddleLeft }; btnAddSpec = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Image = Resources.add, Margin = new Padding(3, 0, 3, 0), Name = "btnAddSpec", Padding = new Padding(1), UseVisualStyleBackColor = true }; btnAddSpec.Click += btnAddSpec_Click; lblSpec.DoOneWayNegatableDatabinding("Visible", _skill, nameof(KnowledgeSkill.IsNativeLanguage)); lblSpec.DoOneWayDataBinding("Text", _skill, nameof(Skill.CurrentDisplaySpecialization)); btnAddSpec.DoOneWayDataBinding("Visible", _skill, nameof(Skill.CanHaveSpecs)); btnAddSpec.DoOneWayDataBinding("Enabled", _skill, nameof(Skill.CanAffordSpecialization)); btnAddSpec.DoOneWayDataBinding("ToolTipText", _skill, nameof(Skill.AddSpecToolTip)); lblSpec.UpdateLightDarkMode(); lblSpec.TranslateWinForm(); btnAddSpec.UpdateLightDarkMode(); btnAddSpec.TranslateWinForm(); tlpMiddle.SetColumnSpan(lblSpec, 2); tlpMiddle.Controls.Add(lblSpec, 1, 0); tlpMiddle.Controls.Add(btnAddSpec, 3, 0); } else { nudSkill = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudSkill" }; nudKarma = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudKarma" }; nudSkill.DoOneWayDataBinding("Visible", _skill.CharacterObject.SkillsSection, nameof(SkillsSection.HasKnowledgePoints)); nudSkill.DoOneWayDataBinding("Enabled", _skill, nameof(KnowledgeSkill.AllowUpgrade)); nudSkill.DoDatabinding("Value", _skill, nameof(Skill.Base)); nudSkill.DoOneWayDataBinding("InterceptMouseWheel", _skill.CharacterObject.Options, nameof(CharacterOptions.InterceptMode)); nudKarma.DoOneWayDataBinding("Enabled", _skill, nameof(KnowledgeSkill.AllowUpgrade)); nudKarma.DoDatabinding("Value", _skill, nameof(Skill.Karma)); nudKarma.DoOneWayDataBinding("InterceptMouseWheel", _skill.CharacterObject.Options, nameof(CharacterOptions.InterceptMode)); nudSkill.UpdateLightDarkMode(); nudSkill.TranslateWinForm(); nudKarma.UpdateLightDarkMode(); nudKarma.TranslateWinForm(); tlpMain.Controls.Add(nudSkill, 1, 0); tlpMain.Controls.Add(nudKarma, 2, 0); chkNativeLanguage = new ColorableCheckBox(components) { Anchor = AnchorStyles.Left, AutoSize = true, DefaultColorScheme = true, Margin = new Padding(3, 0, 3, 0), Name = "chkNativeLanguage", Tag = "Skill_NativeLanguageLong", Text = "Native", UseVisualStyleBackColor = true }; cboSpec = new ElasticComboBox { Anchor = AnchorStyles.Left | AnchorStyles.Right, AutoCompleteMode = AutoCompleteMode.Suggest, FormattingEnabled = true, Margin = new Padding(3, 0, 3, 0), Name = "cboSpec", TabStop = false }; chkKarma = new ColorableCheckBox(components) { Anchor = AnchorStyles.Left, AutoSize = true, DefaultColorScheme = true, Name = "chkKarma", UseVisualStyleBackColor = true }; chkNativeLanguage.DoOneWayDataBinding("Visible", _skill, nameof(Skill.IsLanguage)); chkNativeLanguage.Enabled = _skill.IsNativeLanguage || _skill.CharacterObject.SkillsSection.HasAvailableNativeLanguageSlots; chkNativeLanguage.DoDatabinding("Checked", _skill, nameof(Skill.IsNativeLanguage)); cboSpec.BeginUpdate(); cboSpec.DataSource = null; cboSpec.DisplayMember = nameof(ListItem.Name); cboSpec.ValueMember = nameof(ListItem.Value); cboSpec.DataSource = _skill.CGLSpecializations; cboSpec.SelectedIndex = -1; cboSpec.DoOneWayDataBinding("Enabled", _skill, nameof(Skill.CanHaveSpecs)); cboSpec.DoDatabinding("Text", _skill, nameof(Skill.Specialization)); cboSpec.EndUpdate(); chkKarma.DoOneWayDataBinding("Enabled", _skill, nameof(Skill.CanHaveSpecs)); chkKarma.DoDatabinding("Checked", _skill, nameof(Skill.BuyWithKarma)); chkNativeLanguage.UpdateLightDarkMode(); chkNativeLanguage.TranslateWinForm(); cboSpec.UpdateLightDarkMode(); cboSpec.TranslateWinForm(); chkKarma.UpdateLightDarkMode(); chkKarma.TranslateWinForm(); tlpMiddle.Controls.Add(chkNativeLanguage, 1, 0); tlpMiddle.Controls.Add(cboSpec, 2, 0); tlpMiddle.Controls.Add(chkKarma, 3, 0); } if (_skill.ForcedName) { this.DoOneWayDataBinding("Enabled", _skill, nameof(KnowledgeSkill.Enabled)); } ResumeLayout(); _skill.PropertyChanged += Skill_PropertyChanged; _skill.CharacterObject.SkillsSection.PropertyChanged += OnSkillsSectionPropertyChanged; }
public AttributeControl(CharacterAttrib attribute) { if (attribute == null) { return; } _objAttribute = attribute; _objCharacter = attribute.CharacterObject; InitializeComponent(); this.UpdateLightDarkMode(); this.TranslateWinForm(); SuspendLayout(); _dataSource = _objCharacter.AttributeSection.GetAttributeBindingByName(AttributeName); _objCharacter.AttributeSection.PropertyChanged += AttributePropertyChanged; //Display lblName.DoOneWayDataBinding("Text", _dataSource, nameof(CharacterAttrib.DisplayNameFormatted)); lblValue.DoOneWayDataBinding("Text", _dataSource, nameof(CharacterAttrib.DisplayValue)); lblLimits.DoOneWayDataBinding("Text", _dataSource, nameof(CharacterAttrib.AugmentedMetatypeLimits)); lblValue.DoOneWayDataBinding("ToolTipText", _dataSource, nameof(CharacterAttrib.ToolTip)); if (_objCharacter.Created) { cmdImproveATT = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Image = Resources.add, Margin = new Padding(3, 0, 3, 0), MinimumSize = new Size(24, 24), Name = "cmdImproveATT", UseVisualStyleBackColor = true }; cmdImproveATT.Click += cmdImproveATT_Click; cmdImproveATT.DoOneWayDataBinding("ToolTipText", _dataSource, nameof(CharacterAttrib.UpgradeToolTip)); cmdImproveATT.DoOneWayDataBinding("Enabled", _dataSource, nameof(CharacterAttrib.CanUpgradeCareer)); cmdImproveATT.UpdateLightDarkMode(); cmdImproveATT.TranslateWinForm(); flpRight.Controls.Add(cmdImproveATT); if (AttributeName == "EDG") { cmdBurnEdge = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Image = Resources.fire, Margin = new Padding(3, 0, 3, 0), MinimumSize = new Size(24, 24), Name = "cmdBurnEdge", ToolTipText = LanguageManager.GetString("Tip_CommonBurnEdge"), UseVisualStyleBackColor = true }; cmdBurnEdge.Click += cmdBurnEdge_Click; cmdBurnEdge.UpdateLightDarkMode(); cmdBurnEdge.TranslateWinForm(); flpRight.Controls.Add(cmdBurnEdge); } } else { while (_objAttribute.KarmaMaximum < 0 && _objAttribute.Base > 0) { _objAttribute.Base -= 1; } // Very rough fix for when Karma values somehow exceed KarmaMaximum after loading in. This shouldn't happen in the first place, but this ad-hoc patch will help fix crashes. if (_objAttribute.Karma > _objAttribute.KarmaMaximum) { _objAttribute.Karma = _objAttribute.KarmaMaximum; } nudKarma = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 0, 3, 0), Maximum = new decimal(new[] { 99, 0, 0, 0 }), MinimumSize = new Size(35, 0), Name = "nudKarma" }; nudKarma.BeforeValueIncrement += nudKarma_BeforeValueIncrement; nudKarma.ValueChanged += nudKarma_ValueChanged; nudBase = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 0, 3, 0), Maximum = new decimal(new[] { 99, 0, 0, 0 }), MinimumSize = new Size(35, 0), Name = "nudBase" }; nudBase.BeforeValueIncrement += nudBase_BeforeValueIncrement; nudBase.ValueChanged += nudBase_ValueChanged; nudBase.DoDatabinding("Visible", _objCharacter, nameof(Character.EffectiveBuildMethodUsesPriorityTables)); nudBase.DoOneWayDataBinding("Maximum", _dataSource, nameof(CharacterAttrib.PriorityMaximum)); nudBase.DoDatabinding("Value", _dataSource, nameof(CharacterAttrib.Base)); nudBase.DoOneWayDataBinding("Enabled", _dataSource, nameof(CharacterAttrib.BaseUnlocked)); nudBase.InterceptMouseWheel = GlobalOptions.InterceptMode; nudKarma.DoOneWayDataBinding("Maximum", _dataSource, nameof(CharacterAttrib.KarmaMaximum)); nudKarma.DoDatabinding("Value", _dataSource, nameof(CharacterAttrib.Karma)); nudKarma.InterceptMouseWheel = GlobalOptions.InterceptMode; nudBase.UpdateLightDarkMode(); nudBase.TranslateWinForm(); nudKarma.UpdateLightDarkMode(); nudKarma.TranslateWinForm(); flpRight.Controls.Add(nudKarma); flpRight.Controls.Add(nudBase); } ResumeLayout(); }
public KnowledgeSkillControl(KnowledgeSkill objSkill) { if (objSkill == null) { return; } _objSkill = objSkill; InitializeComponent(); SuspendLayout(); tlpMain.SuspendLayout(); tlpMiddle.SuspendLayout(); try { lblModifiedRating.DoOneWayDataBinding("Text", objSkill, nameof(KnowledgeSkill.DisplayPool)); lblModifiedRating.DoOneWayDataBinding("ToolTipText", objSkill, nameof(KnowledgeSkill.PoolToolTip)); cmdDelete.DoOneWayDataBinding("Visible", objSkill, nameof(Skill.AllowDelete)); cboType.BeginUpdate(); cboType.PopulateWithListItems(objSkill.CharacterObject.SkillsSection.MyKnowledgeTypes); cboType.DoDataBinding("SelectedValue", objSkill, nameof(KnowledgeSkill.Type)); cboType.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.AllowTypeChange)); cboType.EndUpdate(); lblName.DoOneWayNegatableDataBinding("Visible", objSkill, nameof(Skill.AllowNameChange)); lblName.DoOneWayDataBinding("Text", objSkill, nameof(KnowledgeSkill.WritableName)); lblName.DoOneWayDataBinding("ForeColor", objSkill, nameof(Skill.PreferredColor)); cboName.BeginUpdate(); cboName.PopulateWithListItems(objSkill.CharacterObject.SkillsSection.MyDefaultKnowledgeSkills); cboName.SelectedIndex = -1; cboName.Text = objSkill.WritableName; cboName.DoOneWayDataBinding("Visible", objSkill, nameof(Skill.AllowNameChange)); cboName.EndUpdate(); _blnUpdatingName = false; _tmrNameChangeTimer = new Timer { Interval = 1000 }; _tmrNameChangeTimer.Tick += NameChangeTimer_Tick; if (objSkill.CharacterObject.Created) { lblRating = new Label { Anchor = AnchorStyles.Right, AutoSize = true, Margin = new Padding(3, 6, 3, 6), Name = "lblRating", Text = "00", TextAlign = ContentAlignment.MiddleCenter }; btnCareerIncrease = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, ImageDpi96 = Resources.add, ImageDpi192 = Resources.add1, MinimumSize = new Size(24, 24), Name = "btnCareerIncrease", Padding = new Padding(1), UseVisualStyleBackColor = true }; btnCareerIncrease.Click += btnCareerIncrease_Click; lblRating.DoOneWayNegatableDataBinding("Visible", objSkill, nameof(KnowledgeSkill.IsNativeLanguage)); lblRating.DoOneWayDataBinding("Text", objSkill, nameof(Skill.Rating)); btnCareerIncrease.DoOneWayDataBinding("Visible", objSkill, nameof(KnowledgeSkill.AllowUpgrade)); btnCareerIncrease.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanUpgradeCareer)); btnCareerIncrease.DoOneWayDataBinding("ToolTipText", objSkill, nameof(Skill.UpgradeToolTip)); tlpMain.Controls.Add(lblRating, 1, 0); tlpMain.Controls.Add(btnCareerIncrease, 2, 0); lblSpec = new Label { Anchor = AnchorStyles.Left, AutoSize = true, Margin = new Padding(3, 6, 3, 6), Name = "lblSpec", Text = "[SPEC]", TextAlign = ContentAlignment.MiddleLeft }; btnAddSpec = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, ImageDpi96 = Resources.add, ImageDpi192 = Resources.add1, MinimumSize = new Size(24, 24), Name = "btnAddSpec", Padding = new Padding(1), UseVisualStyleBackColor = true }; btnAddSpec.Click += btnAddSpec_Click; lblSpec.DoOneWayDataBinding("Text", objSkill, nameof(Skill.CurrentDisplaySpecialization)); btnAddSpec.DoOneWayDataBinding("Visible", objSkill, nameof(Skill.CanHaveSpecs)); btnAddSpec.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanAffordSpecialization)); btnAddSpec.DoOneWayDataBinding("ToolTipText", objSkill, nameof(Skill.AddSpecToolTip)); tlpMiddle.SetColumnSpan(lblSpec, 2); tlpMiddle.Controls.Add(lblSpec, 1, 0); tlpMiddle.Controls.Add(btnAddSpec, 3, 0); } else { nudSkill = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudSkill" }; nudKarma = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudKarma" }; nudSkill.DoOneWayDataBinding("Visible", objSkill.CharacterObject.SkillsSection, nameof(SkillsSection.HasKnowledgePoints)); nudSkill.DoOneWayDataBinding("Enabled", objSkill, nameof(KnowledgeSkill.AllowUpgrade)); nudSkill.DoDataBinding("Value", objSkill, nameof(Skill.Base)); nudSkill.InterceptMouseWheel = GlobalSettings.InterceptMode; nudKarma.DoOneWayDataBinding("Enabled", objSkill, nameof(KnowledgeSkill.AllowUpgrade)); nudKarma.DoDataBinding("Value", objSkill, nameof(Skill.Karma)); nudKarma.InterceptMouseWheel = GlobalSettings.InterceptMode; tlpMain.Controls.Add(nudSkill, 1, 0); tlpMain.Controls.Add(nudKarma, 2, 0); chkNativeLanguage = new ColorableCheckBox(components) { Anchor = AnchorStyles.Left, AutoSize = true, DefaultColorScheme = true, Margin = new Padding(3, 4, 3, 4), Name = "chkNativeLanguage", Tag = "Skill_NativeLanguageLong", Text = "Native", UseVisualStyleBackColor = true }; cboSpec = new ElasticComboBox { Anchor = AnchorStyles.Left | AnchorStyles.Right, AutoCompleteMode = AutoCompleteMode.Suggest, FormattingEnabled = true, Margin = new Padding(3, 0, 3, 0), Name = "cboSpec", TabStop = false }; chkKarma = new ColorableCheckBox(components) { Anchor = AnchorStyles.Left, AutoSize = true, DefaultColorScheme = true, Margin = new Padding(3, 4, 3, 4), Name = "chkKarma", UseVisualStyleBackColor = true }; chkNativeLanguage.DoOneWayDataBinding("Visible", objSkill, nameof(Skill.IsLanguage)); chkNativeLanguage.Enabled = objSkill.IsNativeLanguage || objSkill.CharacterObject.SkillsSection.HasAvailableNativeLanguageSlots; chkNativeLanguage.DoDataBinding("Checked", objSkill, nameof(Skill.IsNativeLanguage)); cboSpec.BeginUpdate(); cboSpec.PopulateWithListItems(objSkill.CGLSpecializations); cboSpec.EndUpdate(); cboSpec.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanHaveSpecs)); cboSpec.Text = objSkill.CurrentDisplaySpecialization; cboSpec.TextChanged += cboSpec_TextChanged; _blnUpdatingSpec = false; _tmrSpecChangeTimer = new Timer { Interval = 1000 }; _tmrSpecChangeTimer.Tick += SpecChangeTimer_Tick; chkKarma.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanHaveSpecs)); chkKarma.DoDataBinding("Checked", objSkill, nameof(Skill.BuyWithKarma)); tlpMiddle.Controls.Add(chkNativeLanguage, 1, 0); tlpMiddle.Controls.Add(cboSpec, 2, 0); tlpMiddle.Controls.Add(chkKarma, 3, 0); // Hacky way of fixing a weird UI issue caused by items of a combobox only being populated from the DataSource after the combobox is added _blnUpdatingSpec = true; cboSpec.Text = objSkill.CurrentDisplaySpecialization; _blnUpdatingSpec = false; } if (objSkill.ForcedName) { this.DoOneWayDataBinding("Enabled", objSkill, nameof(KnowledgeSkill.Enabled)); } AdjustForDpi(); this.UpdateLightDarkMode(); this.TranslateWinForm(blnDoResumeLayout: false); } finally { tlpMiddle.ResumeLayout(); tlpMain.ResumeLayout(); ResumeLayout(true); objSkill.PropertyChanged += Skill_PropertyChanged; objSkill.CharacterObject.SkillsSection.PropertyChanged += OnSkillsSectionPropertyChanged; } }
private void InitializeComponent() { this.components = (IContainer) new Container(); ComponentResourceManager resources = new ComponentResourceManager(typeof(SpectrumAnalyserForm)); this.panel1 = new Panel(); this.cBoxLanGain = new ComboBox(); this.nudFreqCenter = new NumericUpDownEx(); this.nudFreqSpan = new NumericUpDownEx(); this.nudChanBw = new NumericUpDownEx(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.panel2 = new Panel(); this.graph = new SpectrumGraphControl(); this.panel1.SuspendLayout(); this.nudFreqCenter.BeginInit(); this.nudFreqSpan.BeginInit(); this.nudChanBw.BeginInit(); this.panel2.SuspendLayout(); this.SuspendLayout(); this.panel1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; this.panel1.BackColor = Color.Black; this.panel1.BorderStyle = BorderStyle.FixedSingle; this.panel1.Controls.Add((Control)this.cBoxLanGain); this.panel1.Controls.Add((Control)this.nudFreqCenter); this.panel1.Controls.Add((Control)this.nudFreqSpan); this.panel1.Controls.Add((Control)this.nudChanBw); this.panel1.Controls.Add((Control)this.label2); this.panel1.Controls.Add((Control)this.label1); this.panel1.Controls.Add((Control)this.label6); this.panel1.Controls.Add((Control)this.label7); this.panel1.Controls.Add((Control)this.label3); this.panel1.Controls.Add((Control)this.label4); this.panel1.Controls.Add((Control)this.label5); this.panel1.Location = new Point(557, 0); this.panel1.Margin = new Padding(0); this.panel1.Name = "panel1"; this.panel1.Size = new Size(223, 370); this.panel1.TabIndex = 0; this.cBoxLanGain.FormattingEnabled = true; this.cBoxLanGain.Items.AddRange(new object[6] { (object)"G1", (object)"G2", (object)"G3", (object)"G4", (object)"G5", (object)"G6" }); this.cBoxLanGain.Location = new Point(99, 181); this.cBoxLanGain.Name = "cBoxLanGain"; this.cBoxLanGain.Size = new Size(98, 21); this.cBoxLanGain.TabIndex = 10; this.cBoxLanGain.SelectedIndexChanged += new EventHandler(this.cBoxLanGain_SelectedIndexChanged); this.nudFreqCenter.Anchor = AnchorStyles.None; NumericUpDownEx numericUpDownEx1 = this.nudFreqCenter; int[] bits1 = new int[4]; bits1[0] = 61; Decimal num1 = new Decimal(bits1); numericUpDownEx1.Increment = num1; this.nudFreqCenter.Location = new Point(99, 103); NumericUpDownEx numericUpDownEx2 = this.nudFreqCenter; int[] bits2 = new int[4]; bits2[0] = 1020000000; Decimal num2 = new Decimal(bits2); numericUpDownEx2.Maximum = num2; NumericUpDownEx numericUpDownEx3 = this.nudFreqCenter; int[] bits3 = new int[4]; bits3[0] = 290000000; Decimal num3 = new Decimal(bits3); numericUpDownEx3.Minimum = num3; this.nudFreqCenter.Name = "nudFreqCenter"; this.nudFreqCenter.Size = new Size(98, 20); this.nudFreqCenter.TabIndex = 1; this.nudFreqCenter.ThousandsSeparator = true; NumericUpDownEx numericUpDownEx4 = this.nudFreqCenter; int[] bits4 = new int[4]; bits4[0] = 915000000; Decimal num4 = new Decimal(bits4); numericUpDownEx4.Value = num4; this.nudFreqCenter.ValueChanged += new EventHandler(this.nudFreqCenter_ValueChanged); this.nudFreqSpan.Anchor = AnchorStyles.None; NumericUpDownEx numericUpDownEx5 = this.nudFreqSpan; int[] bits5 = new int[4]; bits5[0] = 61; Decimal num5 = new Decimal(bits5); numericUpDownEx5.Increment = num5; this.nudFreqSpan.Location = new Point(99, 129); NumericUpDownEx numericUpDownEx6 = this.nudFreqSpan; int[] bits6 = new int[4]; bits6[0] = 100000000; Decimal num6 = new Decimal(bits6); numericUpDownEx6.Maximum = num6; this.nudFreqSpan.Name = "nudFreqSpan"; this.nudFreqSpan.Size = new Size(98, 20); this.nudFreqSpan.TabIndex = 4; this.nudFreqSpan.ThousandsSeparator = true; NumericUpDownEx numericUpDownEx7 = this.nudFreqSpan; int[] bits7 = new int[4]; bits7[0] = 1000000; Decimal num7 = new Decimal(bits7); numericUpDownEx7.Value = num7; this.nudFreqSpan.ValueChanged += new EventHandler(this.nudFreqSpan_ValueChanged); this.nudChanBw.Anchor = AnchorStyles.None; this.nudChanBw.Location = new Point(99, 155); NumericUpDownEx numericUpDownEx8 = this.nudChanBw; int[] bits8 = new int[4]; bits8[0] = 500000; Decimal num8 = new Decimal(bits8); numericUpDownEx8.Maximum = num8; NumericUpDownEx numericUpDownEx9 = this.nudChanBw; int[] bits9 = new int[4]; bits9[0] = 3906; Decimal num9 = new Decimal(bits9); numericUpDownEx9.Minimum = num9; this.nudChanBw.Name = "nudChanBw"; this.nudChanBw.Size = new Size(98, 20); this.nudChanBw.TabIndex = 7; this.nudChanBw.ThousandsSeparator = true; NumericUpDownEx numericUpDownEx10 = this.nudChanBw; int[] bits10 = new int[4]; bits10[0] = 10417; Decimal num10 = new Decimal(bits10); numericUpDownEx10.Value = num10; this.nudChanBw.ValueChanged += new EventHandler(this.nudChanBw_ValueChanged); this.label2.Anchor = AnchorStyles.None; this.label2.AutoSize = true; this.label2.BackColor = Color.Transparent; this.label2.ForeColor = Color.Gray; this.label2.Location = new Point(-2, 133); this.label2.Name = "label2"; this.label2.Size = new Size(35, 13); this.label2.TabIndex = 3; this.label2.Text = "Span:"; this.label1.Anchor = AnchorStyles.None; this.label1.AutoSize = true; this.label1.BackColor = Color.Transparent; this.label1.ForeColor = Color.Gray; this.label1.Location = new Point(-2, 107); this.label1.Name = "label1"; this.label1.Size = new Size(91, 13); this.label1.TabIndex = 0; this.label1.Text = "Center frequency:"; this.label6.Anchor = AnchorStyles.None; this.label6.AutoSize = true; this.label6.ForeColor = Color.Gray; this.label6.Location = new Point(203, 159); this.label6.Name = "label6"; this.label6.Size = new Size(20, 13); this.label6.TabIndex = 8; this.label6.Text = "Hz"; this.label7.Anchor = AnchorStyles.None; this.label7.AutoSize = true; this.label7.BackColor = Color.Transparent; this.label7.ForeColor = Color.Gray; this.label7.Location = new Point(-2, 185); this.label7.Name = "label7"; this.label7.Size = new Size(54, 13); this.label7.TabIndex = 9; this.label7.Text = "LNA gain:"; this.label3.Anchor = AnchorStyles.None; this.label3.AutoSize = true; this.label3.BackColor = Color.Transparent; this.label3.ForeColor = Color.Gray; this.label3.Location = new Point(-2, 159); this.label3.Name = "label3"; this.label3.Size = new Size(101, 13); this.label3.TabIndex = 6; this.label3.Text = "Channel bandwidth:"; this.label4.Anchor = AnchorStyles.None; this.label4.AutoSize = true; this.label4.ForeColor = Color.Gray; this.label4.Location = new Point(203, 107); this.label4.Name = "label4"; this.label4.Size = new Size(20, 13); this.label4.TabIndex = 2; this.label4.Text = "Hz"; this.label5.Anchor = AnchorStyles.None; this.label5.AutoSize = true; this.label5.ForeColor = Color.Gray; this.label5.Location = new Point(203, 133); this.label5.Name = "label5"; this.label5.Size = new Size(20, 13); this.label5.TabIndex = 5; this.label5.Text = "Hz"; this.panel2.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.panel2.AutoSizeMode = AutoSizeMode.GrowAndShrink; this.panel2.BorderStyle = BorderStyle.FixedSingle; this.panel2.Controls.Add((Control)this.graph); this.panel2.Location = new Point(0, 0); this.panel2.Margin = new Padding(0); this.panel2.Name = "panel2"; this.panel2.Size = new Size(557, 370); this.panel2.TabIndex = 2; this.graph.Dock = DockStyle.Fill; this.graph.Location = new Point(0, 0); this.graph.Name = "graph"; this.graph.Size = new Size(555, 368); this.graph.TabIndex = 0; this.AutoScaleDimensions = new SizeF(6f, 13f); this.AutoScaleMode = AutoScaleMode.Font; this.ClientSize = new Size(780, 370); this.Controls.Add((Control)this.panel2); this.Controls.Add((Control)this.panel1); this.Icon = (Icon)resources.GetObject("$this.Icon"); this.Name = "SpectrumAnalyserForm"; this.Text = "Spectrum analyser"; this.Load += new EventHandler(this.SpectrumAnalyserForm_Load); this.FormClosed += new FormClosedEventHandler(this.SpectrumAnalyserForm_FormClosed); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.nudFreqCenter.EndInit(); this.nudFreqSpan.EndInit(); this.nudChanBw.EndInit(); this.panel2.ResumeLayout(false); this.ResumeLayout(false); }
private void InitializeComponent() { components = new Container(); errorProvider = new ErrorProvider(components); gBoxOverloadCurrentProtection = new GroupBoxEx(); panel4 = new Panel(); rBtnOcpOff = new RadioButton(); rBtnOcpOn = new RadioButton(); label5 = new Label(); nudOcpTrim = new NumericUpDownEx(); suffixOCPtrim = new Label(); gBoxOutputPower = new GroupBoxEx(); nudOutputPower = new NumericUpDownEx(); suffixOutputPower = new Label(); gBoxPowerAmplifier = new GroupBoxEx(); cBoxPaRamp = new ComboBox(); panel1 = new Panel(); rBtnPaControlPa1Pa2 = new RadioButton(); rBtnPaControlPa1 = new RadioButton(); rBtnPaControlPa0 = new RadioButton(); suffixPAramp = new Label(); label3 = new Label(); ((ISupportInitialize)errorProvider).BeginInit(); gBoxOverloadCurrentProtection.SuspendLayout(); panel4.SuspendLayout(); nudOcpTrim.BeginInit(); gBoxOutputPower.SuspendLayout(); nudOutputPower.BeginInit(); gBoxPowerAmplifier.SuspendLayout(); panel1.SuspendLayout(); base.SuspendLayout(); errorProvider.ContainerControl = this; gBoxOverloadCurrentProtection.Controls.Add(panel4); gBoxOverloadCurrentProtection.Controls.Add(label5); gBoxOverloadCurrentProtection.Controls.Add(nudOcpTrim); gBoxOverloadCurrentProtection.Controls.Add(suffixOCPtrim); gBoxOverloadCurrentProtection.Location = new Point(0xd9, 0x12b); gBoxOverloadCurrentProtection.Name = "gBoxOverloadCurrentProtection"; gBoxOverloadCurrentProtection.Size = new Size(0x16c, 0x45); gBoxOverloadCurrentProtection.TabIndex = 2; gBoxOverloadCurrentProtection.TabStop = false; gBoxOverloadCurrentProtection.Text = "Overload current protection"; gBoxOverloadCurrentProtection.MouseEnter += new EventHandler(control_MouseEnter); gBoxOverloadCurrentProtection.MouseLeave += new EventHandler(control_MouseLeave); panel4.AutoSize = true; panel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; panel4.Controls.Add(rBtnOcpOff); panel4.Controls.Add(rBtnOcpOn); panel4.Location = new Point(0xc0, 0x13); panel4.Name = "panel4"; panel4.Size = new Size(0x66, 20); panel4.TabIndex = 0; rBtnOcpOff.AutoSize = true; rBtnOcpOff.Location = new Point(0x36, 3); rBtnOcpOff.Margin = new Padding(3, 0, 3, 0); rBtnOcpOff.Name = "rBtnOcpOff"; rBtnOcpOff.Size = new Size(0x2d, 0x11); rBtnOcpOff.TabIndex = 1; rBtnOcpOff.Text = "OFF"; rBtnOcpOff.UseVisualStyleBackColor = true; rBtnOcpOff.CheckedChanged += new EventHandler(rBtnOcpOn_CheckedChanged); rBtnOcpOn.AutoSize = true; rBtnOcpOn.Checked = true; rBtnOcpOn.Location = new Point(3, 3); rBtnOcpOn.Margin = new Padding(3, 0, 3, 0); rBtnOcpOn.Name = "rBtnOcpOn"; rBtnOcpOn.Size = new Size(0x29, 0x11); rBtnOcpOn.TabIndex = 0; rBtnOcpOn.TabStop = true; rBtnOcpOn.Text = "ON"; rBtnOcpOn.UseVisualStyleBackColor = true; rBtnOcpOn.CheckedChanged += new EventHandler(rBtnOcpOn_CheckedChanged); label5.AutoSize = true; label5.Location = new Point(6, 0x31); label5.Name = "label5"; label5.Size = new Size(0x34, 13); label5.TabIndex = 1; label5.Text = "Trimming:"; nudOcpTrim.Location = new Point(0xc0, 0x2d); int[] bits = new int[4]; bits[0] = 120; nudOcpTrim.Maximum = new decimal(bits); int[] numArray2 = new int[4]; numArray2[0] = 0x2d; nudOcpTrim.Minimum = new decimal(numArray2); nudOcpTrim.Name = "nudOcpTrim"; nudOcpTrim.Size = new Size(0x7c, 20); nudOcpTrim.TabIndex = 2; nudOcpTrim.ThousandsSeparator = true; int[] numArray3 = new int[4]; numArray3[0] = 100; nudOcpTrim.Value = new decimal(numArray3); nudOcpTrim.ValueChanged += new EventHandler(nudOcpTrim_ValueChanged); suffixOCPtrim.AutoSize = true; suffixOCPtrim.Location = new Point(0x142, 0x31); suffixOCPtrim.Name = "suffixOCPtrim"; suffixOCPtrim.Size = new Size(0x16, 13); suffixOCPtrim.TabIndex = 3; suffixOCPtrim.Text = "mA"; gBoxOutputPower.Controls.Add(nudOutputPower); gBoxOutputPower.Controls.Add(suffixOutputPower); gBoxOutputPower.Location = new Point(0xd9, 0xf9); gBoxOutputPower.Name = "gBoxOutputPower"; gBoxOutputPower.Size = new Size(0x16c, 0x2c); gBoxOutputPower.TabIndex = 1; gBoxOutputPower.TabStop = false; gBoxOutputPower.Text = "Output power"; gBoxOutputPower.MouseEnter += new EventHandler(control_MouseEnter); gBoxOutputPower.MouseLeave += new EventHandler(control_MouseLeave); nudOutputPower.Location = new Point(0xc0, 0x13); int[] numArray4 = new int[4]; numArray4[0] = 13; nudOutputPower.Maximum = new decimal(numArray4); int[] numArray5 = new int[4]; numArray5[0] = 0x12; numArray5[3] = -2147483648; nudOutputPower.Minimum = new decimal(numArray5); nudOutputPower.Name = "nudOutputPower"; nudOutputPower.Size = new Size(0x7c, 20); nudOutputPower.TabIndex = 0; nudOutputPower.ThousandsSeparator = true; int[] numArray6 = new int[4]; numArray6[0] = 13; nudOutputPower.Value = new decimal(numArray6); nudOutputPower.ValueChanged += new EventHandler(nudOutputPower_ValueChanged); suffixOutputPower.AutoSize = true; suffixOutputPower.Location = new Point(0x142, 0x17); suffixOutputPower.Name = "suffixOutputPower"; suffixOutputPower.Size = new Size(0x1c, 13); suffixOutputPower.TabIndex = 1; suffixOutputPower.Text = "dBm"; gBoxPowerAmplifier.Controls.Add(cBoxPaRamp); gBoxPowerAmplifier.Controls.Add(panel1); gBoxPowerAmplifier.Controls.Add(suffixPAramp); gBoxPowerAmplifier.Controls.Add(label3); gBoxPowerAmplifier.Location = new Point(0xd9, 0x7c); gBoxPowerAmplifier.Name = "gBoxPowerAmplifier"; gBoxPowerAmplifier.Size = new Size(0x16c, 0x77); gBoxPowerAmplifier.TabIndex = 0; gBoxPowerAmplifier.TabStop = false; gBoxPowerAmplifier.Text = "Power Amplifier"; gBoxPowerAmplifier.MouseEnter += new EventHandler(control_MouseEnter); gBoxPowerAmplifier.MouseLeave += new EventHandler(control_MouseLeave); cBoxPaRamp.Items.AddRange(new object[] { "3400", "2000", "1000", "500", "250", "125", "100", "62", "50", "40", "31", "25", "20", "15", "12", "10" }); cBoxPaRamp.Location = new Point(0xc0, 0x5e); cBoxPaRamp.Name = "cBoxPaRamp"; cBoxPaRamp.Size = new Size(0x7c, 0x15); cBoxPaRamp.TabIndex = 2; cBoxPaRamp.SelectedIndexChanged += new EventHandler(cBoxPaRamp_SelectedIndexChanged); panel1.AutoSize = true; panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; panel1.Controls.Add(rBtnPaControlPa1Pa2); panel1.Controls.Add(rBtnPaControlPa1); panel1.Controls.Add(rBtnPaControlPa0); panel1.Location = new Point(0x41, 0x13); panel1.Name = "panel1"; panel1.Size = new Size(0xeb, 0x45); panel1.TabIndex = 0; rBtnPaControlPa1Pa2.AutoSize = true; rBtnPaControlPa1Pa2.Location = new Point(3, 0x31); rBtnPaControlPa1Pa2.Name = "rBtnPaControlPa1Pa2"; rBtnPaControlPa1Pa2.Size = new Size(0xe5, 0x11); rBtnPaControlPa1Pa2.TabIndex = 2; rBtnPaControlPa1Pa2.Text = "PA1 + PA2 -> Transmits on pin PA_BOOST"; rBtnPaControlPa1Pa2.UseVisualStyleBackColor = true; rBtnPaControlPa1Pa2.CheckedChanged += new EventHandler(rBtnPaControl_CheckedChanged); rBtnPaControlPa1.AutoSize = true; rBtnPaControlPa1.Location = new Point(3, 0x1a); rBtnPaControlPa1.Name = "rBtnPaControlPa1"; rBtnPaControlPa1.Size = new Size(0xc5, 0x11); rBtnPaControlPa1.TabIndex = 1; rBtnPaControlPa1.Text = "PA1 -> Transmits on pin PA_BOOST"; rBtnPaControlPa1.UseVisualStyleBackColor = true; rBtnPaControlPa1.CheckedChanged += new EventHandler(rBtnPaControl_CheckedChanged); rBtnPaControlPa0.AutoSize = true; rBtnPaControlPa0.Checked = true; rBtnPaControlPa0.Location = new Point(3, 3); rBtnPaControlPa0.Name = "rBtnPaControlPa0"; rBtnPaControlPa0.Size = new Size(0xa5, 0x11); rBtnPaControlPa0.TabIndex = 0; rBtnPaControlPa0.TabStop = true; rBtnPaControlPa0.Text = "PA0 -> Transmits on pin RFIO"; rBtnPaControlPa0.UseVisualStyleBackColor = true; rBtnPaControlPa0.CheckedChanged += new EventHandler(rBtnPaControl_CheckedChanged); suffixPAramp.AutoSize = true; suffixPAramp.Location = new Point(0x142, 0x62); suffixPAramp.Name = "suffixPAramp"; suffixPAramp.Size = new Size(0x12, 13); suffixPAramp.TabIndex = 3; suffixPAramp.Text = "\x00b5s"; label3.AutoSize = true; label3.Location = new Point(6, 0x62); label3.Name = "label3"; label3.Size = new Size(50, 13); label3.TabIndex = 1; label3.Text = "PA ramp:"; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.Controls.Add(gBoxOverloadCurrentProtection); base.Controls.Add(gBoxOutputPower); base.Controls.Add(gBoxPowerAmplifier); base.Name = "TransmitterViewControl"; base.Size = new Size(0x31f, 0x1ed); ((ISupportInitialize)errorProvider).EndInit(); gBoxOverloadCurrentProtection.ResumeLayout(false); gBoxOverloadCurrentProtection.PerformLayout(); panel4.ResumeLayout(false); panel4.PerformLayout(); nudOcpTrim.EndInit(); gBoxOutputPower.ResumeLayout(false); gBoxOutputPower.PerformLayout(); nudOutputPower.EndInit(); gBoxPowerAmplifier.ResumeLayout(false); gBoxPowerAmplifier.PerformLayout(); panel1.ResumeLayout(false); panel1.PerformLayout(); base.ResumeLayout(false); }
private void InitializeComponent() { this.components = (IContainer) new Container(); this.errorProvider = new ErrorProvider(components); this.nudOcpTrim = new NumericUpDownEx(); this.gBoxOverloadCurrentProtection = new GroupBoxEx(); this.panel4 = new Panel(); this.rBtnOcpOff = new RadioButton(); this.rBtnOcpOn = new RadioButton(); this.label5 = new Label(); this.suffixOCPtrim = new Label(); this.gBoxOutputPower = new GroupBoxEx(); this.pnlPa20dBm = new Panel(); this.rBtnPa20dBmOff = new RadioButton(); this.rBtnPa20dBmOn = new RadioButton(); this.lblPa20dBm = new Label(); this.nudMaxOutputPower = new NumericUpDownEx(); this.label7 = new Label(); this.nudOutputPower = new NumericUpDownEx(); this.label6 = new Label(); this.label1 = new Label(); this.suffixOutputPower = new Label(); this.gBoxPowerAmplifier = new GroupBoxEx(); this.cBoxPaRamp = new ComboBox(); this.pnlPaSelect = new Panel(); this.rBtnRfPa = new RadioButton(); this.rBtnRfo = new RadioButton(); this.suffixPAramp = new Label(); this.label3 = new Label(); this.groupBoxEx1 = new GroupBoxEx(); this.nudPllBandwidth = new NumericUpDownEx(); this.label4 = new Label(); this.label2 = new Label(); ((ISupportInitialize)this.errorProvider).BeginInit(); this.nudOcpTrim.BeginInit(); this.gBoxOverloadCurrentProtection.SuspendLayout(); this.panel4.SuspendLayout(); this.gBoxOutputPower.SuspendLayout(); this.pnlPa20dBm.SuspendLayout(); this.nudMaxOutputPower.BeginInit(); this.nudOutputPower.BeginInit(); this.gBoxPowerAmplifier.SuspendLayout(); this.pnlPaSelect.SuspendLayout(); this.groupBoxEx1.SuspendLayout(); this.nudPllBandwidth.BeginInit(); this.SuspendLayout(); this.errorProvider.ContainerControl = (ContainerControl)this; this.errorProvider.SetIconPadding((Control)this.nudOcpTrim, 30); this.nudOcpTrim.Location = new Point(192, 45); NumericUpDownEx numericUpDownEx1 = this.nudOcpTrim; int[] bits1 = new int[4]; bits1[0] = 240; Decimal num1 = new Decimal(bits1); numericUpDownEx1.Maximum = num1; NumericUpDownEx numericUpDownEx2 = this.nudOcpTrim; int[] bits2 = new int[4]; bits2[0] = 45; Decimal num2 = new Decimal(bits2); numericUpDownEx2.Minimum = num2; this.nudOcpTrim.Name = "nudOcpTrim"; this.nudOcpTrim.Size = new Size(124, 20); this.nudOcpTrim.TabIndex = 2; this.nudOcpTrim.ThousandsSeparator = true; NumericUpDownEx numericUpDownEx3 = this.nudOcpTrim; int[] bits3 = new int[4]; bits3[0] = 100; Decimal num3 = new Decimal(bits3); numericUpDownEx3.Value = num3; this.nudOcpTrim.ValueChanged += new EventHandler(this.nudOcpTrim_ValueChanged); this.gBoxOverloadCurrentProtection.Controls.Add((Control)this.panel4); this.gBoxOverloadCurrentProtection.Controls.Add((Control)this.label5); this.gBoxOverloadCurrentProtection.Controls.Add((Control)this.nudOcpTrim); this.gBoxOverloadCurrentProtection.Controls.Add((Control)this.suffixOCPtrim); this.gBoxOverloadCurrentProtection.Location = new Point(217, 301); this.gBoxOverloadCurrentProtection.Name = "gBoxOverloadCurrentProtection"; this.gBoxOverloadCurrentProtection.Size = new Size(364, 69); this.gBoxOverloadCurrentProtection.TabIndex = 2; this.gBoxOverloadCurrentProtection.TabStop = false; this.gBoxOverloadCurrentProtection.Text = "Overload current protection"; this.gBoxOverloadCurrentProtection.MouseEnter += new EventHandler(this.control_MouseEnter); this.gBoxOverloadCurrentProtection.MouseLeave += new EventHandler(this.control_MouseLeave); this.panel4.AutoSize = true; this.panel4.AutoSizeMode = AutoSizeMode.GrowAndShrink; this.panel4.Controls.Add((Control)this.rBtnOcpOff); this.panel4.Controls.Add((Control)this.rBtnOcpOn); this.panel4.Location = new Point(192, 19); this.panel4.Name = "panel4"; this.panel4.Size = new Size(102, 20); this.panel4.TabIndex = 0; this.rBtnOcpOff.AutoSize = true; this.rBtnOcpOff.Location = new Point(54, 3); this.rBtnOcpOff.Margin = new Padding(3, 0, 3, 0); this.rBtnOcpOff.Name = "rBtnOcpOff"; this.rBtnOcpOff.Size = new Size(45, 17); this.rBtnOcpOff.TabIndex = 1; this.rBtnOcpOff.Text = "OFF"; this.rBtnOcpOff.UseVisualStyleBackColor = true; this.rBtnOcpOff.CheckedChanged += new EventHandler(this.rBtnOcpOn_CheckedChanged); this.rBtnOcpOn.AutoSize = true; this.rBtnOcpOn.Checked = true; this.rBtnOcpOn.Location = new Point(3, 3); this.rBtnOcpOn.Margin = new Padding(3, 0, 3, 0); this.rBtnOcpOn.Name = "rBtnOcpOn"; this.rBtnOcpOn.Size = new Size(41, 17); this.rBtnOcpOn.TabIndex = 0; this.rBtnOcpOn.TabStop = true; this.rBtnOcpOn.Text = "ON"; this.rBtnOcpOn.UseVisualStyleBackColor = true; this.rBtnOcpOn.CheckedChanged += new EventHandler(this.rBtnOcpOn_CheckedChanged); this.label5.AutoSize = true; this.label5.Location = new Point(6, 49); this.label5.Name = "label5"; this.label5.Size = new Size(52, 13); this.label5.TabIndex = 1; this.label5.Text = "Trimming:"; this.suffixOCPtrim.AutoSize = true; this.suffixOCPtrim.Location = new Point(322, 49); this.suffixOCPtrim.Name = "suffixOCPtrim"; this.suffixOCPtrim.Size = new Size(22, 13); this.suffixOCPtrim.TabIndex = 3; this.suffixOCPtrim.Text = "mA"; this.gBoxOutputPower.Controls.Add((Control)this.pnlPa20dBm); this.gBoxOutputPower.Controls.Add((Control)this.lblPa20dBm); this.gBoxOutputPower.Controls.Add((Control)this.nudMaxOutputPower); this.gBoxOutputPower.Controls.Add((Control)this.label7); this.gBoxOutputPower.Controls.Add((Control)this.nudOutputPower); this.gBoxOutputPower.Controls.Add((Control)this.label6); this.gBoxOutputPower.Controls.Add((Control)this.label1); this.gBoxOutputPower.Controls.Add((Control)this.suffixOutputPower); this.gBoxOutputPower.Location = new Point(217, 194); this.gBoxOutputPower.Name = "gBoxOutputPower"; this.gBoxOutputPower.Size = new Size(364, 101); this.gBoxOutputPower.TabIndex = 1; this.gBoxOutputPower.TabStop = false; this.gBoxOutputPower.Text = "Output power"; this.gBoxOutputPower.MouseEnter += new EventHandler(this.control_MouseEnter); this.gBoxOutputPower.MouseLeave += new EventHandler(this.control_MouseLeave); this.pnlPa20dBm.AutoSize = true; this.pnlPa20dBm.AutoSizeMode = AutoSizeMode.GrowAndShrink; this.pnlPa20dBm.Controls.Add((Control)this.rBtnPa20dBmOff); this.pnlPa20dBm.Controls.Add((Control)this.rBtnPa20dBmOn); this.pnlPa20dBm.Location = new Point(192, 71); this.pnlPa20dBm.Name = "pnlPa20dBm"; this.pnlPa20dBm.Size = new Size(102, 20); this.pnlPa20dBm.TabIndex = 4; this.rBtnPa20dBmOff.AutoSize = true; this.rBtnPa20dBmOff.Checked = true; this.rBtnPa20dBmOff.Location = new Point(54, 3); this.rBtnPa20dBmOff.Margin = new Padding(3, 0, 3, 0); this.rBtnPa20dBmOff.Name = "rBtnPa20dBmOff"; this.rBtnPa20dBmOff.Size = new Size(45, 17); this.rBtnPa20dBmOff.TabIndex = 1; this.rBtnPa20dBmOff.TabStop = true; this.rBtnPa20dBmOff.Text = "OFF"; this.rBtnPa20dBmOff.UseVisualStyleBackColor = true; this.rBtnPa20dBmOff.CheckedChanged += new EventHandler(this.rBtnPa20dBm_CheckedChanged); this.rBtnPa20dBmOn.AutoSize = true; this.rBtnPa20dBmOn.Location = new Point(3, 3); this.rBtnPa20dBmOn.Margin = new Padding(3, 0, 3, 0); this.rBtnPa20dBmOn.Name = "rBtnPa20dBmOn"; this.rBtnPa20dBmOn.Size = new Size(41, 17); this.rBtnPa20dBmOn.TabIndex = 0; this.rBtnPa20dBmOn.Text = "ON"; this.rBtnPa20dBmOn.UseVisualStyleBackColor = true; this.rBtnPa20dBmOn.CheckedChanged += new EventHandler(this.rBtnPa20dBm_CheckedChanged); this.lblPa20dBm.AutoSize = true; this.lblPa20dBm.Location = new Point(6, 75); this.lblPa20dBm.Name = "lblPa20dBm"; this.lblPa20dBm.Size = new Size(144, 13); this.lblPa20dBm.TabIndex = 5; this.lblPa20dBm.Text = "+20 dBm on pin PA_BOOST:"; this.nudMaxOutputPower.DecimalPlaces = 1; this.nudMaxOutputPower.Increment = new Decimal(new int[4] { 6, 0, 0, 65536 }); this.nudMaxOutputPower.Location = new Point(192, 19); NumericUpDownEx numericUpDownEx4 = this.nudMaxOutputPower; int[] bits4 = new int[4]; bits4[0] = 15; Decimal num4 = new Decimal(bits4); numericUpDownEx4.Maximum = num4; this.nudMaxOutputPower.Minimum = new Decimal(new int[4] { 108, 0, 0, 65536 }); this.nudMaxOutputPower.Name = "nudMaxOutputPower"; this.nudMaxOutputPower.Size = new Size(124, 20); this.nudMaxOutputPower.TabIndex = 0; this.nudMaxOutputPower.ThousandsSeparator = true; this.nudMaxOutputPower.Value = new Decimal(new int[4] { 132, 0, 0, 65536 }); this.nudMaxOutputPower.ValueChanged += new EventHandler(this.nudMaxOutputPower_ValueChanged); this.label7.AutoSize = true; this.label7.Location = new Point(6, 23); this.label7.Name = "label7"; this.label7.Size = new Size(119, 13); this.label7.TabIndex = 1; this.label7.Text = "Maximum output power:"; this.nudOutputPower.DecimalPlaces = 1; this.nudOutputPower.Location = new Point(192, 45); this.nudOutputPower.Maximum = new Decimal(new int[4] { 132, 0, 0, 65536 }); this.nudOutputPower.Minimum = new Decimal(new int[4] { 18, 0, 0, -2147418112 }); this.nudOutputPower.Name = "nudOutputPower"; this.nudOutputPower.Size = new Size(124, 20); this.nudOutputPower.TabIndex = 0; this.nudOutputPower.ThousandsSeparator = true; this.nudOutputPower.Value = new Decimal(new int[4] { 132, 0, 0, 65536 }); this.nudOutputPower.ValueChanged += new EventHandler(this.nudOutputPower_ValueChanged); this.label6.AutoSize = true; this.label6.Location = new Point(322, 23); this.label6.Name = "label6"; this.label6.Size = new Size(28, 13); this.label6.TabIndex = 1; this.label6.Text = "dBm"; this.label1.AutoSize = true; this.label1.Location = new Point(6, 49); this.label1.Name = "label1"; this.label1.Size = new Size(74, 13); this.label1.TabIndex = 1; this.label1.Text = "Output power:"; this.suffixOutputPower.AutoSize = true; this.suffixOutputPower.Location = new Point(322, 49); this.suffixOutputPower.Name = "suffixOutputPower"; this.suffixOutputPower.Size = new Size(28, 13); this.suffixOutputPower.TabIndex = 1; this.suffixOutputPower.Text = "dBm"; this.gBoxPowerAmplifier.Controls.Add((Control)this.cBoxPaRamp); this.gBoxPowerAmplifier.Controls.Add((Control)this.pnlPaSelect); this.gBoxPowerAmplifier.Controls.Add((Control)this.suffixPAramp); this.gBoxPowerAmplifier.Controls.Add((Control)this.label3); this.gBoxPowerAmplifier.Location = new Point(217, 69); this.gBoxPowerAmplifier.Name = "gBoxPowerAmplifier"; this.gBoxPowerAmplifier.Size = new Size(364, 119); this.gBoxPowerAmplifier.TabIndex = 0; this.gBoxPowerAmplifier.TabStop = false; this.gBoxPowerAmplifier.Text = "Power Amplifier"; this.gBoxPowerAmplifier.MouseEnter += new EventHandler(this.control_MouseEnter); this.gBoxPowerAmplifier.MouseLeave += new EventHandler(this.control_MouseLeave); this.cBoxPaRamp.DropDownStyle = ComboBoxStyle.DropDownList; this.cBoxPaRamp.Items.AddRange(new object[16] { (object)"3400", (object)"2000", (object)"1000", (object)"500", (object)"250", (object)"125", (object)"100", (object)"62", (object)"50", (object)"40", (object)"31", (object)"25", (object)"20", (object)"15", (object)"12", (object)"10" }); this.cBoxPaRamp.Location = new Point(192, 94); this.cBoxPaRamp.Name = "cBoxPaRamp"; this.cBoxPaRamp.Size = new Size(124, 21); this.cBoxPaRamp.TabIndex = 2; this.cBoxPaRamp.SelectedIndexChanged += new EventHandler(this.cBoxPaRamp_SelectedIndexChanged); this.pnlPaSelect.AutoSize = true; this.pnlPaSelect.AutoSizeMode = AutoSizeMode.GrowAndShrink; this.pnlPaSelect.Controls.Add((Control)this.rBtnRfPa); this.pnlPaSelect.Controls.Add((Control)this.rBtnRfo); this.pnlPaSelect.Location = new Point(65, 19); this.pnlPaSelect.Name = "pnlPaSelect"; this.pnlPaSelect.Size = new Size(203, 46); this.pnlPaSelect.TabIndex = 0; this.rBtnRfPa.AutoSize = true; this.rBtnRfPa.Location = new Point(3, 26); this.rBtnRfPa.Name = "rBtnRfPa"; this.rBtnRfPa.Size = new Size(197, 17); this.rBtnRfPa.TabIndex = 1; this.rBtnRfPa.Text = "PA1 -> Transmits on pin PA_BOOST"; this.rBtnRfPa.UseVisualStyleBackColor = true; this.rBtnRfPa.CheckedChanged += new EventHandler(this.rBtnPaControl_CheckedChanged); this.rBtnRfo.AutoSize = true; this.rBtnRfo.Checked = true; this.rBtnRfo.Location = new Point(3, 3); this.rBtnRfo.Name = "rBtnRfo"; this.rBtnRfo.Size = new Size(162, 17); this.rBtnRfo.TabIndex = 0; this.rBtnRfo.TabStop = true; this.rBtnRfo.Text = "PA0 -> Transmits on pin RFO"; this.rBtnRfo.UseVisualStyleBackColor = true; this.rBtnRfo.CheckedChanged += new EventHandler(this.rBtnPaControl_CheckedChanged); this.suffixPAramp.AutoSize = true; this.suffixPAramp.Location = new Point(322, 98); this.suffixPAramp.Name = "suffixPAramp"; this.suffixPAramp.Size = new Size(18, 13); this.suffixPAramp.TabIndex = 3; this.suffixPAramp.Text = "µs"; this.label3.AutoSize = true; this.label3.Location = new Point(6, 98); this.label3.Name = "label3"; this.label3.Size = new Size(50, 13); this.label3.TabIndex = 1; this.label3.Text = "PA ramp:"; this.groupBoxEx1.Controls.Add((Control)this.nudPllBandwidth); this.groupBoxEx1.Controls.Add((Control)this.label4); this.groupBoxEx1.Controls.Add((Control)this.label2); this.groupBoxEx1.Location = new Point(217, 376); this.groupBoxEx1.Name = "groupBoxEx1"; this.groupBoxEx1.Size = new Size(364, 48); this.groupBoxEx1.TabIndex = 3; this.groupBoxEx1.TabStop = false; this.groupBoxEx1.Text = "PLL bandwidth"; NumericUpDownEx numericUpDownEx5 = this.nudPllBandwidth; int[] bits5 = new int[4]; bits5[0] = 75000; Decimal num5 = new Decimal(bits5); numericUpDownEx5.Increment = num5; this.nudPllBandwidth.Location = new Point(192, 19); NumericUpDownEx numericUpDownEx6 = this.nudPllBandwidth; int[] bits6 = new int[4]; bits6[0] = 300000; Decimal num6 = new Decimal(bits6); numericUpDownEx6.Maximum = num6; NumericUpDownEx numericUpDownEx7 = this.nudPllBandwidth; int[] bits7 = new int[4]; bits7[0] = 75000; Decimal num7 = new Decimal(bits7); numericUpDownEx7.Minimum = num7; this.nudPllBandwidth.Name = "nudPllBandwidth"; this.nudPllBandwidth.Size = new Size(124, 20); this.nudPllBandwidth.TabIndex = 2; this.nudPllBandwidth.ThousandsSeparator = true; NumericUpDownEx numericUpDownEx8 = this.nudPllBandwidth; int[] bits8 = new int[4]; bits8[0] = 300000; Decimal num8 = new Decimal(bits8); numericUpDownEx8.Value = num8; this.nudPllBandwidth.ValueChanged += new EventHandler(this.nudPllBandwidth_ValueChanged); this.label4.AutoSize = true; this.label4.Location = new Point(6, 23); this.label4.Name = "label4"; this.label4.Size = new Size(29, 13); this.label4.TabIndex = 1; this.label4.Text = "PLL:"; this.label2.AutoSize = true; this.label2.Location = new Point(322, 23); this.label2.Name = "label2"; this.label2.Size = new Size(20, 13); this.label2.TabIndex = 3; this.label2.Text = "Hz"; this.AutoScaleDimensions = new SizeF(6f, 13f); this.AutoScaleMode = AutoScaleMode.Font; this.Controls.Add((Control)this.groupBoxEx1); this.Controls.Add((Control)this.gBoxOverloadCurrentProtection); this.Controls.Add((Control)this.gBoxOutputPower); this.Controls.Add((Control)this.gBoxPowerAmplifier); this.Name = "TransmitterViewControl"; this.Size = new Size(799, 493); ((ISupportInitialize)this.errorProvider).EndInit(); this.nudOcpTrim.EndInit(); this.gBoxOverloadCurrentProtection.ResumeLayout(false); this.gBoxOverloadCurrentProtection.PerformLayout(); this.panel4.ResumeLayout(false); this.panel4.PerformLayout(); this.gBoxOutputPower.ResumeLayout(false); this.gBoxOutputPower.PerformLayout(); this.pnlPa20dBm.ResumeLayout(false); this.pnlPa20dBm.PerformLayout(); this.nudMaxOutputPower.EndInit(); this.nudOutputPower.EndInit(); this.gBoxPowerAmplifier.ResumeLayout(false); this.gBoxPowerAmplifier.PerformLayout(); this.pnlPaSelect.ResumeLayout(false); this.pnlPaSelect.PerformLayout(); this.groupBoxEx1.ResumeLayout(false); this.groupBoxEx1.PerformLayout(); this.nudPllBandwidth.EndInit(); this.ResumeLayout(false); }
public SkillGroupControl(SkillGroup skillGroup) { if (skillGroup == null) { return; } _skillGroup = skillGroup; InitializeComponent(); //This is apparently a factor 30 faster than placed in load. NFI why Stopwatch sw = Stopwatch.StartNew(); SuspendLayout(); tlpMain.SuspendLayout(); try { lblName.DoOneWayDataBinding("Text", _skillGroup, nameof(SkillGroup.CurrentDisplayName)); lblName.DoOneWayDataBinding("ToolTipText", _skillGroup, nameof(SkillGroup.ToolTip)); int intMinimumSize; using (Graphics g = CreateGraphics()) intMinimumSize = (int)(25 * g.DpiX / 96.0f); // Creating these controls outside of the designer saves on handles if (skillGroup.CharacterObject.Created) { lblGroupRating = new Label { Anchor = AnchorStyles.Right, AutoSize = true, Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0), MinimumSize = new Size(intMinimumSize, 0), Name = "lblGroupRating", TextAlign = ContentAlignment.MiddleRight }; btnCareerIncrease = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Image = Resources.add, Margin = new Padding(3, 0, 3, 0), Name = "btnCareerIncrease", Padding = new Padding(1), UseVisualStyleBackColor = true }; btnCareerIncrease.Click += btnCareerIncrease_Click; btnCareerIncrease.DoOneWayDataBinding("Enabled", _skillGroup, nameof(SkillGroup.CareerCanIncrease)); btnCareerIncrease.DoOneWayDataBinding("ToolTipText", _skillGroup, nameof(SkillGroup.UpgradeToolTip)); lblGroupRating.DoOneWayDataBinding("Text", _skillGroup, nameof(SkillGroup.DisplayRating)); tlpMain.Controls.Add(lblGroupRating, 2, 0); tlpMain.Controls.Add(btnCareerIncrease, 3, 0); } else { nudKarma = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudKarma" }; nudSkill = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudSkill" }; nudKarma.DoDatabinding("Value", _skillGroup, nameof(SkillGroup.Karma)); nudKarma.DoOneWayDataBinding("Enabled", _skillGroup, nameof(SkillGroup.KarmaUnbroken)); nudKarma.InterceptMouseWheel = GlobalOptions.InterceptMode; nudSkill.DoDatabinding("Visible", _skillGroup.CharacterObject, nameof(Character.EffectiveBuildMethodUsesPriorityTables)); nudSkill.DoDatabinding("Value", _skillGroup, nameof(SkillGroup.Base)); nudSkill.DoOneWayDataBinding("Enabled", _skillGroup, nameof(SkillGroup.BaseUnbroken)); nudSkill.InterceptMouseWheel = GlobalOptions.InterceptMode; tlpMain.Controls.Add(nudSkill, 2, 0); tlpMain.Controls.Add(nudKarma, 3, 0); } this.UpdateLightDarkMode(); this.TranslateWinForm(string.Empty, false); } finally { tlpMain.ResumeLayout(); ResumeLayout(true); } sw.TaskEnd("Create skillgroup"); }
private void InitializeComponent() { ComponentResourceManager resources = new ComponentResourceManager(typeof(RssiAnalyserForm)); this.panel1 = new Panel(); this.groupBox5 = new GroupBoxEx(); this.btnLogBrowseFile = new Button(); this.pBarLog = new ProgressBar(); this.tableLayoutPanel3 = new TableLayoutPanel(); this.tBoxLogMaxSamples = new TextBox(); this.lblCommandsLogMaxSamples = new System.Windows.Forms.Label(); this.cBtnLogOnOff = new CheckBox(); this.panel3 = new Panel(); this.rBtnRssiAutoThreshOff = new RadioButton(); this.rBtnRssiAutoThreshOn = new RadioButton(); this.label6 = new System.Windows.Forms.Label(); this.nudRssiThresh = new NumericUpDownEx(); this.label55 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.panel2 = new Panel(); this.graph = new RssiGraphControl(); this.sfLogSaveFileDlg = new SaveFileDialog(); this.panel1.SuspendLayout(); this.groupBox5.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); this.panel3.SuspendLayout(); this.nudRssiThresh.BeginInit(); this.panel2.SuspendLayout(); base.SuspendLayout(); this.panel1.Anchor = AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top; this.panel1.BackColor = Color.Black; this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel1.Controls.Add(this.groupBox5); this.panel1.Controls.Add(this.panel3); this.panel1.Controls.Add(this.label6); this.panel1.Controls.Add(this.nudRssiThresh); this.panel1.Controls.Add(this.label55); this.panel1.Controls.Add(this.label3); this.panel1.Controls.Add(this.label1); this.panel1.Controls.Add(this.label9); this.panel1.Controls.Add(this.label7); this.panel1.Controls.Add(this.label5); this.panel1.Controls.Add(this.label4); this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.label8); this.panel1.Location = new Point(0x229, 0); this.panel1.Margin = new Padding(0); this.panel1.Name = "panel1"; this.panel1.Size = new Size(0xdf, 0x16e); this.panel1.TabIndex = 1; this.groupBox5.BackColor = Color.Transparent; this.groupBox5.Controls.Add(this.btnLogBrowseFile); this.groupBox5.Controls.Add(this.pBarLog); this.groupBox5.Controls.Add(this.tableLayoutPanel3); this.groupBox5.Controls.Add(this.cBtnLogOnOff); this.groupBox5.ForeColor = Color.Gray; this.groupBox5.Location = new Point(9, 0xc4); this.groupBox5.Name = "groupBox5"; this.groupBox5.Size = new Size(0xd1, 0x67); this.groupBox5.TabIndex = 8; this.groupBox5.TabStop = false; this.groupBox5.Text = "Log control"; this.btnLogBrowseFile.BackColor = SystemColors.Control; this.btnLogBrowseFile.ForeColor = SystemColors.ControlText; this.btnLogBrowseFile.Location = new Point(15, 70); this.btnLogBrowseFile.Name = "btnLogBrowseFile"; this.btnLogBrowseFile.Size = new Size(0x4b, 0x17); this.btnLogBrowseFile.TabIndex = 2; this.btnLogBrowseFile.Text = "Browse..."; this.btnLogBrowseFile.UseVisualStyleBackColor = false; this.btnLogBrowseFile.Click += new EventHandler(this.btnLogBrowseFile_Click); this.pBarLog.Location = new Point(15, 0x33); this.pBarLog.Name = "pBarLog"; this.pBarLog.Size = new Size(0xb3, 13); this.pBarLog.Step = 1; this.pBarLog.Style = ProgressBarStyle.Continuous; this.pBarLog.TabIndex = 1; this.tableLayoutPanel3.AutoSize = true; this.tableLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel3.ColumnCount = 2; this.tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle()); this.tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle()); this.tableLayoutPanel3.Controls.Add(this.tBoxLogMaxSamples, 1, 0); this.tableLayoutPanel3.Controls.Add(this.lblCommandsLogMaxSamples, 0, 0); this.tableLayoutPanel3.Location = new Point(15, 0x13); this.tableLayoutPanel3.Name = "tableLayoutPanel3"; this.tableLayoutPanel3.RowCount = 1; this.tableLayoutPanel3.RowStyles.Add(new RowStyle()); this.tableLayoutPanel3.Size = new Size(0xb3, 0x1a); this.tableLayoutPanel3.TabIndex = 0; this.tBoxLogMaxSamples.Location = new Point(0x5e, 3); this.tBoxLogMaxSamples.Name = "tBoxLogMaxSamples"; this.tBoxLogMaxSamples.Size = new Size(0x52, 20); this.tBoxLogMaxSamples.TabIndex = 1; this.tBoxLogMaxSamples.Text = "1000"; this.tBoxLogMaxSamples.TextAlign = HorizontalAlignment.Center; this.tBoxLogMaxSamples.Enter += new EventHandler(this.tBoxLogMaxSamples_Enter); this.tBoxLogMaxSamples.Validating += new CancelEventHandler(this.tBoxLogMaxSamples_Validating); this.tBoxLogMaxSamples.Validated += new EventHandler(this.tBoxLogMaxSamples_Validated); this.lblCommandsLogMaxSamples.ForeColor = Color.Gray; this.lblCommandsLogMaxSamples.Location = new Point(3, 0); this.lblCommandsLogMaxSamples.Name = "lblCommandsLogMaxSamples"; this.lblCommandsLogMaxSamples.Size = new Size(0x55, 0x17); this.lblCommandsLogMaxSamples.TabIndex = 0; this.lblCommandsLogMaxSamples.Text = "Max samples:"; this.lblCommandsLogMaxSamples.TextAlign = ContentAlignment.MiddleLeft; this.cBtnLogOnOff.Appearance = Appearance.Button; this.cBtnLogOnOff.BackColor = SystemColors.Control; this.cBtnLogOnOff.CheckAlign = ContentAlignment.MiddleCenter; this.cBtnLogOnOff.ForeColor = SystemColors.ControlText; this.cBtnLogOnOff.Location = new Point(0x77, 70); this.cBtnLogOnOff.Name = "cBtnLogOnOff"; this.cBtnLogOnOff.Size = new Size(0x4b, 0x17); this.cBtnLogOnOff.TabIndex = 3; this.cBtnLogOnOff.Text = "Start"; this.cBtnLogOnOff.TextAlign = ContentAlignment.MiddleCenter; this.cBtnLogOnOff.UseVisualStyleBackColor = false; this.cBtnLogOnOff.CheckedChanged += new EventHandler(this.cBtnLogOnOff_CheckedChanged); this.panel3.Anchor = AnchorStyles.None; this.panel3.AutoSize = true; this.panel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.panel3.Controls.Add(this.rBtnRssiAutoThreshOff); this.panel3.Controls.Add(this.rBtnRssiAutoThreshOn); this.panel3.ForeColor = Color.Gray; this.panel3.Location = new Point(0x75, 0x91); this.panel3.Name = "panel3"; this.panel3.Size = new Size(0x62, 0x17); this.panel3.TabIndex = 5; this.rBtnRssiAutoThreshOff.AutoSize = true; this.rBtnRssiAutoThreshOff.Location = new Point(50, 3); this.rBtnRssiAutoThreshOff.Name = "rBtnRssiAutoThreshOff"; this.rBtnRssiAutoThreshOff.Size = new Size(0x2d, 0x11); this.rBtnRssiAutoThreshOff.TabIndex = 1; this.rBtnRssiAutoThreshOff.Text = "OFF"; this.rBtnRssiAutoThreshOff.UseVisualStyleBackColor = true; this.rBtnRssiAutoThreshOff.CheckedChanged += new EventHandler(this.rBtnRssiAutoThreshOff_CheckedChanged); this.rBtnRssiAutoThreshOn.AutoSize = true; this.rBtnRssiAutoThreshOn.Checked = true; this.rBtnRssiAutoThreshOn.Location = new Point(3, 3); this.rBtnRssiAutoThreshOn.Name = "rBtnRssiAutoThreshOn"; this.rBtnRssiAutoThreshOn.Size = new Size(0x29, 0x11); this.rBtnRssiAutoThreshOn.TabIndex = 0; this.rBtnRssiAutoThreshOn.TabStop = true; this.rBtnRssiAutoThreshOn.Text = "ON"; this.rBtnRssiAutoThreshOn.UseVisualStyleBackColor = true; this.rBtnRssiAutoThreshOn.CheckedChanged += new EventHandler(this.rBtnRssiAutoThreshOn_CheckedChanged); this.label6.Anchor = AnchorStyles.None; this.label6.AutoSize = true; this.label6.ForeColor = Color.Gray; this.label6.Location = new Point(6, 150); this.label6.Name = "label6"; this.label6.Size = new Size(0x69, 13); this.label6.TabIndex = 4; this.label6.Text = "RSSI auto threshold:"; this.nudRssiThresh.Anchor = AnchorStyles.None; this.nudRssiThresh.DecimalPlaces = 1; this.nudRssiThresh.Enabled = false; int[] bits = new int[4]; bits[0] = 5; bits[3] = 0x10000; this.nudRssiThresh.Increment = new decimal(bits); this.nudRssiThresh.Location = new Point(0x75, 0xab); this.nudRssiThresh.Margin = new Padding(0); int[] numArray2 = new int[4]; this.nudRssiThresh.Maximum = new decimal(numArray2); int[] numArray3 = new int[4]; numArray3[0] = 0x4fb; numArray3[3] = -2147418112; this.nudRssiThresh.Minimum = new decimal(numArray3); this.nudRssiThresh.Name = "nudRssiThresh"; this.nudRssiThresh.Size = new Size(60, 20); this.nudRssiThresh.TabIndex = 7; this.nudRssiThresh.ThousandsSeparator = true; int[] numArray4 = new int[4]; numArray4[0] = 0x72; numArray4[3] = -2147483648; this.nudRssiThresh.Value = new decimal(numArray4); this.nudRssiThresh.ValueChanged += new EventHandler(this.nudRssiThresh_ValueChanged); this.label55.Anchor = AnchorStyles.None; this.label55.AutoSize = true; this.label55.BackColor = Color.Transparent; this.label55.ForeColor = Color.Gray; this.label55.Location = new Point(6, 0xab); this.label55.Margin = new Padding(0); this.label55.Name = "label55"; this.label55.Size = new Size(0x36, 13); this.label55.TabIndex = 6; this.label55.Text = "Threshold"; this.label55.TextAlign = ContentAlignment.MiddleCenter; this.label3.Anchor = AnchorStyles.None; this.label3.AutoSize = true; this.label3.ForeColor = Color.Green; this.label3.Location = new Point(6, 90); this.label3.Name = "label3"; this.label3.Size = new Size(0x52, 13); this.label3.TabIndex = 2; this.label3.Text = "RSSI Threshold"; this.label1.Anchor = AnchorStyles.None; this.label1.BackColor = Color.Green; this.label1.Location = new Point(0x75, 0x5f); this.label1.Margin = new Padding(3, 3, 0, 3); this.label1.Name = "label1"; this.label1.Size = new Size(0x19, 2); this.label1.TabIndex = 3; this.label1.Text = "label7"; this.label9.Anchor = AnchorStyles.None; this.label9.AutoSize = true; this.label9.ForeColor = Color.Aqua; this.label9.Location = new Point(6, 0x1d); this.label9.Margin = new Padding(3); this.label9.Name = "label9"; this.label9.Size = new Size(0x45, 13); this.label9.TabIndex = 0; this.label9.Text = "RF_PA RSSI"; this.label9.Visible = false; this.label7.Anchor = AnchorStyles.None; this.label7.BackColor = Color.Aqua; this.label7.Location = new Point(0x75, 0x22); this.label7.Margin = new Padding(3); this.label7.Name = "label7"; this.label7.Size = new Size(0x19, 2); this.label7.TabIndex = 1; this.label7.Text = "label7"; this.label7.Visible = false; this.label5.Anchor = AnchorStyles.None; this.label5.AutoSize = true; this.label5.ForeColor = Color.Yellow; this.label5.Location = new Point(6, 0x30); this.label5.Margin = new Padding(3); this.label5.Name = "label5"; this.label5.Size = new Size(0x42, 13); this.label5.TabIndex = 0; this.label5.Text = "RF_IO RSSI"; this.label5.Visible = false; this.label4.Anchor = AnchorStyles.None; this.label4.BackColor = Color.Yellow; this.label4.Location = new Point(0x75, 0x35); this.label4.Margin = new Padding(3); this.label4.Name = "label4"; this.label4.Size = new Size(0x19, 2); this.label4.TabIndex = 1; this.label4.Text = "label7"; this.label4.Visible = false; this.label2.Anchor = AnchorStyles.None; this.label2.AutoSize = true; this.label2.ForeColor = Color.Red; this.label2.Location = new Point(6, 0x43); this.label2.Margin = new Padding(3); this.label2.Name = "label2"; this.label2.Size = new Size(0x20, 13); this.label2.TabIndex = 0; this.label2.Text = "RSSI"; this.label8.Anchor = AnchorStyles.None; this.label8.BackColor = Color.Red; this.label8.Location = new Point(0x75, 0x48); this.label8.Margin = new Padding(3); this.label8.Name = "label8"; this.label8.Size = new Size(0x19, 2); this.label8.TabIndex = 1; this.label8.Text = "label7"; this.panel2.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel2.Controls.Add(this.graph); this.panel2.Location = new Point(0, 0); this.panel2.Margin = new Padding(0); this.panel2.Name = "panel2"; this.panel2.Size = new Size(0x229, 0x16e); this.panel2.TabIndex = 0; this.graph.Dock = DockStyle.Fill; this.graph.Location = new Point(0, 0); this.graph.Name = "graph"; this.graph.Size = new Size(0x227, 0x16c); this.graph.TabIndex = 0; this.sfLogSaveFileDlg.DefaultExt = "*.log"; this.sfLogSaveFileDlg.Filter = "Log Files(*.log)|*.log|AllFiles(*.*)|*.*"; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new Size(0x308, 0x16e); base.Controls.Add(this.panel2); base.Controls.Add(this.panel1); base.Icon = (Icon)resources.GetObject("$this.Icon"); base.Name = "RssiAnalyserForm"; this.Text = "Rssi analyser"; base.FormClosed += new FormClosedEventHandler(this.RssiAnalyserForm_FormClosed); base.Load += new EventHandler(this.RssiAnalyserForm_Load); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.groupBox5.ResumeLayout(false); this.groupBox5.PerformLayout(); this.tableLayoutPanel3.ResumeLayout(false); this.tableLayoutPanel3.PerformLayout(); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); this.nudRssiThresh.EndInit(); this.panel2.ResumeLayout(false); base.ResumeLayout(false); }
private void InitializeComponent() { ComponentResourceManager resources = new ComponentResourceManager(typeof(SpectrumAnalyserForm)); this.panel1 = new Panel(); this.cBoxLanGainSelect = new ComboBox(); this.nudFreqCenter = new NumericUpDownEx(); this.nudFreqSpan = new NumericUpDownEx(); this.nudChanBw = new NumericUpDownEx(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.panel2 = new Panel(); this.graph = new SpectrumGraphControl(); this.panel1.SuspendLayout(); this.nudFreqCenter.BeginInit(); this.nudFreqSpan.BeginInit(); this.nudChanBw.BeginInit(); this.panel2.SuspendLayout(); base.SuspendLayout(); this.panel1.Anchor = AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top; this.panel1.BackColor = Color.Black; this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel1.Controls.Add(this.cBoxLanGainSelect); this.panel1.Controls.Add(this.nudFreqCenter); this.panel1.Controls.Add(this.nudFreqSpan); this.panel1.Controls.Add(this.nudChanBw); this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.label1); this.panel1.Controls.Add(this.label6); this.panel1.Controls.Add(this.label7); this.panel1.Controls.Add(this.label3); this.panel1.Controls.Add(this.label4); this.panel1.Controls.Add(this.label5); this.panel1.Location = new Point(0x22d, 0); this.panel1.Margin = new Padding(0); this.panel1.Name = "panel1"; this.panel1.Size = new Size(0xdf, 370); this.panel1.TabIndex = 0; this.cBoxLanGainSelect.FormattingEnabled = true; this.cBoxLanGainSelect.Items.AddRange(new object[] { "G1", "G2", "G3", "G4", "G5", "G6" }); this.cBoxLanGainSelect.Location = new Point(0x63, 0xb5); this.cBoxLanGainSelect.Name = "cBoxLanGainSelect"; this.cBoxLanGainSelect.Size = new Size(0x62, 0x15); this.cBoxLanGainSelect.TabIndex = 10; this.cBoxLanGainSelect.SelectedIndexChanged += new EventHandler(this.cBoxLanGainSelect_SelectedIndexChanged); this.nudFreqCenter.Anchor = AnchorStyles.None; int[] bits = new int[4]; bits[0] = 0x3d; this.nudFreqCenter.Increment = new decimal(bits); this.nudFreqCenter.Location = new Point(0x63, 0x67); int[] numArray2 = new int[4]; numArray2[0] = 0x3ccbf700; this.nudFreqCenter.Maximum = new decimal(numArray2); int[] numArray3 = new int[4]; numArray3[0] = 0x11490c80; this.nudFreqCenter.Minimum = new decimal(numArray3); this.nudFreqCenter.Name = "nudFreqCenter"; this.nudFreqCenter.Size = new Size(0x62, 20); this.nudFreqCenter.TabIndex = 1; this.nudFreqCenter.ThousandsSeparator = true; int[] numArray4 = new int[4]; numArray4[0] = 0x3689cac0; this.nudFreqCenter.Value = new decimal(numArray4); this.nudFreqCenter.ValueChanged += new EventHandler(this.nudFreqCenter_ValueChanged); this.nudFreqSpan.Anchor = AnchorStyles.None; int[] numArray5 = new int[4]; numArray5[0] = 0x3d; this.nudFreqSpan.Increment = new decimal(numArray5); this.nudFreqSpan.Location = new Point(0x63, 0x81); int[] numArray6 = new int[4]; numArray6[0] = 0x5f5e100; this.nudFreqSpan.Maximum = new decimal(numArray6); this.nudFreqSpan.Name = "nudFreqSpan"; this.nudFreqSpan.Size = new Size(0x62, 20); this.nudFreqSpan.TabIndex = 4; this.nudFreqSpan.ThousandsSeparator = true; int[] numArray7 = new int[4]; numArray7[0] = 0xf4240; this.nudFreqSpan.Value = new decimal(numArray7); this.nudFreqSpan.ValueChanged += new EventHandler(this.nudFreqSpan_ValueChanged); this.nudChanBw.Anchor = AnchorStyles.None; this.nudChanBw.Location = new Point(0x63, 0x9b); int[] numArray8 = new int[4]; numArray8[0] = 0x7a120; this.nudChanBw.Maximum = new decimal(numArray8); int[] numArray9 = new int[4]; numArray9[0] = 0xf42; this.nudChanBw.Minimum = new decimal(numArray9); this.nudChanBw.Name = "nudChanBw"; this.nudChanBw.Size = new Size(0x62, 20); this.nudChanBw.TabIndex = 7; this.nudChanBw.ThousandsSeparator = true; int[] numArray10 = new int[4]; numArray10[0] = 0x28b1; this.nudChanBw.Value = new decimal(numArray10); this.nudChanBw.ValueChanged += new EventHandler(this.nudChanBw_ValueChanged); this.label2.Anchor = AnchorStyles.None; this.label2.AutoSize = true; this.label2.BackColor = Color.Transparent; this.label2.ForeColor = Color.Gray; this.label2.Location = new Point(-2, 0x85); this.label2.Name = "label2"; this.label2.Size = new Size(0x23, 13); this.label2.TabIndex = 3; this.label2.Text = "Span:"; this.label1.Anchor = AnchorStyles.None; this.label1.AutoSize = true; this.label1.BackColor = Color.Transparent; this.label1.ForeColor = Color.Gray; this.label1.Location = new Point(-2, 0x6b); this.label1.Name = "label1"; this.label1.Size = new Size(0x5b, 13); this.label1.TabIndex = 0; this.label1.Text = "Center frequency:"; this.label6.Anchor = AnchorStyles.None; this.label6.AutoSize = true; this.label6.ForeColor = Color.Gray; this.label6.Location = new Point(0xcb, 0x9f); this.label6.Name = "label6"; this.label6.Size = new Size(20, 13); this.label6.TabIndex = 8; this.label6.Text = "Hz"; this.label7.Anchor = AnchorStyles.None; this.label7.AutoSize = true; this.label7.BackColor = Color.Transparent; this.label7.ForeColor = Color.Gray; this.label7.Location = new Point(-2, 0xb9); this.label7.Name = "label7"; this.label7.Size = new Size(0x36, 13); this.label7.TabIndex = 9; this.label7.Text = "LNA gain:"; this.label3.Anchor = AnchorStyles.None; this.label3.AutoSize = true; this.label3.BackColor = Color.Transparent; this.label3.ForeColor = Color.Gray; this.label3.Location = new Point(-2, 0x9f); this.label3.Name = "label3"; this.label3.Size = new Size(0x65, 13); this.label3.TabIndex = 6; this.label3.Text = "Channel bandwidth:"; this.label4.Anchor = AnchorStyles.None; this.label4.AutoSize = true; this.label4.ForeColor = Color.Gray; this.label4.Location = new Point(0xcb, 0x6b); this.label4.Name = "label4"; this.label4.Size = new Size(20, 13); this.label4.TabIndex = 2; this.label4.Text = "Hz"; this.label5.Anchor = AnchorStyles.None; this.label5.AutoSize = true; this.label5.ForeColor = Color.Gray; this.label5.Location = new Point(0xcb, 0x85); this.label5.Name = "label5"; this.label5.Size = new Size(20, 13); this.label5.TabIndex = 5; this.label5.Text = "Hz"; this.panel2.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel2.Controls.Add(this.graph); this.panel2.Location = new Point(0, 0); this.panel2.Margin = new Padding(0); this.panel2.Name = "panel2"; this.panel2.Size = new Size(0x22d, 370); this.panel2.TabIndex = 2; this.graph.Dock = DockStyle.Fill; this.graph.Location = new Point(0, 0); this.graph.Name = "graph"; this.graph.Size = new Size(0x22b, 0x170); this.graph.TabIndex = 0; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new Size(780, 370); base.Controls.Add(this.panel2); base.Controls.Add(this.panel1); base.Icon = (Icon)resources.GetObject("$this.Icon"); base.Name = "SpectrumAnalyserForm"; this.Text = "Spectrum analyser"; base.Load += new EventHandler(this.SpectrumAnalyserForm_Load); base.FormClosed += new FormClosedEventHandler(this.SpectrumAnalyserForm_FormClosed); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.nudFreqCenter.EndInit(); this.nudFreqSpan.EndInit(); this.nudChanBw.EndInit(); this.panel2.ResumeLayout(false); base.ResumeLayout(false); }
/* * this.graph = new RssiGraphControl(); * this.panel2.Controls.Add(this.graph); */ private void InitializeComponent() { this.components = (IContainer) new Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RssiAnalyserForm)); this.panel1 = new System.Windows.Forms.Panel(); this.groupBox5 = new SemtechLib.Controls.GroupBoxEx(); this.btnLogBrowseFile = new System.Windows.Forms.Button(); this.pBarLog = new System.Windows.Forms.ProgressBar(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.tBoxLogMaxSamples = new System.Windows.Forms.TextBox(); this.lblCommandsLogMaxSamples = new System.Windows.Forms.Label(); this.cBtnLogOnOff = new System.Windows.Forms.CheckBox(); this.nudRssiThresh = new SemtechLib.Controls.NumericUpDownEx(); this.label55 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.sfLogSaveFileDlg = new System.Windows.Forms.SaveFileDialog(); this.graph = new SemtechLib.Devices.SX1276.UI.Controls.RssiGraphControl(); this.panel1.SuspendLayout(); this.groupBox5.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudRssiThresh)).BeginInit(); this.panel2.SuspendLayout(); this.SuspendLayout(); // // panel1 // this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.panel1.BackColor = System.Drawing.Color.Black; this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel1.Controls.Add(this.groupBox5); this.panel1.Controls.Add(this.nudRssiThresh); this.panel1.Controls.Add(this.label55); this.panel1.Controls.Add(this.label3); this.panel1.Controls.Add(this.label1); this.panel1.Controls.Add(this.label9); this.panel1.Controls.Add(this.label7); this.panel1.Controls.Add(this.label5); this.panel1.Controls.Add(this.label4); this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.label8); this.panel1.Location = new System.Drawing.Point(553, 0); this.panel1.Margin = new System.Windows.Forms.Padding(0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(223, 366); this.panel1.TabIndex = 1; // // groupBox5 // this.groupBox5.BackColor = System.Drawing.Color.Transparent; this.groupBox5.Controls.Add(this.btnLogBrowseFile); this.groupBox5.Controls.Add(this.pBarLog); this.groupBox5.Controls.Add(this.tableLayoutPanel3); this.groupBox5.Controls.Add(this.cBtnLogOnOff); this.groupBox5.ForeColor = System.Drawing.Color.Gray; this.groupBox5.Location = new System.Drawing.Point(9, 196); this.groupBox5.Name = "groupBox5"; this.groupBox5.Size = new System.Drawing.Size(209, 103); this.groupBox5.TabIndex = 8; this.groupBox5.TabStop = false; this.groupBox5.Text = "Log control"; // // btnLogBrowseFile // this.btnLogBrowseFile.BackColor = System.Drawing.SystemColors.Control; this.btnLogBrowseFile.ForeColor = System.Drawing.SystemColors.ControlText; this.btnLogBrowseFile.Location = new System.Drawing.Point(15, 70); this.btnLogBrowseFile.Name = "btnLogBrowseFile"; this.btnLogBrowseFile.Size = new System.Drawing.Size(75, 23); this.btnLogBrowseFile.TabIndex = 2; this.btnLogBrowseFile.Text = "Browse..."; this.btnLogBrowseFile.UseVisualStyleBackColor = false; this.btnLogBrowseFile.Click += new System.EventHandler(this.btnLogBrowseFile_Click); // // pBarLog // this.pBarLog.Location = new System.Drawing.Point(15, 51); this.pBarLog.Name = "pBarLog"; this.pBarLog.Size = new System.Drawing.Size(179, 13); this.pBarLog.Step = 1; this.pBarLog.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.pBarLog.TabIndex = 1; // // tableLayoutPanel3 // this.tableLayoutPanel3.AutoSize = true; this.tableLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel3.ColumnCount = 2; this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel3.Controls.Add(this.tBoxLogMaxSamples, 1, 0); this.tableLayoutPanel3.Controls.Add(this.lblCommandsLogMaxSamples, 0, 0); this.tableLayoutPanel3.Location = new System.Drawing.Point(15, 19); this.tableLayoutPanel3.Name = "tableLayoutPanel3"; this.tableLayoutPanel3.RowCount = 1; this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.Size = new System.Drawing.Size(179, 26); this.tableLayoutPanel3.TabIndex = 0; // // tBoxLogMaxSamples // this.tBoxLogMaxSamples.Location = new System.Drawing.Point(94, 3); this.tBoxLogMaxSamples.Name = "tBoxLogMaxSamples"; this.tBoxLogMaxSamples.Size = new System.Drawing.Size(82, 20); this.tBoxLogMaxSamples.TabIndex = 1; this.tBoxLogMaxSamples.Text = "1000"; this.tBoxLogMaxSamples.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.tBoxLogMaxSamples.Enter += new System.EventHandler(this.tBoxLogMaxSamples_Enter); this.tBoxLogMaxSamples.Validating += new System.ComponentModel.CancelEventHandler(this.tBoxLogMaxSamples_Validating); this.tBoxLogMaxSamples.Validated += new System.EventHandler(this.tBoxLogMaxSamples_Validated); // // lblCommandsLogMaxSamples // this.lblCommandsLogMaxSamples.ForeColor = System.Drawing.Color.Gray; this.lblCommandsLogMaxSamples.Location = new System.Drawing.Point(3, 0); this.lblCommandsLogMaxSamples.Name = "lblCommandsLogMaxSamples"; this.lblCommandsLogMaxSamples.Size = new System.Drawing.Size(85, 23); this.lblCommandsLogMaxSamples.TabIndex = 0; this.lblCommandsLogMaxSamples.Text = "Max samples:"; this.lblCommandsLogMaxSamples.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // cBtnLogOnOff // this.cBtnLogOnOff.Appearance = System.Windows.Forms.Appearance.Button; this.cBtnLogOnOff.BackColor = System.Drawing.SystemColors.Control; this.cBtnLogOnOff.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter; this.cBtnLogOnOff.ForeColor = System.Drawing.SystemColors.ControlText; this.cBtnLogOnOff.Location = new System.Drawing.Point(119, 70); this.cBtnLogOnOff.Name = "cBtnLogOnOff"; this.cBtnLogOnOff.Size = new System.Drawing.Size(75, 23); this.cBtnLogOnOff.TabIndex = 3; this.cBtnLogOnOff.Text = "Start"; this.cBtnLogOnOff.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.cBtnLogOnOff.UseVisualStyleBackColor = false; this.cBtnLogOnOff.CheckedChanged += new System.EventHandler(this.cBtnLogOnOff_CheckedChanged); // // nudRssiThresh // this.nudRssiThresh.Anchor = System.Windows.Forms.AnchorStyles.None; this.nudRssiThresh.DecimalPlaces = 1; this.nudRssiThresh.Increment = new decimal(new int[] { 5, 0, 0, 65536 }); this.nudRssiThresh.Location = new System.Drawing.Point(117, 171); this.nudRssiThresh.Margin = new System.Windows.Forms.Padding(0); this.nudRssiThresh.Maximum = new decimal(new int[] { 0, 0, 0, 0 }); this.nudRssiThresh.Minimum = new decimal(new int[] { 1275, 0, 0, -2147418112 }); this.nudRssiThresh.Name = "nudRssiThresh"; this.nudRssiThresh.Size = new System.Drawing.Size(60, 20); this.nudRssiThresh.TabIndex = 7; this.nudRssiThresh.ThousandsSeparator = true; this.nudRssiThresh.Value = new decimal(new int[] { 114, 0, 0, -2147483648 }); this.nudRssiThresh.ValueChanged += new System.EventHandler(this.nudRssiThresh_ValueChanged); // // label55 // this.label55.Anchor = System.Windows.Forms.AnchorStyles.None; this.label55.AutoSize = true; this.label55.BackColor = System.Drawing.Color.Transparent; this.label55.ForeColor = System.Drawing.Color.Gray; this.label55.Location = new System.Drawing.Point(6, 171); this.label55.Margin = new System.Windows.Forms.Padding(0); this.label55.Name = "label55"; this.label55.Size = new System.Drawing.Size(54, 13); this.label55.TabIndex = 6; this.label55.Text = "Threshold"; this.label55.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // label3 // this.label3.Anchor = System.Windows.Forms.AnchorStyles.None; this.label3.AutoSize = true; this.label3.ForeColor = System.Drawing.Color.Green; this.label3.Location = new System.Drawing.Point(6, 90); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(82, 13); this.label3.TabIndex = 2; this.label3.Text = "RSSI Threshold"; // // label1 // this.label1.Anchor = System.Windows.Forms.AnchorStyles.None; this.label1.BackColor = System.Drawing.Color.Green; this.label1.Location = new System.Drawing.Point(117, 95); this.label1.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(25, 2); this.label1.TabIndex = 3; this.label1.Text = "label7"; // // label9 // this.label9.Anchor = System.Windows.Forms.AnchorStyles.None; this.label9.AutoSize = true; this.label9.ForeColor = System.Drawing.Color.Aqua; this.label9.Location = new System.Drawing.Point(6, 29); this.label9.Margin = new System.Windows.Forms.Padding(3); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(69, 13); this.label9.TabIndex = 0; this.label9.Text = "RF_PA RSSI"; this.label9.Visible = false; // // label7 // this.label7.Anchor = System.Windows.Forms.AnchorStyles.None; this.label7.BackColor = System.Drawing.Color.Aqua; this.label7.Location = new System.Drawing.Point(117, 34); this.label7.Margin = new System.Windows.Forms.Padding(3); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(25, 2); this.label7.TabIndex = 1; this.label7.Text = "label7"; this.label7.Visible = false; // // label5 // this.label5.Anchor = System.Windows.Forms.AnchorStyles.None; this.label5.AutoSize = true; this.label5.ForeColor = System.Drawing.Color.Yellow; this.label5.Location = new System.Drawing.Point(6, 48); this.label5.Margin = new System.Windows.Forms.Padding(3); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(66, 13); this.label5.TabIndex = 0; this.label5.Text = "RF_IO RSSI"; this.label5.Visible = false; // // label4 // this.label4.Anchor = System.Windows.Forms.AnchorStyles.None; this.label4.BackColor = System.Drawing.Color.Yellow; this.label4.Location = new System.Drawing.Point(117, 53); this.label4.Margin = new System.Windows.Forms.Padding(3); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(25, 2); this.label4.TabIndex = 1; this.label4.Text = "label7"; this.label4.Visible = false; // // label2 // this.label2.Anchor = System.Windows.Forms.AnchorStyles.None; this.label2.AutoSize = true; this.label2.ForeColor = System.Drawing.Color.Red; this.label2.Location = new System.Drawing.Point(6, 67); this.label2.Margin = new System.Windows.Forms.Padding(3); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(32, 13); this.label2.TabIndex = 0; this.label2.Text = "RSSI"; // // label8 // this.label8.Anchor = System.Windows.Forms.AnchorStyles.None; this.label8.BackColor = System.Drawing.Color.Red; this.label8.Location = new System.Drawing.Point(117, 72); this.label8.Margin = new System.Windows.Forms.Padding(3); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(25, 2); this.label8.TabIndex = 1; this.label8.Text = "label7"; // // panel2 // this.panel2.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))); this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel2.Controls.Add(this.graph); this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Margin = new System.Windows.Forms.Padding(0); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(553, 366); this.panel2.TabIndex = 0; // // sfLogSaveFileDlg // this.sfLogSaveFileDlg.DefaultExt = "*.log"; this.sfLogSaveFileDlg.Filter = "Log Files(*.log)|*.log|AllFiles(*.*)|*.*"; // // graph // this.graph.Dock = System.Windows.Forms.DockStyle.Fill; this.graph.Location = new System.Drawing.Point(0, 0); this.graph.Name = "graph"; this.graph.Size = new System.Drawing.Size(551, 364); this.graph.TabIndex = 0; // // RssiAnalyserForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(776, 366); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "RssiAnalyserForm"; this.Text = "Rssi analyser"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.RssiAnalyserForm_FormClosed); this.Load += new System.EventHandler(this.RssiAnalyserForm_Load); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.groupBox5.ResumeLayout(false); this.groupBox5.PerformLayout(); this.tableLayoutPanel3.ResumeLayout(false); this.tableLayoutPanel3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudRssiThresh)).EndInit(); this.panel2.ResumeLayout(false); this.ResumeLayout(false); }
public SkillControl2(Skill objSkill) { if (objSkill == null) { return; } _objGraphics = CreateGraphics(); _objSkill = objSkill; _objAttributeActive = objSkill.AttributeObject; InitializeComponent(); SkillControl2_DpiChangedAfterParent(null, EventArgs.Empty); this.UpdateLightDarkMode(); this.TranslateWinForm(); foreach (ToolStripItem tssItem in cmsSkillLabel.Items) { tssItem.UpdateLightDarkMode(); tssItem.TranslateToolStripItemsRecursively(); } SuspendLayout(); //Display _fntNormalName = lblName.Font; _fntItalicName = new Font(_fntNormalName, FontStyle.Italic); _fntNormal = btnAttribute.Font; _fntItalic = new Font(_fntNormal, FontStyle.Italic); if (!_objSkill.Default) { lblName.Font = _fntItalicName; } lblName.DoOneWayDataBinding("Text", objSkill, nameof(Skill.CurrentDisplayName)); lblName.DoOneWayDataBinding("ForeColor", objSkill, nameof(Skill.PreferredColor)); lblName.DoOneWayDataBinding("ToolTipText", objSkill, nameof(Skill.HtmlSkillToolTip)); btnAttribute.DoOneWayDataBinding("Text", objSkill, nameof(Skill.DisplayAttribute)); lblModifiedRating.Text = objSkill.DisplayOtherAttribute(_objAttributeActive.Abbrev); lblModifiedRating.ToolTipText = objSkill.CompileDicepoolTooltip(_objAttributeActive.Abbrev); // Creating controls outside of the designer saves on handles if the controls would be invisible anyway if (objSkill.AllowDelete) // For active skills, can only change by going from Create to Career mode, so no databinding necessary { cmdDelete = new Button { AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Dock = DockStyle.Fill, Margin = new Padding(3, 0, 3, 0), Name = "cmdDelete", Tag = "String_Delete", Text = "Delete", UseVisualStyleBackColor = true }; cmdDelete.Click += cmdDelete_Click; cmdDelete.UpdateLightDarkMode(); cmdDelete.TranslateWinForm(); tlpRight.Controls.Add(cmdDelete, 4, 0); } if (objSkill.CharacterObject.Created) { lblCareerRating = new Label { Anchor = AnchorStyles.Right, AutoSize = true, MinimumSize = new Size((int)(25 * _objGraphics.DpiX / 96.0f), 0), Name = "lblCareerRating", Text = "00", TextAlign = ContentAlignment.MiddleRight }; btnCareerIncrease = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Image = Resources.add, Margin = new Padding(3, 0, 3, 0), Name = "btnCareerIncrease", Padding = new Padding(1), UseVisualStyleBackColor = true }; btnCareerIncrease.Click += btnCareerIncrease_Click; lblCareerRating.DoOneWayDataBinding("Text", objSkill, nameof(Skill.Rating)); btnCareerIncrease.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanUpgradeCareer)); btnCareerIncrease.DoOneWayDataBinding("ToolTipText", objSkill, nameof(Skill.UpgradeToolTip)); lblCareerRating.UpdateLightDarkMode(); lblCareerRating.TranslateWinForm(); btnCareerIncrease.UpdateLightDarkMode(); btnCareerIncrease.TranslateWinForm(); tlpMain.Controls.Add(lblCareerRating, 2, 0); tlpMain.Controls.Add(btnCareerIncrease, 3, 0); btnAddSpec = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Image = Resources.add, Margin = new Padding(3, 0, 3, 0), Name = "btnAddSpec", Padding = new Padding(1), UseVisualStyleBackColor = true }; btnAddSpec.Click += btnAddSpec_Click; lblCareerSpec = new Label { Anchor = AnchorStyles.Left, AutoSize = true, Name = "lblCareerSpec", Text = "[Specializations]", TextAlign = ContentAlignment.MiddleLeft }; lblCareerSpec.DoOneWayDataBinding("Text", objSkill, nameof(Skill.CurrentDisplaySpecialization)); btnAddSpec.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanAffordSpecialization)); btnAddSpec.DoOneWayDataBinding("Visible", objSkill, nameof(Skill.CanHaveSpecs)); btnAddSpec.DoOneWayDataBinding("ToolTipText", objSkill, nameof(Skill.AddSpecToolTip)); lblCareerSpec.UpdateLightDarkMode(); lblCareerSpec.TranslateWinForm(); btnAddSpec.UpdateLightDarkMode(); btnAddSpec.TranslateWinForm(); tlpRight.Controls.Add(lblCareerSpec, 0, 0); tlpRight.Controls.Add(btnAddSpec, 1, 0); List <ListItem> lstAttributeItems = new List <ListItem>(AttributeSection.AttributeStrings.Count); foreach (string strLoopAttribute in AttributeSection.AttributeStrings) { if (strLoopAttribute == "MAGAdept") { if (!objSkill.CharacterObject.Options.MysAdeptSecondMAGAttribute) { continue; } lstAttributeItems.Add(new ListItem(strLoopAttribute, LanguageManager.MAGAdeptString())); } else { string strAttributeShort = LanguageManager.GetString("String_Attribute" + strLoopAttribute + "Short", GlobalOptions.Language, false); lstAttributeItems.Add(new ListItem(strLoopAttribute, !string.IsNullOrEmpty(strAttributeShort) ? strAttributeShort : strLoopAttribute)); } } cboSelectAttribute = new ElasticComboBox { Anchor = AnchorStyles.Left | AnchorStyles.Right, DropDownStyle = ComboBoxStyle.DropDownList, FormattingEnabled = true, Margin = new Padding(3, 0, 3, 0), Name = "cboSelectAttribute" }; cboSelectAttribute.DropDownClosed += cboSelectAttribute_Closed; cboSelectAttribute.BeginUpdate(); cboSelectAttribute.DataSource = null; cboSelectAttribute.DisplayMember = nameof(ListItem.Name); cboSelectAttribute.ValueMember = nameof(ListItem.Value); cboSelectAttribute.DataSource = lstAttributeItems; cboSelectAttribute.SelectedValue = _objSkill.AttributeObject.Abbrev; cboSelectAttribute.EndUpdate(); cboSelectAttribute.UpdateLightDarkMode(); cboSelectAttribute.TranslateWinForm(); pnlAttributes.Controls.Add(cboSelectAttribute); } else { nudSkill = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudSkill" }; nudKarma = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudKarma" }; // Trick to make it seem like the button is a label (+ onclick method not doing anything in Create mode) btnAttribute.FlatAppearance.MouseDownBackColor = Color.Transparent; btnAttribute.FlatAppearance.MouseOverBackColor = Color.Transparent; nudSkill.DoOneWayDataBinding("Visible", objSkill.CharacterObject, nameof(objSkill.CharacterObject.BuildMethodHasSkillPoints)); nudSkill.DoDatabinding("Value", objSkill, nameof(Skill.Base)); nudSkill.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.BaseUnlocked)); nudSkill.DoOneWayDataBinding("InterceptMouseWheel", objSkill.CharacterObject.Options, nameof(CharacterOptions.InterceptMode)); nudKarma.DoDatabinding("Value", objSkill, nameof(Skill.Karma)); nudKarma.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.KarmaUnlocked)); nudKarma.DoOneWayDataBinding("InterceptMouseWheel", objSkill.CharacterObject.Options, nameof(CharacterOptions.InterceptMode)); nudSkill.UpdateLightDarkMode(); nudSkill.TranslateWinForm(); nudKarma.UpdateLightDarkMode(); nudKarma.TranslateWinForm(); tlpMain.Controls.Add(nudSkill, 2, 0); tlpMain.Controls.Add(nudKarma, 3, 0); if (objSkill.IsExoticSkill) { lblCareerSpec = new Label { Anchor = AnchorStyles.Left, AutoSize = true, Name = "lblCareerSpec", Text = "[Specializations]", TextAlign = ContentAlignment.MiddleLeft }; lblCareerSpec.DoOneWayDataBinding("Text", objSkill, nameof(Skill.CurrentDisplaySpecialization)); lblCareerSpec.UpdateLightDarkMode(); lblCareerSpec.TranslateWinForm(); tlpRight.Controls.Add(lblCareerSpec, 0, 0); } else { cboSpec = new ElasticComboBox { Anchor = AnchorStyles.Left | AnchorStyles.Right, AutoCompleteMode = AutoCompleteMode.Suggest, FormattingEnabled = true, Margin = new Padding(3, 0, 3, 0), Name = "cboSpec", Sorted = true, TabStop = false }; cboSpec.BeginUpdate(); cboSpec.DataSource = null; cboSpec.DisplayMember = nameof(ListItem.Name); cboSpec.ValueMember = nameof(ListItem.Value); cboSpec.DataSource = objSkill.CGLSpecializations; cboSpec.SelectedIndex = -1; cboSpec.DoDatabinding("Text", objSkill, nameof(Skill.Specialization)); cboSpec.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanHaveSpecs)); cboSpec.EndUpdate(); cboSpec.UpdateLightDarkMode(); cboSpec.TranslateWinForm(); chkKarma = new ColorableCheckBox(components) { Anchor = AnchorStyles.Left, AutoSize = true, DefaultColorScheme = true, Margin = new Padding(3, 0, 3, 0), Name = "chkKarma", UseVisualStyleBackColor = true }; chkKarma.DoOneWayDataBinding("Visible", objSkill.CharacterObject, nameof(objSkill.CharacterObject.BuildMethodHasSkillPoints)); chkKarma.DoDatabinding("Checked", objSkill, nameof(Skill.BuyWithKarma)); chkKarma.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanHaveSpecs)); chkKarma.UpdateLightDarkMode(); chkKarma.TranslateWinForm(); tlpRight.Controls.Add(cboSpec, 0, 0); tlpRight.Controls.Add(chkKarma, 1, 0); } } this.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.Enabled)); this.DoOneWayDataBinding("BackColor", objSkill, nameof(Skill.PreferredControlColor)); ResumeLayout(true); _blnLoading = false; _objSkill.PropertyChanged += Skill_PropertyChanged; }
public SkillControl(Skill objSkill) { if (objSkill == null) { return; } _objSkill = objSkill; _objAttributeActive = objSkill.AttributeObject; if (_objAttributeActive != null) { _objAttributeActive.PropertyChanged += Attribute_PropertyChanged; } InitializeComponent(); SuspendLayout(); pnlAttributes.SuspendLayout(); tlpMain.SuspendLayout(); tlpRight.SuspendLayout(); try { //Display _fntNormalName = lblName.Font; _fntItalicName = new Font(_fntNormalName, FontStyle.Italic); _fntNormal = btnAttribute.Font; _fntItalic = new Font(_fntNormal, FontStyle.Italic); if (!_objSkill.Default) { lblName.Font = _fntItalicName; } lblName.DoOneWayDataBinding("Text", objSkill, nameof(Skill.CurrentDisplayName)); lblName.DoOneWayDataBinding("ForeColor", objSkill, nameof(Skill.PreferredColor)); lblName.DoOneWayDataBinding("ToolTipText", objSkill, nameof(Skill.HtmlSkillToolTip)); btnAttribute.DoOneWayDataBinding("Text", objSkill, nameof(Skill.DisplayAttribute)); RefreshPoolTooltipAndDisplay(); // Creating controls outside of the designer saves on handles if the controls would be invisible anyway if (objSkill.AllowDelete) // For active skills, can only change by going from Create to Career mode, so no databinding necessary { cmdDelete = new Button { AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Dock = DockStyle.Fill, Margin = new Padding(3, 0, 3, 0), Name = "cmdDelete", Tag = "String_Delete", Text = "Delete", UseVisualStyleBackColor = true }; cmdDelete.Click += cmdDelete_Click; tlpRight.Controls.Add(cmdDelete, 4, 0); } if (objSkill.CharacterObject.Created) { lblCareerRating = new Label { Anchor = AnchorStyles.Right, AutoSize = true, Margin = new Padding(3, 6, 3, 6), Name = "lblCareerRating", Text = "00", TextAlign = ContentAlignment.MiddleRight }; btnCareerIncrease = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, ImageDpi96 = Resources.add, ImageDpi192 = Resources.add1, MinimumSize = new Size(24, 24), Name = "btnCareerIncrease", Padding = new Padding(1), UseVisualStyleBackColor = true }; btnCareerIncrease.Click += btnCareerIncrease_Click; lblCareerRating.DoOneWayDataBinding("Text", objSkill, nameof(Skill.Rating)); btnCareerIncrease.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanUpgradeCareer)); btnCareerIncrease.DoOneWayDataBinding("ToolTipText", objSkill, nameof(Skill.UpgradeToolTip)); tlpMain.Controls.Add(lblCareerRating, 2, 0); tlpMain.Controls.Add(btnCareerIncrease, 3, 0); btnAddSpec = new ButtonWithToolTip { Anchor = AnchorStyles.Right, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, ImageDpi96 = Resources.add, ImageDpi192 = Resources.add1, MinimumSize = new Size(24, 24), Name = "btnAddSpec", Padding = new Padding(1), UseVisualStyleBackColor = true }; btnAddSpec.Click += btnAddSpec_Click; lblCareerSpec = new Label { Anchor = AnchorStyles.Left, AutoSize = true, Margin = new Padding(3, 6, 3, 6), Name = "lblCareerSpec", Text = "[Specializations]", TextAlign = ContentAlignment.MiddleLeft }; lblCareerSpec.DoOneWayDataBinding("Text", objSkill, nameof(Skill.CurrentDisplaySpecialization)); btnAddSpec.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanAffordSpecialization)); btnAddSpec.DoOneWayDataBinding("Visible", objSkill, nameof(Skill.CanHaveSpecs)); btnAddSpec.DoOneWayDataBinding("ToolTipText", objSkill, nameof(Skill.AddSpecToolTip)); tlpRight.Controls.Add(lblCareerSpec, 0, 0); tlpRight.Controls.Add(btnAddSpec, 1, 0); using (new FetchSafelyFromPool <List <ListItem> >(Utils.ListItemListPool, out List <ListItem> lstAttributeItems)) { foreach (string strLoopAttribute in AttributeSection.AttributeStrings) { if (strLoopAttribute == "MAGAdept") { if (!objSkill.CharacterObject.Settings.MysAdeptSecondMAGAttribute) { continue; } lstAttributeItems.Add(new ListItem(strLoopAttribute, LanguageManager.MAGAdeptString())); } else { string strAttributeShort = LanguageManager.GetString( "String_Attribute" + strLoopAttribute + "Short", GlobalSettings.Language, false); lstAttributeItems.Add(new ListItem(strLoopAttribute, !string.IsNullOrEmpty(strAttributeShort) ? strAttributeShort : strLoopAttribute)); } } cboSelectAttribute = new ElasticComboBox { Dock = DockStyle.Fill, DropDownStyle = ComboBoxStyle.DropDownList, FormattingEnabled = true, Margin = new Padding(3, 0, 3, 0), Name = "cboSelectAttribute" }; cboSelectAttribute.PopulateWithListItems(lstAttributeItems); cboSelectAttribute.SelectedValue = _objSkill.AttributeObject.Abbrev; cboSelectAttribute.DropDownClosed += cboSelectAttribute_Closed; pnlAttributes.Controls.Add(cboSelectAttribute); } } else { nudSkill = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudSkill" }; nudKarma = new NumericUpDownEx { Anchor = AnchorStyles.Right, AutoSize = true, InterceptMouseWheel = NumericUpDownEx.InterceptMouseWheelMode.WhenMouseOver, Margin = new Padding(3, 2, 3, 2), Maximum = new decimal(new[] { 99, 0, 0, 0 }), Name = "nudKarma" }; // Trick to make it seem like the button is a label (+ onclick method not doing anything in Create mode) btnAttribute.FlatAppearance.MouseDownBackColor = Color.Transparent; btnAttribute.FlatAppearance.MouseOverBackColor = Color.Transparent; nudSkill.DoOneWayDataBinding("Visible", objSkill.CharacterObject, nameof(objSkill.CharacterObject.EffectiveBuildMethodUsesPriorityTables)); nudSkill.DoDataBinding("Value", objSkill, nameof(Skill.Base)); nudSkill.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.BaseUnlocked)); nudSkill.InterceptMouseWheel = GlobalSettings.InterceptMode; nudKarma.DoDataBinding("Value", objSkill, nameof(Skill.Karma)); nudKarma.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.KarmaUnlocked)); nudKarma.InterceptMouseWheel = GlobalSettings.InterceptMode; tlpMain.Controls.Add(nudSkill, 2, 0); tlpMain.Controls.Add(nudKarma, 3, 0); if (objSkill.IsExoticSkill) { lblCareerSpec = new Label { Anchor = AnchorStyles.Left, AutoSize = true, Margin = new Padding(3, 6, 3, 6), Name = "lblCareerSpec", Text = "[Specializations]", TextAlign = ContentAlignment.MiddleLeft }; lblCareerSpec.DoOneWayDataBinding("Text", objSkill, nameof(Skill.CurrentDisplaySpecialization)); tlpRight.Controls.Add(lblCareerSpec, 0, 0); } else { cboSpec = new ElasticComboBox { Anchor = AnchorStyles.Left | AnchorStyles.Right, AutoCompleteMode = AutoCompleteMode.Suggest, FormattingEnabled = true, Margin = new Padding(3, 0, 3, 0), Name = "cboSpec", Sorted = true, TabStop = false }; cboSpec.PopulateWithListItems(objSkill.CGLSpecializations); cboSpec.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanHaveSpecs)); cboSpec.Text = objSkill.CurrentDisplaySpecialization; cboSpec.TextChanged += cboSpec_TextChanged; _blnUpdatingSpec = false; _tmrSpecChangeTimer = new Timer { Interval = 1000 }; _tmrSpecChangeTimer.Tick += SpecChangeTimer_Tick; chkKarma = new ColorableCheckBox(components) { Anchor = AnchorStyles.Left, AutoSize = true, DefaultColorScheme = true, Margin = new Padding(3, 4, 3, 4), Name = "chkKarma", UseVisualStyleBackColor = true }; chkKarma.DoOneWayDataBinding("Visible", objSkill.CharacterObject, nameof(objSkill.CharacterObject.EffectiveBuildMethodUsesPriorityTables)); chkKarma.DoDataBinding("Checked", objSkill, nameof(Skill.BuyWithKarma)); chkKarma.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.CanHaveSpecs)); tlpRight.Controls.Add(cboSpec, 0, 0); tlpRight.Controls.Add(chkKarma, 1, 0); // Hacky way of fixing a weird UI issue caused by items of a combobox only being populated from the DataSource after the combobox is added _blnUpdatingSpec = true; cboSpec.Text = objSkill.CurrentDisplaySpecialization; _blnUpdatingSpec = false; } } this.DoOneWayDataBinding("Enabled", objSkill, nameof(Skill.Enabled)); this.DoOneWayDataBinding("BackColor", objSkill, nameof(Skill.PreferredControlColor)); AdjustForDpi(); this.UpdateLightDarkMode(); this.TranslateWinForm(blnDoResumeLayout: false); foreach (ToolStripItem tssItem in cmsSkillLabel.Items) { tssItem.UpdateLightDarkMode(); tssItem.TranslateToolStripItemsRecursively(); } } finally { _blnLoading = false; tlpRight.ResumeLayout(); tlpMain.ResumeLayout(); pnlAttributes.ResumeLayout(); ResumeLayout(true); _objSkill.PropertyChanged += Skill_PropertyChanged; } }