
Convertir código de VB.NET a C#
Publicado por erika (2 intervenciones) el 11/09/2015 17:13:47
buenos dias estoy queriendo manipularunos controles industriales , la verdad no se nada de c# pero yo los hice en vb.net y me funsionaron pero el profesor los quiere en c# , utilice el conversor de el guille pero no me funsiono si alguien me pudiera ayudar es urgente, gracias de antemano.
enVB.net
con el convertidor guille C#
enVB.net
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Public Class Form1
Private Sub LbKnob1_KnobChangeValue(sender As Object, e As LBSoft.IndustrialCtrls.Knobs.LBKnobEventArgs) Handles LbKnob1.KnobChangeValue
LbKnob1.Value = (CInt(LbKnob1.Value))
LbDigitalMeter1.Value = LbKnob1.Value
LbAnalogMeter1.Value = LbKnob1.Value
End Sub
Private Sub LbKnob1_Load(sender As Object, e As EventArgs) Handles LbKnob1.Load
End Sub
End Class
con el convertidor guille C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Cknob
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
lbKnob1.KnobChangeValue += new LBSoft.IndustrialCtrls.Knobs.LBKnobEventHandler(lbKnob1_knobChangeValue);
lbKnob1.Load += new EventHandler(LbKnob1_load);
}
private void LbKnob1_KnobChangeValue(object sender, LBSoft.IndustrialCtrls.Knobs.LBKnobEventArgs e)
{
lbKnob1.Value=(int)lbKnob1.Value ;
lbDigitalMeter1.Value = lbKnob1.Value;
lbAnalogMeter1.Value = lbKnob1.Value;
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
- Cknob.rar(67,0 KB)
- knobdigi.rar(92,4 KB)
Valora esta pregunta


0