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.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.VisualBasic;
|
||||
|
||||
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
|
||||
namespace MyNotepad
|
||||
|
@ -59,8 +54,6 @@ namespace MyNotepad
|
|||
{
|
||||
// Nothing happens
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Pulsante "salva con nome"
|
||||
|
@ -135,9 +128,8 @@ namespace MyNotepad
|
|||
// Mostra o nascondi barra di stato
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
private void selezionaTuttoToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -317,15 +309,15 @@ namespace MyNotepad
|
|||
|
||||
public void vaiARigo(int rigo)
|
||||
{
|
||||
int indice = testo_notepad.GetFirstCharIndexFromLine(rigo - 1); //(gli umani contano da 1)
|
||||
try
|
||||
{
|
||||
int indice = testo_notepad.GetFirstCharIndexFromLine(rigo - 1); //(gli umani contano da 1)
|
||||
testo_notepad.Select(indice, 0);
|
||||
testo_notepad.ScrollToCaret();
|
||||
}
|
||||
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">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Form2.cs">
|
||||
<Compile Include="VaiAllaRigaForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form2.Designer.cs">
|
||||
<DependentUpon>Form2.cs</DependentUpon>
|
||||
<Compile Include="VaiAllaRigaForm.Designer.cs">
|
||||
<DependentUpon>VaiAllaRigaForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form2.resx">
|
||||
<DependentUpon>Form2.cs</DependentUpon>
|
||||
<EmbeddedResource Include="VaiAllaRigaForm.resx">
|
||||
<DependentUpon>VaiAllaRigaForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
|
|
|
@ -1,87 +1,87 @@
|
|||
namespace MyNotepad
|
||||
{
|
||||
partial class Vai_alla_riga
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Vai_alla_riga));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.vaiAllaRiga_textbox = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 39);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(64, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Vai alla riga:";
|
||||
//
|
||||
// vaiAllaRiga_textbox
|
||||
//
|
||||
this.vaiAllaRiga_textbox.Location = new System.Drawing.Point(118, 39);
|
||||
this.vaiAllaRiga_textbox.Name = "vaiAllaRiga_textbox";
|
||||
this.vaiAllaRiga_textbox.Size = new System.Drawing.Size(100, 20);
|
||||
this.vaiAllaRiga_textbox.TabIndex = 1;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(143, 80);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Vai";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// Vai_alla_riga
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(280, 136);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.vaiAllaRiga_textbox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "Vai_alla_riga";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Vai alla riga";
|
||||
this.Load += new System.EventHandler(this.vai_alla_riga_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox vaiAllaRiga_textbox;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
namespace MyNotepad
|
||||
{
|
||||
partial class Vai_alla_riga
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Vai_alla_riga));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.vaiAllaRiga_textbox = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 39);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(64, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Vai alla riga:";
|
||||
//
|
||||
// vaiAllaRiga_textbox
|
||||
//
|
||||
this.vaiAllaRiga_textbox.Location = new System.Drawing.Point(118, 39);
|
||||
this.vaiAllaRiga_textbox.Name = "vaiAllaRiga_textbox";
|
||||
this.vaiAllaRiga_textbox.Size = new System.Drawing.Size(100, 20);
|
||||
this.vaiAllaRiga_textbox.TabIndex = 1;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(143, 80);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Vai";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// Vai_alla_riga
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(280, 136);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.vaiAllaRiga_textbox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "Vai_alla_riga";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Vai alla riga";
|
||||
this.Load += new System.EventHandler(this.vai_alla_riga_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox vaiAllaRiga_textbox;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
|
@ -1,44 +1,44 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MyNotepad
|
||||
{
|
||||
public partial class Vai_alla_riga : Form
|
||||
{
|
||||
myBloccoNote formChiamante;
|
||||
public Vai_alla_riga()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public Vai_alla_riga(myBloccoNote formChiamanteObj)
|
||||
{
|
||||
InitializeComponent();
|
||||
formChiamante = formChiamanteObj;
|
||||
}
|
||||
|
||||
private void vai_alla_riga_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (String.IsNullOrWhiteSpace(vaiAllaRiga_textbox.Text)) return; //do nothing
|
||||
try
|
||||
{
|
||||
this.Hide();
|
||||
formChiamante.vaiARigo(int.Parse(vaiAllaRiga_textbox.Text));
|
||||
}
|
||||
catch(System.FormatException)
|
||||
{
|
||||
MessageBox.Show("Ammessi solo valori numerici");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MyNotepad
|
||||
{
|
||||
public partial class Vai_alla_riga : Form
|
||||
{
|
||||
myBloccoNote formChiamante;
|
||||
public Vai_alla_riga()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public Vai_alla_riga(myBloccoNote formChiamanteObj)
|
||||
{
|
||||
InitializeComponent();
|
||||
formChiamante = formChiamanteObj;
|
||||
}
|
||||
|
||||
private void vai_alla_riga_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (String.IsNullOrWhiteSpace(vaiAllaRiga_textbox.Text)) return; //do nothing
|
||||
try
|
||||
{
|
||||
this.Hide();
|
||||
formChiamante.vaiARigo(int.Parse(vaiAllaRiga_textbox.Text));
|
||||
}
|
||||
catch(System.FormatException)
|
||||
{
|
||||
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.exe
|
||||
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