AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

VS.NET to Delphi.NET Codesample

Ein Thema von schwa226 · begonnen am 4. Apr 2008 · letzter Beitrag vom 4. Apr 2008
 
schwa226

Registriert seit: 4. Apr 2008
400 Beiträge
 
#1

VS.NET to Delphi.NET Codesample

  Alt 4. Apr 2008, 09:41
Hi,

ich habe eine Code für VS.NET und möchte ihn für Delphi.NET (CodeGear™ Delphi® 2007 für Microsoft® .NET Version 11.0.2902.10471) verwenden. Kann mir da jemand dabei helfen dies in die richtige Form zu bekommen?
Hab mit Delphi noch nicht viel Erfahrungen und bekomme es einfach nicht hin...

Code:
Zitat:
1) Open up vs.net and click New Project
2) Choose the language of your choise and create a new Class library project and call it MyPlugin
3) Add a reference to CoreInterfaces.dll located in your lcdstudio folder.
4) Paste the following code into class1.cs (C# is used but this code is that basic it shoudn't be hard to convert to VB.Net)

Code:
Code:
using System;
using LcdStudio.CoreInterfaces;

namespace MyPlugin

   public class Plugin : AbstractDataPlugin
   { 
      public override void RegisterData(IDataService ds)
      { 
         ds.RegisterVariable(Group,"MyPlugin.HelloWorld","MyPlugin\\Hello world");
         ds.RegisterVariable(Group,"MyPlugin.TimeMsg","MyPlugin\\Time");
         this.UpdateInterval = 10000; //Update every 10000ms (10 sec)
      } 
       
      public override void UpdateData(IDataService ds)
      { 
         ds.SetValue("MyPlugin.HelloWorld","Hello world");
         ds.SetValue("MyPlugin.TimeMsg",string.Format("The time is {0} ",DateTime.Now.ToShortTimeString()));
      } 

   } 
}


5) Compile your project and copy the resulting MyPlugin.dll to your LcdStudio folder
6) Create a file in your LcdStudio folder called MyPlugin.Plugin with the following lines

Code:
Code:
 
<?xml version="1.0" encoding="utf-8" ?>
<Plugins>
   <Plugin ID="My Plugin" Type="MyPlugin.Plugin, MyPlugin" Visible="Yes" >
      <Depends ID="DataService" />
      <Depends ID="DispatchService" />
   </Plugin>
</Plugins>


7) Run LcdStudio and add your Plugin in the config panel.

Can't make it any easyer to extend LcdStudio.
Hier ist das Programm LCDStudio zu finden: http://www.lcdstudio.com/site20/home.php

Kann mir das jemand für Delphi.NET übresetzen?
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:56 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz