| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member | is there anybody out there who can explain me, where i have to put my c# script in my plugin-file so that this routine will work the whole time an writes this code into the text file. Code: FileStream file = new FileStream("test1234.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter sw = new StreamWriter(file);
sw.WriteLine("test");
sw.Close();
file.Close();
I generate a complete script with the tutorial but now i dont know how to continue |
| | |
| | #3 (permalink) |
| Portal Member | i want MP to write continuously in the test12345.txt while i can control the value of TEXT Code: using System;
using System.IO;
using System.Windows.Forms;
using MediaPortal.GUI.Library;
using MediaPortal.Dialogs;
namespace TestPlugIn
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class Class1 : GUIWindow, ISetupForm
{
#region ISetupForm Members
#endregion
#region GenerateFile
public static void Start()
{
FileStream file = new FileStream("test12345.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter sw = new StreamWriter(file);
sw.WriteLine("TEST");
sw.Close();
file.Close();
}
#endregion
}
}
|
| | |
| | #4 (permalink) |
| Portal Member Join Date: Dec 2004 Location: United Kingdom
Posts: 630
Thanks: 0
Thanked 2 Times in 1 Post
| The Start method will be called once per MP session and the last time I looked the method is called within the main application's thread so you cannot loop within this method. You will need to either create a seperate thread, use timer or take a look at this. |
| | |
![]() |
| Bookmarks |
| Tags |
| developing, plugin |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IPTV@UT Plugin | moiristo | Plugins | 116 | 2008-10-06 22:32 |
| (original thread) MCE Replacement Plugin v1.0.0 | and-81 | MCE Replacement Plugin | 532 | 2007-02-24 00:24 |
| Gathering topical infos about plugins (To: authors & use | tomtom21000 | Plugins | 2 | 2006-02-05 00:20 |
| Plugin example doesnt show in list | Anonymous | Plugins | 5 | 2005-08-13 12:12 |