public MainWindow() { WindowStartupLocation = WindowStartupLocation.CenterScreen; PianoController pC = new PianoController() { }; SheetController sC = new SheetController(); MidiController mC = new MidiController(); sC.MidiController = mC; kC = new KeyboardController() { PianoController = pC }; mPc = new MusicPieceController() { Piano = pC, SheetController = sC, MidiController = mC, KeyboardController = kC }; //mPc.Guide.Start(); DrawMenu(); InitializeComponent(); Show(); }
private void btnNewRegister_Click(object sender, EventArgs e) { if (tabControl.SelectedTab == tabPageNAC) { using (var form = new FormNacRegister()) { var result = form.ShowDialog(); if (result == DialogResult.OK) { Models.Nacimientos reg = form.Register; using (Models.notariadbContext db = new Models.notariadbContext()) { db.Add(reg); db.SaveChanges(); SheetController test = new SheetController(); test.UpdateSheets(nacSheetGridView, matSheetGridView, defSheetGridView, userSheetGridView); } } } } if (tabControl.SelectedTab == tabPageMAT) { using (var form = new FormMatRegister()) { var result = form.ShowDialog(); if (result == DialogResult.OK) { //DatabaseModel.insert(reg); } } } }
public formMain() { InitializeComponent(); includeDataSheetsToView(); nacSheetGridView.SelectionChanged += new EventHandler(SheetGridView_SelectionChanged); matSheetGridView.SelectionChanged += new EventHandler(SheetGridView_SelectionChanged); defSheetGridView.SelectionChanged += new EventHandler(SheetGridView_SelectionChanged); userSheetGridView.SelectionChanged += new EventHandler(SheetGridView_SelectionChanged); SheetController test = new SheetController(); test.UpdateSheets(nacSheetGridView, matSheetGridView, defSheetGridView, userSheetGridView); applyStyles(); }
public override async Task Execute(Message message, MessageController messageController) { if (PlayerName(message) == string.Empty) { await messageController.SendMessageAsync(message.Chat.Id, $"Вы не указали фамилию и имя{Environment.NewLine}Введите /reg Фамилия Имя"); return; } var messageForUser = await RegisterPlayer(message, messageController.PlayerRepository); await messageController.SendMessageAsync(message.Chat.Id, messageForUser); await SheetController.GetInstance().UpsertPlayerAsync(PlayerName(message)); await messageController.SendTextMessageToBotOwnerAsync($"{PlayerName(message)} зарегистрировался"); }
/// <summary> /// Constructor for the form showing the spreadsheet program /// </summary> public Form1() { controller = new SheetController(); // New spreadsheet for display sheet = new Spreadsheet(s => true, s => s.ToUpper(), "ps6"); InitializeComponent(); //spreadsheetPanel1.SelectionChanged += OnSelectionChanged; this.ActiveControl = usernameBox; ContentBox.ReadOnly = true; controller.SendSetupToView += loadFiles; controller.UpdateSpreadsheet += updateSpreadsheet; controller.ErrorCodeOne += invalidAuthorization; controller.ErrorCodeTwo += circularDependency; controller.ResetConnection += resetConnection; // Set the current cell in the panel to A1 // spreadsheetPanel1.SetSelection(0, 0); // Update the view of the panel // OnSelectionChanged(spreadsheetPanel1); }