Esempio n. 1
0
        public AddNodeDialog(SimulatorInterface simulatorInterface)
        {
            this.Build ();
            this.simulatorInterface = simulatorInterface;
            ScrolledWindow sw = new ScrolledWindow ();
            sw.ShadowType = ShadowType.EtchedIn;
            sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
            sw.HeightRequest = 250;

            VBox.PackStart (sw, true, true, 0);
            Table table = new Table ((uint)(BasicNode.NodeLabels.Length), 2, true);
            sw.AddWithViewport (table);
            for (int i = 0; i < BasicNode.NodeLabels.Length; i++)
            {
                labels.Add (new Label (BasicNode.NodeLabels[i]));
                table.Attach (labels[i], 0, 1, (uint)(i), (uint)(i) + 1);
                entries.Add (new SpinButton (0, 80, 1));
                entries[i].ClimbRate = 1;
                entries[i].Numeric = true;
                table.Attach (entries[i], 1, 2, (uint)(i), (uint)(i) + 1);
            }
            buttonOk.Clicked += new EventHandler (AddNode);
            buttonCancel.Clicked += new EventHandler (Cancel);
            this.SetDefaultSize (340, 300);
            this.Modal = true;
            this.ShowAll ();
        }
 public InitialProcessState(SimulatorInterface simulatorInterface)
 {
     this.simulatorInterface = simulatorInterface;
     this.ProcVec = this.simulatorInterface.Processes.GetAllProcesses ();
     this.ModifyBg (StateType.Normal, new Color (255, 255, 255));
     this.HeightRequest = this.ProcVec.Count * 46 + 5;
     this.WidthRequest = width * 25;
     this.ExposeEvent += ExposeInitialProcessState;
 }
Esempio n. 3
0
 public SchedPlanPanel(SimulatorInterface simulatorInterface)
 {
     this.ModifyBg (StateType.Normal, new Color (255, 255, 255));
     this.simulatorInterface = simulatorInterface;
     this.HeightRequest = simulatorInterface.Nodes.Count * 140 + 40;
     plans = simulatorInterface.SchedPlans;
     this.WidthRequest = 60 + plans[0].Size () * this.width + 50;
     this.ExposeEvent += ExposeSchedPlanPanel;
 }