public AggregateStage AddProjection(IDonutFunction function) { var stage = new AggregateStage(_script, function); Stages.Add(stage); return(stage); }
public virtual void ReadChildData(BinaryReader reader) { int x = 0; _lensFlare.ReadString(reader); for (x = 0; (x < _extraLayers.Count); x = (x + 1)) { ExtraLayers.Add(new ShaderTransparentLayerBlock()); ExtraLayers[x].Read(reader); } for (x = 0; (x < _extraLayers.Count); x = (x + 1)) { ExtraLayers[x].ReadChildData(reader); } for (x = 0; (x < _maps.Count); x = (x + 1)) { Maps.Add(new ShaderTransparentGenericMapBlock()); Maps[x].Read(reader); } for (x = 0; (x < _maps.Count); x = (x + 1)) { Maps[x].ReadChildData(reader); } for (x = 0; (x < _stages.Count); x = (x + 1)) { Stages.Add(new ShaderTransparentGenericStageBlock()); Stages[x].Read(reader); } for (x = 0; (x < _stages.Count); x = (x + 1)) { Stages[x].ReadChildData(reader); } }
public StageCode NewStage() { var stage = new StageCode(); Stages.Add(stage); return(stage); }
private void LoadOrders() { foreach (OrderModel order in _orderCache.StageOrders) { OrderManagerRowModel orderRow = new OrderManagerRowModel { ClOrderId = order.ClOrderId, TickerSymbol = order.TickerSymbol, AvgPrice = order.AvgPrice, StopPrice = order.StopPrice, LimitPrice = order.LimitPrice, OrderDate = order.OrderDate, CommissionAndFees = order.CommissionAndFees, TotalCost = order.AvgPrice + order.CommissionAndFees, TotalQuantity = order.Quantity, ExecutedQuantity = order.Quantity, RemainingQuantity = 0, TraderName = "Ramesh Verma" }; orderRow.OrderType = ((OrderType)order.Type).ToString(); orderRow.OrderSide = ((OrderSide)order.Side).ToString(); orderRow.TIF = ((TimeInForce)order.TIF).ToString(); orderRow.InternalOrderType = ((InternalOrderType)order.InternalOrderType).ToString(); orderRow.OrderStatus = ((OrderStatus)order.OrderStatus).ToString(); orderRow.Broker = _fieldsCache.Brokers.First(x => x.Id.Equals(order.Broker)).Name; orderRow.Allocation = _fieldsCache.Accounts.First(x => x.Id.Equals(order.Allocation)).Name; Stages.Add(orderRow); } foreach (OrderModel order in _orderCache.SubOrders) { OrderManagerRowModel orderRow = new OrderManagerRowModel { ClOrderId = order.ClOrderId, TickerSymbol = order.TickerSymbol, AvgPrice = order.AvgPrice, StopPrice = order.StopPrice, LimitPrice = order.LimitPrice, OrderDate = order.OrderDate, CommissionAndFees = order.CommissionAndFees, TotalCost = order.AvgPrice + order.CommissionAndFees, TotalQuantity = order.Quantity, ExecutedQuantity = order.Quantity, RemainingQuantity = 0, TraderName = "Ramesh Verma" }; orderRow.OrderType = ((OrderType)order.Type).ToString(); orderRow.OrderSide = ((OrderSide)order.Side).ToString(); orderRow.TIF = ((TimeInForce)order.TIF).ToString(); orderRow.InternalOrderType = ((InternalOrderType)order.InternalOrderType).ToString(); orderRow.OrderStatus = ((OrderStatus)order.OrderStatus).ToString(); orderRow.Broker = _fieldsCache.Brokers.First(x => x.Id.Equals(order.Broker)).Name; orderRow.Allocation = _fieldsCache.Accounts.First(x => x.Id.Equals(order.Allocation)).Name; Orders.Add(orderRow); } Status = "Data Initialized"; }
public void FromOptions(JenkinsOptions options) { switch (options.FlubuToolType) { case FlubuToolType.GlobalTool: FlubuCommand = "flubu"; break; case FlubuToolType.LocalTool: case FlubuToolType.CliTool: FlubuCommand = "dotnet flubu"; break; } Options = options.Options; if (options.Environment != null && options.Environment.Count != 0) { Environment = options.Environment; } if (!options.CustomStagesBeforeTargets.IsNullOrEmpty()) { Stages.AddRange(options.CustomStagesBeforeTargets); } else { Stages = new List <Stage>(); } foreach (var targetName in options.TargetNames) { Stage stage = new Stage { Name = targetName, }; if (!string.IsNullOrEmpty(options.WorkingDirectory)) { stage.WorkingDirectory = options.WorkingDirectory; } var command = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "bat" : "sh"; stage.Steps.Add($"{command} '{FlubuCommand} {targetName} --nd'"); Stages.Add(stage); } if (!options.CustomStagesAfterTargets.IsNullOrEmpty()) { Stages.AddRange(options.CustomStagesAfterTargets); } if (!options.JenkinsPosts.IsNullOrEmpty()) { Post = options.JenkinsPosts; } }
void AddStage(object parameter) { Stages.Add(new StageViewModel { Time = 1 }); Stages.Add(new StageViewModel { Time = 1 }); }
public AppManager() { this.AppHttpClient = new AppHttpClient(); this.MessageProviderManager = new MessageProviderManager(new MessageProviderContext(AppHttpClient)); // Create blank stage Stage initialStage = new Stage(MessageProviderManager); this.Stages = new List <Stage>(); Stages.Add(initialStage); this.CurrentStage = initialStage; }
private void TemplatesListBox_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e) { if (Stages != null && e.NewValue != null) { var sortIndex = Stages.Max(x => x.SortIndex) ?? 1; var template = (KeyValuePair <int, string>)e.NewValue; var newStage = new ProjectStageTile((EStageTemplate)template.Key, ++sortIndex); newStage.Project = _originalProject; Stages.Add(newStage); FocusedStage = newStage; StageTemplatesPopup.ClosePopup(); } }
public void Load(ORM.ProjectInfoView project) { if (_dc != null) { _dc.Dispose(); } ; _dc = new FPMDataContext(); Stages.Clear(); var mainStage = new ProjectStageTile() { ID = -1, Name = "Основные данные", SortIndex = 0, IsPublic = true, RowState = 0, }; Stages.Add(mainStage); FocusedStage = mainStage; _project = project; _originalProject = project.ToProject(); if (_project.ID > 0) { var stages = _dc.ProjectStage .Where(x => x.RowState == Convert.ToInt16(ERowState.Active) && x.ProjectID == _project.ID && (x.IsPublic || (UserSettings.ProfileRole == ERole.Administrator) || x.ResponsibleRole == Convert.ToInt16(UserSettings.ProfileRole))) .OrderBy(x => x.SortIndex); foreach (var stage in stages) { Stages.Add(new ProjectStageTile(stage)); } ; } else { Stages.Add(new ProjectStageTile(EStageTemplate.Sketch, 1)); Stages.Add(new ProjectStageTile(EStageTemplate.Contract, 2)); Stages.Add(new ProjectStageTile(EStageTemplate.Payment, 3)); Stages.Add(new ProjectStageTile(EStageTemplate.Shipment, 4)); }; Stages.Where(x => x.Project == null).ToList().ForEach(x => x.Project = _originalProject); OnStageChanged(); isLoaded = true; }
public override void Read(EndianBinaryReader reader, ISection section = null) { int count = reader.ReadInt32(); uint section1Offset = reader.ReadUInt32(); uint section2Offset = reader.ReadUInt32(); uint section3Offset = reader.ReadUInt32(); uint section4Offset = reader.ReadUInt32(); Format = ((section2Offset - section1Offset) / count) != 108 ? BinaryFormat.FT : BinaryFormat.F; reader.ReadAtOffset(section1Offset, () => { Stages.Capacity = count; for (int i = 0; i < count; i++) { var stageEntry = new StageEntry(); stageEntry.ReadFirst(reader, Format); Stages.Add(stageEntry); } }); reader.ReadAtOffset(section2Offset, () => { foreach (var stageEntry in Stages) { stageEntry.ReadSecond(reader); } }); reader.ReadAtOffset(section3Offset, () => { foreach (var stageEntry in Stages) { stageEntry.ReadThird(reader); } }); reader.ReadAtOffset(section4Offset, () => { for (int i = 0; i < Stages.Count; i++) { int index = reader.ReadInt32(); Debug.Assert(i == index); Stages[index].ReadFourth(reader); } }); }
private void BuildStages(QuestStageDetailsViewModel stage) { var stages = stage.NextStages; if (stages == null || stages.Count == 0) { return; } var container = new QuestStageContainer(stages); Stages.Add(container); var first = stages.First(); BuildStages(first); }
public void FromOptions(JenkinsOptions options) { Options = options.Options; if (options.Environment != null && options.Environment.Count != 0) { Environment = options.Environment; } if (!options.CustomStagesBeforeTargets.IsNullOrEmpty()) { Stages.AddRange(options.CustomStagesBeforeTargets); } else { Stages = new List <Stage>(); } foreach (var targetName in options.TargetNames) { Stage stage = new Stage { Name = targetName, }; if (!string.IsNullOrEmpty(options.WorkingDirectory)) { stage.WorkingDirectory = options.WorkingDirectory; } stage.Steps.Add($"flubu {targetName} --nd"); Stages.Add(stage); } if (!options.CustomStagesAfterTargets.IsNullOrEmpty()) { Stages.AddRange(options.CustomStagesAfterTargets); } if (!options.JenkinsPosts.IsNullOrEmpty()) { Post = options.JenkinsPosts; } }
private void BuildStagesForNewQuest() { Stages.Clear(); var first = CurrentQuest.FirstStage; if (first == null) { return; } var firstStage = new List <QuestStageDetailsViewModel>(); var viewModel = new QuestStageDetailsViewModel(first); firstStage.Add(viewModel); Stages.Add(new QuestStageContainer(firstStage)); BuildStages(viewModel); }
public void NewStage() { var stage = new NewConversationStage(); stage.associatedConvo = this; if (Stages.Count() > 0) { stage.txtId.Text = (this.Stages.Select(a => a.StageId).Max() + 10).ToString(); } else { stage.txtId.Text = "10"; } stage.ShowDialog(); if (stage.DialogResult == true) { var res = new ConversationStage(); res.StageId = Convert.ToInt32(stage.txtId.Text); res.StageName = stage.txtFriendlyName.Text; Stages.Add(res); Stages = new ObservableCollection <ConversationStage>(Stages.OrderBy(a => a.StageId)); SelectedStage = res; } }
public Test_QuestTwo() { QuestID = "QST_test02"; Title = "Second Test Quest"; Description = "This is the second test quest. Use the test elevator!"; Repeatable = false; RequiredLevel = 1; RequiredQuests.Add("QST_test01"); EndNPCID = "npc_type_questnpc"; QuestStage firstStage = new QuestStage(); firstStage.Objectives.Add(new QuestObjective() { Type = QST_OBJ_TYPE.OBJECT_INTERACT, RequiredProgress = 1, TargetList = new List <string>() { "321" } }); Stages.Add(firstStage); }
public Test_Quest() { QuestID = "QST_test01"; Title = "First Test Quest"; Description = "This is the first test quest. Kill 4 of those annoying test NPCs!"; Repeatable = false; RequiredLevel = 1; EndNPCID = "npc_type_questnpc"; QuestStage firstStage = new QuestStage(); firstStage.Objectives.Add(new QuestObjective() { Type = QST_OBJ_TYPE.KILL_COLLECT, RequiredProgress = 4, Task = "Kill four TestNPC enemies.", TargetList = new List <string>() { "npc_type_testnpc" } }); Stages.Add(firstStage); }
public ASequence() { Stages = this.getStages(); Stages.Add(Stage.Final); manipulators = getManipulators(); }
public void AddStage(ProxyStage stage) { Stages.Add(stage); Value.Stages.Add(stage.Value); stage.Parent = this; }
public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("Script", false, out subEle)) { if (Script == null) { Script = new RecordReference(); } Script.ReadXML(subEle, master); } if (ele.TryPathTo("Name", false, out subEle)) { if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Large", false, out subEle)) { if (LargeIcon == null) { LargeIcon = new SimpleSubrecord <String>(); } LargeIcon.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Small", false, out subEle)) { if (SmallIcon == null) { SmallIcon = new SimpleSubrecord <String>(); } SmallIcon.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) { Data = new QuestData(); } Data.ReadXML(subEle, master); } if (ele.TryPathTo("Conditions", false, out subEle)) { if (Conditions == null) { Conditions = new List <Condition>(); } foreach (XElement e in subEle.Elements()) { Condition tempCTDA = new Condition(); tempCTDA.ReadXML(e, master); Conditions.Add(tempCTDA); } } if (ele.TryPathTo("Stages", false, out subEle)) { if (Stages == null) { Stages = new List <QuestStage>(); } foreach (XElement e in subEle.Elements()) { QuestStage tempINDX = new QuestStage(); tempINDX.ReadXML(e, master); Stages.Add(tempINDX); } } if (ele.TryPathTo("Objectives", false, out subEle)) { if (Objectives == null) { Objectives = new List <QuestObjective>(); } foreach (XElement e in subEle.Elements()) { QuestObjective tempQOBJ = new QuestObjective(); tempQOBJ.ReadXML(e, master); Objectives.Add(tempQOBJ); } } }
public override void ReadData(ESPReader reader, long dataEnd) { while (reader.BaseStream.Position < dataEnd) { string subTag = reader.PeekTag(); switch (subTag) { case "EDID": if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadBinary(reader); break; case "SCRI": if (Script == null) { Script = new RecordReference(); } Script.ReadBinary(reader); break; case "FULL": if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadBinary(reader); break; case "ICON": if (LargeIcon == null) { LargeIcon = new SimpleSubrecord <String>(); } LargeIcon.ReadBinary(reader); break; case "MICO": if (SmallIcon == null) { SmallIcon = new SimpleSubrecord <String>(); } SmallIcon.ReadBinary(reader); break; case "DATA": if (Data == null) { Data = new QuestData(); } Data.ReadBinary(reader); break; case "CTDA": if (Conditions == null) { Conditions = new List <Condition>(); } Condition tempCTDA = new Condition(); tempCTDA.ReadBinary(reader); Conditions.Add(tempCTDA); break; case "INDX": if (Stages == null) { Stages = new List <QuestStage>(); } QuestStage tempINDX = new QuestStage(); tempINDX.ReadBinary(reader); Stages.Add(tempINDX); break; case "QOBJ": if (Objectives == null) { Objectives = new List <QuestObjective>(); } QuestObjective tempQOBJ = new QuestObjective(); tempQOBJ.ReadBinary(reader); Objectives.Add(tempQOBJ); break; default: throw new Exception(); } } }
public virtual void AddStage(Stage stage) { Stages.Add(stage); }
public void Add(BazelyStageData sdata) { sdata.PropertyChanged += sdata_PropertyChanged; Stages.Add(sdata); }
public void LoadConfig(string path) { StreamReader sr = new StreamReader(path); var config = (JObject)JsonConvert.DeserializeObject(sr.ReadToEnd()); sr.Close(); JToken token; if (config.TryGetValue("AGVConfig", out token)) { ISerialize serialize = new ProtoClass(); foreach (JObject t in token.Values()) { try { IPort port = new TcpPort(t.Value <string>("port")); //var test = $"HuiJinYun.Domain.Entity.Device.{t.Value<string>("type")}AGV<TState, TPosition>"; Type type = Type.GetType($"HuiJinYun.Domain.Entity.Device.{t.Value<string>("type")}AGV`2"); type = type.MakeGenericType(typeof(eHuiJinYunAGVState), typeof(eHuiJinYunStagePosition)); object[] @params = new object[] { port, serialize }; @params = @params.Concat(buildParams(type, t.Value <JObject>("options"))).ToArray <object>(); var agv = (IAGV <eHuiJinYunAGVState, eHuiJinYunStagePosition>)Activator.CreateInstance(type, @params); AGVs.Add(agv); } catch { continue; } } } if (config.TryGetValue("DeviceConfig", out token)) { ISerialize serialize = new ProtoClass(); foreach (JObject t in token.Values()) { try { var port = PortFactory.NewPort(t.Value <string>("port")); Type type = Type.GetType($"HuiJinYun.Domain.Entity.Device.{t.Value<string>("type")}Device"); var device = (PlcDeviceBase)Activator.CreateInstance(type, port, serialize); Devices.Add(((JProperty)t.Parent).Name, device); } catch (Exception ex) { continue; } } } if (config.TryGetValue("StageConfig", out token)) { foreach (var t in token.Values()) { try { List <IDevice> deviceList = new List <IDevice>(); foreach (var d in t["Device"].Values <string>()) { deviceList.Add(Devices[d]); } Type type = Type.GetType($"HuiJinYun.Domain.Entity.{((JProperty)t.Parent).Name}Stage"); var stage = (IProductionStage)Activator.CreateInstance(type, deviceList.ToArray()); Stages.Add(stage); } catch (Exception ex) { continue; } } } object[] buildParams(Type type, JObject joParams) { if (null == joParams) { return(new object[0]); } else { object[] @params = new object[joParams.Count]; List <JProperty> jpParams = new List <JProperty>(joParams.Properties()); for (var i = 0; i < jpParams.Count; i++) { @params[i] = jpParams[i].Value.Value <string>(); } return(@params); } } }
public void AddStage(IStage stage) { Stages.Add(stage); }