mirror of https://github.com/xfarrow/MyNotepad.git
update
This commit is contained in:
parent
ddb4305c77
commit
e8de659c5f
Binary file not shown.
|
@ -1,12 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Microsoft.VisualBasic;
|
|
||||||
|
|
||||||
|
|
||||||
using System.Collections;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace MyNotepad
|
namespace MyNotepad
|
||||||
|
@ -59,8 +54,6 @@ namespace MyNotepad
|
||||||
{
|
{
|
||||||
// Nothing happens
|
// Nothing happens
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pulsante "salva con nome"
|
// Pulsante "salva con nome"
|
||||||
|
@ -135,9 +128,8 @@ namespace MyNotepad
|
||||||
// Mostra o nascondi barra di stato
|
// Mostra o nascondi barra di stato
|
||||||
private void checkbox_barra_di_stato_Click(object sender, EventArgs e)
|
private void checkbox_barra_di_stato_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (barra_di_stato.Visible == true) barra_di_stato.Visible = false;
|
if (barra_di_stato.Visible) barra_di_stato.Visible = false;
|
||||||
else barra_di_stato.Visible = true;
|
else barra_di_stato.Visible = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selezionaTuttoToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selezionaTuttoToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -317,15 +309,15 @@ namespace MyNotepad
|
||||||
|
|
||||||
public void vaiARigo(int rigo)
|
public void vaiARigo(int rigo)
|
||||||
{
|
{
|
||||||
int indice = testo_notepad.GetFirstCharIndexFromLine(rigo - 1); //(gli umani contano da 1)
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
int indice = testo_notepad.GetFirstCharIndexFromLine(rigo - 1); //(gli umani contano da 1)
|
||||||
testo_notepad.Select(indice, 0);
|
testo_notepad.Select(indice, 0);
|
||||||
testo_notepad.ScrollToCaret();
|
testo_notepad.ScrollToCaret();
|
||||||
}
|
}
|
||||||
catch (ArgumentOutOfRangeException)
|
catch (ArgumentOutOfRangeException)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Numero di riga maggiore del numero di righe totali");
|
MessageBox.Show("Numero di riga non valido");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,19 +77,19 @@
|
||||||
<Compile Include="MainForm.Designer.cs">
|
<Compile Include="MainForm.Designer.cs">
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Form2.cs">
|
<Compile Include="VaiAllaRigaForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Form2.Designer.cs">
|
<Compile Include="VaiAllaRigaForm.Designer.cs">
|
||||||
<DependentUpon>Form2.cs</DependentUpon>
|
<DependentUpon>VaiAllaRigaForm.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<EmbeddedResource Include="MainForm.resx">
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Form2.resx">
|
<EmbeddedResource Include="VaiAllaRigaForm.resx">
|
||||||
<DependentUpon>Form2.cs</DependentUpon>
|
<DependentUpon>VaiAllaRigaForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
|
|
@ -1,87 +1,87 @@
|
||||||
namespace MyNotepad
|
namespace MyNotepad
|
||||||
{
|
{
|
||||||
partial class Vai_alla_riga
|
partial class Vai_alla_riga
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clean up any resources being used.
|
/// Clean up any resources being used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
{
|
{
|
||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Vai_alla_riga));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Vai_alla_riga));
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
this.vaiAllaRiga_textbox = new System.Windows.Forms.TextBox();
|
this.vaiAllaRiga_textbox = new System.Windows.Forms.TextBox();
|
||||||
this.button1 = new System.Windows.Forms.Button();
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(12, 39);
|
this.label1.Location = new System.Drawing.Point(12, 39);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(64, 13);
|
this.label1.Size = new System.Drawing.Size(64, 13);
|
||||||
this.label1.TabIndex = 0;
|
this.label1.TabIndex = 0;
|
||||||
this.label1.Text = "Vai alla riga:";
|
this.label1.Text = "Vai alla riga:";
|
||||||
//
|
//
|
||||||
// vaiAllaRiga_textbox
|
// vaiAllaRiga_textbox
|
||||||
//
|
//
|
||||||
this.vaiAllaRiga_textbox.Location = new System.Drawing.Point(118, 39);
|
this.vaiAllaRiga_textbox.Location = new System.Drawing.Point(118, 39);
|
||||||
this.vaiAllaRiga_textbox.Name = "vaiAllaRiga_textbox";
|
this.vaiAllaRiga_textbox.Name = "vaiAllaRiga_textbox";
|
||||||
this.vaiAllaRiga_textbox.Size = new System.Drawing.Size(100, 20);
|
this.vaiAllaRiga_textbox.Size = new System.Drawing.Size(100, 20);
|
||||||
this.vaiAllaRiga_textbox.TabIndex = 1;
|
this.vaiAllaRiga_textbox.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// button1
|
// button1
|
||||||
//
|
//
|
||||||
this.button1.Location = new System.Drawing.Point(143, 80);
|
this.button1.Location = new System.Drawing.Point(143, 80);
|
||||||
this.button1.Name = "button1";
|
this.button1.Name = "button1";
|
||||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||||
this.button1.TabIndex = 2;
|
this.button1.TabIndex = 2;
|
||||||
this.button1.Text = "Vai";
|
this.button1.Text = "Vai";
|
||||||
this.button1.UseVisualStyleBackColor = true;
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
//
|
//
|
||||||
// Vai_alla_riga
|
// Vai_alla_riga
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(280, 136);
|
this.ClientSize = new System.Drawing.Size(280, 136);
|
||||||
this.Controls.Add(this.button1);
|
this.Controls.Add(this.button1);
|
||||||
this.Controls.Add(this.vaiAllaRiga_textbox);
|
this.Controls.Add(this.vaiAllaRiga_textbox);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
this.Name = "Vai_alla_riga";
|
this.Name = "Vai_alla_riga";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.Text = "Vai alla riga";
|
this.Text = "Vai alla riga";
|
||||||
this.Load += new System.EventHandler(this.vai_alla_riga_Load);
|
this.Load += new System.EventHandler(this.vai_alla_riga_Load);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Label label1;
|
||||||
private System.Windows.Forms.TextBox vaiAllaRiga_textbox;
|
private System.Windows.Forms.TextBox vaiAllaRiga_textbox;
|
||||||
private System.Windows.Forms.Button button1;
|
private System.Windows.Forms.Button button1;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,44 +1,44 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace MyNotepad
|
namespace MyNotepad
|
||||||
{
|
{
|
||||||
public partial class Vai_alla_riga : Form
|
public partial class Vai_alla_riga : Form
|
||||||
{
|
{
|
||||||
myBloccoNote formChiamante;
|
myBloccoNote formChiamante;
|
||||||
public Vai_alla_riga()
|
public Vai_alla_riga()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
public Vai_alla_riga(myBloccoNote formChiamanteObj)
|
public Vai_alla_riga(myBloccoNote formChiamanteObj)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
formChiamante = formChiamanteObj;
|
formChiamante = formChiamanteObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void vai_alla_riga_Load(object sender, EventArgs e)
|
private void vai_alla_riga_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (String.IsNullOrWhiteSpace(vaiAllaRiga_textbox.Text)) return; //do nothing
|
if (String.IsNullOrWhiteSpace(vaiAllaRiga_textbox.Text)) return; //do nothing
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.Hide();
|
this.Hide();
|
||||||
formChiamante.vaiARigo(int.Parse(vaiAllaRiga_textbox.Text));
|
formChiamante.vaiARigo(int.Parse(vaiAllaRiga_textbox.Text));
|
||||||
}
|
}
|
||||||
catch(System.FormatException)
|
catch(System.FormatException)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Ammessi solo valori numerici");
|
MessageBox.Show("Ammessi solo valori numerici");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,4 @@
|
||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
|
Binary file not shown.
|
@ -1 +1 @@
|
||||||
d638d27bd995b5c7438f24c07719243a6e21f0bf
|
c66af5722762eae07206fd460f79a3fd7b9e6c63
|
||||||
|
|
|
@ -28,3 +28,13 @@ D:\Lavoro\WinForms\MyNotepad\MyNotepad\obj\Debug\MyNotepad.csproj.GenerateResour
|
||||||
D:\Lavoro\WinForms\MyNotepad\MyNotepad\obj\Debug\MyNotepad.csproj.CoreCompileInputs.cache
|
D:\Lavoro\WinForms\MyNotepad\MyNotepad\obj\Debug\MyNotepad.csproj.CoreCompileInputs.cache
|
||||||
D:\Lavoro\WinForms\MyNotepad\MyNotepad\obj\Debug\MyNotepad.exe
|
D:\Lavoro\WinForms\MyNotepad\MyNotepad\obj\Debug\MyNotepad.exe
|
||||||
D:\Lavoro\WinForms\MyNotepad\MyNotepad\obj\Debug\MyNotepad.pdb
|
D:\Lavoro\WinForms\MyNotepad\MyNotepad\obj\Debug\MyNotepad.pdb
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\bin\Debug\MyNotepad.exe
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\bin\Debug\MyNotepad.pdb
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\obj\Debug\MyNotepad.csproj.AssemblyReference.cache
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\obj\Debug\MyNotepad.myBloccoNote.resources
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\obj\Debug\MyNotepad.Vai_alla_riga.resources
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\obj\Debug\MyNotepad.Properties.Resources.resources
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\obj\Debug\MyNotepad.csproj.GenerateResource.cache
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\obj\Debug\MyNotepad.csproj.CoreCompileInputs.cache
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\obj\Debug\MyNotepad.exe
|
||||||
|
D:\Lavoro\WinForms\Nuova cartella\idk\MyNotepad\obj\Debug\MyNotepad.pdb
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue