Ejemplo n.º 1
0
        public static ClockPluginSettings ReadFromFile(string xmlConfigurationFile)
        {
            string settingsDirectory = Path.GetDirectoryName(xmlConfigurationFile);
            string templateFilePath  = Path.Combine(settingsDirectory, "ClockTemplate.xml");

            ClockPluginSettings result = new ClockPluginSettings();

            result.ClockTemplate = UITemplates.ClockTemplate;

            if (File.Exists(templateFilePath))
            {
                result.ClockTemplate = File.ReadAllText(templateFilePath);
            }

            return(result);
        }
Ejemplo n.º 2
0
 protected override void Init()
 {
     Settings = ClockPluginSettings.ReadFromFile(PluginSettingsFilePath);
     Context.RPCClient.Callbacks.PlayerConnect += Callbacks_PlayerConnect;
     StartClockTimer();
 }