Skip to content

Commit

Permalink
1.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo.gvs authored and gustavo.gvs committed Sep 5, 2023
1 parent 18516fb commit 447cc3e
Show file tree
Hide file tree
Showing 7 changed files with 428 additions and 252 deletions.
2 changes: 1 addition & 1 deletion PeriTAB/PeriTAB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PublishUrl>C:\Users\gustavo.gvs.PF\OneDrive - Polícia Federal\PCF Gustavo\Visual Studio\PeriTAB\publicacoes\</PublishUrl>
<InstallUrl />
<TargetCulture>pt-BR</TargetCulture>
<ApplicationVersion>1.1.5.0</ApplicationVersion>
<ApplicationVersion>1.1.6.0</ApplicationVersion>
<AutoIncrementApplicationRevision>false</AutoIncrementApplicationRevision>
<UpdateEnabled>true</UpdateEnabled>
<UpdateInterval>0</UpdateInterval>
Expand Down
2 changes: 1 addition & 1 deletion PeriTAB/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
// É possível especificar todos os valores ou usar como padrão os Números da Versão e da Revisão
// utilizando o "*" como mostrado abaixo:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.5.*")]
[assembly: AssemblyVersion("1.1.6.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

437 changes: 236 additions & 201 deletions PeriTAB/Ribbon1.Designer.cs

Large diffs are not rendered by default.

162 changes: 159 additions & 3 deletions PeriTAB/Ribbon1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private void button_cola_imagem_Click(object sender, RibbonControlEventArgs e)
{
object obj = System.Windows.Clipboard.GetData("FileDrop");
string[] pathfile = (string[])obj;

//for (int i = 0; i <= pathfile.Length - 1; i++) MessageBox.Show(pathfile[i]);
string[] pathfile2 = { "" };
int n = 0;
for (int i = 0; i <= pathfile.Length - 1; i++)
Expand All @@ -194,11 +194,15 @@ private void button_cola_imagem_Click(object sender, RibbonControlEventArgs e)

if (pathfile2[0] != "")
{
//for (int i = 0; i <= pathfile2.Length - 1; i++) MessageBox.Show(pathfile2[i]);

if (dropDown_ordem.SelectedItem.Label == "Alfabética") { Array.Sort(pathfile2); } //Ordem alfabética

//for (int i = 0; i <= pathfile2.Length - 1; i++) MessageBox.Show(pathfile2[i]);

for (int i = 0; i <= pathfile2.Length - 1; i++)
{
Globals.ThisAddIn.Application.ScreenUpdating = false;
//Globals.ThisAddIn.Application.ScreenUpdating = false;

bool link = false; bool save = true;
if (Globals.Ribbons.Ribbon1.checkBox_referencia.Checked == true) { link = true; save = false; }
Expand Down Expand Up @@ -238,6 +242,7 @@ private void button_cola_imagem_Click(object sender, RibbonControlEventArgs e)
break;
}
}

Globals.ThisAddIn.Application.ScreenUpdating = true;
}
}
Expand Down Expand Up @@ -597,7 +602,52 @@ private string get_text(string texto, string inicio = null, string fim = null )
catch { return null; }
}

private void button_destaca_imagem_Click(object sender, RibbonControlEventArgs e)
private void button_remove_formatacao_Click(object sender, RibbonControlEventArgs e)
{
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
{
if (ishape.Type == WdInlineShapeType.wdInlineShapeLinkedPicture | ishape.Type == WdInlineShapeType.wdInlineShapePicture)
{
//ishape.Line.Visible = MsoTriState.msoFalse;
ishape.Reset();
ishape.AlternativeText = "";
}
}
Globals.ThisAddIn.Application.ScreenUpdating = true;
}

private void button_insere_borda_preta_Click(object sender, RibbonControlEventArgs e)
{
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
{
if (ishape.Type == WdInlineShapeType.wdInlineShapeLinkedPicture | ishape.Type == WdInlineShapeType.wdInlineShapePicture)
{
ishape.Line.Visible = MsoTriState.msoTrue;
ishape.Line.Weight = (float)0.5;
ishape.Line.ForeColor.RGB = Color.FromArgb(0, 0, 0).ToArgb();
}
}
Globals.ThisAddIn.Application.ScreenUpdating = true;
}

private void button_insere_borda_vermelha_Click(object sender, RibbonControlEventArgs e)
{
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
{
if (ishape.Type == WdInlineShapeType.wdInlineShapeLinkedPicture | ishape.Type == WdInlineShapeType.wdInlineShapePicture)
{
ishape.Line.Visible = MsoTriState.msoTrue;
ishape.Line.Weight = 2;
ishape.Line.ForeColor.RGB = Color.FromArgb(0, 0, 255).ToArgb();
}
}
Globals.ThisAddIn.Application.ScreenUpdating = true;
}

private void button_insere_borda_amarela_Click(object sender, RibbonControlEventArgs e)
{
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
Expand Down Expand Up @@ -1423,6 +1473,112 @@ private void button_confere_formatacao_Click(object sender, RibbonControlEventAr

}

private void dropDown1_SelectionChanged(object sender, RibbonControlEventArgs e)
{

}

private void dropDown1_ButtonClick(object sender, RibbonControlEventArgs e)
{

}

private void comboBox1_TextChanged(object sender, RibbonControlEventArgs e)
{

}

private void comboBox_insere_TextChanged(object sender, RibbonControlEventArgs e)
{
switch (comboBox_insere.Text)
{
case "Borda preta 0,5 pt":
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
{
if (ishape.Type == WdInlineShapeType.wdInlineShapeLinkedPicture | ishape.Type == WdInlineShapeType.wdInlineShapePicture)
{
ishape.Line.Visible = MsoTriState.msoTrue;
ishape.Line.Weight = (float)0.5;
ishape.Line.ForeColor.RGB = Color.FromArgb(0, 0, 0).ToArgb();
}
}
Globals.ThisAddIn.Application.ScreenUpdating = true;
break;
case "Borda vermelha 2 pt":
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
{
if (ishape.Type == WdInlineShapeType.wdInlineShapeLinkedPicture | ishape.Type == WdInlineShapeType.wdInlineShapePicture)
{
ishape.Line.Visible = MsoTriState.msoTrue;
ishape.Line.Weight = 2;
ishape.Line.ForeColor.RGB = Color.FromArgb(0, 0, 255).ToArgb();
}
}
Globals.ThisAddIn.Application.ScreenUpdating = true;
break;
case "Borda amarela 3 pt":
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
{
if (ishape.Type == WdInlineShapeType.wdInlineShapeLinkedPicture | ishape.Type == WdInlineShapeType.wdInlineShapePicture)
{
ishape.Line.Visible = MsoTriState.msoTrue;
ishape.Line.Weight = 3;
ishape.Line.ForeColor.RGB = Color.FromArgb(0, 255, 255).ToArgb();
}
}
Globals.ThisAddIn.Application.ScreenUpdating = true;
break;
}
}

private void comboBox_remove_TextChanged(object sender, RibbonControlEventArgs e)
{
switch (comboBox_remove.Text)
{
case "Borda":
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
{
if (ishape.Type == WdInlineShapeType.wdInlineShapeLinkedPicture | ishape.Type == WdInlineShapeType.wdInlineShapePicture)
{
ishape.Line.Visible = MsoTriState.msoFalse;
}
}
Globals.ThisAddIn.Application.ScreenUpdating = true;
break;
case "Formatação":
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
{
if (ishape.Type == WdInlineShapeType.wdInlineShapeLinkedPicture | ishape.Type == WdInlineShapeType.wdInlineShapePicture)
{
ishape.Reset();
}
}
Globals.ThisAddIn.Application.ScreenUpdating = true;
break;
case "Texto Alt":
Globals.ThisAddIn.Application.ScreenUpdating = false;
foreach (InlineShape ishape in Globals.ThisAddIn.Application.Selection.InlineShapes)
{
if (ishape.Type == WdInlineShapeType.wdInlineShapeLinkedPicture | ishape.Type == WdInlineShapeType.wdInlineShapePicture)
{
ishape.AlternativeText = "";
}
}
Globals.ThisAddIn.Application.ScreenUpdating = true;
break;
}
}








//private string get_text2(string texto, string inicio = null, string fim = null) //Retona a primeira ocorrência de string entre os strings 'inicio' e 'fim' no string 'texto'.
Expand Down
Loading

0 comments on commit 447cc3e

Please sign in to comment.