IScheduleEditor is a client program's interface for managing a list of events, controlling how and when they are processed, and keeping the client application’s user interface up to date.

You can get an IScheduleEditor interface to any controller (channel) by calling ISimpleController2::GetScheduleEditor. This would typically be called from a client application after getting a controller object from IAppServerMgrProxy2::GetController.

Note: Please do not create a new controller with a CreateController call, instead, use GetController.

Note: Since it is a shared controller object, please do not close it. Other applications like the Event Monitor depend on it's existence.

Most methods in this interface log to the K2 log. They are logged as API commands, so you must select the protocol icon in log viewer to see the log messages.

Namespace:  GrassValley.Mseries.ScheduleEditor
Assembly:  GrassValley.Mseries.ScheduleEditor (in GrassValley.Mseries.ScheduleEditor.dll) Version: 1.0.0.0

Syntax

C#
public interface IScheduleEditor : IDisposable
Visual Basic (Declaration)
Public Interface IScheduleEditor _
	Implements IDisposable
Visual C++
public interface class IScheduleEditor : IDisposable

Examples

This example demonstrates how to create a connection to the Event Scheduler interface. The CreateIScheduleEditor() function below is used throughout the documentation examples.
CopyC#
private AppServerMgrProxy _appServerMgrProxy = null;
private IAppServer _appServer = null;
private ISimpleController2 _controller2 = null;
private string _appName = "IScheduleEditorTest";
private string _hostname = "localhost"; //hostname
private int _channel = 0; //0-based channel number

public IScheduleEditor CreateIScheduleEditor()
{
    // setup some variables
    string hostname = _hostname;
    string suiteName = _appName + System.Guid.NewGuid().ToString("N") + "_suite";
    string userName = "Administrator";
    string password = "adminK2";
    string domain = "";

    // create an AppServerMgr proxy object
    _appServerMgrProxy = new AppServerMgrProxy();
    // set the host name of the K2 server
    _appServerMgrProxy.SetHost(hostname);
    // pass the credentials info
    _appServerMgrProxy.SetUserCredentials(userName, password, domain, false);
    // connect to the AppServerMgr
    if (!_appServerMgrProxy.Connect())
    {
        _appServerMgrProxy = null;
        throw new InternalTestFailureException("AppService Connection Failed.");
    }

    if (_controller2 == null)
    {
        _controller2 = (ISimpleController2)((IAppServerMgrProxy2)_appServerMgrProxy).GetController(_channel);
    }

    return (IScheduleEditor) _controller2.GetScheduleEditor();
}

See Also