本文整理汇总了C#中System.Form1类的典型用法代码示例。如果您正苦于以下问题:C# Form1类的具体用法?C# Form1怎么用?C# Form1使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Form1类属于System命名空间,在下文中一共展示了Form1类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: entity
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)
{
}
}
示例2: EntEffect
public EntEffect(Wrapped.Wrapped socket, Form1 Mainform)
{
socket.readInt();
socket.readByte();
socket.readByte();
socket.readShort();
}
示例3: timer1_Tick
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;
}
}
示例4: EntTeleport
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;
}
}
}
示例5: BulkChunks
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.
}
}
示例6: CoordinateSystem
public CoordinateSystem(Form1 parentForm)
{
this.parentForm = parentForm;
projCoordinates = new List<Coordinate>();
geoCoordinates = new CoordinateListEventChanged <Coordinate>();
coordinatesListener = new CoordinateListEventListener(parentForm, geoCoordinates, projCoordinates);
}
示例7: itemData
public itemData(Wrapped.Wrapped socket, Form1 mainform)
{
socket.readShort();
socket.readShort();
int txtlength = socket.readShort();
socket.readByteArray(txtlength);
}
示例8: DelaunayListEventListener
public DelaunayListEventListener(Form1 parentForm, DelaunayEventChanged triangulation )
{
this.parentForm = parentForm;
this.triangulation = triangulation;
this.triangulation.Changed += new ChangedEventHandler(TriangulationChanged);
}
示例9: WebDownloader
public WebDownloader(Form1 form)
{
_threader = new MultiThreader(Convert.ToInt32(ConfigurationManager.AppSettings["MaximumThreads"]));
_queue = new DownloadQueue();
_crawlDAO = new CrawlDAO();
myFormControl1 = form;
}
示例10: PrefilterListener
public PrefilterListener(Form1 form)
{
this.form1 = form;
JmsServerInfo jmsServerinfo = new JmsServerInfo();
jmsServerinfo = xmlreaderConvert.getJmsServerInfo();
nosoursejmxbroker = new JmsAdvancedBroker(jmsServerinfo);
}
示例11: dxInit
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);
}
}
示例12: Border
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";
}
示例13: Run
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());
}
示例14: DockWindowRankingViewer
public DockWindowRankingViewer(Form1 form1)
{
InitializeComponent();
this.ClientSize = rankingViewer1.Size;
this.MainForm = form1;
}
示例15: DockWindowToolBox
public DockWindowToolBox(Form1 form1)
{
InitializeComponent();
this.ClientSize = toolBox1.Size;
this.MainForm = form1;
}