示例#1
0
 public FormComPort(PIC.PIC Pic)
 {
     InitializeComponent();
     this.Pic = Pic;
     comboBoxPorts.Items.AddRange(Pic.ComPort.Ports);
     buttonOpenClosePort.Text = Pic.ComPort.Active ? "Stop" : "Start";
 }
 public FormStack(PIC.PIC Pic) : this()
 {
     bindLabelStack1.Bind(Pic.Stack.Entrys[0], 1);
     bindLabelStack2.Bind(Pic.Stack.Entrys[1], 2);
     bindLabelStack3.Bind(Pic.Stack.Entrys[2], 3);
     bindLabelStack4.Bind(Pic.Stack.Entrys[3], 4);
     bindLabelStack5.Bind(Pic.Stack.Entrys[4], 5);
     bindLabelStack6.Bind(Pic.Stack.Entrys[5], 6);
     bindLabelStack7.Bind(Pic.Stack.Entrys[6], 7);
     bindLabelStack8.Bind(Pic.Stack.Entrys[7], 8);
 }
示例#3
0
        public FormTime(PIC.PIC Pic)
        {
            this.Pic = Pic;
            InitializeComponent();

            Pic.CrystalFrequencyType.DataChanged += CrystalFrequencyType_DataChanged;
            Pic.CrystalFrequency.DataChanged     += CrystalFrequency_DataChanged;
            Pic.CycleTime.DataChanged            += CyclusTime_DataChanged;
            Pic.Runtime.DataChanged += Runtime_DataChanged;

            CrystalFrequencyType_DataChanged(Pic.CrystalFrequencyType.Value, null);
            CrystalFrequency_DataChanged(Pic.CrystalFrequency.Value, null);
        }
        private void toolStripMenuItem2_Click(object sender, EventArgs e)
        {
            OpenFileDialog OFD = new OpenFileDialog();

            OFD.Filter          = "LST file|*.lst|All files|*.*";
            OFD.CheckFileExists = true;
            OFD.Multiselect     = false;

            if (OFD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Pic = new PIC.PIC(OFD.FileName);
                HasNewSource();
            }
        }
示例#5
0
 public FormSourcecode(PIC.PIC Pic) : this()
 {
     this.Pic = Pic;
     Pic.RegisterMap.ProgrammCounterAdapter.DataChanged += ProgrammCounterAdapter_DataChanged;
     for (int X = 0; X < Pic.SourceCode.Length; X++)
     {
         string LineNr = "";
         string Code   = "";
         string Line   = Pic.SourceCode[X].SourceCode;
         if (Line.Length > 5)
         {
             LineNr = Line.Remove(5);
             Code   = Line.Remove(0, 5);
         }
         dataGridView1.Rows.Add(new object[] { LineNr, Code });
     }
     dataGridView1.SelectionChanged += dataGridView1_SelectionChanged;
 }
示例#6
0
        public FormRegisterOverview(PIC.PIC Pic)
            : this()
        {
            this.Pic = Pic;
            // Event für FSR registrieren
            Pic.RegisterMap.FSRChanged += RegisterMap_FSRChanged;

            AddHeader();
            // UI Erstellen
            for (int X = 0; X < Pic.RegisterMap.Length; X += 8)
            {
                Label L = new Label();
                L.Text = X.ToString("X2");
                L.SetBounds(0, 23 + X * 3, 20, 13);
                Controls.Add(L);
                for (int Y = 0; Y < 8; Y++)
                {
                    DataAdapter <byte> Adapter = Pic.RegisterMap.GetAdapter(X + Y);
                    BindTextBoxHex     T       = new BindTextBoxHex();
                    T.BindDoubleclick += T_BindDoubleclick;
                    T.ID = (Y + X).ToString("X2");
                    T.SetBounds(35 + Y * 34, X * 3 + 20, 20, 15);
                    T.Bind(new ByteToIntDataAdapter(Adapter));
                    T.EnableChangeColor = true;

                    if (X == 0 && Y == 0)
                    {
                        TextBox0x0 = T;
                    }
                    else if (X == 0x80 && Y == 0)
                    {
                        TextBox0x80 = T;
                    }

                    Controls.Add(T);
                }
            }
        }
示例#7
0
 public FormDebugActions(PIC.PIC Pic)
 {
     InitializeComponent();
     this.Pic = Pic;
 }
示例#8
0
 public Clock(PIC _pic, short _interval)
 {
     clock = new System.Timers.Timer(_interval);
     clock.Elapsed += OnTimedEvent;
     this.pic = _pic;
 }
 public SerialCom(PIC Pic)
 {
     this.Pic = Pic;
 }