internal void OnFIContinueButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { GameFiber.StartNew(delegate { Check(); Game.LogTrivial("FI personal info saving for: " + SuspectLastBox.Text.ToString() + " " + SuspectFirstBox.Text.ToString()); Game.DisplayNotification("Page 2 of 3 saved. Continuing Field Interaction form..."); using (StreamWriter Information = new StreamWriter("Plugins/LSPDFR/ComputerPlus/field interviews/" + SuspectLastBox.Text.ToLower() + SuspectFirstBox.Text.ToLower() + ".txt", true)) { // 13 lines Information.WriteLine("---PERSONAL INFORMATION---"); Information.WriteLine("DOB: " + SuspectDOBBox.Text); Information.WriteLine(SuspectSSNBox.Text); Information.WriteLine("Occupation: " + SuspectOccupationBox.Text); Information.WriteLine("Address: " + SuspectAddressBox.Text + " " + SuspectCityBox.Text); Information.WriteLine("Sex: " + SuspectSexBox.Text); Information.WriteLine("Race: " + SuspectRaceBox.Text); Information.WriteLine("Hair: " + SuspectHairBox.Text); Information.WriteLine("Eyes: " + SuspectEyesBox.Text); Information.WriteLine("Scars/Tattoos: " + SuspectMarkBox.Text); Information.WriteLine("License Status: " + SuspectLicenseBox.Text); Information.WriteLine("Vehicle Make, Model, Color: " + SuspectVehicleBox.Text); Information.WriteLine("Vehicle Plate: " + SuspectPlateBox.Text); } Game.LogTrivial("Successfully written to .txt"); }); state = SubmitCheck.submitted; FIComplete(); this.Window.Close(); form_firemarks = new GameFiber(OpenFIRemarksForm); form_firemarks.Start(); }
private void OnSaveButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { using (StreamWriter Information = new StreamWriter("LSPDFR/Police Notebook/Notebook.txt", true)) { Information.WriteLine(MainBox.Text); } }
private void OnCitationContinueClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { Check(); Game.LogTrivial("Citation page 1 submission begin..."); using (StreamWriter Information = new StreamWriter("Plugins/LSPDFR/ComputerPlus/citations/completedcitations.txt", true)) { Information.WriteLine(" "); Information.WriteLine(" "); Information.WriteLine("---INFORMATION---"); Information.WriteLine("Citation Number: " + CitationNumberBox.Text); Information.WriteLine("Related Report Number: " + CitationRelatedBox.Text); Information.WriteLine("Date of incident: " + CitationDateBox.Text); Information.WriteLine("Time of incident: " + CitationTimeBox.Text); Information.WriteLine("Offender Full Name: " + SuspectFirstBox.Text + " " + SuspectLastBox.Text); Information.WriteLine("Offender DOB: " + CitationPerpDOBBox.Text); Information.WriteLine("Offender Residence: " + CitationPerpStreetBox.Text); Information.WriteLine("Issuing Officer #: " + CitationIssuedOfficerBox.Text); Information.WriteLine("Issuing Officer Name: " + CitationIssuedOfficerNameBox.Text); } Game.LogTrivial("Citation page 1 submission success!"); Game.DisplayNotification("Citation page 1 of 2 complete..."); this.Window.Close(); form_citationviolation = new GameFiber(OpenCitationViolationForm); form_citationviolation.Start(); }
void row_Clicked(Base sender, ClickedEventArgs arguments) { CompilerError error = sender.UserData as CompilerError; CodeArea.CursorPosition = new Point(error.Column - 1, error.Line - 1); CodeArea.CursorEnd = new Point(CodeArea.GetTextLine(error.Line - 1).Length, error.Line - 1); CodeArea.Focus(); }
void AddPackage_Clicked(Base control, ClickedEventArgs args) { Package pkg = new Package(Guid.NewGuid()); pkg.Name = "New Package"; Package.AddPackage(pkg); new AddPackage(pkg).Send(); }
void Run_Clicked(Base control, ClickedEventArgs args) { Package.RecompilePackages(); ErrorList.RemoveAllRows(); foreach (CompilerError error in Resource.Errors) { ListBoxRow row = ErrorList.AddRow(error.ErrorText); row.UserData = error; row.DoubleClicked += new GwenEventHandler<ClickedEventArgs>(row_Clicked); } }
internal void OnShowFIButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { string Exists = "Plugins/LSPDFR/ComputerPlus/field interviews/" + SuspectLastBox.Text.ToLower() + SuspectFirstBox.Text.ToLower() + ".txt"; if (File.Exists(Exists)) { FIBox.Show(); FIBackButton.Show(); string FILines = File.ReadAllText("Plugins/LSPDFR/ComputerPlus/field interviews/" + SuspectLastBox.Text.ToLower() + SuspectFirstBox.Text.ToLower() + ".txt"); FIBox.Text = FILines; } else { Game.DisplayNotification("~r~Please check your spelling, as there are no records found"); } }
internal void OnFISubmitButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { Game.LogTrivial("FI remarks saving for: " + SuspectLastBox.Text.ToString() + " " + SuspectFirstBox.Text.ToString()); using (StreamWriter Information = new StreamWriter("Plugins/LSPDFR/ComputerPlus/field interviews/" + SuspectLastBox.Text.ToLower() + SuspectFirstBox.Text.ToLower() + ".txt", true)) { // 3 lines Information.WriteLine("---REMARKS---"); Information.WriteLine("Remarks: " + RemarkBox.Text); Information.WriteLine("Date & Time Submitted: " + System.DateTime.Now.ToShortDateString() + System.DateTime.Now.ToShortTimeString()); } Game.DisplayNotification("Page 3 of 3 saved. Field interaction for: ~r~" + SuspectLastBox.Text.ToString() + ", " + SuspectFirstBox.Text.ToString() + " ~w~ completed successfully!"); this.Window.Close(); ComputerMain.form_report = new GameFiber(ComputerMain.OpenReportMenuForm); ComputerMain.form_report.Start(); }
private void OnYesButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { GameFiber.StartNew(delegate { Sure.Hide(); NoButton.Hide(); YesButton.Hide(); File.WriteAllText("LSPDFR/Police Notebook/Notebook.txt", String.Empty); GameFiber.Sleep(0500); string Exists = "LSPDFR/Police Notebook/Notebook.txt"; if (File.Exists(Exists)) { string Notes = File.ReadAllText("LSPDFR/Police Notebook/Notebook.txt"); MainBox.Text = Notes; } }); }
private void OnPoliceNotebookClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { Game.LogTrivial("Loading Police Notebook via MDT"); GameFiber.StartNew(delegate { GameFiber.Sleep(0500); Rage.Forms.GwenForm PNotebook = new NotebookCode2(); Game.IsPaused = true; PNotebook.Show(); PNotebook.Position = new System.Drawing.Point(900, 100); while (PNotebook.Window.IsVisible) { Game.IsPaused = true; GameFiber.Yield(); } Game.IsPaused = false; }); }
private void OnConfigurationRightClicked(Base item, ClickedEventArgs args) { Configuration ClickedConfig = (Configuration)item.UserData; Menu RightClickMenu = new Menu(Parent); { MenuItem SetActive = RightClickMenu.AddItem("Set as Active Configuration"); { SetActive.Clicked += delegate(Base sender, ClickedEventArgs args2) { Game.ServerInfo.CurrentConfiguration = ClickedConfig; }; } } Point LocalPos = Parent.CanvasPosToLocal(new Point(args.X, args.Y)); RightClickMenu.SetPosition(LocalPos.X - 6, LocalPos.Y - 28); //Subtracting bounds of inner panel RightClickMenu.Show(); }
private void OnFIButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { GameFiber.StartNew(delegate { GameFiber.Sleep(0500); Game.LogTrivial("Loading FIs -- Based on CitationForm"); GwenForm FIForm = new FIEnvironmentCode2(); Game.IsPaused = true; FIForm.Show(); FIForm.Position = new System.Drawing.Point(500, 250); while (FIForm.Window.IsVisible) { GameFiber.Yield(); } Game.IsPaused = true; }); }
private void OnCitationSubmitClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { Game.LogTrivial("Citation page 2 submission begin..."); using (StreamWriter Information = new StreamWriter("Plugins/LSPDFR/ComputerPlus/citations/completedcitations.txt", true)) { Information.WriteLine("---VIOLATIONS---"); Information.WriteLine("The above defendent operated a:"); Information.WriteLine("Passenger: " + VehCheck1.IsChecked); Information.WriteLine("Commercial: " + VehCheck2.IsChecked); Information.WriteLine("Cycle: " + VehCheck3.IsChecked); Information.WriteLine("Bus: " + VehCheck4.IsChecked); Information.WriteLine("Other: " + VehCheck5.IsChecked); Information.WriteLine("Vehicle Make, Model, Color, Style: " + VehInfoBox.Text); Information.WriteLine("License Plate: " + VehPlateBox.Text); Information.WriteLine("Upon the public highway: " + StreetBox.Text + " in the city: " + CityBox.Text); Information.WriteLine("In the following conditions:"); Information.WriteLine("Street Condition: " + CitationStreetConditionBox.Text); Information.WriteLine("Light Condition: " + CitationLightConditionBox.Text); Information.WriteLine("Traffic Condition: " + CitationTrafficConditionBox.Text); Information.WriteLine("And committed the following offenses:"); Information.WriteLine("Accident: " + AccidentCheck.IsChecked); Information.WriteLine("Speed: " + SpeedCheck.IsChecked + " and was traveling " + SpeedBox.Text + " in a speed limit of " + InABox.Text); Information.WriteLine("Speed Device Used: " + CitationSpeedDeviceBox.Text); Information.WriteLine("In a:"); Information.WriteLine("Commercial Vehicle: " + InCommCheck.IsChecked); Information.WriteLine("Construction Zone: " + InConstCheck.IsChecked); Information.WriteLine("Area: " + Area.Text); Information.WriteLine("Violations: " + Violations.Text); Information.WriteLine("Additional Information: " + ExtraInfo.Text); Information.WriteLine("And is summoned to appear in court on: " + DateBox.Text + " at " + TimeBox.Text); Information.WriteLine(" "); Information.WriteLine("Citation Submitted " + System.DateTime.Now.ToString()); Information.WriteLine("---END CITATION---"); } Game.LogTrivial("Citation page 2 submission success!"); Game.DisplayNotification("Citation ~b~successfully~w~ submitted!"); vehplate = VehPlateBox.Text.ToLower(); CitationComplete(); state = SubmitCheck.submitted; this.Window.Close(); ComputerMain.form_report = new GameFiber(ComputerMain.OpenReportMenuForm); ComputerMain.form_report.Start(); }
private void OnOpenMDTButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { Game.LogTrivial("Loading MDT via Notebook"); GameFiber.StartNew(delegate { GameFiber.Sleep(1000); Rage.Forms.GwenForm form11 = new ReportMain(); Game.IsPaused = true; form11.Show(); form11.Position = new System.Drawing.Point(500, 250); while (form11.Window.IsVisible) { Game.IsPaused = true; GameFiber.Yield(); } Game.IsPaused = false; }); }
internal void OnFIContinueButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { GameFiber.StartNew(delegate { Game.DisplayNotification("Page 1 of 3 saved. Continuing Field Interaction form..."); using (StreamWriter Information = new StreamWriter("Plugins/LSPDFR/ComputerPlus/field interviews/" + SuspectLastBox.Text.ToLower() + SuspectFirstBox.Text.ToLower() + ".txt", true)) { // 8 Lines Information.WriteLine(" "); Information.WriteLine(" "); Information.WriteLine("---ENVIRONMENT---"); Information.WriteLine("Date: " + FIDateBox.Text); Information.WriteLine("Time: " + FITimeBox.Text); Information.WriteLine("Location: " + FILocation.Text); Information.WriteLine("Officer Name and Number: " + FIOfficerNameBox.Text + " " + FIOfficerNumberBox.Text); Information.WriteLine("Individual Full Name: " + SuspectFirstBox.Text + " " + SuspectLastBox.Text); } Game.LogTrivial("Successfully written to .txt"); }); this.Window.Close(); form_fipersonal = new GameFiber(OpenFIPersonalForm); form_fipersonal.Start(); }
private void OnBackButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { this.Window.Close(); ComputerMain.form_report = new GameFiber(ComputerMain.OpenReportMenuForm); ComputerMain.form_report.Start(); }
private void OnResourceRightClicked(Base item, ClickedEventArgs args) { Resource ClickedResource = (Resource)(((ResourceNode)item).Resource); Menu RightClickMenu = new Menu(Parent); { if (ClickedResource is Folder) { Folder FolderResource = ClickedResource as Folder; MenuItem Add = RightClickMenu.AddItem("Add"); { MenuItem submenu = Add.Menu.AddItem("Folder"); { submenu.SetImage(@"Data\folder.png"); submenu.Clicked += delegate(Base sender, ClickedEventArgs args2) { Folder res = new Folder(); res.Name = "New Folder"; FolderResource.Add(res); new AddFolder(res, ClickedResource.ID).Send(); }; } submenu = Add.Menu.AddItem("Texture"); { submenu.SetImage(@"Data\texture.png"); submenu.Clicked += delegate(Base sender, ClickedEventArgs args2) { FSTexture tex = new FSTexture(); tex.Name = "NewTexture.png"; tex.Load(new Bitmap(16, 16)); FolderResource.Add(tex); new AddTexture(tex, ClickedResource.ID).Send(); }; } submenu = Add.Menu.AddItem("Block Type"); { submenu.SetImage(@"Data\blocktype.png"); submenu.Clicked += delegate(Base sender, ClickedEventArgs args2) { BlockType bt = new BlockType(); bt.Name = "NewBlock.block"; FolderResource.Add(bt); new AddBlockType(bt, ClickedResource.ID).Send(); }; } submenu = Add.Menu.AddItem("Code File"); { submenu.SetImage(@"Data\SharedCode.png"); submenu.Clicked += delegate(Base sender, ClickedEventArgs args2) { CodeFile cf = new CodeFile(); cf.Name = "NewClass.cs"; FolderResource.Add(cf); new AddCode(cf, ClickedResource.ID).Send(); }; } } } MenuItem Rename = RightClickMenu.AddItem("Rename"); Rename.Clicked += delegate(Base sender, ClickedEventArgs renameargs) { ((ResourceNode)item).StartRename(); }; } Point LocalPos = Parent.CanvasPosToLocal(new Point(args.X, args.Y)); RightClickMenu.SetPosition(LocalPos.X - 6, LocalPos.Y - 28); //Subtracting bounds of inner panel RightClickMenu.Show(); }
/// <summary> /// Handler for the button down event. /// </summary> /// <param name="control">Event source.</param> protected virtual void OnButtonDown(Base control, ClickedEventArgs args) { Value = m_Value - 1; }
private void OnEraseButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { Sure.Show(); YesButton.Show(); NoButton.Show(); }
private void OnNoButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { Sure.Hide(); NoButton.Hide(); YesButton.Hide(); }
private void OnReportArrestClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { // In progress }
public void OnHomeButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { this.Window.Close(); form_main = new GameFiber(OpenMainMenuForm); form_main.Start(); }
void NodeDoubleClicked(Base control, ClickedEventArgs args) { TreeNode node = control as TreeNode; UnitPrint(String.Format("Node double clicked: {0}", node.Text)); }
internal void OnFIBackButtonClick(Gwen.Control.Base sender, Gwen.Control.ClickedEventArgs e) { FIBox.Hide(); FIBackButton.Hide(); }
void NodeClicked(Base control, ClickedEventArgs args) { TreeNode node = control as TreeNode; UnitPrint(String.Format("Node clicked: {0} @({1}, {2})", node.Text, args.X, args.Y)); }