public EditWindow(MainView view, Controller controller, Dictionary<string, string> originalValues) { this.originalValues = originalValues; this.view = view; this.controller = controller; InitializeComponent(); Point mousePos = Mouse.GetPosition(this.view.MainWindow); editWindow.Top = mousePos.Y + this.view.MainWindow.Top - (editWindow.Height / 2); editWindow.Left = mousePos.X + this.view.MainWindow.Left - (editWindow.Width / 2); edit_ReasonForChangeTextBox.Text = defaultReasonForChange; edit_ReasonForChangeTextBox.Foreground = placeHolderColor; editWindow.Title = this.title += originalValues[Transactions.transactionID]; editTransactionGroupBox.Header += originalValues[Transactions.transactionID]; edit_TransactionIDTextBox.Text = originalValues[Transactions.transactionID]; edit_TransactionTypeTextBox.Text = originalValues[Transactions.type]; edit_CategoryTextBox.Text = originalValues[Transactions.category]; edit_AmountTextBox.Text = originalValues[Transactions.amount]; edit_DateAddedDatePicker.SelectedDate = this.controller.validateDate(originalValues[Transactions.dateCreated]); if (!originalValues[Transactions.dateModified].Equals("")) edit_DateModifiedDatePicker.SelectedDate = this.controller.validateDate(originalValues[Transactions.dateModified]); edit_DescriptionTextBox.Text = originalValues[Transactions.description]; }
public Popup(MainView view, Controller controller, string originalBalance) { InitializeComponent(); this.view = view; this.controller = controller; popupLabel.Content = originalBalance; }
public HistoryWindow(MainView view, Controller controller, string transactionID) { InitializeComponent(); this.controller = controller; this.view = view; Point mousePos = Mouse.GetPosition(this.view.MainWindow); editHistory.Top = mousePos.Y + this.view.MainWindow.Top - (editHistory.Height / 2); editHistory.Left = mousePos.X + this.view.MainWindow.Left - (editHistory.Width / 2); editHistoryLabel.Content += transactionID + " History"; editHistoryDataGrid.DataContext = this.controller.populateEditHistoryDataGrid(this, transactionID); }
public Controller(MainView view, Model model) { this.view = view; this.model = model; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MainWindow = ((Basic_Financial_Tracker.MainView)(target)); return; case 2: this.mainLabelGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.informationLabel = ((System.Windows.Controls.Label)(target)); return; case 4: this.dataGridLabel = ((System.Windows.Controls.Label)(target)); return; case 5: this.currentBalanceLabel = ((System.Windows.Controls.Label)(target)); return; case 6: this.currentBalanceValue = ((System.Windows.Controls.Label)(target)); return; case 7: this.todayDetailsGroupBox = ((System.Windows.Controls.GroupBox)(target)); return; case 8: this.todayDetailsGrid = ((System.Windows.Controls.Grid)(target)); return; case 9: this.todayInFlowLabel = ((System.Windows.Controls.Label)(target)); return; case 10: this.todayInFlowValue = ((System.Windows.Controls.Label)(target)); return; case 11: this.todayOutFlowLabel = ((System.Windows.Controls.Label)(target)); return; case 12: this.todayOutFlowValue = ((System.Windows.Controls.Label)(target)); return; case 13: this.todayNetFlowLabel = ((System.Windows.Controls.Label)(target)); return; case 14: this.todayNetFlowValue = ((System.Windows.Controls.Label)(target)); return; case 15: this.transactionDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 16: #line 62 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.launchEditPopupWindow); #line default #line hidden return; case 17: #line 63 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.launchDeletePrompt); #line default #line hidden return; case 18: #line 64 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.launchEditHistoryWindow); #line default #line hidden return; case 19: this.transactionGroupBox = ((System.Windows.Controls.GroupBox)(target)); return; case 20: this.transactionButtonGrid = ((System.Windows.Controls.Grid)(target)); return; case 21: this.addButton = ((System.Windows.Controls.Button)(target)); #line 82 "..\..\MainWindow.xaml" this.addButton.Click += new System.Windows.RoutedEventHandler(this.addButton_Click); #line default #line hidden return; case 22: this.editButton = ((System.Windows.Controls.Button)(target)); #line 83 "..\..\MainWindow.xaml" this.editButton.Click += new System.Windows.RoutedEventHandler(this.launchEditPopupWindow); #line default #line hidden return; case 23: this.deleteButton = ((System.Windows.Controls.Button)(target)); #line 84 "..\..\MainWindow.xaml" this.deleteButton.Click += new System.Windows.RoutedEventHandler(this.launchDeletePrompt); #line default #line hidden return; case 24: this.transactionInfoGrid = ((System.Windows.Controls.Grid)(target)); return; case 25: this.mainInfoGrid = ((System.Windows.Controls.Grid)(target)); return; case 26: this.labelInfoGrid1 = ((System.Windows.Controls.Grid)(target)); return; case 27: this.transactionIDLabel = ((System.Windows.Controls.Label)(target)); return; case 28: this.transactionTypeLabel = ((System.Windows.Controls.Label)(target)); return; case 29: this.labelInfoGrid2 = ((System.Windows.Controls.Grid)(target)); return; case 30: this.amountLabel = ((System.Windows.Controls.Label)(target)); return; case 31: this.categoryLabel = ((System.Windows.Controls.Label)(target)); return; case 32: this.labelInfoGrid3 = ((System.Windows.Controls.Grid)(target)); return; case 33: this.dateAddedLabel = ((System.Windows.Controls.Label)(target)); return; case 34: this.dateAddedCheckBoxLabel = ((System.Windows.Controls.Label)(target)); return; case 35: this.subInfoGrid1 = ((System.Windows.Controls.Grid)(target)); return; case 36: this.transactionIDTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 37: this.transactionTypeTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 38: this.subInfoGrid2 = ((System.Windows.Controls.Grid)(target)); return; case 39: this.amountTextBox = ((System.Windows.Controls.TextBox)(target)); #line 137 "..\..\MainWindow.xaml" this.amountTextBox.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.amountTextBox_PreviewTextInput); #line default #line hidden #line 137 "..\..\MainWindow.xaml" this.amountTextBox.LostFocus += new System.Windows.RoutedEventHandler(this.roundOffDecimal); #line default #line hidden #line 137 "..\..\MainWindow.xaml" this.amountTextBox.KeyDown += new System.Windows.Input.KeyEventHandler(this.amountTextBox_KeyDown); #line default #line hidden return; case 40: this.categoryTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 41: this.subInfoGrid3 = ((System.Windows.Controls.Grid)(target)); return; case 42: this.dateAddedDatePicker = ((System.Windows.Controls.DatePicker)(target)); return; case 43: this.dateAddedCheckBox = ((System.Windows.Controls.CheckBox)(target)); #line 146 "..\..\MainWindow.xaml" this.dateAddedCheckBox.Checked += new System.Windows.RoutedEventHandler(this.dateAddedCheckBox_Checked); #line default #line hidden #line 146 "..\..\MainWindow.xaml" this.dateAddedCheckBox.Unchecked += new System.Windows.RoutedEventHandler(this.dateAddedCheckBox_Unchecked); #line default #line hidden return; case 44: this.descriptionGrid = ((System.Windows.Controls.Grid)(target)); return; case 45: this.descriptionLabel = ((System.Windows.Controls.Label)(target)); return; case 46: this.descriptionTextBox = ((System.Windows.Controls.TextBox)(target)); #line 156 "..\..\MainWindow.xaml" this.descriptionTextBox.GotFocus += new System.Windows.RoutedEventHandler(this.descriptionTextBox_GotFocus); #line default #line hidden #line 156 "..\..\MainWindow.xaml" this.descriptionTextBox.LostFocus += new System.Windows.RoutedEventHandler(this.descriptionTextBox_LostFocus); #line default #line hidden return; case 47: this.constantsGroupBox = ((System.Windows.Controls.GroupBox)(target)); return; case 48: this.constantsGrid = ((System.Windows.Controls.Grid)(target)); return; case 49: this.originalBalanceGrid = ((System.Windows.Controls.Grid)(target)); return; case 50: this.originalBalance = ((System.Windows.Controls.Label)(target)); return; case 51: this.originalBalanceButton = ((System.Windows.Controls.Button)(target)); #line 190 "..\..\MainWindow.xaml" this.originalBalanceButton.Click += new System.Windows.RoutedEventHandler(this.originalBalanceButton_Click); #line default #line hidden return; } this._contentLoaded = true; }