public SMSPhone() { SMSButtonClicked = false; simCorp = new SimCorpMobile(new ListViewOutput(MessageListView)); MsgAdder += AddMsgToTextBox; simCorp.MsgStor.MsgAdded += OnMsgAdded; simCorp.MsgStor.MsgRemoved += OnMsgRemoved; InitializeComponent(); FormatItem defaultItem = new FormatItem("None", StringFormatter.FormatNone); FormatComboBox.Items.Add(defaultItem); FormatComboBox.Items.Add(new FormatItem("Start with DateTime", StringFormatter.FormatStartDateTime)); FormatComboBox.Items.Add(new FormatItem("End with DateTime", StringFormatter.FormatEndDateTime)); FormatComboBox.Items.Add(new FormatItem("Lowercase", StringFormatter.FormatLower)); FormatComboBox.Items.Add(new FormatItem("Uppercase", StringFormatter.FormatUpper)); FormatComboBox.SelectedItem = defaultItem; SenderComboBox.Items.Add(allSenderItem); SenderComboBox.SelectedItem = allSenderItem; OrAndCheckBox.Checked = true; ChargeProgressBar.Value = simCorp.Battery.GetCurrentCharge(); UpdProgBar += OnChargeChanged; BatteryDischargeTask = new Task(() => { Discharge(); }); BatteryDischargeTask.Start(); simCorp.Battery.ChargeChanged += OnChargeLevelChanged; }
public SMSPhone() { CallButtonClicked = false; simCorp = new SimCorpMobile(new ListViewOutput(CallListView)); CallAdder += AddCallToTextBox; simCorp.CallStor.CallAdded += OnCallAdded; simCorp.CallStor.CallRemoved += OnCallRemoved; InitializeComponent(); ChargeProgressBar.Value = simCorp.Battery.GetCurrentCharge(); UpdProgBar += OnChargeChanged; BatteryDischargeTask = new Task(() => { Discharge(); }); BatteryDischargeTask.Start(); simCorp.Battery.ChargeChanged += OnChargeLevelChanged; }