public void GetListOfStringsInColumn()
        {        // nest several panels
            _SetupForLayoutPanelTests();
            Form             form  = new Form();
            FAKE_LayoutPanel panel = new FAKE_LayoutPanel(CoreUtilities.Constants.BLANK, false);

            form.Controls.Add(panel);

            // needed else DataGrid does not initialize
            form.Visible = false;
            form.Show();

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout("mynewpanel", true, null);
            NoteDataXML_Table test = new NoteDataXML_Table(425, 380);

            test.GuidForNote = "thisguid1";
            test.Caption     = "note1";
            panel.SaveLayout();
            //	test.Columns = new appframe.ColumnDetails[3] {new appframe.ColumnDetails("snakes", 109), new appframe.ColumnDetails("fish", 90), new appframe.ColumnDetails("goobers", 11111)};

            panel.AddNote(test);
            test.CreateParent(panel);
            _w.output("COLUMN " + test.Columns.Length.ToString());
            Assert.AreEqual(4, test.Columns.Length, "before save");

            // saving is deleting the columns?!
            panel.SaveLayout();
            Assert.AreEqual(4, test.Columns.Length, "after save");
            for (int i = 0; i < 4; i++)
            {
                switch (i)
                {
                case 0: Assert.AreEqual("Roll", test.Columns[i].ColumnName); break;

                case 1:  Assert.AreEqual("Result", test.Columns[i].ColumnName); break;

                case 2: Assert.AreEqual("Next Table", test.Columns[i].ColumnName); break;

                case 3:  Assert.AreEqual("Modifier", test.Columns[i].ColumnName); break;
                }
            }


// not sure what we are testin here [The default Columns?]
            // testing notedataxml_table
        }
        public void GetListOfStringsInColumn()
        {
            // nest several panels
            _SetupForLayoutPanelTests ();
            Form form = new Form();
            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            form.Controls.Add (panel);

            // needed else DataGrid does not initialize
            form.Visible = false;
            form.Show ();

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout ("mynewpanel", true, null);
            NoteDataXML_Table test = new NoteDataXML_Table (425, 380);
            test.GuidForNote = "thisguid1";
            test.Caption = "note1";
            panel.SaveLayout ();
            //	test.Columns = new appframe.ColumnDetails[3] {new appframe.ColumnDetails("snakes", 109), new appframe.ColumnDetails("fish", 90), new appframe.ColumnDetails("goobers", 11111)};

            panel.AddNote (test);
            test.CreateParent (panel);
            _w.output ("COLUMN "+test.Columns.Length.ToString());
            Assert.AreEqual (4, test.Columns.Length,"before save");

            // saving is deleting the columns?!
            panel.SaveLayout ();
            Assert.AreEqual (4, test.Columns.Length, "after save");
            for (int i = 0; i < 4; i ++)
            {
                switch (i)
                {
                case 0: Assert.AreEqual("Roll", test.Columns[i].ColumnName); break;
                case 1:  Assert.AreEqual("Result", test.Columns[i].ColumnName); break;
                case 2: Assert.AreEqual("Next Table", test.Columns[i].ColumnName); break;
                case 3:  Assert.AreEqual("Modifier", test.Columns[i].ColumnName); break;

                }
            }

            // not sure what we are testin here [The default Columns?]
            // testing notedataxml_table
        }
        public void GetValuesForTable()
        {
            _SetupForLayoutPanelTests();
            Form             form  = new Form();
            FAKE_LayoutPanel panel = new FAKE_LayoutPanel(CoreUtilities.Constants.BLANK, false);

            form.Controls.Add(panel);

            // needed else DataGrid does not initialize
            form.Visible = false;
            form.Show();
            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout("mynewpanel", true, null);
            NoteDataXML_Table test = new NoteDataXML_Table(425, 380);

            test.GuidForNote = "thisguid1";
            test.Caption     = "note1";

            test.Columns = new ColumnDetails[3] {
                new ColumnDetails("snakes", 109),
                new ColumnDetails("fish", 90),
                new ColumnDetails("goobers", 11111)
            };
            test.AddRow(new object[3] {
                "1", "value1", "testA"
            });
            test.AddRow(new object[3] {
                "2", "value2", "testB"
            });
            test.AddRow(new object[3] {
                "3", "value3", "testC"
            });

            panel.AddNote(test);
            test.CreateParent(panel);
            panel.SaveLayout();
            List <string> cols = test.GetValuesForColumn(1, "*");

            for (int i = 0; i < 3; i++)
            {
                switch (i)
                {
                case 0: Assert.AreEqual(cols[i], "value1"); break;

                case 1: Assert.AreEqual(cols[i], "value2"); break;

                case 2: Assert.AreEqual(cols[i], "value3"); break;
                }
            }
            cols = test.GetValuesForColumn(2, "*");
            for (int i = 0; i < 3; i++)
            {
                switch (i)
                {
                case 0: Assert.AreEqual(cols[i], "testA"); break;

                case 1: Assert.AreEqual(cols[i], "testB"); break;

                case 2: Assert.AreEqual(cols[i], "testC"); break;
                }
            }
        }
Пример #4
0
        public static void CreateASystemLayout(Control parent, ContextMenuStrip textEditorContextStrip)
        {
            LayoutPanel SystemLayout = new Layout.LayoutPanel(CoreUtilities.Constants.BLANK, true);

            SystemLayout.NewLayout("system", false, textEditorContextStrip);
            SystemLayout.BackColor = System.Drawing.Color.Wheat;
            SystemLayout.SetName(Loc.Instance.GetString("system"));
            SystemLayout.Parent  = parent;
            SystemLayout.Visible = true;



            NoteDataXML_Panel sidedockpanel = new NoteDataXML_Panel(800, 300);

            sidedockpanel.GuidForNote = LayoutDetails.SIDEDOCK;             //"system_sidedock";
            SystemLayout.AddNote(sidedockpanel);
            sidedockpanel.CreateParent(SystemLayout);



            sidedockpanel.BringToFrontAndShow();
            sidedockpanel.Dock = DockStyle.Left;

            //
            //------Subpanel
            //
            NoteDataXML_Panel subpanel = new NoteDataXML_Panel(100, 100);

            //subpanel.Save();
            //sidedockpanel.Save();
            //* important

            subpanel.GuidForNote = LayoutDetails.TABLEGUID;
            subpanel.Caption     = Loc.Instance.GetString("Tables");


            sidedockpanel.AddNote(subpanel);
            subpanel.CreateParent(sidedockpanel.GetPanelsLayout());



            NoteDataXML_Table randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2] {
                new ColumnDetails("id", 100), new ColumnDetails("tables", 100)
            });

            randomTables.Caption = LayoutDetails.SYSTEM_RANDOM_TABLES;
            //	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100), new appframe.ColumnDetails("tables",100)};



            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout());


            randomTables.AddRow(new object[2] {
                "1", "example|colors"
            });
            randomTables.AddRow(new object[2] {
                "2", "example|colorPROMPTS"
            });
            SystemLayout.SaveLayout();

            randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[3] {
                new ColumnDetails("id", 100),
                new ColumnDetails("notebooks", 100),
                new ColumnDetails("sections", 200)
            });
            randomTables.Caption = LayoutDetails.SYSTEM_NOTEBOOKS;
//			randomTables.Columns = new appframe.ColumnDetails[3]{new appframe.ColumnDetails("id",100),
//				new appframe.ColumnDetails("notebooks",100),
//				new appframe.ColumnDetails("sections",200)};


            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout());

            randomTables.AddRow(new object[3] {
                "1", Loc.Instance.GetString("Writing"), Loc.Instance.GetString("All|Advice|Characters|Markets|Projects|Scenes")
            });
            randomTables.AddRow(new object[3] {
                "2", Loc.Instance.GetString("Research"), Loc.Instance.GetString("All|Historical|Science")
            });
            randomTables.AddRow(new object[3] {
                "3", Loc.Instance.GetString("All"), Loc.Instance.GetString("All")
            });



            ///
            /// -- STATUS
            ///
            randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2] {
                new ColumnDetails("id", 100),
                new ColumnDetails("status", 100)
            });
            randomTables.Caption = LayoutDetails.SYSTEM_STATUS;
            //	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
            //		new appframe.ColumnDetails("status",100)};

            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout());

            randomTables.AddRow(new object[2] {
                "1", Loc.Instance.GetString("0 Not Started")
            });
            randomTables.AddRow(new object[2] {
                "2", Loc.Instance.GetString("1 Planning")
            });
            randomTables.AddRow(new object[2] {
                "3", Loc.Instance.GetString("2 Writing")
            });
            randomTables.AddRow(new object[2] {
                "4", Loc.Instance.GetString("3 Rewriting")
            });
            randomTables.AddRow(new object[2] {
                "5", Loc.Instance.GetString("4 Complete")
            });
            randomTables.AddRow(new object[2] {
                "6", Loc.Instance.GetString("5 Accepted")
            });
            randomTables.AddRow(new object[2] {
                "7", Loc.Instance.GetString("6 Published")
            });
            randomTables.AddRow(new object[2] {
                "8", Loc.Instance.GetString("7 Republished on personal site")
            });
            randomTables.AddRow(new object[2] {
                "9", Loc.Instance.GetString("8 Selfpublished")
            });
            //	NewMessage.Show (randomTables.RowCount().ToString ());
            randomTables.AddRow(new object[2] {
                "10", Loc.Instance.GetString("9 Retired")
            });

            //	NewMessage.Show (randomTables.RowCount().ToString ());


            ///
            /// -- SUBTYPES
            ///
            ///
            ///
            randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2] {
                new ColumnDetails("id", 100),
                new ColumnDetails("subtype", 100)
            });
            randomTables.Caption = LayoutDetails.SYSTEM_SUBTYPE;
            //		randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
            //		new appframe.ColumnDetails("subtype",100)};
            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout());

            randomTables.AddRow(new object[2] {
                "1", Loc.Instance.GetString("Article")
            });
            randomTables.AddRow(new object[2] {
                "2", Loc.Instance.GetString("Idea")
            });
            randomTables.AddRow(new object[2] {
                "3", Loc.Instance.GetString("Novel")
            });
            randomTables.AddRow(new object[2] {
                "4", Loc.Instance.GetString("Play")
            });
            randomTables.AddRow(new object[2] {
                "5", Loc.Instance.GetString("Story")
            });

            ///
            /// -- KEYWORDS
            ///
            ///
            ///
            randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2] {
                new ColumnDetails("id", 100),
                new ColumnDetails("keyword", 100)
            });
            randomTables.Caption = LayoutDetails.SYSTEM_KEYWORDS;
            //	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
            //		new appframe.ColumnDetails("keyword",100)};
            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout());

            randomTables.AddRow(new object[2] {
                "1", Loc.Instance.GetString("Brainstorm")
            });
            randomTables.AddRow(new object[2] {
                "2", Loc.Instance.GetString("Horror")
            });
            randomTables.AddRow(new object[2] {
                "3", Loc.Instance.GetString("Fantasy")
            });
            randomTables.AddRow(new object[2] {
                "4", Loc.Instance.GetString("SciFi")
            });
            randomTables.AddRow(new object[2] {
                "5", Loc.Instance.GetString("WhatIf?")
            });



            ///
            /// -- WORKLOG
            ///
            ///
            ///
//			randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2]{new ColumnDetails("id",100),
//				new ColumnDetails("category",100)});
//			randomTables.Caption = LayoutDetails.SYSTEM_WORKLOGCATEGORY;
//		//	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
//		//		new appframe.ColumnDetails("category",100)};
//			subpanel.AddNote(randomTables);
//			randomTables.CreateParent(subpanel.GetPanelsLayout ());
//
//			randomTables.AddRow(new object[2]{"1", Loc.Instance.GetString("Writing")});
//			randomTables.AddRow(new object[2]{"2", Loc.Instance.GetString("Editing")});
//			randomTables.AddRow(new object[2]{"3", Loc.Instance.GetString("Planning")});


            ///
            /// -- Grammar
            ///
            ///
            ///
//			randomTables = new NoteDataXML_Table(100, 100 , new ColumnDetails[4]{new ColumnDetails("id",100),
//				new ColumnDetails("pattern",100), new ColumnDetails("advice",100), new ColumnDetails("overused",100)});
//			randomTables.Caption = LayoutDetails.SYSTEM_GRAMMAR;
//		//	randomTables.Columns = new appframe.ColumnDetails[4]{new appframe.ColumnDetails("id",100),
//		//		new appframe.ColumnDetails("pattern",100), new appframe.ColumnDetails("advice",100), new appframe.ColumnDetails("overused",100)};
//			subpanel.AddNote(randomTables);
//			randomTables.CreateParent(subpanel.GetPanelsLayout ());
//
//			randomTables.AddRow(new object[4]{
//				"1", "1.0", @"The first row of this table is a version number. Feel free to edit it when major changes are made to this list. On each Layout you can record the last grammar version you have checked it against.", "0"}
//			);
//
//			randomTables.AddRow(new object[4]{
//				"2", "Among", @"When more than two things or persons are involved, among is usually called for.", "0"}
//			);
//			randomTables.AddRow(new object[4]{
//				"3", "As to whether", @"Whether is sufficient.", "1"}
//			);


            ///
            /// -- Queries
            ///
            ///
            ///
            randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[3] {
                new ColumnDetails("id", 100),
                new ColumnDetails("name", 100), new ColumnDetails("query", 100)
            });
            randomTables.GuidForNote = "systemqueries";
            randomTables.Caption     = LayoutDetails.SYSTEM_QUERIES;
            //		randomTables.Columns = new appframe.ColumnDetails[3]{new appframe.ColumnDetails("id",100),
            //			new appframe.ColumnDetails("name",100), new appframe.ColumnDetails("query",100)};
            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout());


            randomTables.AddRow(new object[3] {
                "1", "All", @""
            }
                                );
            randomTables.AddRow(new object[3] {
                "2", "WritingProjects", @"notebook='Writing' and section='Projects'"
            }
                                );


            //  be created by those AddIns.
            ///
            /// -- SUBMISSION -- most submission stuff needs to be in Submission AddIn but these two (for load reasons) are here. Sorry.
            ///
            ///
            ///
            /// 1. Publish Types (electronic or print)
            ///
            ///
//			randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2]{new ColumnDetails("id",100),
//				new ColumnDetails("category",100)});
//			randomTables.Caption = LayoutDetails.SYSTEM_PUBLISHTYPES;
//			//	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
//			//		new appframe.ColumnDetails("category",100)};
//			subpanel.AddNote(randomTables);
//			randomTables.CreateParent(subpanel.GetPanelsLayout ());
//
//			randomTables.AddRow(new object[2]{"1", Loc.Instance.GetString("Both")});
//			randomTables.AddRow(new object[2]{"2", Loc.Instance.GetString("Electronic")});
//			randomTables.AddRow(new object[2]{"3", Loc.Instance.GetString("None")});
//			randomTables.AddRow(new object[2]{"4", Loc.Instance.GetString("Print")});

            ///
            /// 2. Market Types (pay category)
            ///
            ///
//			randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2]{new ColumnDetails("id",100),
//				new ColumnDetails("category",100)});
//			randomTables.Caption = LayoutDetails.SYSTEM_MARKETTYPES;
//			//	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
//			//		new appframe.ColumnDetails("category",100)};
//			subpanel.AddNote(randomTables);
//			randomTables.CreateParent(subpanel.GetPanelsLayout ());
//
//			randomTables.AddRow(new object[2]{"1", Loc.Instance.GetString("Non Paying")});
//			randomTables.AddRow(new object[2]{"2", Loc.Instance.GetString("None")});
//			randomTables.AddRow(new object[2]{"3", Loc.Instance.GetString("Semi-Pro")});
//			randomTables.AddRow(new object[2]{"4", Loc.Instance.GetString("Small Press (Token)")});
//			randomTables.AddRow(new object[2]{"5", Loc.Instance.GetString("Pro Market")});

            SystemLayout.SaveLayout();
            // note list needs to be at the end March 2013 but creatio happens earlier so it is the defautl viewed note
            // so we build it later


            NoteDataXML_NoteList list = new NoteDataXML_NoteList();

            list.GuidForNote = "notelist";
            sidedockpanel.AddNote(list);

            list.CreateParent(sidedockpanel.GetPanelsLayout());
            list.Mode = NoteDataXML_NoteList.Modes.LAYOUTS;


            list.Dock = DockStyle.Fill;


            SystemLayout.SaveLayout();
            list.Refresh();
            SystemLayout.Dispose();
        }
Пример #5
0
        /// <summary>
        /// Creates the example layout. For new users.
        /// </summary>
        /// <returns>
        /// The example layout.
        /// </returns>
        /// <param name='parent'>
        /// Parent.
        /// </param>
        public static void CreateExampleLayout(Control parent, ContextMenuStrip TextEditMenuStrip)
        {
            LayoutPanel exampleLayout = new Layout.LayoutPanel(CoreUtilities.Constants.BLANK, true);

            exampleLayout.NewLayout("example", false, TextEditMenuStrip);

            exampleLayout.Parent  = parent;
            exampleLayout.Visible = true;


            exampleLayout.SetName(Loc.Instance.GetString("example"));



            const int columns = 3;

            NoteDataXML_Table randomTables = new NoteDataXML_Table();

            randomTables.Columns = new ColumnDetails[columns] {
                new ColumnDetails(TableWrapper.Roll, 100), new ColumnDetails(TableWrapper.Result, 100)
                , new ColumnDetails(TableWrapper.NextTable, 100)
            };

            exampleLayout.SaveLayout();

            exampleLayout.AddNote(randomTables);
            randomTables.CreateParent(exampleLayout);

            randomTables.Caption      = "colors";
            randomTables.TableCaption = "COLORS: ";
            randomTables.AddRow(new object[columns] {
                "1", "red", ""
            });
            randomTables.AddRow(new object[columns] {
                "2", "blue", ""
            });
            randomTables.AddRow(new object[columns] {
                "3", "yellow", ""
            });

            // 2nd table
            randomTables = new NoteDataXML_Table();
            randomTables.TableCaption = "COLORS AS PROMPT: ";
            randomTables.Columns      = new ColumnDetails[columns] {
                new ColumnDetails(TableWrapper.Roll, 100),
                new ColumnDetails(TableWrapper.Result, 100), new ColumnDetails(TableWrapper.NextTable, 100)
            };
            randomTables.Caption = "colorprompts";
            randomTables.AddRow(new object[columns] {
                "1", "red", ""
            });
            randomTables.AddRow(new object[columns] {
                "2", "blue", ""
            });
            randomTables.AddRow(new object[columns] {
                "3", "yellow", ""
            });

            exampleLayout.AddNote(randomTables);
            randomTables.CreateParent(exampleLayout);


            exampleLayout.SaveLayout();

            exampleLayout.Dispose();
        }
        protected override void DoBuildChildren(LayoutPanelBase Layout)
        {
            // Unable to BUILD A SYSTEM TABLE here. It is a copy, not a link to the actual table
            // and hence does not work.
            // Instead I will try under Register; see my logic for why, there
            // We create the table when registering type.
            // The LOGIC I am using is that this will be called when the user
            // clicks the FIRST TIME to register the type. Meaning the table is created.

            // WHERE IT FAILS: If the user deletes the table manually, it will never attempt to recreate it, unless
            // Addin deregistered and reregisetered
            string TableName = SYSTEM_WORKLOGCATEGORY;
            LayoutPanels.NoteDataXML_Panel PanelContainingTables = LayoutPanel.GetPanelToAddTableTo (TableName);
            BringToFrontAndShow ();
            // can't use TableLayout because its not the actual tablelayout (its a copy)
            if (PanelContainingTables != null) {

                // create the note
                NoteDataXML_Table randomTables = new NoteDataXML_Table (100, 100, new ColumnDetails[2]{new ColumnDetails ("id", 100),
                        new ColumnDetails ("category", 100)});
                randomTables.Caption = TableName;

                PanelContainingTables.AddNote (randomTables);
                randomTables.CreateParent (PanelContainingTables.GetPanelsLayout ());

                randomTables.AddRow (new object[2]{"1", Loc.Instance.GetString ("Writing")});
                randomTables.AddRow (new object[2]{"2", Loc.Instance.GetString ("Editing")});
                randomTables.AddRow (new object[2]{"3", Loc.Instance.GetString ("Planning")});
                //		LayoutDetails.Instance.TableLayout.SaveLayout();
                PanelContainingTables.GetPanelsLayout ().SaveLayout ();
                //NewMessage.Show("Making new");
                // now we reload the system version
                LayoutDetails.Instance.TableLayout.LoadLayout (LayoutDetails.TABLEGUID, true, null);
                BringToFrontAndShow ();
            }

            base.DoBuildChildren (Layout);
            properties.DropDownItems.Add (new ToolStripSeparator ());
            CaptionLabel.Dock = DockStyle.Top;

             Journal = new JournalPanel(this.Layout.GUID, BringFrontWrapper);
            Journal.Dock = DockStyle.Fill;
            //Journal.Click+= (object sender, EventArgs e) => BringToFrontAndShow();

            ParentNotePanel.Controls.Add (Journal);

            Journal.BringToFront();
            Journal.RefreshPanels("");
        }
        public void TableSearch()
        {
            // the way filters work for tables is weird
            // and becaue it is weird I might tweak it later and this is a bad idea
            // so I'm writing this test to stop me from doing that

            _TestSingleTon.Instance._SetupForLayoutPanelTests();

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

            // needed else DataGrid does not initialize

            form.Show ();
            //form.Visible = false;
            _w.output("boom");
            // March 2013 -- notelist relies on having this
            YOM2013.DefaultLayouts.CreateASystemLayout(form,null);

            //NOTE: For now remember that htis ADDS 1 Extra notes

            string panelname2 = System.Guid.NewGuid().ToString();
            FAKE_LayoutPanel  PanelOtherGuy= new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            PanelOtherGuy.NewLayout (panelname2,true, null);
            form.Controls.Add (PanelOtherGuy);
            PanelOtherGuy.SaveLayout();

            Assert.AreEqual( 2, PanelOtherGuy.CountNotes(), "count1");

            // ADD 1 of each type
            //foreach (Type t in LayoutDetails.Instance.ListOfTypesToStoreInXML())

            NoteDataXML_Table table =  new NoteDataXML_Table(100, 100,new ColumnDetails[3]{new ColumnDetails("id",100),
                new ColumnDetails("tables",100),
                new ColumnDetails("values",220)} );
            table.GuidForNote="thetable";
            table.Caption="thettable2";

            PanelOtherGuy.AddNote (table);
            table.CreateParent(PanelOtherGuy);

            //	table.UpdateAfterLoad();

            table.AddRow(new object[3] {"0", "table1", "value1"});
            table.AddRow(new object[3] {"0", "table2", "value2"});
            table.AddRow(new object[3] {"0", "table3", "value3"});
            table.AddRow(new object[3] {"0", "table4", "value4"});

            PanelOtherGuy.SaveLayout();
            Assert.AreEqual( 3, PanelOtherGuy.CountNotes(), "count2");
            string ToSearchFor = "table3";

            // looks in row 1 for the value and will return the value from row 2
            List<string> results  = PanelOtherGuy.GetListOfStringsFromSystemTable("thettable2", 2, String.Format ("1|{0}", ToSearchFor));
            Assert.NotNull(results);
            Assert.AreEqual (1, results.Count);
            Assert.AreEqual ("value3", results[0]);

            ToSearchFor ="bacon";
            results  = PanelOtherGuy.GetListOfStringsFromSystemTable("thettable2", 2, String.Format ("1|{0}", ToSearchFor));
            Assert.NotNull(results);
            Assert.AreEqual (0, results.Count);

            ToSearchFor ="0";
            results  = PanelOtherGuy.GetListOfStringsFromSystemTable("thettable2", 1, String.Format ("0|{0}", ToSearchFor));
            Assert.NotNull(results);
            Assert.AreEqual (4, results.Count);
        }
Пример #8
0
        public void TableSearch()
        {
            // the way filters work for tables is weird
            // and becaue it is weird I might tweak it later and this is a bad idea
            // so I'm writing this test to stop me from doing that

            _TestSingleTon.Instance._SetupForLayoutPanelTests();


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



            // needed else DataGrid does not initialize

            form.Show();
            //form.Visible = false;
            _w.output("boom");
            // March 2013 -- notelist relies on having this
            YOM2013.DefaultLayouts.CreateASystemLayout(form, null);


            //NOTE: For now remember that htis ADDS 1 Extra notes


            string           panelname2    = System.Guid.NewGuid().ToString();
            FAKE_LayoutPanel PanelOtherGuy = new FAKE_LayoutPanel(CoreUtilities.Constants.BLANK, false);

            PanelOtherGuy.NewLayout(panelname2, true, null);
            form.Controls.Add(PanelOtherGuy);
            PanelOtherGuy.SaveLayout();

            Assert.AreEqual(2, PanelOtherGuy.CountNotes(), "count1");

            // ADD 1 of each type
            //foreach (Type t in LayoutDetails.Instance.ListOfTypesToStoreInXML())


            NoteDataXML_Table table = new NoteDataXML_Table(100, 100, new ColumnDetails[3] {
                new ColumnDetails("id", 100),
                new ColumnDetails("tables", 100),
                new ColumnDetails("values", 220)
            });

            table.GuidForNote = "thetable";
            table.Caption     = "thettable2";



            PanelOtherGuy.AddNote(table);
            table.CreateParent(PanelOtherGuy);

            //	table.UpdateAfterLoad();

            table.AddRow(new object[3] {
                "0", "table1", "value1"
            });
            table.AddRow(new object[3] {
                "0", "table2", "value2"
            });
            table.AddRow(new object[3] {
                "0", "table3", "value3"
            });
            table.AddRow(new object[3] {
                "0", "table4", "value4"
            });


            PanelOtherGuy.SaveLayout();
            Assert.AreEqual(3, PanelOtherGuy.CountNotes(), "count2");
            string ToSearchFor = "table3";

            // looks in row 1 for the value and will return the value from row 2
            List <string> results = PanelOtherGuy.GetListOfStringsFromSystemTable("thettable2", 2, String.Format("1|{0}", ToSearchFor));

            Assert.NotNull(results);
            Assert.AreEqual(1, results.Count);
            Assert.AreEqual("value3", results[0]);

            ToSearchFor = "bacon";
            results     = PanelOtherGuy.GetListOfStringsFromSystemTable("thettable2", 2, String.Format("1|{0}", ToSearchFor));
            Assert.NotNull(results);
            Assert.AreEqual(0, results.Count);

            ToSearchFor = "0";
            results     = PanelOtherGuy.GetListOfStringsFromSystemTable("thettable2", 1, String.Format("0|{0}", ToSearchFor));
            Assert.NotNull(results);
            Assert.AreEqual(4, results.Count);
        }
Пример #9
0
        public static void CreateASystemLayout(Control parent, ContextMenuStrip textEditorContextStrip)
        {
            LayoutPanel SystemLayout = new Layout.LayoutPanel (CoreUtilities.Constants.BLANK, true);
            SystemLayout.NewLayout ("system" ,false, textEditorContextStrip);
            SystemLayout.BackColor = System.Drawing.Color.Wheat;
            SystemLayout.SetName (Loc.Instance.GetString("system"));
            SystemLayout.Parent = parent;
            SystemLayout.Visible = true;

            NoteDataXML_Panel sidedockpanel = new NoteDataXML_Panel(800,300);
            sidedockpanel.GuidForNote = LayoutDetails.SIDEDOCK; //"system_sidedock";
            SystemLayout.AddNote(sidedockpanel);
            sidedockpanel.CreateParent(SystemLayout);

            sidedockpanel.BringToFrontAndShow();
            sidedockpanel.Dock = DockStyle.Left;

            //
            //------Subpanel
            //
            NoteDataXML_Panel subpanel = new NoteDataXML_Panel(100,100);

            //subpanel.Save();
            //sidedockpanel.Save();
            //* important

            subpanel.GuidForNote = LayoutDetails.TABLEGUID;
            subpanel.Caption = Loc.Instance.GetString("Tables");

            sidedockpanel.AddNote(subpanel);
            subpanel.CreateParent(sidedockpanel.GetPanelsLayout());

            NoteDataXML_Table randomTables = new NoteDataXML_Table(100, 100,new ColumnDetails[2]{new ColumnDetails("id",100), new ColumnDetails("tables",100)} );
            randomTables.Caption = LayoutDetails.SYSTEM_RANDOM_TABLES;
            //	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100), new appframe.ColumnDetails("tables",100)};

            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout());

            randomTables.AddRow(new object[2]{"1", "example|colors"});
            randomTables.AddRow(new object[2]{"2", "example|colorPROMPTS"});
            SystemLayout.SaveLayout ();

            randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[3]{new ColumnDetails("id",100),
                new ColumnDetails("notebooks",100),
                new ColumnDetails("sections",200)});
            randomTables.Caption = LayoutDetails.SYSTEM_NOTEBOOKS;
            //			randomTables.Columns = new appframe.ColumnDetails[3]{new appframe.ColumnDetails("id",100),
            //				new appframe.ColumnDetails("notebooks",100),
            //				new appframe.ColumnDetails("sections",200)};

            subpanel.AddNote(randomTables);
            randomTables.CreateParent (subpanel.GetPanelsLayout ());

            randomTables.AddRow(new object[3]{"1", Loc.Instance.GetString("Writing"), Loc.Instance.GetString("All|Advice|Characters|Markets|Projects|Scenes")});
            randomTables.AddRow(new object[3]{"2", Loc.Instance.GetString("Research"), Loc.Instance.GetString("All|Historical|Science")});
            randomTables.AddRow(new object[3]{"3", Loc.Instance.GetString("All"), Loc.Instance.GetString("All")});

            ///
            /// -- STATUS
            ///
            randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2]{new ColumnDetails("id",100),
                new ColumnDetails("status",100)});
            randomTables.Caption = LayoutDetails.SYSTEM_STATUS;
            //	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
            //		new appframe.ColumnDetails("status",100)};

            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout());

            randomTables.AddRow(new object[2]{"1", Loc.Instance.GetString("0 Not Started")});
            randomTables.AddRow(new object[2]{"2", Loc.Instance.GetString("1 Planning")});
            randomTables.AddRow(new object[2]{"3", Loc.Instance.GetString("2 Writing")});
            randomTables.AddRow(new object[2]{"4", Loc.Instance.GetString("3 Rewriting")});
            randomTables.AddRow(new object[2]{"5", Loc.Instance.GetString("4 Complete")});
            randomTables.AddRow(new object[2]{"6", Loc.Instance.GetString("5 Accepted")});
            randomTables.AddRow(new object[2]{"7", Loc.Instance.GetString("6 Published")});
            randomTables.AddRow(new object[2]{"8", Loc.Instance.GetString("7 Republished on personal site")});
            randomTables.AddRow(new object[2]{"9", Loc.Instance.GetString("8 Selfpublished")});
            //	NewMessage.Show (randomTables.RowCount().ToString ());
            randomTables.AddRow(new object[2]{"10", Loc.Instance.GetString("9 Retired")});

            //	NewMessage.Show (randomTables.RowCount().ToString ());

            ///
            /// -- SUBTYPES
            ///
            ///
            ///
            randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2]{new ColumnDetails("id",100),
                new ColumnDetails("subtype",100)});
            randomTables.Caption = LayoutDetails.SYSTEM_SUBTYPE;
            //		randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
            //		new appframe.ColumnDetails("subtype",100)};
            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout());

            randomTables.AddRow(new object[2]{"1", Loc.Instance.GetString("Article")});
            randomTables.AddRow(new object[2]{"2", Loc.Instance.GetString("Idea")});
            randomTables.AddRow(new object[2]{"3", Loc.Instance.GetString("Novel")});
            randomTables.AddRow(new object[2]{"4", Loc.Instance.GetString("Play")});
            randomTables.AddRow(new object[2]{"5", Loc.Instance.GetString("Story")});

            ///
            /// -- KEYWORDS
            ///
            ///
            ///
            randomTables = new NoteDataXML_Table(100, 100,  new ColumnDetails[2]{new ColumnDetails("id",100),
                new ColumnDetails("keyword",100)});
            randomTables.Caption = LayoutDetails.SYSTEM_KEYWORDS;
            //	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
            //		new appframe.ColumnDetails("keyword",100)};
            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout ());

            randomTables.AddRow(new object[2]{"1", Loc.Instance.GetString("Brainstorm")});
            randomTables.AddRow(new object[2]{"2", Loc.Instance.GetString("Horror")});
            randomTables.AddRow(new object[2]{"3", Loc.Instance.GetString("Fantasy")});
            randomTables.AddRow(new object[2]{"4", Loc.Instance.GetString("SciFi")});
            randomTables.AddRow(new object[2]{"5", Loc.Instance.GetString("WhatIf?")});

            ///
            /// -- WORKLOG
            ///
            ///
            ///
            //			randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2]{new ColumnDetails("id",100),
            //				new ColumnDetails("category",100)});
            //			randomTables.Caption = LayoutDetails.SYSTEM_WORKLOGCATEGORY;
            //		//	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
            //		//		new appframe.ColumnDetails("category",100)};
            //			subpanel.AddNote(randomTables);
            //			randomTables.CreateParent(subpanel.GetPanelsLayout ());
            //
            //			randomTables.AddRow(new object[2]{"1", Loc.Instance.GetString("Writing")});
            //			randomTables.AddRow(new object[2]{"2", Loc.Instance.GetString("Editing")});
            //			randomTables.AddRow(new object[2]{"3", Loc.Instance.GetString("Planning")});

            ///
            /// -- Grammar
            ///
            ///
            ///
            //			randomTables = new NoteDataXML_Table(100, 100 , new ColumnDetails[4]{new ColumnDetails("id",100),
            //				new ColumnDetails("pattern",100), new ColumnDetails("advice",100), new ColumnDetails("overused",100)});
            //			randomTables.Caption = LayoutDetails.SYSTEM_GRAMMAR;
            //		//	randomTables.Columns = new appframe.ColumnDetails[4]{new appframe.ColumnDetails("id",100),
            //		//		new appframe.ColumnDetails("pattern",100), new appframe.ColumnDetails("advice",100), new appframe.ColumnDetails("overused",100)};
            //			subpanel.AddNote(randomTables);
            //			randomTables.CreateParent(subpanel.GetPanelsLayout ());
            //
            //			randomTables.AddRow(new object[4]{
            //				"1", "1.0", @"The first row of this table is a version number. Feel free to edit it when major changes are made to this list. On each Layout you can record the last grammar version you have checked it against.", "0"}
            //			);
            //
            //			randomTables.AddRow(new object[4]{
            //				"2", "Among", @"When more than two things or persons are involved, among is usually called for.", "0"}
            //			);
            //			randomTables.AddRow(new object[4]{
            //				"3", "As to whether", @"Whether is sufficient.", "1"}
            //			);

            ///
            /// -- Queries
            ///
            ///
            ///
            randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[3]{new ColumnDetails("id",100),
                new ColumnDetails("name",100), new ColumnDetails("query",100)});
            randomTables.GuidForNote ="systemqueries";
            randomTables.Caption = LayoutDetails.SYSTEM_QUERIES;
            //		randomTables.Columns = new appframe.ColumnDetails[3]{new appframe.ColumnDetails("id",100),
            //			new appframe.ColumnDetails("name",100), new appframe.ColumnDetails("query",100)};
            subpanel.AddNote(randomTables);
            randomTables.CreateParent(subpanel.GetPanelsLayout ());

            randomTables.AddRow(new object[3]{
                "1", "All", @""}
            );
            randomTables.AddRow(new object[3]{
                "2", "WritingProjects", @"notebook='Writing' and section='Projects'"}
            );

            //  be created by those AddIns.
            ///
            /// -- SUBMISSION -- most submission stuff needs to be in Submission AddIn but these two (for load reasons) are here. Sorry.
            ///
            ///
            ///
            /// 1. Publish Types (electronic or print)
            ///
            ///
            //			randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2]{new ColumnDetails("id",100),
            //				new ColumnDetails("category",100)});
            //			randomTables.Caption = LayoutDetails.SYSTEM_PUBLISHTYPES;
            //			//	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
            //			//		new appframe.ColumnDetails("category",100)};
            //			subpanel.AddNote(randomTables);
            //			randomTables.CreateParent(subpanel.GetPanelsLayout ());
            //
            //			randomTables.AddRow(new object[2]{"1", Loc.Instance.GetString("Both")});
            //			randomTables.AddRow(new object[2]{"2", Loc.Instance.GetString("Electronic")});
            //			randomTables.AddRow(new object[2]{"3", Loc.Instance.GetString("None")});
            //			randomTables.AddRow(new object[2]{"4", Loc.Instance.GetString("Print")});

            ///
            /// 2. Market Types (pay category)
            ///
            ///
            //			randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[2]{new ColumnDetails("id",100),
            //				new ColumnDetails("category",100)});
            //			randomTables.Caption = LayoutDetails.SYSTEM_MARKETTYPES;
            //			//	randomTables.Columns = new appframe.ColumnDetails[2]{new appframe.ColumnDetails("id",100),
            //			//		new appframe.ColumnDetails("category",100)};
            //			subpanel.AddNote(randomTables);
            //			randomTables.CreateParent(subpanel.GetPanelsLayout ());
            //
            //			randomTables.AddRow(new object[2]{"1", Loc.Instance.GetString("Non Paying")});
            //			randomTables.AddRow(new object[2]{"2", Loc.Instance.GetString("None")});
            //			randomTables.AddRow(new object[2]{"3", Loc.Instance.GetString("Semi-Pro")});
            //			randomTables.AddRow(new object[2]{"4", Loc.Instance.GetString("Small Press (Token)")});
            //			randomTables.AddRow(new object[2]{"5", Loc.Instance.GetString("Pro Market")});

            SystemLayout.SaveLayout ();
            // note list needs to be at the end March 2013 but creatio happens earlier so it is the defautl viewed note
            // so we build it later

            NoteDataXML_NoteList list = new NoteDataXML_NoteList();
            list.GuidForNote = "notelist";
            sidedockpanel.AddNote(list);

            list.CreateParent(sidedockpanel.GetPanelsLayout());
            list.Mode = NoteDataXML_NoteList.Modes.LAYOUTS;

            list.Dock = DockStyle.Fill;

            SystemLayout.SaveLayout ();
            list.Refresh();
            SystemLayout.Dispose ();
        }
Пример #10
0
        /// <summary>
        /// Creates the example layout. For new users.
        /// </summary>
        /// <returns>
        /// The example layout.
        /// </returns>
        /// <param name='parent'>
        /// Parent.
        /// </param>
        public static void CreateExampleLayout(Control parent, ContextMenuStrip TextEditMenuStrip)
        {
            LayoutPanel exampleLayout = new Layout.LayoutPanel (CoreUtilities.Constants.BLANK, true);
            exampleLayout.NewLayout ("example" ,false, TextEditMenuStrip);

            exampleLayout.Parent = parent;
            exampleLayout.Visible = true;

            exampleLayout.SetName (Loc.Instance.GetString("example"));

            const int columns = 3;

            NoteDataXML_Table randomTables = new NoteDataXML_Table();
            randomTables.Columns = new ColumnDetails[columns]{new ColumnDetails(TableWrapper.Roll,100), new ColumnDetails(TableWrapper.Result,100)
            ,new ColumnDetails(TableWrapper.NextTable, 100)};

            exampleLayout.SaveLayout ();

            exampleLayout.AddNote(randomTables);
            randomTables.CreateParent(exampleLayout);

            randomTables.Caption = "colors";
            randomTables.TableCaption = "COLORS: ";
            randomTables.AddRow(new object[columns]{"1", "red",""});
            randomTables.AddRow(new object[columns]{"2", "blue",""});
            randomTables.AddRow(new object[columns]{"3", "yellow",""});

            // 2nd table
            randomTables = new NoteDataXML_Table();
            randomTables.TableCaption = "COLORS AS PROMPT: ";
            randomTables.Columns = new ColumnDetails[columns]{new ColumnDetails(TableWrapper.Roll,100),
                new ColumnDetails(TableWrapper.Result,100),new ColumnDetails(TableWrapper.NextTable, 100)};
            randomTables.Caption = "colorprompts";
            randomTables.AddRow(new object[columns]{"1", "red",""});
            randomTables.AddRow(new object[columns]{"2", "blue",""});
            randomTables.AddRow(new object[columns]{"3", "yellow",""});

            exampleLayout.AddNote(randomTables);
            randomTables.CreateParent(exampleLayout);

            exampleLayout.SaveLayout ();

            exampleLayout.Dispose();
        }
        private void CreateSubmissionTypeTable()
        {
            NoteDataXML_Table randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[3]{new ColumnDetails("id",100),
                new ColumnDetails("name",100), new ColumnDetails("code",100)} );
            randomTables.Caption = SubmissionMaster.TABLE_SubmissionTypes;
            randomTables.GuidForNote = SubmissionMaster.TABLE_SubmissionTypes;
            randomTables.Columns = new ColumnDetails[3]{new ColumnDetails("id",100),
                new ColumnDetails("name",100), new ColumnDetails("code",100)};
            Layout.AddNote(randomTables);
            randomTables.CreateParent(Layout);

            randomTables.AddRow(new object[3]{"1", "Submission", @"submission"});
            randomTables.AddRow(new object[3]{"2", "Invalid", @"invalid"});
            randomTables.AddRow(new object[3]{"3", "Contest Entry", @"submission"});
            randomTables.AddRow(new object[3]{"4", "Query", @"none"});
            randomTables.AddRow(new object[3]{"5", "Followup Call", @"none"});
            randomTables.AddRow(new object[3]{"6", "Email Contest", @"submission"});
            randomTables.AddRow(new object[3]{"7", "Followup Letter", @"none"});
            randomTables.AddRow(new object[3]{"8", "Proposal", @"none"});
            // removed because only I need it for legacy work
            //	randomTables.AddRow(new object[3]{"9", "Destination",SubmissionMaster.CODE_DESTINATION });
        }
        private void CreateReplyTypeTable()
        {
            NoteDataXML_Table randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[3]{new ColumnDetails("id",100),
                new ColumnDetails("name",100), new ColumnDetails("code",100)} );
            randomTables.Caption = SubmissionMaster.TABLE_ReplyTypes;
            randomTables.GuidForNote = SubmissionMaster.TABLE_ReplyTypes;
            //	randomTables.Columns =
            Layout.AddNote(randomTables);
            randomTables.CreateParent(Layout);

            randomTables.AddRow(new object[3]{"1", "Invalid",SubmissionMaster.CODE_NO_REPLY_YET});

            randomTables.AddRow(new object[3]{"2", "Closed", @"rejection"});
            randomTables.AddRow(new object[3]{"3", "Accepted", SubmissionMaster.CODE_ACCEPTANCE});
            randomTables.AddRow(new object[3]{"4", "No Response", @"rejection"});
            randomTables.AddRow(new object[3]{"5", "Query Rejected", @"rejection"});
            randomTables.AddRow(new object[3]{"6", "Rejection", @"rejection"});
            randomTables.AddRow(new object[3]{"7", "Request For Rewrite", SubmissionMaster.CODE_NO_REPLY_YET});
            randomTables.AddRow(new object[3]{"8", "Work Requested", @"rejection"});
        }
        private void CreateReplyFeedbackTable()
        {
            NoteDataXML_Table randomTables = new NoteDataXML_Table(100, 100, new ColumnDetails[3]{new ColumnDetails("id",100),
                new ColumnDetails("name",100), new ColumnDetails("code",100)} );
            randomTables.Caption = SubmissionMaster.TABLE_ReplyFeedback;
            randomTables.GuidForNote = SubmissionMaster.TABLE_ReplyFeedback;
            //	randomTables.Columns =
            Layout.AddNote(randomTables);
            randomTables.CreateParent(Layout);

            randomTables.AddRow(new object[3]{"1", "Form", SubmissionMaster.CODE_FEEDBACK1});
            randomTables.AddRow(new object[3]{"2", "Personal", SubmissionMaster.CODE_FEEDBACK2});
            randomTables.AddRow(new object[3]{"3", "Encouraging",SubmissionMaster.CODE_FEEDBACK3});
            randomTables.AddRow(new object[3]{"4", "Almost",SubmissionMaster.CODE_FEEDBACK4});
        }
        public void GetValuesForTable()
        {
            _SetupForLayoutPanelTests ();
            Form form = new Form();
            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            form.Controls.Add (panel);

            // needed else DataGrid does not initialize
            form.Visible = false;
            form.Show ();
            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout ("mynewpanel", true, null);
            NoteDataXML_Table test = new NoteDataXML_Table (425, 380);
            test.GuidForNote = "thisguid1";
            test.Caption = "note1";

            test.Columns = new ColumnDetails[3] {
                new ColumnDetails ("snakes", 109),
                new ColumnDetails ("fish", 90),
                new ColumnDetails ("goobers", 11111)
            };
            test.AddRow(new object[3] {"1", "value1", "testA"});
            test.AddRow(new object[3] {"2", "value2", "testB"});
            test.AddRow(new object[3] {"3", "value3", "testC"});

            panel.AddNote (test);
            test.CreateParent (panel);
            panel.SaveLayout ();
            List<string> cols = test.GetValuesForColumn (1,"*");
            for (int i = 0; i <3; i++) {
                switch (i)
                {
                case 0: Assert.AreEqual(cols[i], "value1"); break;
                case 1:Assert.AreEqual(cols[i], "value2"); break;
                case 2: Assert.AreEqual(cols[i], "value3"); break;
                }
            }
            cols = test.GetValuesForColumn (2,"*");
            for (int i = 0; i <3; i++) {
                switch (i)
                {
                case 0: Assert.AreEqual(cols[i], "testA"); break;
                case 1:Assert.AreEqual(cols[i], "testB"); break;
                case 2: Assert.AreEqual(cols[i], "testC"); break;
                }
            }
        }