/// <summary> /// The operation will (on the client side) call the StorePuzzlerRun() /// web service to store all of the current execution statics. /// </summary> /// <param name="solution">The Solution reference containing the dictionary, /// puzzle, and words found data to store in the data base.</param> /// <param name="statistics">The ManageStats reference containing the /// dictionary, puzzle, and solution execution times.</param> /// <returns>The success or failure message of the server side db insert operation.</returns> public string Call_StorePuzzlerRun( ref Solution solution, ref ManageStats statistics ) { SetDataForStorage( solution.Dictionary, solution.Puzzle, solution.WordsFound, ref solution ); dictionaryTime = statistics.DictionaryTime.Ticks; puzzleTime = statistics.PuzzleTime.Ticks; solutionTime = statistics.SolutionTime.Ticks; return dbinterface.StorePuzzlerRun( dictionaryXML, puzzleXML, wordsFoundXML, dictionaryTime, puzzleTime, solutionTime ); }
/// <summary> /// Main load page event handler /// </summary> /// <param name="sender">sender idenitifier</param> /// <param name="e">Event arguements</param> public void Page_Load(object sender, System.EventArgs e) { list_counter = 0; writer = CreateHtmlTextWriter( Response.Output ); if( !Page.IsPostBack ) { managestats = new ManageStats(); statistics = new ArrayList(0); LoadStatistics(); WordsFound_VS_DictionarySize.Text = wordsFoundResult; DictionaryListBox.Items.Clear(); InitializeDictionaryListBox( managestats.solution.Dictionary, ' ' ); Init_DirectionDropDownList(); xbound = managestats.puzzleCreator.GetBoundaries()[0]; ybound = managestats.puzzleCreator.GetBoundaries()[1]; zbound = managestats.puzzleCreator.GetBoundaries()[2]; WordsFound_VS_DictionarySize.Text = "The dictionary size is " + managestats.dictionaryCreator.DictionarySize.ToString() + " words."; PuzzleSize.Text = "The puzzle is " + xbound + " x " + ybound + " x " + zbound + " dimentional lengths."; Cross_sectionDropDownList.Items.Add( new ListItem( "Please select cross section parallel to direction." )); Select_Layer( 0, -1 ); // Start the default layer selection view Help.from = "./Main.aspx"; DataBind(); } else { PuzzleView.Controls.Clear(); Select_Layer( pre_direction, pre_cross_section ); StatisticsView.Controls.Clear(); foreach( string str in statistics ) { row = new HtmlTableRow(); cell = new HtmlTableCell(); cell.Controls.Add( new LiteralControl( str ) ); row.Controls.Add( cell ); StatisticsView.Controls.Add( row ); } StatisticsView.RenderControl( writer ); } }