public entity(string uri, Form1 host) : base(uri, host) { this.Host = host; this.Runtime = new Spider.Scripting.LuaInterpreter(this); this.Preprocessor = new Spider.Preprocessor.LuaMako(this); entifyScheme = new EntifyScheme(this); var fragments = uri.Split(':'); var app = fragments[1]; this.uri = uri; try { Program.settings.UserStyleSheetEnabled = true; Program.settings.UserStyleSheetLocation = "resources/resources/css/" + Properties.Settings.Default.Theme + ".css"; webView = new CefSharp.WinForms.WebView("about:blank", Program.settings); CefSharp.CEF.RegisterScheme("entify", new EntifySchemeHandlerFactory(this, entifyScheme)); webView.PropertyChanged += webView_PropertyChanged; #if(false) template = LoadLocalResource("entify://" + app + "/index.html"); #endif webView.Dock = DockStyle.Fill; webViewIsReady = true; this.Controls.Add(webView); } catch (Exception e) { } }
public EntEffect(Wrapped.Wrapped socket, Form1 Mainform) { socket.readInt(); socket.readByte(); socket.readByte(); socket.readShort(); }
private void timer1_Tick(object sender, EventArgs e) { eiei++; switch (eiei) { case 1: pictureBox1.Image = MDGame.Properties.Resources.Load2; break; case 2: pictureBox1.Image = MDGame.Properties.Resources.Load3; break; case 3: pictureBox1.Image = MDGame.Properties.Resources.Load4; break; case 4: Form1 gameView = new Form1(); gameView.Show(); this.Hide(); timer1.Stop(); break; //case 5: // Form1 gameView = new Form1(); // gameView.Show(); // this.Hide(); // timer1.Stop(); // break; } }
public EntTeleport(Wrapped.Wrapped socket, Form1 Mainform) { int EID = socket.readInt(); int X = socket.readInt(); int Y = socket.readInt(); int Z = socket.readInt(); byte yaw = socket.readByte(); byte pitch = socket.readByte(); functions helper = new functions(); Classes.Entity thisEnt = helper.getEntbyID(EID, Mainform); if (thisEnt != null) { thisEnt.X = X ; thisEnt.Y = Y; thisEnt.Z = Z; thisEnt.yaw = yaw; thisEnt.pitch = pitch; if (Mainform.following == true && thisEnt.name == Mainform.fname) { Mainform.location[0] = thisEnt.X / 32; Mainform.location[1] = thisEnt.Y / 32; Mainform.location[2] = thisEnt.Z / 32; Mainform.location[3] = thisEnt.Y / 32 + 1; } } }
public BulkChunks(Wrapped.Wrapped socket, Form1 mainform) { short columncount = socket.readShort(); int Datalength = socket.readInt(); bool skylight = socket.readBool(); byte[] packdata = socket.readByteArray(Datalength); byte[] decompressed; byte[] trim = new byte[Datalength - 2]; Chunk[] chunks = new Chunk[columncount]; // Shoutout to BjorN64 for the simplification of this. Array.Copy(packdata, 2, trim, 0, Datalength - 2); // Decompress the data Classes.Decompressor dc = new Classes.Decompressor(trim); decompressed = dc.decompress(); for (int i = 0; columncount > i; i++) { // Need to store this data so it's not lost as well.. int x = socket.readInt(); int z = socket.readInt(); short pbitmap = socket.readShort(); short abitmap = socket.readShort(); chunks[i] = new Chunk(x, z, pbitmap, abitmap, skylight, true); // Assume true for Ground Up Continuous decompressed = chunks[i].getData(decompressed); // Calls the chunk class to take all of the bytes it needs, and return whats left. mainform.Chunks.Add(chunks[i]); // Add the chunk to the main form so we can use it later. } }
public CoordinateSystem(Form1 parentForm) { this.parentForm = parentForm; projCoordinates = new List<Coordinate>(); geoCoordinates = new CoordinateListEventChanged <Coordinate>(); coordinatesListener = new CoordinateListEventListener(parentForm, geoCoordinates, projCoordinates); }
public itemData(Wrapped.Wrapped socket, Form1 mainform) { socket.readShort(); socket.readShort(); int txtlength = socket.readShort(); socket.readByteArray(txtlength); }
public DelaunayListEventListener(Form1 parentForm, DelaunayEventChanged triangulation ) { this.parentForm = parentForm; this.triangulation = triangulation; this.triangulation.Changed += new ChangedEventHandler(TriangulationChanged); }
public WebDownloader(Form1 form) { _threader = new MultiThreader(Convert.ToInt32(ConfigurationManager.AppSettings["MaximumThreads"])); _queue = new DownloadQueue(); _crawlDAO = new CrawlDAO(); myFormControl1 = form; }
public PrefilterListener(Form1 form) { this.form1 = form; JmsServerInfo jmsServerinfo = new JmsServerInfo(); jmsServerinfo = xmlreaderConvert.getJmsServerInfo(); nosoursejmxbroker = new JmsAdvancedBroker(jmsServerinfo); }
public void dxInit(Form1 form) { try { this.parentForm = form; mapDraw = new MapDraw(this); mapView = new MapView(this); mapUserControl = new MapUserControl(this); InitializeGraphics(); this.parentForm.Show(); this.parentForm.Focus(); while (isCreated) { if(parentForm.d3dRenderStatus==Form1.D3dRenderStatus.D3D_RENDER) Render(); Application.DoEvents(); } } catch (DirectXException ex) { throw new ArgumentException("Error: Couldn't initialize 3d graphics", ex); } }
public Border(int pos_x, int pos_y, int width, int height, Form1 form) : base(pos_x, pos_y, width, height, 0, 0, 0, 0, form) { Type = ObjectType.BORDER; this.image = Properties.Resources.bush; this.description = "Walls are objects that block your path, forcing you to move around it"; }
public void Run(Form1 form) { var htmlNodeCollection = SiteUtils.getNodes("//tr/td[3]"); if (htmlNodeCollection == null) { return; } int i = 0; var builder = new StringBuilder(); Match match = null; string str = ""; foreach (HtmlNode row in htmlNodeCollection) { builder.Append(". " + (i+1) + ". "); str = SiteUtils.replaceBadUTF(row.InnerText); match = Regex.Match(str, @"^(.*)\((.*)\)(.*)$", RegexOptions.IgnoreCase); if (match.Success && match.Groups.Count > 0) { builder.Append(". " + match.Groups[1].ToString() + ". "); } ++i; i %= 10; } Console.WriteLine(builder.ToString()); form.speechSynthesizer.SpeakAsync(builder.ToString()); }
public DockWindowRankingViewer(Form1 form1) { InitializeComponent(); this.ClientSize = rankingViewer1.Size; this.MainForm = form1; }
public DockWindowToolBox(Form1 form1) { InitializeComponent(); this.ClientSize = toolBox1.Size; this.MainForm = form1; }
protected GameObject( int pos_x, int pos_y, int width, int height, int speed_x, int speed_y, int damage, int health, Form1 form) { Position_X = pos_x; Position_Y = pos_y; Width = width; Height = height; BaseSpeed_X = speed_x; BaseSpeed_Y = speed_y; Damage = damage; Health = health; game_Form = form; horizontalDirection = Direction.NONE; verticalDirection = Direction.NONE; alive = true; isSolid = true; currentCollisionObjectsList = new List<GameObject>(); currentSpeedEffectList = new List<SpeedEffects>(); setupImages(); }
public Form7(int x, int y,Form1 form1) { InitializeComponent(); X = x; Y = y; frm = form1; }
private void BtnHRManagement_Click(object sender, EventArgs e) { Form1 MainScreen = new Form1(); MainScreen.treeView1.SelectedNode = MainScreen.treeView1.Nodes[3]; this.Hide(); MainScreen.Show(); }
public CompilerOptionsContent(Form1 MainForm) { this.MainForm = MainForm; InitializeComponent(); PascalABCCompiler.StringResources.SetTextForAllObjects(this, strprefix); //this.cbUseDllForSystemUnits.Visible = false; }
public GpsConnector(Form1 parentForm) { //signed parent to gpsConnector this.parentForm = parentForm; //initialize gps hardware handler _gps = Hardware.Hardware.GetGpsHandler(); //initialize list to contain position info _tmpPositionList = new List<GpsPosition>(); //initialize satelliteView to contain satellite info satView = new SatelliteView(); //if gps hardware exist and gpsIntermediateDriver exist //initialize gps connection and events if (_gps.hasGPS) { gps = new Gps(); gpsEvents = new GpsEvents(this); if (!gps.Opened) { gps.Open(); gpsEvents.newLocationReceived += new EventHandler<LocationChangedEventArgs>(gpsEvents.Form1_NewLocationReceived); gps.LocationChanged += new LocationChangedEventHandler(gpsEvents.gps_LocationChanged); } } }
// Server-to-Client only public teams(Wrapped.Wrapped socket, Form1 Mainform) { List<string> players; string teamDisplayname; string teamPrefix; string teamSuffix; byte friendlyFire; short playerCount; string teamName = socket.readString(); byte mode = socket.readByte(); if (mode == 0 || mode == 2) { teamDisplayname = socket.readString(); teamPrefix = socket.readString(); teamSuffix = socket.readString(); friendlyFire = socket.readByte(); } if (mode == 0 || mode == 3 || mode == 4) { playerCount = socket.readShort(); players = new List<string>(); for (int i = 1; i < playerCount; i++) { players.Add(socket.readString()); } } }
public EntlookRelmove(Wrapped.Wrapped socket, Form1 mainform) { int EID = socket.readInt(); sbyte dx = (sbyte)socket.readByte(); sbyte dy = (sbyte)socket.readByte(); sbyte dz = (sbyte)socket.readByte(); byte yaw = socket.readByte(); byte pitch = socket.readByte(); functions helper = new functions(); Classes.Entity thisEnt = helper.getEntbyID(EID, mainform); if (thisEnt != null) { thisEnt.yaw = yaw; thisEnt.pitch = pitch; thisEnt.X += dx; thisEnt.Y += dy; thisEnt.Z += dz; if (mainform.following == true && thisEnt.name == mainform.fname) { mainform.location[0] = thisEnt.X / 32; mainform.location[1] = thisEnt.Y / 32; mainform.location[2] = thisEnt.Z /32; mainform.location[3] = thisEnt.Y / 32 + 1; } } }
public ObjRenderer(Form1 F) : base(F.Device) { P = F; PortalRoomManager.Equals(null, null); S = new Sorter(); string s0 = Environment.CurrentDirectory + "/resources/shaders/ambient_fast.fx"; SB_V = ShaderBytecode.CompileFromFile(s0, "VS_STATIC", "vs_4_0", ManagedSettings.ShaderCompileFlags, EffectFlags.None); SB_P = ShaderBytecode.CompileFromFile(s0, "PS", "ps_4_0", ManagedSettings.ShaderCompileFlags, EffectFlags.None); VS = new VertexShader(F.Device.HadrwareDevice(), SB_V); PS = new PixelShader(F.Device.HadrwareDevice(), SB_P); IL = new InputLayout(Device.HadrwareDevice(), SB_V, StaticVertex.ies); BufferDescription desc = new BufferDescription { Usage = ResourceUsage.Default, SizeInBytes = 2 * 64, BindFlags = BindFlags.ConstantBuffer }; cBuf = new SlimDX.Direct3D11.Buffer(Device.HadrwareDevice(), desc); dS = new DataStream(2 * 64, true, true); BufferDescription desc2 = new BufferDescription { Usage = ResourceUsage.Default, SizeInBytes = 64, BindFlags = BindFlags.ConstantBuffer }; cBuf2 = new SlimDX.Direct3D11.Buffer(Device.HadrwareDevice(), desc2); dS2 = new DataStream(64, true, true); }
public Wall(int pos_x, int pos_y, Form1 form) : base(pos_x, pos_y, 50, 50, 0, 0, 0, 0, form) { Type = ObjectType.WALL; this.image = Properties.Resources.bush; this.description = "Walls are objects that block your path, forcing you to move around it"; }
public Finish(int pos_x, int pos_y, int width, int height, Form1 form) : base(pos_x, pos_y, width, height, 0, 0, 0, 0, form) { Type = ObjectType.GOAL; this.image = Properties.Resources.loghouse; this.description = "When you reach the finish you complete the level"; }
public entityEquipment(Wrapped.Wrapped sock, Form1 myform) { socket = sock; mainform = myform; handle(); }
public CoordinateListEventListener(Form1 parentForm, CoordinateListEventChanged<Coordinate> coordinateEvList, List<Coordinate> coordinateList) { this.parentForm = parentForm; this.geoCoordinateEvList = coordinateEvList; this.projCoordinateList = coordinateList; this.geoCoordinateEvList.Changed += new ChangedEventHandler(ListChanged); }
public void crash(Fish fish, Form1 form, ArrayList fishList) { collision = aquaticAnimal.Bounds.IntersectsWith(fish.aquaticAnimal.Bounds); if (collision==true) { if ((aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon adulto.png") || aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon hembra.png")) && (fish.aquaticAnimal.ImageLocation.Equals(@"Resources\Dorys.png") || fish.aquaticAnimal.ImageLocation.Equals(@"Resources\Nemo.png"))) { fishList.Remove(fish); fish.aquaticAnimal.Hide(); } else if ((aquaticAnimal.ImageLocation.Equals(@"Resources\Dorys.png") || aquaticAnimal.ImageLocation.Equals(@"Resources\Nemo.png")) && (fish.aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon adulto.png") || fish.aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon hembra.png"))) { fishList.Remove(aquaticAnimal); aquaticAnimal.Hide(); } else if ((aquaticAnimal.ImageLocation.Equals(@"Resources\Nemo.png") && fish.aquaticAnimal.ImageLocation.Equals(@"Resources\Nemo.png"))) { fishList.Remove(fish); aquaticAnimal.Hide(); } else if ((aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon adulto.png") && fish.aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon adulto.png"))) { fishList.Remove(aquaticAnimal); aquaticAnimal.Hide(); } } }
//--------------------------------------------------- //-------------------Methodes------------------------ //--------------------------------------------------- public void init(Form1 mainForm, CoronaJointure joint) { this.joint = joint; this.mainForm = mainForm; if (this.joint.type.Equals("DISTANCE")) { this.frequencyNumUpDw.Value = System.Convert.ToInt32(joint.frequency); this.dampingRatioNumUpDw.Value = System.Convert.ToInt32(joint.dampingRatio); this.nameObj1TxtBx.Text = joint.coronaObjA.DisplayObject.Name; this.nameObj2TxtBx.Text = joint.coronaObjB.DisplayObject.Name; this.objA = joint.coronaObjA; this.objB = joint.coronaObjB; this.modePanel = "MODIFY"; } else { this.modePanel = "NEW"; this.frequencyNumUpDw.Value = 0; this.dampingRatioNumUpDw.Value = 0; this.nameObj1TxtBx.Text = ""; this.nameObj2TxtBx.Text = ""; } }
public Playerdigging(Wrapped.Wrapped socket, Form1 mainform, int option) { switch (option) { case 3: socket.writeByte(14); socket.writeByte((byte)option); socket.writeInt(0); socket.writeByte(0); socket.writeInt(0); socket.writeByte(0); break; case 4: socket.writeByte(14); socket.writeByte((byte)option); socket.writeInt(0); socket.writeByte(0); socket.writeInt(0); socket.writeByte(0); break; case 5: socket.writeByte(14); socket.writeByte((byte)option); socket.writeInt(0); socket.writeByte(0); socket.writeInt(0); socket.writeByte(255); break; default: break; } }