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


C# System.Windows.Forms.Form.Show方法代码示例

本文整理汇总了C#中System.Windows.Forms.Form.Show方法的典型用法代码示例。如果您正苦于以下问题:C# System.Windows.Forms.Form.Show方法的具体用法?C# System.Windows.Forms.Form.Show怎么用?C# System.Windows.Forms.Form.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.Form的用法示例。


在下文中一共展示了System.Windows.Forms.Form.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run

        public void Run()
        {
            // 初期設定を行う。
            var option = new asd.EngineOption
            {
                IsFullScreen = false
            };

            bool closed = false;
            System.Windows.Forms.Form form = new System.Windows.Forms.Form();
            form.FormClosed += (object sender, System.Windows.Forms.FormClosedEventArgs e) =>
                {
                    closed = true;
                };
            form.Show();

            // aceを初期化する。
            asd.Engine.InitializeByExternalWindow(form.Handle, IntPtr.Zero, form.Size.Width, form.Size.Height, option);

            // aceが進行可能かチェックする。
            while (asd.Engine.DoEvents())
            {
                System.Windows.Forms.Application.DoEvents();
                if (closed) break;

                // aceを更新する。
                asd.Engine.Update();
            }

            // aceを終了する。
            asd.Engine.Terminate();
        }
开发者ID:Pctg-x8,项目名称:Altseed,代码行数:32,代码来源:EmptyExternal.cs

示例2: HandlePluginLaunch

        private void HandlePluginLaunch(object sender, EventArgs e)
        {
            //NWN2Toolset.NWN2.Data.Blueprints.NWN2GlobalBlueprintManager bpManager = new NWN2Toolset.NWN2.Data.Blueprints.NWN2GlobalBlueprintManager();
            //bpManager.Initialize();
            NWN2Toolset.NWN2.Data.TypedCollections.NWN2BlueprintCollection items = NWN2Toolset.NWN2.Data.Blueprints.NWN2GlobalBlueprintManager.GetBlueprintsOfType(NWN2Toolset.NWN2.Data.Templates.NWN2ObjectType.Item);
            ALFAItemBlueprint scroll;
            
            System.Windows.Forms.Form form = new System.Windows.Forms.Form();
            /*System.Windows.Forms.TextBox text = new System.Windows.Forms.TextBox();
            text.Size = new System.Drawing.Size(400, 300);
            text.Multiline = true;
            text.WordWrap = false;
            text.AcceptsReturn = true;
            text.AcceptsTab = true;
            text.ScrollBars = System.Windows.Forms.ScrollBars.Both;
            text.Text = scroll.ToString();*/
            System.Windows.Forms.ListBox listBox = new System.Windows.Forms.ListBox();
            listBox.Sorted = true;
            listBox.HorizontalScrollbar = true;
            listBox.Size = new System.Drawing.Size(400, 300);

            form.Controls.Add(listBox);
            form.Size = new System.Drawing.Size(430, 330);
            form.Show();    

            //items.Add(scroll.ItemBlueprint);
            //scroll.TemplateResRef = "TEST RESREF";
            //scroll.AddItemProperty(ALFAItemProperty.CastSpell1ChargeItemProperty(0));
            //scroll.AddItemProperty(ALFAItemProperty.WizardOnlyItemProperty());            
            //items.Add(scroll.ItemBlueprint);

            ConsumableCreator cc = new ConsumableCreator();
            cc.Run();
        }
开发者ID:CastanoALFA,项目名称:ALFA-Base-Resources,代码行数:34,代码来源:ABR_Creator.cs

示例3: CreateReadOnlyGridControl

 protected override IReadOnlyGridControl CreateReadOnlyGridControl(bool putOnForm)
 {
     Habanero.Faces.Win.ReadOnlyGridControlWin readOnlyGridControlWin =
         new Habanero.Faces.Win.ReadOnlyGridControlWin(GetControlFactory());
     if (putOnForm)
     {
         _form = new System.Windows.Forms.Form();
         _form.Controls.Add(readOnlyGridControlWin);
         _form.Show();
         DisposeOnTearDown(_form);
     }
     return GetControlledLifetimeFor(readOnlyGridControlWin);
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:13,代码来源:TestReadOnlyGridControlWin.cs

示例4: Initialize

        private static void Initialize()
        {
            form = new System.Windows.Forms.Form();
            listBox = new System.Windows.Forms.ListBox();
            listBox.Sorted = false;
            listBox.Size = new System.Drawing.Size(400, 300);
            listBox.HorizontalScrollbar = true;

            form.Controls.Add(listBox);
            form.Size = new System.Drawing.Size(430, 330);
            form.Text = "Error Window";
            form.Show();

            initialized = true;
        }
开发者ID:CastanoALFA,项目名称:ALFA-Base-Resources,代码行数:15,代码来源:ErrorWindow.cs

示例5: TestAddItemsToStoryboard

        public void TestAddItemsToStoryboard()
        {
            _w.output ("START");
            System.Windows.Forms .Form form = new System.Windows.Forms.Form ();
            _TestSingleTon.Instance._SetupForLayoutPanelTests ();

            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            form.Controls.Add (panel);
            form.Show ();

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout ("mynewpanel", true, null);
            NoteDataXML basicNote = new NoteDataXML ();
            basicNote.Caption = "note1";

            panel.AddNote (basicNote);
            //basicNote.CreateParent(panel);

            NoteDataXML_GroupEm StoryBoard = new NoteDataXML_GroupEm();
            panel.AddNote (StoryBoard);

            //panel.MoveNote(
            // create four panels A and B at root level. C inside A. D inside C
            FAKE_NoteDataXML_Panel panelA = new FAKE_NoteDataXML_Panel ();
            panelA.Caption = "PanelA";
            panel.AddNote (panelA);  // 1

            StoryBoard = new NoteDataXML_GroupEm();
            StoryBoard.GuidForNote = "storyboard2";
            StoryBoard.Caption = "storyboard";
            panelA.AddNote (StoryBoard);
            StoryBoard.CreateParent(panelA.GetPanelsLayout());

            Assert.AreEqual (0, StoryBoard.CountStoryBoardItems());

            CoreUtilities.Links.LinkTableRecord record = new CoreUtilities.Links.LinkTableRecord();
            record.sFileName = "PanelA";//StoryBoard.GuidForNote;
            record.sKey = "*";
            record.sText="*";
            record.sSource = StoryBoard.GuidForNote;
            panel.GetLinkTable().Add (record);
            Assert.AreEqual (1,panel.GetLinkTable ().Count());
            StoryBoard.Refresh();
            Assert.AreEqual (1, StoryBoard.CountStoryBoardItems());
        }
开发者ID:BrentKnowles,项目名称:YourOtherMind,代码行数:45,代码来源:StoryboardTesting.cs

示例6: AlLFindBarsAreTheSame

        public void AlLFindBarsAreTheSame()
        {
            // children panels have the same findbar as a parent
            _TestSingleTon.Instance._SetupForLayoutPanelTests();

            System.Windows.Forms .Form form = new System.Windows.Forms.Form();

            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);

            form.Controls.Add (panel);

            // needed else DataGrid does not initialize

            form.Show ();
            //form.Visible = false;

            //NOTE: For now remember that htis ADDS 1 Extra notes
            string panelname = System.Guid.NewGuid().ToString();
            panel.NewLayout (panelname,true, null);
            LayoutDetails.Instance.AddToList (typeof(FAKE_NoteDataXML_Panel), "testingpanel");

            FAKE_NoteDataXML_Panel panelA = new FAKE_NoteDataXML_Panel();
            panelA.GuidForNote="panelA";
            panel.AddNote(panelA);

            //panel.AddNote(panelA); Intentionally do not add this because it should bea  failre

            // Won't actually add things properly because I need to override the findbar
            FAKE_FindBar findBar = new FAKE_FindBar();
            form.Controls.Add (findBar);
            RichTextExtended fakeText = new RichTextExtended();
            form.Controls.Add (fakeText);
            fakeText.Text = "We have a dog. His name is Jake." + Environment.NewLine + "We love him a lot. He is a nice dog. We all love dogs.";
            findBar.DoFind("dog", false,fakeText,0);

            Assert.AreEqual(panelA.GetPanelsLayout().GetFindbar(), panel.GetFindbar());
            //	Assert.AreEqual(panelB.GetPanelsLayout().GetFindbar(), panel.GetFindbar());
        }
开发者ID:BrentKnowles,项目名称:YourOtherMind,代码行数:38,代码来源:FindBarTest.cs

示例7: CreateExampleAndSystemLayouts

        public void CreateExampleAndSystemLayouts()
        {
            _TestSingleTon.Instance._SetupForLayoutPanelTests();

            System.Windows.Forms .Form form = new System.Windows.Forms.Form();
            form.Show();
            //form.Visible=false; NOPE Form has to be visible now!!!

            DefaultLayouts.CreateExampleLayout(form,null);
            DefaultLayouts.CreateASystemLayout(form,null);
            FAKE_SqlLiteDatabase db = new FAKE_SqlLiteDatabase(LayoutDetails.Instance.YOM_DATABASE);
            NoteDataXML_Table table =  (NoteDataXML_Table) LayoutDetails.Instance.TableLayout.FindNoteByGuid("systemqueries");
            Assert.NotNull(table);
            Assert.AreEqual ("name", table.Columns[1].ColumnName);

            string result = db.BackupDatabase();
            Assert.Greater(result.Length,29000);
            //Assert.AreEqual(29971, result.Length);
            db.Dispose();
            // creates the example and system layouts
            // to catch if any popups or other oddities introduced
            //Assert.True (false);
        }
开发者ID:BrentKnowles,项目名称:YourOtherMind,代码行数:23,代码来源:MainFormTests.cs

示例8: Test

        //[Test]
        public override void Test(asd.GraphicsDeviceType graphicsType)
        {
            var option = new asd.EngineOption
            {
                GraphicsDevice = graphicsType,
                IsFullScreen = false
            };

            bool closed = false;
            System.Windows.Forms.Form form = new System.Windows.Forms.Form();
            form.FormClosed += (object sender, System.Windows.Forms.FormClosedEventArgs e) =>
                {
                    closed = true;
                };
            form.Show();

            // aceを初期化する。
            asd.Engine.InitializeByExternalWindow(form.Handle, new IntPtr(), form.Size.Width, form.Size.Height, new asd.EngineOption());

            int time = 0;

            // aceが進行可能かチェックする。
            while (asd.Engine.DoEvents())
            {
                System.Windows.Forms.Application.DoEvents();
                if (closed) break;

                // aceを更新する。
                asd.Engine.Update();

                if (time == 10) break;
                time++;
            }

            // aceを終了する。
            asd.Engine.Terminate();
        }
开发者ID:Pctg-x8,项目名称:Altseed,代码行数:38,代码来源:EmptyExternal.cs

示例9: Optimization

 public Optimization(Device device)
 {
     ComputeViewFrustum(device);
     #if DEBUG
     System.Windows.Forms.Form f = null;
     foreach (System.Windows.Forms.Form frm in System.Windows.Forms.Application.OpenForms)
     {
         if (frm.Name == "DebugInfo")
             f = frm;
     }
     //f.Dispose();
     //f = null;
     if (f != null)
     {
         f = new System.Windows.Forms.Form();
         f.Dock = System.Windows.Forms.DockStyle.Bottom;
         f.Name = "DebugInfo";
         System.Windows.Forms.Label l = new System.Windows.Forms.Label();
         f.Controls.AddRange(new System.Windows.Forms.Control[] {
             new System.Windows.Forms.Label(),
             new System.Windows.Forms.Label(),
             new System.Windows.Forms.Label(),
             new System.Windows.Forms.Label(),
             new System.Windows.Forms.Label(),
             new System.Windows.Forms.Label(),
             new System.Windows.Forms.Label(),
             new System.Windows.Forms.Label() });
         for (int cc = 0; cc < f.Controls.Count; cc++)
         {
             f.Controls[cc].Location = new System.Drawing.Point(70, 25 * cc);
             f.Controls[cc].Size = new System.Drawing.Size(180, 16);
         }
         f.Show();
     }
     #endif
 }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:36,代码来源:Optimization.cs

示例10: SaveAndLoadStressLoad

        public void SaveAndLoadStressLoad()
        {
            System.Windows.Forms .Form form = new System.Windows.Forms.Form();
            _TestSingleTon.Instance._SetupForLayoutPanelTests();
            int linktable = 1;
            int extranodeadded = 1;
            _w.output("this is a slow test. 6 minutes?");
            int count = 200;
            //FakeLayoutDatabase layout = new FakeLayoutDatabase ("testguid");
            LayoutPanel layoutPanel = new LayoutPanel(CoreUtilities.Constants.BLANK, false);
            layoutPanel.NewLayout("testguid", true, null);
            form.Controls.Add (layoutPanel);
            form.Show ();

            NoteDataXML note = new NoteDataXML ();
            for (int i = 0; i < count; i++) {
                note.Caption = "boo" + i.ToString();
                layoutPanel.AddNote (note);
                note.CreateParent(layoutPanel);
            }
            //_w.output(String.Format ("{0} Notes in Layout before save", layout.GetNotes().Count.ToString()));
            layoutPanel.SaveLayout();

            //_w.output(String.Format ("{0} Objects Saved", layout.ObjectsSaved().ToString()));
            //layoutPanel = new FakeLayoutDatabase ("testguid");
             layoutPanel = new LayoutPanel(CoreUtilities.Constants.BLANK, false);
            layoutPanel.LoadLayout("testguid", false, null);
            //layoutPanel.LoadFrom(layoutPanel);

            //_w.output(String.Format ("{0} Objects Loaded", layout.GetNotes().Count));
            //NOT DONE YET
            Assert.AreEqual (count + linktable + extranodeadded, layoutPanel.GetAllNotes().Count);
        }
开发者ID:BrentKnowles,项目名称:YourOtherMind,代码行数:33,代码来源:LayoutDatabaseTest.cs

示例11: Enter


//.........这里部分代码省略.........
                new Client.Game.Interface.StageInfo
                {
                    HitPoints = 500,
                    Rage = 3f,
                    Time = 150,
                    MaxHitPoints = 600,
                },
                null
            };

            Action<String, Func<Graphics.Entity>> addDialogTest = (text, dialog) =>
            {
                button = new Button
                {
                    Text = text,
                };
                buttonsGrid.AddChild(button);
                button.Click += new EventHandler((o, e) =>
                {
                    var d = dialog();
                    Program.Instance.Interface.AddChild(d);
                    System.Windows.Forms.Form f = new System.Windows.Forms.Form
                    {
                        Size = new System.Drawing.Size(200, 500)
                    };
                    var pg = new System.Windows.Forms.PropertyGrid
                    {
                        SelectedObject = d,
                        Dock = System.Windows.Forms.DockStyle.Fill
                    };
                    f.Controls.Add(pg);
                    pg.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler((o2, e2) =>
                    { d.Invalidate(); });
                    f.Show();
                });
            };

            addDialogTest("StartScreenControl", () => new Game.Interface.StartScreenControl
            {
                Anchor = Orientation.Center,
                Moveable = true,
                MapSettings = new Client.Game.Map.MapSettings
                {
                    Name = "The test map",
                },
                AvailableRangedWeapons = Program.Instance.Profile.AvailableRangedWeapons,
                AvailableMeleeWeapons = Program.Instance.Profile.AvailableMeleeWeapons
            });
            addDialogTest("CreditsText", () => new Game.Interface.CreditsText
            {
                Title = "Entertainment",
                Text = "The muppets",
            });

            addDialogTest("LargeStoneButton", () => new LargeStoneButton
            {
                Text = "Button",
                Anchor = Orientation.Center
            });

            addDialogTest("StoneButton", () => new StoneButton
            {
                Text = "Button",
                Anchor = Orientation.Center
            });
开发者ID:ChristianMarchiori,项目名称:DeadMeetsLead,代码行数:66,代码来源:DeveloperMainMenu.cs

示例12: TestMovingNotes

        public void TestMovingNotes()
        {
            _w.output ("START");
            System.Windows.Forms .Form form = new System.Windows.Forms.Form ();
            _TestSingleTon.Instance._SetupForLayoutPanelTests ();

            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            form.Controls.Add (panel);
            form.Show ();

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout ("mynewpanel", true, null);
            NoteDataXML basicNote = new NoteDataXML ();
            basicNote.Caption = "note1";

            panel.AddNote (basicNote);
            //basicNote.CreateParent(panel);

            //panel.MoveNote(
            // create four panels A and B at root level. C inside A. D inside C
            FAKE_NoteDataXML_Panel panelA = new FAKE_NoteDataXML_Panel ();
            panelA.Caption = "PanelA";
            panelA.GuidForNote = "panela";
            FAKE_NoteDataXML_Panel panelB = new FAKE_NoteDataXML_Panel ();
            panelB.Caption = "PanelB";
            panelB.GuidForNote = "panelb";
            FAKE_NoteDataXML_Panel panelC = new FAKE_NoteDataXML_Panel ();
            panelC.Caption = "PanelC";
            panelC.GuidForNote = "panelc";

            _w.output ("panels made");

            panel.AddNote (panelA);  // 1
            panel.AddNote (panelB);  // 2
            //panelA.CreateParent(panel); should not need to call this when doing LayoutPanel.AddNote because it calls CreateParent insid eof it

            basicNote = new NoteDataXML ();
            basicNote.Caption = "note2";

            panelA.AddNote (basicNote);  // Panel A has 1 note
            basicNote.CreateParent (panelA.myLayoutPanel ());  // DO need to call it when adding notes like this (to a subpanel, I think)
            panel.SaveLayout ();
            Assert.AreEqual (1, panelA.CountNotes (), "Panel A holds one note");  // So this counts as  + 2

            // so we have (1 + 1 note on it)panel A + (1)panelB + basicNote +DefaultNote = 5  + (NEW) LinkTable = 6
            _w.output ("STARTCOUNT");
            Assert.AreEqual (6, panel.CountNotes (), "Total notes SHOULD BE 6 :  (1 + 1 note on it)panel A + (1)panelB + basicNote +DefaultNote = 5  + (NEW) LinkTable = 6");

            _w.output ("ENDCOUNT");

            //COUNT SHOULD BE: panelA has 1 note
            //COUNT Total should be: Default Note + Note + PanelA + Panel B  + (Note Inside Panel A) = 5

            panelA.AddNote (panelC);  // panelC is now part of Panel 2
            panelC.CreateParent (panelA.myLayoutPanel ());
            panel.SaveLayout (); // NEED TO SAVE before conts will be accurated

            //COUNT SHOULD BE: panelA has 2 notes (Panel C + the Note I add)

            _w.output ("START COUNT SUB");
            Assert.AreEqual (2, panelA.CountNotes (), "two notes in panelA");
            _w.output ("END COUNT SUB");

            Assert.AreEqual (7, panel.CountNotes (), "total of SEVEN notes");

            _w.output ("START COUNT SUB2");
            Assert.AreEqual (0, panelB.CountNotes (), "0 count worked?");
            _w.output ("END COUNT SUB2");
            //COUNT Total should be: Default Note + Note + PanelA + Panel B + (NoteInside Panel A) + (Panel C Inside Panel A) = 6

            FAKE_NoteDataXML_Panel panelD = new FAKE_NoteDataXML_Panel ();
            panelD.Caption = "PanelD";
            panelC.AddNote (panelD); // panelC which is inside PANELA now adds panelD (which is empty?)
            panelD.CreateParent (panelC.myLayoutPanel ());

            panel.SaveLayout ();
            _w.output ("START COUNT SUB3");
            Assert.AreEqual (0, panelD.CountNotes (), "No notes in panelD");
            _w.output ("START COUNT SUB3");
            /*
            NoteDataXML_RichText extra = new NoteDataXML_RichText();
            panelD.AddNote (extra); //this was here only to test that there is an error with counting EMPTY panels
            extra.CreateParent(panelD.myLayoutPanel());
            panel.SaveLayout();*/
            // update on ERROR: Every note in D is being counted DOUBLE

            // weird error: If a panel is empty it will register as +1 (i.e, counted twice)

            // PanelC and PanelA are adding this note
            //			AddChildrenToList, TYPE: TEMPORARY, scanning children...47d43f01-a031-42d1-8539-bb7ae284a9e1 from PanelC

            //			AddChildrenToList, TYPE: TEMPORARY, scanning children...47d43f01-a031-42d1-8539-bb7ae284a9e1 from PanelA

            //OK: Every note is claiming ownership of the TEXT NOTE, which is the problem, I think.
            _w.output ("START COUNT SUB4");
            Assert.AreEqual (1, panelC.CountNotes (), "1 notes in panelC");
            _w.output ("E COUNT SUB4");
            Assert.AreEqual (0, panelD.CountNotes (), "1 note in panelD");
            _w.output ("_------------------------------");
            _w.output ("panel.CountNotes=" +panel.CountNotes ());
//.........这里部分代码省略.........
开发者ID:BrentKnowles,项目名称:YourOtherMind,代码行数:101,代码来源:LayoutPanelTests.cs

示例13: TestNavigationNote

        public void TestNavigationNote()
        {
            NoteDataXML_RichText texter = new NoteDataXML_RichText(100, 100);

            System.Windows.Forms .Form form = new System.Windows.Forms.Form ();
            _TestSingleTon.Instance._SetupForLayoutPanelTests ();

            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            form.Controls.Add (panel);
            form.Show ();

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout ("mynewpanel", true, null);

            panel.AddNote(texter);

            texter.GetRichTextBox().Text = "";

            NoteNavigation bookMarkView = new NoteNavigation (texter);

            // Test 1: Tests that no crash happens when we don't have a proper markup assigned
            bookMarkView.UpdateListOfBookmarks();

            LayoutDetails.Instance.SetCurrentMarkup(new iMarkupYourOtherMind());
            // Test 2: Same test. No crash still.
            bookMarkView.UpdateListOfBookmarks();
            string TestText = @"7 minutes
            Bus crash over cliff in Ecuador
            Lost style flash leading to salvation
            ddd[[f]]
            =Dog=

            =Dog 2=
            The |whatis|this|
            ===error===
            The |firstssafdfsf|day of the ghoose|
            The |linkfdfgdfgdfg|dfdgdfgedfgdnded|";
                texter.GetRichTextBox().Text = TestText;
            // test 3: some text
            bookMarkView.UpdateListOfBookmarks();

            // Main Level Node +1
            // Dog +1
            // Dog 2 + 1
            // <Make Up Node to insert between Dog 2 and Error> +1
            // Error + 1
            // Current Position (Automated Node) + 1
            // = 6
            Assert.AreEqual (6, bookMarkView.NumberOfNodes());

            texter.GetRichTextBox().Text = "[[~scene]]";
            bookMarkView.UpdateListOfBookmarks();
            Assert.AreEqual (3, bookMarkView.NumberOfNodes());
            texter.GetRichTextBox().Text = @"Hello.
            =h1=
            =h2=
            =h3=
            =h4=
            =h1=
            ";
            bookMarkView.UpdateListOfBookmarks();
            Assert.AreEqual (7, bookMarkView.NumberOfNodes());
        }
开发者ID:BrentKnowles,项目名称:YourOtherMind,代码行数:63,代码来源:LayoutPanelTests.cs

示例14: TestAsterix

        public void TestAsterix()
        {
            _TestSingleTon.Instance._SetupForLayoutPanelTests();

            System.Windows.Forms .Form form = new System.Windows.Forms.Form();

            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);

            form.Controls.Add (panel);

            // needed else DataGrid does not initialize

            form.Show ();
            //form.Visible = false;

            //NOTE: For now remember that htis ADDS 1 Extra notes
            string panelname = System.Guid.NewGuid().ToString();
            panel.NewLayout (panelname,true, null);
            LayoutDetails.Instance.AddToList (typeof(FAKE_NoteDataXML_Panel), "testingpanel");

            // Won't actually add things properly because I need to override the findbar
            FAKE_FindBar findBar = new FAKE_FindBar();
            form.Controls.Add (findBar);
            RichTextExtended fakeText = new RichTextExtended();
            form.Controls.Add (fakeText);
            fakeText.Text = "We have a dog. His name is Jake." + Environment.NewLine + "We love him a lot. He is a nice dog. We all love dogs.";
            findBar.DoFind("*dog", false,fakeText,0);
            Assert.AreEqual(0, findBar.PositionsFOUND(), "Found 0 *dogs");

            // I removed the code that prevented typing asertixes. Do not remember why I had it.
            // make sure it does not crash\
        }
开发者ID:BrentKnowles,项目名称:YourOtherMind,代码行数:32,代码来源:FindBarTest.cs

示例15: CallingSetFieldsOnAParent

        public void CallingSetFieldsOnAParent()
        {
            System.Windows.Forms .Form form = new System.Windows.Forms.Form ();
            _TestSingleTon.Instance._SetupForLayoutPanelTests ();

            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            form.Controls.Add (panel);
            form.Show ();

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout ("mynewpanel", true, null);
            NoteDataXML basicNote = new NoteDataXML ();
            basicNote.Caption = "note1";

            panel.AddNote (basicNote);
            panel.SetParentFields("","","","");
        }
开发者ID:BrentKnowles,项目名称:YourOtherMind,代码行数:17,代码来源:LayoutPanelTests.cs


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