public static List <Beer> GetBeers(Country co) { //list List <Beer> list = new List <Beer>(); //query string query = "select be_id, be_grd_alcoh,be_presentation,be_level_ferm,be_unitMeas,be_content,beer.br_code,cla_code,be_price,be_image from beer join brand on beer.br_code= brand.br_code join country on country.cn_code = brand.cn_code where country.cn_code=@CON"; //command MySqlCommand command = new MySqlCommand(query); command.Parameters.AddWithValue("@CON", co.Id); //execute query DataTable table = MySqlConnection.ExecuteQuery(command); //iterate rows foreach (DataRow row in table.Rows) { //read fields int id = (int)row["be_id"]; double gradoalcohol = (double)row["be_grd_alcoh"]; PresentationType presentation = (PresentationType)(int)row["be_presentation"]; Fermentation fermentation = (Fermentation)(int)row["be_level_ferm"]; MeasurementUnit measurementUnit = (MeasurementUnit)row["be_unitMeas"]; double content = (double)row["be_content"]; Brand brand = new Brand((string)row["br_code"]); Clasification clasification = new Clasification((string)row["cla_code"]); double price = (double)row["be_price"]; string image = (string)row["be_image"]; //add country to list list.Add(new Beer(id, gradoalcohol, presentation, fermentation, measurementUnit, content, brand, clasification, price, image)); } //return list return(list); }
/// <summary> /// Creates an object with data from the databas /// </summary> /// <param name="id">Country Id</param> public Beer(int id) { //query string query = "select be_id, be_grd_alcoh,be_presentation, be_level_ferm,be_unitMeas,be_content,br_code,cla_code,be_price from beer where be_id = @ID"; //command MySqlCommand command = new MySqlCommand(query); //parameters command.Parameters.AddWithValue("@ID", id); //execute query DataTable table = MySqlConnection.ExecuteQuery(command); //check if rows were found if (table.Rows.Count > 0) { //read first and only row DataRow row = table.Rows[0]; //read data _id = (int)row["be_id"]; _gradoAlcohol = (double)row["be_grd_alcoh"]; _presentation = (PresentationType)(int)row["be_presentation"]; _fermentation = (Fermentation)row["be_nicel_ferm"]; _measurementUnit = (MeasurementUnit)row["be_unitMeas"]; _content = (double)row["be_content"]; _brand = (Brand)row["br_code"]; _clasification = (Clasification)row["cla_code"]; _price = (double)row["be_price"]; } }
private void miAddNavigationInterface_Click(object sender, EventArgs e) { PresentationType c = (PresentationType)tvManifest.SelectedNode.Tag; HideLMSUIType n = new HideLMSUIType(); c.navigationInterface.Add(n); Forms.PropertyEditor.Show(n); tvManifest.SelectedNode.Expand(); }
public void Locator_ViewBaseLocatorControl_IsNotNull() { //Arrange var typeName = "Boolean"; PresentationType presentation = PresentationType.Control; //Act var component = _fixture.RenderableContent.ViewBaseLocatorBuilder(typeName, presentation); //Assert Assert.NotNull(component); }
public void Locator_ViewBaseLocatorGenericDisplay_IsNotNull() { //Arrange Type genericType = typeof(decimal); PresentationType presentation = PresentationType.Display; //Act var component = _fixture.RenderableContent.ViewGenericBaseLocatorBuilder(presentation, genericType, false); //Assert Assert.NotNull(component); }
public ItemEditorInfo(PresentationType permittedPresentationTypes, ushort itemId, bool hasVariants, ItemVariant[]?fabricVariants, ItemVariant[]?bodyVariants, ushort maxStackSize, ItemKind kind) { PermittedPresentationTypes = permittedPresentationTypes; ItemId = itemId; HasVariants = hasVariants; FabricVariants = fabricVariants; BodyVariants = bodyVariants; MaxStackSize = maxStackSize; Kind = kind; }
public void Locator_ViewBaseLocatorGenericEnumControl_IsNotNull() { //Arrange Type genericType = typeof(EnumType); PresentationType presentation = PresentationType.Control; //Act var component = _fixture.RenderableContent.ViewGenericBaseLocatorBuilder(presentation, genericType, true); //Assert Assert.NotNull(component); }
public void Locator_ViewBaseLocatorDisplay_IsNotNull() { //Arrange var typeName = "DateTime"; PresentationType presentation = PresentationType.Display; //Act var component = _fixture.RenderableContent.ViewBaseLocatorBuilder(typeName, presentation); //Assert Assert.NotNull(component); }
public Beer() { _id = 0; _gradoAlcohol = 0; _presentation = new PresentationType(); _fermentation = new Fermentation(); _measurementUnit = new MeasurementUnit(); _content = 0; _brand = new Brand(); _clasification = new Clasification(); _price = 0; }
public Task(Game _game, MediaType _mediaType, ManagerStatus _managerStatus, ProgressStatus _progressStatus, PresentationType _presentationType, String _mediaName, int _operatorID) : base() { game = _game; mediaType = _mediaType; managerStatus = _managerStatus; progressStatus = _progressStatus; presentationType = _presentationType; mediaName = _mediaName; operatorID = _operatorID; AvateeringXNA.AllTasks.Add(this); }
/// <summary> /// Creates an object with data from the arguments /// </summary> /// <param name="id"></param> /// <param name="name"></param> public Beer(int id, double gradoalcohol, PresentationType presentation, Fermentation fermentation, MeasurementUnit measurementUnit, double content, Brand brand, Clasification clasification, double price, string image) { _id = id; _gradoAlcohol = gradoalcohol; _presentation = presentation; _fermentation = fermentation; _measurementUnit = measurementUnit; _content = content; _brand = brand; _clasification = clasification; _price = price; _image = image; }
internal IRenderableComponent ViewGenericBaseLocatorBuilder(PresentationType presentationType, Type typeArg, bool isEnum) { string buildedComponentName; if (isEnum) { buildedComponentName = $"EnumeratorContainer{presentationType}View`1"; } else { buildedComponentName = $"ComponentBaseType{presentationType}View`1"; } return(ComponentService.GetGenericComponent(buildedComponentName, typeArg)); }
/// <summary> /// Initializes a new instance of the NavigationOptions class. /// </summary> /// <param name="parameter">A parameter to pass to the view model being navigated to.</param> /// <param name="presentationType">Identifies how the screen should be presented to the user.</param> /// <param name="animateTransitionToNextView">True if the transition to the next screen should be animated, the default is true.</param> /// <param name="completionHandler">An optional callback that will be invoked upon the completion of the navigation transition.</param> public NavigationOptions( object parameter = null, PresentationType presentationType = PresentationType.Standard, bool animateTransitionToNextView = true, Action completionHandler = null) { if (presentationType == PresentationType.Invalid) { throw new ArgumentException("PresentationType cannot be 'Invalid'."); } this.Parameter = parameter; this.PresentationType = presentationType; this.AnimateTransitionToNextView = animateTransitionToNextView; this.completionHandler = completionHandler; }
public CMLChartYAsix(string label, bool fill, Color backgroundColor, Color borderColor, double[] values, int id, PresentationType type, Location location, bool zoroValueMark) { Label = label; Fill = fill; BackgroundColor = backgroundColor; BorderColor = borderColor; Id = id; Type = type; Location = location; ZoroValueMark = zoroValueMark; Values = values; if (values != null) { MinValue = values.Min(); MaxValue = values.Max(); } }
/// <summary> /// Crea un objeto cerveza a partir de sus registro de la base datos, filtrado /// por su ID. /// </summary> /// <param name="id">Beer Id</param> public Beer(int id) { // Cadena de Consulta string query = "select be_id, be_grd_alcoh,be_presentation, be_level_ferm," + "be_unitMeas,be_content,br_code,cla_code,be_price, be_image, be_level_ferm" + " from beer where be_id = @ID"; // Comando MySQL MySqlCommand command = new MySqlCommand(query); // Parametros Preparados command.Parameters.AddWithValue("@ID", id); // Ejecutamos Consulta MySqlConnection connection = new MySqlConnection(); connection.ConnectionSource = new AppSettings(); // Guardamos la consulta en una tabla DataTable table = connection.ExecuteQuery(command); // Mostramos si la tabla tiene filas (no esta vacia) if (table.Rows.Count > 0) { // Guardamos la primera fila que guarda la informacion // de este objeto DataRow row = table.Rows[0]; // Asignamos los datos de la fila a propiedades del objeto // a crear _id = (int)row["be_id"]; _gradoAlcohol = (double)row["be_grd_alcoh"]; _presentation = (PresentationType)(int)row["be_presentation"]; _fermentation = (Fermentation)(int)row["be_level_ferm"]; _measurementUnit = (MeasurementUnit)row["be_unitMeas"]; _content = (double)row["be_content"]; _image = (byte[])row["be_image"]; _brand = (new Brand((string)row["br_code"])); _clasification = (new Clasification((string)row["cla_code"])); _price = (double)row["be_price"]; } }
/// <summary> /// Obtener Cervezas /// </summary> /// <returns>Lista de todos los objetos cervezas que hay en la base de datos</returns> public static List <Beer> GetAll() { // Lista para guardar las cervezas de la base de datos List <Beer> list = new List <Beer>(); // Consulta string query = "select be_id, be_grd_alcoh,be_presentation,be_level_ferm,be_unitMeas,be_content,br_code,cla_code,be_price,be_image from beer"; // Comando MySqlCommand command = new MySqlCommand(query); // Ejecutar Consulta MySqlConnection connection = new MySqlConnection(); connection.ConnectionSource = new AppSettings(); // Tabla DataTable table = connection.ExecuteQuery(command); // Iteramos filas de la consulta para asignar valores foreach (DataRow row in table.Rows) { // Asignamos valores int id = (int)row["be_id"]; double gradoalcohol = (double)row["be_grd_alcoh"]; PresentationType presentation = (PresentationType)(int)row["be_presentation"]; Fermentation fermentation = (Fermentation)(int)row["be_level_ferm"]; MeasurementUnit measurementUnit = (MeasurementUnit)row["be_unitMeas"]; double content = (double)row["be_content"]; Brand brand = new Brand((string)row["br_code"]); Clasification clasification = new Clasification((string)row["cla_code"]); double price = (double)row["be_price"]; byte[] image = (byte[])row["be_image"]; // Agregar Cerveza a la lista list.Add(new Beer(id, gradoalcohol, presentation, fermentation, measurementUnit, content, brand, clasification, price, image)); } // Regresamos lista de cerveza return(list); }
public void RemoveChild(IManifestNode child) { switch (child.GetType().Name) { case "ItemType": { var item = child as ItemType; if (SubItems.Contains(item)) { SubItems.Remove(item); return; } break; } case "SequencingType": { if (Sequencing != null) { Sequencing = null; return; } break; } case "PresentationType": { if (presentation != null) { presentation = null; return; } break; } } throw new FireFlyException("Manifest item '{0}' not found", child); }
public static List <Beer> GetBeers(Brand br) { //list List <Beer> list = new List <Beer>(); //query string query = "select be_id, be_grd_alcoh,be_presentation,be_level_ferm,be_unitMeas,be_content,br_code,cla_code,be_price from beer where br_code=@BRD"; //command MySqlCommand command = new MySqlCommand(query); command.Parameters.AddWithValue("@BRD", br.Id); //execute query MySqlConnection connection = new MySqlConnection(); connection.ConnectionSource = new AppSettings(); DataTable table = connection.ExecuteQuery(command); //iterate rows foreach (DataRow row in table.Rows) { //read fields int id = (int)row["be_id"]; double gradoalcohol = (double)row["be_grd_alcoh"]; PresentationType presentation = (PresentationType)(int)row["be_presentation"]; Fermentation fermentation = (Fermentation)(int)row["be_level_ferm"]; MeasurementUnit measurementUnit = (MeasurementUnit)row["be_unitMeas"]; double content = (double)row["be_content"]; Brand brand = new Brand((string)row["br_code"]); Clasification clasification = new Clasification((string)row["cla_code"]); double price = (double)row["be_price"]; byte[] image = (byte[])row["be_image"]; //add beer to list list.Add(new Beer(id, gradoalcohol, presentation, fermentation, measurementUnit, content, brand, clasification, price, image)); } //return list return(list); }
/// <summary> /// Call this ctor if you want to use a <see cref="PresentationType"/> different from default <see cref="PresentationType.Once"/>. /// </summary> /// <param name="presentationType">Presentation type used for all manual tests (if not overruled by test itself).</param> protected ManualTestBase(PresentationType presentationType = PresentationType.Once) { _presentationType = presentationType; _presenter = UserPresenterAttribute.CreatePresenter(GetType()); }
public int UpdateDBTables(String presentationFile, PresentationType pres_Type, string Title, String ukeyword, string keywords, int GalleryFolderNid) { String sSql = String.Empty; string Pres_FileName = string.Empty; int PresNid = 0; object oPresNid = null; try { // Update DB only when Presentaion file exist if (File.Exists(presentationFile)) { // Save FileName without extention in Database // file name may be Côte d’Ivoire - AIDS deaths Total Number - Table.xls. So do not remove quotes using // DICommon remove Quotes as it replace "’", "''" // Use Local remove quote that will only replace "'", "''" Pres_FileName = RemoveQuotes(Path.GetFileNameWithoutExtension(presentationFile)); // Clear PreSearch Table this.ClearPreSearchTable(); #region " -- File already in Database.Delete it -- " ////////////// Ckeck File already in DataBase try { // If gallery folder do not exist add it if (GalleryFolderNid > 0) { // Check for Presentaion sSql = this.GetPresNIdQuery(Pres_FileName, GalleryFolderNid, pres_Type.ToString()); oPresNid = DBConnection.ExecuteScalarSqlQuery(sSql); // If presentation was found in gallery db then delete it. if (oPresNid != null) { this.DeletePresFromGallery(Convert.ToInt32(oPresNid)); } } } catch (Exception ex) { } #endregion //// If gallery folder do not exist add it //if (GalleryFolderNid==0) //{ // // Add new Gallery in Gallery Mst // GalleryFolderNid = this.AddNewGalleryToGallMst(Path.GetDirectoryName(presentationFile)); //} // Insert into Master Table sSql = "Insert into " + DBTable.UT_PresMst + " ( " + PresentationMaster.Pres_FileName + "," + PresentationMaster.Pres_Type + "," + PresentationMaster.GalleryId + ") values ('" + Pres_FileName + "','" + pres_Type + "','" + GalleryFolderNid.ToString() + "')"; //Executing Query DBConnection.ExecuteNonQuery(sSql); try { // Get New PresNid sSql = "Select max(" + PresentationMaster.Pres_NId + ") from " + DBTable.UT_PresMst; PresNid = (int)DBConnection.ExecuteScalarSqlQuery(sSql); // Insert new Record in Pres Table sSql = " Insert into " + DBTable.UT_PresKeyword + " (" + PresentationMaster.Pres_NId + "," + PresentationKeywords.Pres_Titles + "," + PresentationMaster.Pres_Type + "," + PresentationKeywords.Pres_UKeywords + "," + PresentationKeywords.Pres_Keywords + ") values (" + PresNid + ",'" + DICommon.RemoveQuotes(Title) + "','" + pres_Type + "','" + DICommon.EscapeWildcardChar(DICommon.RemoveQuotes(ukeyword)) + "','" + DICommon.EscapeWildcardChar(DICommon.RemoveQuotes(keywords)) + "') "; DBConnection.ExecuteNonQuery(sSql); } catch (Exception ex) { // Delete Entry From PresMaster for this NID and Set Success to False //Successs = false; sSql = "DELETE * from UT_PresMst where " + PresentationMaster.Pres_NId + " = " + PresNid; DBConnection.ExecuteNonQuery(sSql); PresNid = 0; } } } catch (Exception EX) { //Successs = false; PresNid = 0; } return PresNid; }
/// <summary> /// Get Title from Presentaion /// </summary> /// <param name="presentaionType"></param> /// <param name="presFileName"></param> /// <returns></returns> private String GetPresentationTitle(PresentationType presentaionType,String presFileName, DIExcel dIExl) { string RetVal = string.Empty; int Map_Suffix_Lenght = 10; //" - Map.xls" int Graph_Suffix_Lenght = 12; //" - Graph.xls" try { switch (presentaionType) { //Map . // In case of Map RetVal Column will be name of the file minus " - Map.xls" case PresentationType.M: RetVal = presFileName.Substring(0, presFileName.Length - Map_Suffix_Lenght); break; case PresentationType.G: //Get FileName for RetVal Column. In case of table or Graph this will be name of the file minus " - Table.xls" or - Graph.xls so lenght is 1; RetVal = presFileName.Substring(0, presFileName.Length - Graph_Suffix_Lenght); break; case PresentationType.T: //Get RetVal and Subtitle Column Value when Presentation is not Map //Get FileName for RetVal Column. In case of table or Graph this will be name of the file minus " - Table.xls" or - Graph.xls so lenght is 1; RetVal = presFileName.Substring(0, presFileName.Length - Graph_Suffix_Lenght); // Value in First sheet A1 and A2 Column respectively will added in RetVal // Getting Value of Main RetVal from first cell and adding this to RetVal if (dIExl.GetCellValue(0, CELL_A1).Length > 0) { //Check RetVal already contain this word or not, If Not then add this to RetVal if (RetVal.Contains(dIExl.GetCellValue(0, CELL_A1)) == false) { //Check column value contain RetVal filename or not if ((dIExl.GetCellValue(0, CELL_A1)).Contains(RetVal) == false) // Add column value to RetVal { RetVal += " " + dIExl.GetCellValue(0, CELL_A1); } else // Replace Existing Value of RetVal with this column value { RetVal = dIExl.GetCellValue(0, CELL_A1); } } } // Getting SubTitle (If Available) if (dIExl.GetCellValue(0, CELL_A2).Length > 0) { // Adding SubTitle in RetVal string with a blank space RetVal += " " + dIExl.GetCellValue(0, CELL_A2); } break; default: break; } } catch (Exception ex) { } return RetVal; }
/// <summary> /// Use Grouped <see cref="PresentationType"/>. /// </summary> /// <returns>this</returns> public ManualTestBuilder AsGroupedUserInteraction() { PresentationType = PresentationType.Grouped; return(this); }
/// <summary> /// Use Once <see cref="PresentationType"/>. /// </summary> /// <returns>this</returns> public ManualTestBuilder AsOneStepUserInteraction() { PresentationType = PresentationType.Once; return(this); }
/// <summary> /// Extarct Serialized Xml text from Selection worksheet of presentation /// </summary> /// <param name="PresentationPath">Presentation file path</param> /// <param name="presentationType">Presentation Type</param> /// <param name="showExcel">True, if hosting application use Excel, otherwise false</param> /// <returns></returns>Excel public static string GetSerializedPresentationText(string PresentationPath, PresentationType presentationType, bool showExcel) { string RetVal = string.Empty; object SerializedText = null; // Open presentation using excel wrapper class (Spreadsheet gear) DIExcel DIExcel = new DIExcel(PresentationPath); // Identify Selection worksheet int SelectionSheetIndex = DIExcel.GetSheetIndex(SELECTION_WORKSHEET_NAME); // Check for existence of selection tab if (SelectionSheetIndex != -1) { // In case of graph chart sheet is not conidered as sheet so reduce index by 1 if (showExcel && presentationType == Presentation.PresentationType.Graph) { SelectionSheetIndex -= 1; } //Assunmption - Xml serialized text will occupy at the most 20 cells. //May convert this logic based on max range used for (int i = 0; i < 500; i++) { SerializedText = DIExcel.GetCellValue(SelectionSheetIndex, i, 0, i, 0); if (!string.IsNullOrEmpty(SerializedText.ToString())) { RetVal += SerializedText.ToString(); } else { break; } } } DIExcel.Close(); return RetVal; }
/// <summary> /// Insert Xml serialized presentation text in a worksheet and append it to presenatation workbook /// </summary> /// <param name="Presentation">Preesnataion Class Instance TablePresentation / Map</param> /// <param name="PresentationPath">Full path of presentation file</param> /// <param name="presentationType">PresentationType enum value. Table / Graph / Map</param> public static void InsertSelectionSheet(object Presentation, string PresentationPath, PresentationType presentationType) { string SerializedText = string.Empty; DIExcel DIExcel = new DIExcel(PresentationPath); DIExcel.InsertWorkSheet(SELECTION_WORKSHEET_NAME); int SelectionWorksheetIndex = DIExcel.GetSheetIndex(SELECTION_WORKSHEET_NAME); //-- Upadte the user selection GIds before inserting them in selections sheet //-- Retrieve serialized text switch (presentationType) { case PresentationType.Table: SerializedText = ((TablePresentation)Presentation).GetSerializedText(true); break; case PresentationType.Graph: if (((GraphPresentation)Presentation).TablePresentation.UserPreference.General.ShowExcel) { SelectionWorksheetIndex -= 1; } SerializedText = ((GraphPresentation)Presentation).GetSerializedText(); break; case PresentationType.Map: SerializedText = ((Map.Map)Presentation).GetSerializedText(true); break; } //Insert Serialized Text into worksheet // Single excel cell can hold at the most 32000 characters // If length of serialized text is greater than 32000 char then break them and place them in multiple cells //TODO Use this logic for Table and graph also and update GetSerializedPresentationText() function accordingly if (SerializedText.Length > 32000) { int i = 0; //Calculating and Iterating number of 32000 Characters slots in Text //-- Set First column format type as "TEXT" DIExcel.SetColumnFormatType("A:A", SelectionWorksheetIndex, SpreadsheetGear.NumberFormatType.Text); while (i < Math.Floor((double)(SerializedText.Length / 32000))) { //'Adding next 32000 Charcters each time at i row. if (i == 160) { } DIExcel.SetCellValue(SelectionWorksheetIndex, i, 0, SerializedText.Substring(32000 * i, 32000)); i += 1; } DIExcel.SetCellValue(SelectionWorksheetIndex, i, 0, SerializedText.Substring(32000 * i)); } else { DIExcel.SetCellValue(SelectionWorksheetIndex, 0, 0, SerializedText); } //-- Hide the selection sheet. DIExcel.HideWorksheet(SELECTION_WORKSHEET_NAME); DIExcel.ActiveSheetIndex = 0; DIExcel.Save(); DIExcel.Close(); }
internal IRenderableComponent ViewBaseLocatorBuilder(string primitiveTypeName, PresentationType presentationType) { var buildedComponentName = $"Component{primitiveTypeName}{presentationType}View"; return(ComponentService.GetComponent(buildedComponentName)); }
public object UpdatePresentation(object view, IConvertationObject data, PresentationType type) { switch (type) { case PresentationType.Short: return UpdateShortPresentation(view, data); case PresentationType.Full: return UpdateFullPresentation(view, data); case PresentationType.ShortString: return ShortString(data); case PresentationType.FullString: return FullString(data); default: throw new ArgumentOutOfRangeException("type"); } }
public object GetPresentation(IConvertationObject dataObject, PresentationType type) { switch (type) { case PresentationType.Short: return ShortPresentation(dataObject); case PresentationType.Full: return FullPresentation(dataObject); case PresentationType.ShortString: return ShortString(dataObject); case PresentationType.FullString: return FullString(dataObject); default: throw new ArgumentOutOfRangeException("type"); } }
public AsyncMvcRouteHandler(PresentationType pType) { PresentationType = pType; }
/// <summary> /// Use SingleStep <see cref="PresentationType"/>. /// </summary> /// <returns>this</returns> public ManualTestBuilder AsSingleStepUserInteraction() { PresentationType = PresentationType.SingleStep; return(this); }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="presenter">The user presenter to be used for feedback.</param> /// <param name="presentationType">The presentation type to be used.</param> public ManualTestBuilder(IUserPresenter presenter, PresentationType presentationType = PresentationType.Once) { _presenter = presenter; PresentationType = presentationType; }
/// <summary> /// Save the presentation in the sidebar /// </summary> /// <param name="sidebarFolderPath"></param> /// <param name="presentationPath"></param> /// <param name="presentationType"></param> public static void SaveToSidebar(string sidebarFolderPath, string presentationPath, string presentationFileName, PresentationType presentationType) { string FolderName = string.Empty; int EmptyFolderIndex = -1; //-- Identify the folder name to be used. switch (presentationType) { case PresentationType.Table: FolderName = TABLE_FOLDER; break; case PresentationType.Graph: FolderName = GRAPH_FOLDER; break; case PresentationType.Map: FolderName = MAP_FOLDER; break; case PresentationType.None: break; default: break; } //-- check for Empty folder EmptyFolderIndex = CheckForEmptyFolder(FolderName, sidebarFolderPath); if (EmptyFolderIndex == -1) { //-- Delete the fifth folder of the presentation, if none of them are empty. Directory.Delete(Path.Combine(sidebarFolderPath, FolderName + " 5"), true); //-- Rename the folders RenameFolder(FolderName, sidebarFolderPath); //-- Copy the presentation CopyPresentation(FolderName, 1, sidebarFolderPath, presentationPath, presentationFileName); } else { //-- Copy the presentation CopyPresentation(FolderName, EmptyFolderIndex, sidebarFolderPath, presentationPath, presentationFileName); } }