Esempio n. 1
0
        public void AddChannel(Channels.Channel pChannel)
        {
            if (pChannel == null)
            {
                return;
            }

            //Check if the channel is in the liste
            Channels.AutoChannel chan = new DmxFramework.Channels.AutoChannel(pChannel, Channels.ChangeOrigin.AutoMode);
            chan.ProgressMode = mProgressive;
            chan.NumberOfStep = mNumberOfStep;

            if (pChannel.Function == DmxFramework.Channels.ChannelFunction.Pan && mLimitEnabled)
            {
                chan.Min = mPanMin;
                chan.Max = mPanMax;
            }
            else if (pChannel.Function == DmxFramework.Channels.ChannelFunction.Tilt && mLimitEnabled)
            {
                chan.Min = mTiltMin;
                chan.Max = mTiltMax;
            }

            lock (mAutoChanList)
            {
                mAutoChanList.Add(chan);
            }
        }
Esempio n. 2
0
        public void AddChannel(Channels.Channel pChannel, string pChannelName)
        {
            this.Channels.Add(pChannel);
            this.ChannelNames.Add(pChannelName);

            foreach (Step step in mSteps)
            {
                step.AddChannel(pChannel);
            }
        }
        private Channels.Channel CreateOU(string displayName, string code, long?parentId = null)
        {
            var ou = new Channels.Channel(1, displayName, parentId)
            {
                Code = code
            };

            _session.Save(ou);
            return(ou);
        }
Esempio n. 4
0
        internal void AddChannel(Channels.Channel pChannel)
        {
            int OriginalSize = Values.Length;

            int[] val = new int[OriginalSize + 1];
            for (int i = 0; i < OriginalSize; i++)
            {
                val[i] = Values[i];
            }
            val[OriginalSize] = pChannel.Value;

            mValues = val;
        }
Esempio n. 5
0
 protected void DetectPanTiltChannel()
 {
     foreach (DmxFramework.Channels.Channel chan in mChannels)
     {
         if (chan.Function == DmxFramework.Channels.ChannelFunction.Pan)
         {
             mPanChannel = chan;
         }
         else if (chan.Function == DmxFramework.Channels.ChannelFunction.Tilt)
         {
             mTiltChannel = chan;
         }
     }
 }
Esempio n. 6
0
        public void AddChannel(Channels.Channel pChannel)
        {
            if (pChannel == null)
            {
                return;
            }

            //Check if the channel is in the liste
            Channels.AutoChannel chan = new DmxFramework.Channels.AutoChannel(pChannel, Channels.ChangeOrigin.AutoMode);
            chan.ProgressMode = Progressive;
            chan.NumberOfStep = mNumberOfStep;
            lock (mAutoChanList)
            {
                mAutoChanList.Add(chan);
            }
        }
Esempio n. 7
0
        public void RemoveChannel(Channels.Channel pChannel)
        {
            int index = mChannels.IndexOf(pChannel);

            if (index == -1)
            {
                return;
            }

            mChannels.RemoveAt(index);
            mChannelNames.RemoveAt(index);

            foreach (Step step in mSteps)
            {
                step.RemoveChannel(index);
            }
        }
Esempio n. 8
0
        public void RemoveChannel(Channels.Channel pChannel)
        {
            if (pChannel == null)
            {
                return;
            }

            lock (mAutoChanList)
            {
                foreach (Channels.AutoChannel chan in mAutoChanList)
                {
                    if (chan.Chan == pChannel)
                    {
                        mAutoChanList.Remove(chan);
                        break;
                    }
                }
            }
        }
Esempio n. 9
0
        private void CreateCHs()
        {
            var defaultTenant = _context.Tenants.FirstOrDefault(t => t.TenancyName == Tenant.DefaultTenantName);

            _context.SaveChanges();
            var defaultApp = _context.Apps.FirstOrDefault(e => e.Id > 0);

            if (defaultApp == null)
            {
                defaultApp = new App
                {
                    AppName  = App.DefaultName,
                    AppDir   = App.DefaultDir,
                    AppUrl   = "/" + App.DefaultDir,
                    TenantId = defaultTenant.Id
                };
                _context.Apps.Add(defaultApp);
                _context.SaveChanges();
            }
            var defaultApp1 = _context.Apps.FirstOrDefault(a => a.AppName == App.DefaultName);

            var defaultChannel = _context.Channels.FirstOrDefault(e => e.Id > 0);

            if (defaultChannel == null)
            {
                defaultChannel = new Channels.Channel
                {
                    ParentId    = null,
                    DisplayName = ChannelManager.DefaultChannelName,
                    AppId       = defaultApp.Id,
                    Code        = Channels.Channel.CreateCode(0),
                    Parent      = null,
                };

                _context.Channels.Add(defaultChannel);
                _context.SaveChanges();
            }
        }
Esempio n. 10
0
 public Action(Channels.Channel pChannel, Channels.DmxValue pValue)
 {
     mChannel = pChannel;
     mValue = pValue;
     //mPath = pPath;
 }