/// <summary> /// Creates a new ScheduleManager with default values, linked to the /// specified <see cref="EMMServer"/>. /// </summary> /// <param name="server">The EMMServer to use for executing commands.</param> public SchedulerManager(EMMServer server) { mServer = server; mTasks = new List<ScheduleTask>(); mTimer = new Timer(); mTimer.Elapsed += onTimerEvent; }
private void Initialise() { // Setup the log viewer mLogItemLock = new object(); mLogItems = new InvokeOC<LogListItem>(uxLogListView.Dispatcher); uxLogListView.ItemsSource = mLogItems; // Setup the server manager mMinecraft = Manager.Server; mMinecraft.ServerMessage += HandleServerMessage; mMinecraft.StatusChanged += HandleServerMessage; }
public void FixtureSetup() { mPersistentServer = new EMMServer(); mSettingsFilename = Path.Combine(Path.GetTempPath(), Path.GetTempFileName()); using (TextWriter tw = new StreamWriter(mSettingsFilename)) { tw.WriteLine(@"SimpleValue=Banana"); tw.WriteLine(@"TestSimpleValue=Strawberry"); tw.WriteLine(string.Format(@"AbsolutePath={0}", mSettingsFilename)); tw.WriteLine(string.Format(@"RelativePath=.\{0}", Path.GetFileName(mSettingsFilename))); tw.Close(); } mSettings = new SettingsFile(mPersistentServer, mSettingsFilename, '='); mSettings.LookForNewSettings(); }
public void FixtureSetup() { // Reflection within the server will yield the incorrect directory for settings, so we need to set it here. string testRoot = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase.Substring(8)); string settingsFile = Path.Combine(testRoot, "settings.conf"); using (TextWriter tw = new StreamWriter(settingsFile)) { tw.WriteLine(@"ServerJar=.\MinecraftSimulator.exe"); tw.Close(); } Console.WriteLine("Settings File is: " + settingsFile); mPersistentServer = new EMMServer(); //mPersistentServer = new EMMServer(settingsFile); //Assert.That(mPersistentServer.Settings.Filename, Is.EqualTo(settingsFile)); mPersistentServer.StartServer(); WaitForServerStatus(Status.Running); }
/// <summary> /// Creates a new <c>CommandParser</c> and connects it to the specified <see cref="IServer"/>. /// </summary> /// <param name="minecraft"></param> public CommandParser(EMMServer minecraft) { mMinecraft = minecraft; }
public UserManager(EMMServer server) { mServer = server; }
public SettingsFile(EMMServer server, string fileName, char separator) { mServer = server; mSettingsFile = fileName; mSeparator = separator; }
internal PowerManager(EMMServer server) { mServer = server; }
public void FixtureTeardown() { mPersistentServer.StopServer(false, 0, true); WaitForServerStatus(Status.Stopped); mPersistentServer = null; }
public Config(EMMServer server) { mServer = server; mServerManagerRoot = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase.Substring(8))); // strip the "file:///" from the front of the codebase }
public MCServerProperties(EMMServer server) : base(server, Path.Combine(server.Settings.MinecraftRoot, "server.properties"), '=') { }