예제 #1
0
 public Profile()
 {
     FileName        = string.Empty;
     _isFrozen       = false;
     TreatAsLocal    = false;
     Key             = Host.GetUniqueKey();
     _channelObjects = new List <Channel>();
     _channelOutputs = new List <int>();
     PlugInData      = new SetupData();
     IsDirty         = false;
 }
예제 #2
0
 public SequenceProgram(EventSequence sequence)
 {
     _profile = null;
     UseSequencePluginData = false;
     TreatAsLocal          = false;
     _key     = Host.GetUniqueKey();
     _mask    = null;
     FileName = sequence.FileName;
     ConstructUsing();
     SetupData = sequence.PlugInData;
     EventSequences.Add(new EventSequenceStub(sequence));
 }
예제 #3
0
        public static void VerifyPlugIns(IExecutable _object)
        {
            var allPluginData = _object.PlugInData.GetAllPluginData(SetupData.PluginType.Output);

            if (allPluginData.Count == 0)
            {
                return;
            }
            var builder = new StringBuilder();
            var plugins = new StringBuilder();

            foreach (XmlNode node in allPluginData)
            {
                if (node.Attributes == null)
                {
                    continue;
                }
                var pluginName = node.Attributes["name"].Value;
                if (FindPlugin(pluginName) != null)
                {
                    continue;
                }
                if (node.OwnerDocument != null &&
                    node.OwnerDocument.DocumentElement != null)
                {
                    var targetDoc = Xml.CreateXmlDocument(node.OwnerDocument.DocumentElement.Name);
                    Xml.CloneNode(targetDoc, node, true);
                    Host.GetUniqueKey();
                    var str = string.Format(
                        "{0}.{1}.{2}.{3}.vda", _object.Name, node.Attributes["name"].Value, DateTime.Today.ToString("MMddyyyy"), DateTime.Now.ToString("HHmmssfff"));
                    targetDoc.Save(Path.Combine(Paths.ImportExportPath, str));
                    builder.Append(str + "\n");
                    plugins.Append(pluginName + "\n");
                }
                _object.PlugInData.RemovePlugInData(node.Attributes["id"].Value);
            }
            if (builder.Length == 0)
            {
                return;
            }
            var msg =
                string.Format("Output plugins used by this {1} were missing or have not been implemented by {2}.\n\n" +
                              "The following exports were created containing the data for those missing plugins:\n\n" +
                              "{0}\nThe data has been removed from the {1}, but it has not been saved.\n\n" +
                              "NOTE: You may need to edit your profile(s) and remove the\n\n{3}\nplugin(s) so that you don't continue to see this message",
                              builder, (_object is EventSequence) ? "sequence" : "program", Vendor.ProductName, plugins);

            MessageBox.Show(msg, Vendor.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }
예제 #4
0
 public EventSequence()
 {
     _fullChannels     = new List <Channel>();
     Channels          = new List <Channel>();
     PlugInData        = new SetupData();
     Extensions        = new SequenceExtensions();
     EventValues       = null;
     _eventPeriod      = 100;
     MinimumLevel      = 0;
     MaximumLevel      = 255;
     Audio             = null;
     TotalEventPeriods = 0;
     WindowWidth       = 0;
     WindowHeight      = 0;
     ChannelWidth      = 0;
     EngineType        = EngineType.Standard;
     _profile          = null;
     TreatAsLocal      = false;
     AudioDeviceIndex  = -1;
     AudioDeviceVolume = 0;
     Key = Host.GetUniqueKey();
 }