当前位置: 首页>>代码示例>>C#>>正文


C# System.Form1类代码示例

本文整理汇总了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)
            {
            }
        }
开发者ID:krikelin,项目名称:Entifi,代码行数:31,代码来源:entity.cs

示例2: EntEffect

 public EntEffect(Wrapped.Wrapped socket, Form1 Mainform)
 {
     socket.readInt();
     socket.readByte();
     socket.readByte();
     socket.readShort();
 }
开发者ID:umby24,项目名称:Minebot,代码行数:7,代码来源:EntEffect.cs

示例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;

            }
        }
开发者ID:MegaDefenseGame,项目名称:MDGame,代码行数:29,代码来源:LoadingForm.cs

示例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;
                }
            }
        }
开发者ID:umby24,项目名称:Minebot,代码行数:27,代码来源:EntTeleport.cs

示例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.
            }
        }
开发者ID:umby24,项目名称:Minebot,代码行数:33,代码来源:BulkChunks.cs

示例6: CoordinateSystem

 public CoordinateSystem(Form1 parentForm)
 {
     this.parentForm = parentForm;
     projCoordinates = new List<Coordinate>();
     geoCoordinates = new CoordinateListEventChanged <Coordinate>();
     coordinatesListener = new CoordinateListEventListener(parentForm, geoCoordinates, projCoordinates);
 }
开发者ID:mnieznalska,项目名称:mobmap,代码行数:7,代码来源:CoordinateSystem.cs

示例7: itemData

 public itemData(Wrapped.Wrapped socket, Form1 mainform)
 {
     socket.readShort();
     socket.readShort();
     int txtlength = socket.readShort();
     socket.readByteArray(txtlength);
 }
开发者ID:umby24,项目名称:Minebot,代码行数:7,代码来源:itemData.cs

示例8: DelaunayListEventListener

        public DelaunayListEventListener(Form1 parentForm, DelaunayEventChanged triangulation )
        {
            this.parentForm = parentForm;
            this.triangulation = triangulation;

            this.triangulation.Changed += new ChangedEventHandler(TriangulationChanged);
        }
开发者ID:mnieznalska,项目名称:mobmap,代码行数:7,代码来源:DelaunayListEventListener.cs

示例9: WebDownloader

 public WebDownloader(Form1 form)
 {
     _threader = new MultiThreader(Convert.ToInt32(ConfigurationManager.AppSettings["MaximumThreads"]));
     _queue = new DownloadQueue();
     _crawlDAO = new CrawlDAO();
     myFormControl1 = form;
 }
开发者ID:piyushkp,项目名称:Web-Crawler,代码行数:7,代码来源:WebDownloader.cs

示例10: PrefilterListener

 public PrefilterListener(Form1 form)
 {
     this.form1 = form;
     JmsServerInfo jmsServerinfo = new JmsServerInfo();
     jmsServerinfo = xmlreaderConvert.getJmsServerInfo();
     nosoursejmxbroker = new JmsAdvancedBroker(jmsServerinfo);
 }
开发者ID:daluobohao,项目名称:RFIDReader_vfinal,代码行数:7,代码来源:PrefilterListener.cs

示例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);
            }
        }
开发者ID:mnieznalska,项目名称:mobmap,代码行数:29,代码来源:Map3d.cs

示例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";
 }
开发者ID:ICTSE1b5,项目名称:KBS1,代码行数:7,代码来源:Border.cs

示例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());
        }
开发者ID:Exagram,项目名称:Text-To-Speech,代码行数:29,代码来源:HackerNewsSite.cs

示例14: DockWindowRankingViewer

        public DockWindowRankingViewer(Form1 form1)
        {
            InitializeComponent();

            this.ClientSize = rankingViewer1.Size;
            this.MainForm = form1;
        }
开发者ID:CoRelaxuma,项目名称:HoppoAlpha,代码行数:7,代码来源:DockWindowRankingViewer.cs

示例15: DockWindowToolBox

        public DockWindowToolBox(Form1 form1)
        {
            InitializeComponent();

            this.ClientSize =  toolBox1.Size;
            this.MainForm = form1;
        }
开发者ID:CoRelaxuma,项目名称:HoppoAlpha,代码行数:7,代码来源:DockWindowToolBox.cs


注:本文中的System.Form1类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。