internal FTeams(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; Trace.WriteLine("FTeams: Creating"); EnableMeInvoker = new MethodInvoker(this.enableMe); PopulateTeamsDropDownThreadInvoker += new MethodInvoker(populateTeamsDropDownThread); try { height = this.Size.Height; width = this.Size.Width; } catch (Exception exc) { Trace.WriteLine("FTeams: Exception during creation:" + exc.ToString()); throw; } finally { Trace.WriteLine("FTeams: Created."); } }
internal FResultsView(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; Trace.WriteLine("FResultsView: Creating"); try { height = this.Size.Height; width = this.Size.Width; this.DatasetBindToDataGrid += new DatasetBindToDataGridHandler(this.datasetBindToDataGrid); BindDDWClasses += new MethodInvoker(FResultsView_BindDDWClasses); BindDDUClasses += new MethodInvoker(FResultsView_BindDDUClasses); } catch (Exception exc) { Trace.WriteLine("FResultsView: Exception" + exc.ToString()); throw; } finally { Trace.WriteLine("FResultsView: Created"); } }
internal CPrintMirrorLabels(ref Common.Interface newCommon) { _labelCount = 0; _nrofseries = 0; _currentCompetitorSeries = 0; _currentCompetitor = 0; _commonCode = newCommon; }
internal FClubs(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); _commonCode = newCommon; Trace.WriteLine("FClubs: Creating"); try { _height = Size.Height; _width = Size.Width; Resize += FClubsResize; // Create some things to hold clubs. _bindClubsTable += BindClubsTable; // Create one DataTable to bind dropdown with _clubTable = new DataTable(); var colName = new DataColumn("Name", Type.GetType("System.String")); _clubTable.Columns.Add(colName); var colId = new DataColumn("Id", Type.GetType("System.String")); _clubTable.Columns.Add(colId); // Display the right things in clubs _ddClubs.ValueMember = "Id"; _ddClubs.DisplayMember = "Name"; // Countrys _countryTable = new DataTable(); var colCountry = new DataColumn("Country", Type.GetType("System.String")); _countryTable.Columns.Add(colCountry); var colCId = new DataColumn("Id", Type.GetType("System.String")); _countryTable.Columns.Add(colCId); var seRow = _countryTable.NewRow(); seRow["Country"] = "Sverige"; seRow["Id"] = "SE"; _countryTable.Rows.Add(seRow); _ddCountry.DataSource = _countryTable; _ddCountry.DisplayMember = "Country"; _ddCountry.ValueMember = "Id"; _ddClubs.DataSource = _clubTable; } catch (Exception exc) { Trace.WriteLine("FClubs: Exception during creation:" + exc); throw; } finally { Trace.WriteLine("FClubs: Created."); } }
internal CPrintResultLabels(ref Common.Interface newCommon, Structs.Patrol PatrolToPrint, int AlreadyPrintedLabels) : base() { CommonCode = newCommon; Patrol = PatrolToPrint; labelCount = AlreadyPrintedLabels; }
internal CPrintResultlistByPatrol(ref Common.Interface newCommon, Structs.Patrol patrolToPrint) : base() { CommonCode = newCommon; patrol = patrolToPrint; Structs.Competition competition = CommonCode.GetCompetitions()[0]; CompetitionType = competition.Type; this.NorwegianCount = competition.NorwegianCount; }
public FStationsField(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; updatedStationsInvoker += new MethodInvoker(updatedStations); this.Resize += new EventHandler(FStationsField_Resize); }
internal CPrintResultlistByPatrol(ref Common.Interface newCommon, Structs.Patrol patrolToPrint) : base () { CommonCode = newCommon; patrol = patrolToPrint; Structs.Competition competition = CommonCode.GetCompetitions()[0]; CompetitionType = competition.Type; this.NorwegianCount = competition.NorwegianCount; }
internal FCompetitionPrecision(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; height = this.Size.Height; width = this.Size.Width; this.Resize += new EventHandler(this.resize); }
internal FCompetitionField(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; height = Size.Height; width = Size.Width; Resize += new EventHandler(resize); }
internal CPrintResultlist(ref Common.Interface newCommon, Structs.ResultWeaponsClass wclasswanted, Structs.ShootersClass uclasswanted, bool prelResults, string clubIdwanted) : base () { CommonCode = newCommon; wclass = wclasswanted; uclass = uclasswanted; printPrelResults = prelResults; clubId = clubIdwanted; competition = CommonCode.GetCompetitions()[0]; CompetitionType = competition.Type; }
internal CPrintResultlist(ref Common.Interface newCommon, Structs.ResultWeaponsClass wclasswanted, Structs.ShootersClass uclasswanted, bool prelResults, string clubIdwanted) : base() { CommonCode = newCommon; wclass = wclasswanted; uclass = uclasswanted; printPrelResults = prelResults; clubId = clubIdwanted; competition = CommonCode.GetCompetitions()[0]; CompetitionType = competition.Type; }
internal FPatrols(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; Trace.WriteLine("FPatrols: Creating"); try { height = this.Size.Height; width = this.Size.Width; this.dataGrid1.MouseUp += new MouseEventHandler(dataGrid1_MouseUp); myPatrolWindow = new FPatrol(ref CommonCode, this); myPatrolWindow.EnablePatrols += new MethodInvoker(enableMe); DatasetBindToDataGrid += new MethodInvoker(datasetBindToDataGrid); UpdateNrOfPatrols += new UpdateNrOfPatrolsHandler(FPatrols_UpdateNrOfPatrols); CommonCode.UpdatedPatrolAddAutomaticCompetitors += new UpdatedPatrolAddAutomaticCompetitorsHandler( updatePatrolAddAutomaticCompetitors); EnableAndStartProgressbar += new MethodInvoker(enableAndStartProgressbar); updatedPatrolsThread = new Thread( new ThreadStart(updatedPatrolsWithThread)); updatedPatrolsThread.IsBackground = true; updatedPatrolsThread.Name = "FPatrols:updatedPatrolsThread"; updatedCompetitorsThread = new Thread( new ThreadStart(updatedCompetitorsWithThread)); updatedCompetitorsThread.Name = "FPatrols:updatedCompetitorsThread"; updatedCompetitorsThread.IsBackground = true; } catch (Exception exc) { Trace.WriteLine("FPatrols: Exception: " + exc.ToString()); throw; } finally { Trace.WriteLine("FPatrols: Created."); } }
internal FStationsPrecision(ref Common.Interface newCommon) { Trace.WriteLine("FStationsPrecision: Creating on thread \"" + Thread.CurrentThread.Name + "\" ( " + Thread.CurrentThread.ManagedThreadId.ToString() + " )"); // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; height = Size.Height; width = Size.Width; Resize += new EventHandler(FStationsPrecision_Resize); Trace.WriteLine("FStationsPrecision: Succesfully created."); }
internal FStations(ref Common.Interface newCommon) { Trace.WriteLine("FStations: Creating on thread \"" + Thread.CurrentThread.Name + "\" ( " + AppDomain.GetCurrentThreadId().ToString() + " )"); // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; height = this.Size.Height; width = this.Size.Width; this.Resize += new EventHandler(FStations_Resize); Trace.WriteLine("FStations: Succesfully created."); }
internal FPatrol(ref Common.Interface newCommon, FPatrols newParentWindow) { // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; parentWindow = newParentWindow; BindPatrolNumberAndClass += new MethodInvoker(bindPatrolNumberAndClass); BindDatagrid += new MethodInvoker(bindDatagrid); SetVisibillity += new SetVisibillityHandler(FPatrol_SetVisibillity); this.Resize += new EventHandler(FPatrol_Resize); }
internal FImport(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); setCursorMethod += new setCursorMethodInvoker(setCursor); setVisibleMethod += new setVisibleMethodInvoker(setVisible); CommonCode = newCommon; Trace.WriteLine("FImport: Creating"); try { Resize += new EventHandler(FImport_Resize); // Default columnorder columnOrder.Add(Common.Interface.ImportFileColumns.ShooterId.ToString(), 0); columnOrder.Add(Common.Interface.ImportFileColumns.ClubId.ToString(), 1); columnOrder.Add(Common.Interface.ImportFileColumns.Surname.ToString(), 2); columnOrder.Add(Common.Interface.ImportFileColumns.Givenname.ToString(), 3); columnOrder.Add(Common.Interface.ImportFileColumns.ShooterClass.ToString(), 4); columnOrder.Add(Common.Interface.ImportFileColumns.Email.ToString(), 5); columnOrder.Add(Common.Interface.ImportFileColumns.WeaponId.ToString(), 6); columnOrder.Add(Common.Interface.ImportFileColumns.Patrol.ToString(), 7); columnOrder.Add(Common.Interface.ImportFileColumns.Lane.ToString(), 8); CommonCode.UpdatedFileImportCount += new UpdatedFileImportCountHandler(CommonCode_UpdatedFileImportCount); CallDataBindToDataGrid = new MethodInvoker(dataGridResultDataBind); } catch (Exception exc) { Trace.WriteLine("FImport: Exception: " + exc.ToString()); throw; } finally { Trace.WriteLine("FImport: Created."); } }
internal CPrintFollowup(ref Common.Interface newCommon) { Color = false; _commonCode = newCommon; }
public FCompetitionWizard(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; Trace.WriteLine("FCompetitionWizard: Creating wizard."); // Handle images for begin, end int orgImageWidth = this.infoContainerBegin.Image.Width; int orgImageHeight = this.infoContainerBegin.Image.Height; // get image Bitmap newBitmap = (Bitmap)CommonCode.Settings.GetWinshooterLogo(orgImageHeight, orgImageWidth); this.infoContainerBegin.Image = newBitmap; this.infoContainerFinish.Image = newBitmap; // Handle images for icon orgImageWidth = 52; orgImageHeight = 52; newBitmap = (Bitmap)CommonCode.Settings.GetWinshooterLogo(orgImageHeight, orgImageWidth); this.header1.Image = newBitmap; this.header2.Image = newBitmap; this.header3.Image = newBitmap; this.header4.Image = newBitmap; this.header5.Image = newBitmap; this.headerCompetitionType.Image = newBitmap; // Handle buttons this.AcceptButton = this.wizardCtrl.btnNext; this.CancelButton = this.wizardCtrl.btnCancel; this.wizardCtrl.CancelEnabled = true; this.wizardCtrl.CloseFromCancel += new CancelEventHandler(wizardCtrl_CloseFromCancel); // Name page this.wizardPageName.ShowFromNext += new EventHandler(wizardPageName_ShowFromNext); // TimeDate Page dateTimePickerStart.Value = DateTime.Now.Date; this.wizardPageTimeDate.ShowFromNext += new EventHandler(wizardPageTimeDate_ShowFromNext); this.wizardPageTimeDate.CloseFromNext += new PageEventHandler(wizardPageTimeDate_CloseFromNext); // Competition Type Page this.wizardPageCompetitionType.ShowFromNext += new EventHandler(wizardPageCompetitionType_ShowFromNext); this.wizardPageCompetitionType.CloseFromNext += new PageEventHandler( wizardPageCompetitionType_CloseFromNext); ddChampionshipType.SelectedIndex = 0; // FieldPatrol Page wizardPageFieldPatrol.ShowFromNext += new EventHandler(wizardPageFieldPatrol_ShowFromNext); wizardPageFieldPatrol.CloseFromNext += new PageEventHandler(wizardPageFieldPatrol_CloseFromNext); DDFieldPatrolConnectionType.SelectedIndex = 0; // PrecisionPatrol Page wizardPagePrecisionPatrol.ShowFromNext += new EventHandler(wizardPagePrecisionPatrol_ShowFromNext); wizardPagePrecisionPatrol.CloseFromBack += new PageEventHandler(wizardPagePrecisionPatrol_CloseFromBack); DdPrecisionPatrolConnectionType.SelectedIndex = 0; // wizardPagePriceMoney chkPriceUseSameDeposit.CheckedChanged += new EventHandler(chkPriceUseSameDeposit_CheckedChanged); numPriceDeposit1.ValueChanged += new EventHandler(numPriceDeposit1_ValueChanged); wizardPagePriceMoney.ShowFromNext += new EventHandler(wizardPagePriceMoney_ShowFromNext); // Handle finish this.wizardPageFinish.CloseFromNext += new PageEventHandler(wizardPageFinish_CloseFromNext); Trace.WriteLine("FCompetitionWizard: Created wizard."); }
internal FWeapons(ref Common.Interface newCommon) { // // Required for Windows Form Designer support // InitializeComponent(); CommonCode = newCommon; Trace.WriteLine("FWeapons: Creating"); try { height = this.Size.Height; width = this.Size.Width; this.Resize += new EventHandler(FWeapons_Resize); // Create one DataTable to bind dropdown with. weaponTable = new DataTable(); DataColumn colName = new DataColumn("Name", Type.GetType("System.String")); weaponTable.Columns.Add(colName); DataColumn colId = new DataColumn("Id", Type.GetType("System.String")); weaponTable.Columns.Add(colId); // Display the right things in weapons this.ddWeapons.ValueMember = "Id"; this.ddWeapons.DisplayMember = "Name"; // Initialize the class dropdown by creating a // datatable, filling it with info and bind // the control to it classTable = new DataTable(); DataColumn colClassName = new DataColumn("Name", Type.GetType("System.String")); classTable.Columns.Add(colClassName); DataColumn colClassId = new DataColumn("Id", Type.GetType("System.String")); classTable.Columns.Add(colClassId); // Insert data for (int i = 1; i <= Structs.WeaponClassMax; i++) { Structs.WeaponClass thisClass = (Structs.WeaponClass)i; if (thisClass.ToString() != i.ToString()) { DataRow row = classTable.NewRow(); row["Name"] = thisClass.ToString(); row["Id"] = (int)thisClass; classTable.Rows.Add(row); } } // Display the right things in weapons this.ddClass.DataSource = classTable; this.ddClass.ValueMember = "Id"; this.ddClass.DisplayMember = "Name"; // Internet connection this.linkWeaponsAutomatic.Visible = CommonCode.EnableInternetConnections; this.chkInternet.Visible = CommonCode.EnableInternetConnections; } catch (Exception exc) { Trace.WriteLine("FWeapons: Creating Exception:" + exc.ToString()); throw; } finally { Trace.WriteLine("FWeapons: Created."); } }
internal CPrintPatrollistByPatrol(ref Common.Interface newCommon) : base () { CommonCode = newCommon; currentPatrol = CommonCode.GetPatrols()[0].PatrolId; competition = CommonCode.GetCompetitions()[0]; }
internal CPrintPrinterTest(ref Common.Interface newCommon) : base() { CommonCode = newCommon; }
internal CPrintPatrollistByPatrol(ref Common.Interface newCommon) : base() { CommonCode = newCommon; currentPatrol = CommonCode.GetPatrols()[0].PatrolId; competition = CommonCode.GetCompetitions()[0]; }
private void FMainStartup() { Trace.WriteLine("FMain: FMainStartup started from thread \"" + Thread.CurrentThread.Name + "\" " + " ( " + Thread.CurrentThread.ManagedThreadId.ToString() + " ) " + DateTime.Now.ToLongTimeString()); Trace.WriteLine("FMainStartup started."); try { getAssemblyVersion(); // Let's rock'n roll! setHeader(); // Common code CommonCode = new Common.Interface(); // About window Trace.WriteLine("Creating about window"); myAboutWindow = new FAbout(); myAboutWindow.EnableMain += new MethodInvoker(enableMain); // Competition window field Trace.WriteLine("Creating Competition field window"); myCompetitionFieldWindow = new FCompetitionField(ref CommonCode); myCompetitionFieldWindow.EnableMain += new FCompetitionField.EnableMainHandler(enableMain); // Competition window precision Trace.WriteLine("Creating Competition precision window"); myCompetitionPrecisionWindow = new FCompetitionPrecision(ref CommonCode); myCompetitionPrecisionWindow.EnableMain += new FCompetitionPrecision.EnableMainHandler(enableMain); // Stations Field window Trace.WriteLine("Creating StationField window"); myStationsFieldWindow = new FStationsField(ref CommonCode); myStationsFieldWindow.EnableMain += new FStationsField.EnableMainHandler(enableMain); // Stations Ban window Trace.WriteLine("Creating StationPrecision window"); myStationsPrecisionWindow = new FStationsPrecision(ref CommonCode); myStationsPrecisionWindow.EnableMain += new FStationsPrecision.EnableMainHandler(enableMain); // Clubs window Trace.WriteLine("Creating Clubs window"); myClubsWindow = new FClubs(ref CommonCode); myClubsWindow.EnableMain += new FClubs.EnableMainHandler(enableMain); // Competitors Window Trace.WriteLine("Creating Competitors window"); myCompetitorsWindow = new FCompetitors(ref CommonCode); myCompetitorsWindow.EnableMain+= new FCompetitors.EnableMainHandler(enableMain); // Weapons Window Trace.WriteLine("Creating Weapons window"); myWeaponsWindow = new FWeapons(ref CommonCode); myWeaponsWindow.EnableMain += new FWeapons.EnableMainHandler(enableMain); // Patrols Window Trace.WriteLine("Creating Patrols window"); myPatrolsWindow = new FPatrols(ref CommonCode); myPatrolsWindow.EnableMain += new FPatrols.EnableMainHandler(enableMain); // Results Window Trace.WriteLine("Creating Results window"); myResultsWindow = new FResults(ref CommonCode); myResultsWindow.EnableMain += new FResults.EnableMainHandler(enableMain); myResultsWindow.PrintPatrolResult += new FResults.PrintPatrolResultHandler(menuPrintPrelResultPatrol_Print); // ResultsView Window Trace.WriteLine("Creating ResultsView window"); myResultsViewWindow = new FResultsView(ref CommonCode); myResultsViewWindow.EnableMain += new FResultsView.EnableMainHandler(enableMain); // Import Window Trace.WriteLine("Creating Import window"); myImportWindow = new FImport(ref CommonCode); myImportWindow.EnableMain += new FImport.EnableMainHandler(enableMain); // ServerConnect Window Trace.WriteLine("Creating ServerConnect window"); myServerConnectWindow = new FServerConnect(); myServerConnectWindow.EnableMain += new FServerConnect.EnableMainHandler(enableMain); myServerConnectWindow.ConnectToServer += new FServerConnect.ConnectToServerHandler(ConnectToServer); // Teams Window Trace.WriteLine("Create Teams Window"); myTeamsWindow = new FTeams(ref CommonCode); myTeamsWindow.EnableMain += new FTeams.EnableMainHandler(enableMain); // Settings window Trace.WriteLine("Create settings window"); mySettingsWindow = new FSettings(ref CommonCode); mySettingsWindow.EnableMain += new FSettings.EnableMainHandler(enableMain); // Updating handlers Trace.WriteLine("Updating Handlers."); CommonCode.UpdatedCompetition += new MethodInvoker( CommonCode_UpdatedCompetition); CommonCode.UpdatedStation += new MethodInvoker( CommonCode_UpdatedStation); CommonCode.UpdatedClub += new MethodInvoker( CommonCode_UpdatedClub); CommonCode.UpdatedWeapon += new MethodInvoker( CommonCode_UpdatedWeapon); CommonCode.UpdatedShooter+= new MethodInvoker( CommonCode_UpdatedShooter); CommonCode.UpdatedCompetitor += new MethodInvoker( CommonCode_UpdatedCompetitor); CommonCode.UpdatedCompetitorResult += new MethodInvoker( CommonCode_UpdatedCompetitorResult); CommonCode.UpdatedPatrol += new MethodInvoker( CommonCode_UpdatedPatrol); CommonCode.UpdatedTeam += new MethodInvoker( CommonCode_UpdatedTeam); //assemblyDir = // System.IO.Directory.GetCurrentDirectory(); // Activate main window Trace.WriteLine("Activating main window"); menuFile.Enabled = true; Activate(); #if VisualStudio // If mono, no splash FSplash.RemoveSplash(); #endif // Autoopen if (FilenameToOpen != null) { FileOpen(FilenameToOpen); } #if !VisualStudio // If this is mono, ADOX is not supported menuFileNew.Visible = false; menuFileOpen.Visible = false; menuFileLine1.Visible = false; // If this is mono, printing is not supported menuPrint.Visible = false; // If this is linux, IE is not supported. This is possible with mono menuHelpInternet.Visible = false; menuHelpInternetSupport.Visible = false; menuHelpInternetAllberg.Visible = false; #endif #if DEBUG menuFileUpdateBeta.Visible = true; #endif #if DEBUG checkForNewerVersion(false); #else // Check if there is a newer version Thread updateVersionThread = new Thread( new ThreadStart(checkForNewerVersion)); updateVersionThread.Name = "updateVersionThread"; updateVersionThread.IsBackground = true; updateVersionThread.Start(); #endif #if DEBUG menuTestErrorHandling.Visible=true; #endif if (DateTime.Now.Month == 4 && DateTime.Now.Day == 1) { timerEasterEgg.Enabled = true; timerEasterEgg.Start(); } Trace.WriteLine("FMain: Successfully created from thread."); } catch(Exception exc) { #if VisualStudio // If mono, no splash FSplash.RemoveSplash(); #endif Trace.WriteLine("Exception during init of FMain:" + exc.ToString()); MessageBox.Show("Ett fel uppstod vid start av WinShooter:\r\n" + exc.ToString()); } finally { Trace.WriteLine("FMain: (Finally) created from thread \"" + Thread.CurrentThread.Name + "\" " + " ( " + Thread.CurrentThread.ManagedThreadId.ToString() + " ) " + DateTime.Now.ToLongTimeString()); } }
//private float RightMargin = 50; internal CPrintPatrollistByClub(ref Common.Interface newCommon) : base () { CommonCode = newCommon; }
//private float RightMargin = 50; internal CPrintPatrollistByUser(ref Common.Interface newCommon) : base() { CommonCode = newCommon; }