public ModelNode() { InitializeComponent(); _nodeDef = (ResourceDefinitionModel)DataContext; ResourceModel.Capacity = 10000000; VerticalAlignment = VerticalAlignment.Top; HorizontalAlignment = HorizontalAlignment.Left; ResourceModel.IsProcess = false; DeclaredJobs.Add(new Job() { Name = "Default", State = new State("Used") }); }
public Machine() : base() { //NodeImage.Source = HelpClasses.InteropHelp.LoadBitmap(Properties.Resources.Machine); DeclaredJobs.Clear(); DeclaredJobs.Add(new Job() { Name = "Default", Subjobs = new ObservableCollection <SubJob>(new SubJob[] { new SubJob() { Distribution = new NormalDistribution() { Mean = 10, Std = 2 }, } }) }); ResourceModel.Capacity = 1; ResourceModel.ProcessName = "Machine" + i++; ResourceModel.IsProcess = true; }