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); } }
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); }
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; }
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; } } }
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); } }
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); } }
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; } } } }
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(); } }
public Action(Channels.Channel pChannel, Channels.DmxValue pValue) { mChannel = pChannel; mValue = pValue; //mPath = pPath; }