This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*OPERATIONS WITH FOLDERS*/ | |
/*Check if folder exists*/ | |
private Boolean ExistsFolder(string folderPath) | |
{ | |
if (Directory.Exists(folderPath)) return true; | |
else return false; | |
} | |
/*Create folder*/ | |
private void CreateFolder(string folderPath) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*TEMPLATES FOR WORKING WITH DOCUMENTS*/ | |
/*Word*/ | |
private void TemplateUsageWordDocument(string filePath) | |
{ //Open app and document | |
Word.Application WordApp= new Word.Application(); | |
Word.Document wordDoc = WordApp.Documents.Open(filePath, ReadOnly: true, Visible: false); | |
//Include operations here | |
//Close document and app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*FONT CUSTOMIZATION*/ | |
/*Size*/ | |
private Font SetFontSize(int fontSize) | |
{ | |
Font newFont; | |
try | |
{ | |
newFont = new Font(FontFamily.GenericSansSerif, fontSize); | |
} | |
catch (Exception ex) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*PATHS*/ | |
/*Special folders*/ | |
string FolderPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments); //C:\Users\Public\Documents in Windows | |
/*GENERATION OF PATHS*/ | |
/*Paths of documents*/ | |
string FilePath = System.IO.Path.Combine(folderName, fileName); | |
string FilePath = System.IO.Path.Combine(destinationFolderPath, selectedWord + " - " + selectedTypeOfProject + ".pdf"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*OPERATIONS WITH FILES*/ | |
/*Check if file exists*/ | |
private Boolean ExistsFile(string filePath) | |
{ | |
if (File.Exists(filePath)) return true; | |
else return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.Close(); //If called in the main form, it closes the app too. | |
Application.Exit(); | |
System.Diagnostics.Process.GetCurrentProcess().Kill(); // Causes an abnormal process termination and should only used when necessary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge from branch not possible because branches do not share the same history: | |
git checkout [BRANCH] | |
git branch master [BRANCH] -f | |
git checkout master | |
git push origin master -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Versión con Emojis sin fotos*/ | |
<table border="0" cellspacing="0" cellpadding="0"> | |
<tbody> | |
<tr> | |
<td width="189" style="width:auto;border-top:none;border-bottom:none;border-left:none;border-right:1.5pt solid rgb(91,155,213);padding-right: 1rem; vertical-align: middle; min-width: 250px;"> | |
<h3 style="margin:0cm 0cm 0.0001pt; font-family:Arial,sans-serif;color:black">Felipe | |
de Abajo Aragón</h3> | |
<p style="margin:0cm 0cm 0.0001pt;line-height:16.5pt; font-family:Arial,sans-serif;color:black">Informático y formador</p> | |
</td> | |
<td width="378" valign="top" style="auto;padding-left: 1rem; vertical-align: middle; min-width: 200px;"> |
OlderNewer