Example #1
0
 public ConsumerSelection(Consumer consumer, CalculatorWindow parent)
 {
     InitializeComponent();
     MyConsumer          = consumer;
     IsSelected.Checked  = true;
     NameLabel.Text      = MyConsumer.Name;
     ConsumerCount.Value = MyConsumer.Count;
     WattsInput.Value    = MyConsumer.Wattage;
     TotalUsage.Text     = (MyConsumer.Wattage * ConsumerCount.Value).ToString();
     Parent = parent;
 }
Example #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            AppForm = new CalculatorWindow();
            AppForm.AvailableConsumption = 1440;
            AppForm.AllConsumers         = LoadConsumers();
            AppForm.PopulateConsumers();
            Application.Run(AppForm);
        }