mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
Merge pull request #84 from Alex-TIMEHACK/master
Even more tweaks to the explorer and stuff
This commit is contained in:
commit
819f802152
15 changed files with 79 additions and 50 deletions
Binary file not shown.
|
@ -88,14 +88,38 @@ private void timeDateToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ActivateOpenFileDialog(".txt");
|
try
|
||||||
mainText.Text = ReadTextFile(Program.OpenFileExplorerAsDialogAndReturnGivenPath());
|
{
|
||||||
|
ActivateSaveFileDialog(".txt");
|
||||||
|
String selectedPath;
|
||||||
|
selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
|
||||||
|
|
||||||
|
MessageBox.Show(selectedPath);
|
||||||
|
if (selectedPath != "")
|
||||||
|
{
|
||||||
|
mainText.Text = ReadTextFile(selectedPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ActivateSaveFileDialog(".txt");
|
try
|
||||||
File.WriteAllText(Program.OpenFileExplorerAsDialogAndReturnGivenPath(), mainText.Text);
|
{
|
||||||
|
ActivateSaveFileDialog(".txt");
|
||||||
|
String selectedPath;
|
||||||
|
selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
|
||||||
|
|
||||||
|
MessageBox.Show(selectedPath);
|
||||||
|
if (selectedPath != "")
|
||||||
|
{
|
||||||
|
File.WriteAllText(selectedPath, mainText.Text);
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,12 +116,12 @@ void RefreshAll() {
|
||||||
{
|
{
|
||||||
if (new FileInfo(str).Extension == onlyViewExtension)
|
if (new FileInfo(str).Extension == onlyViewExtension)
|
||||||
{
|
{
|
||||||
this.mainView.Items.Add(Path.GetFileName(str), 0);
|
this.mainView.Items.Add(Path.GetFileName(str), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!(Path.GetFileName(str) == "_data.info")) {
|
if (!(Path.GetFileName(str) == "_data.info")) {
|
||||||
this.mainView.Items.Add(Path.GetFileName(str));
|
this.mainView.Items.Add(Path.GetFileName(str), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -467,23 +467,18 @@ void mainView_DoubleClick(object sender, EventArgs e)
|
||||||
if ((String)mainView.FocusedItem.Tag != "") { // If it isn't a file
|
if ((String)mainView.FocusedItem.Tag != "") { // If it isn't a file
|
||||||
GoToDir(currentDirectory + "\\" + mainView.FocusedItem.Tag);
|
GoToDir(currentDirectory + "\\" + mainView.FocusedItem.Tag);
|
||||||
} else { // If it is a file
|
} else { // If it is a file
|
||||||
if (IsFileOpenDialog == true || IsFileSaveDialog == true) { // If it is a open/save file dialog box
|
if (new FileInfo(Path.Combine(currentDirectory, txtSave.Text)).Extension == onlyViewExtension)
|
||||||
Program.WindowsExplorerReturnPath = currentDirectory + "\\" + mainView.FocusedItem.Text;
|
{
|
||||||
((Form)this.TopLevelControl).Close();
|
Program.WindowsExplorerReturnPath = currentDirectory + "\\" + txtSave.Text;
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
ReturnType(new FileInfo(currentDirectory + "\\" + mainView.FocusedItem.Text).Extension);
|
|
||||||
|
|
||||||
switch (fileType) {
|
|
||||||
case 1:
|
|
||||||
//ManageTextFile.OpenNewTextFile(currentDirectory + "\\" + mainView.FocusedItem.Text);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
|
||||||
|
FileDialogBoxManager.IsInOpenDialog = false;
|
||||||
|
FileDialogBoxManager.IsInSaveDialog = false;
|
||||||
|
|
||||||
|
((Form)this.TopLevelControl).Close();
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -495,11 +490,9 @@ void diskView_DoubleClick(object sender, EventArgs e)
|
||||||
if (diskView.FocusedItem.Text == "My Computer") {
|
if (diskView.FocusedItem.Text == "My Computer") {
|
||||||
|
|
||||||
GoToDir(ProfileFileSystemDirectory);
|
GoToDir(ProfileFileSystemDirectory);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch {
|
||||||
} catch (Exception ex) {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,24 +536,42 @@ private void FolderToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
private void Button1_Click(object sender, EventArgs e)
|
private void Button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (txtSave.Text == "")
|
try
|
||||||
{
|
{
|
||||||
wm.startInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info);
|
Boolean OpenFile = false;
|
||||||
}
|
if (mainView.FocusedItem != null)
|
||||||
else
|
|
||||||
{
|
|
||||||
if (new FileInfo(currentDirectory + "\\" + txtSave.Text).Extension == onlyViewExtension)
|
|
||||||
{
|
{
|
||||||
|
if ((String)mainView.FocusedItem.Tag != "")
|
||||||
Program.WindowsExplorerReturnPath = currentDirectory + "\\" + txtSave.Text;
|
{ // If it isn't a file
|
||||||
|
GoToDir(currentDirectory + "\\" + mainView.FocusedItem.Tag);
|
||||||
|
}
|
||||||
|
else OpenFile = true; // If it is a file
|
||||||
}
|
}
|
||||||
|
else OpenFile = true;
|
||||||
|
if (OpenFile == true)
|
||||||
|
{
|
||||||
|
if (txtSave.Text == "")
|
||||||
|
{
|
||||||
|
wm.startInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (new FileInfo(currentDirectory + "\\" + txtSave.Text).Extension == onlyViewExtension)
|
||||||
|
{
|
||||||
|
|
||||||
FileDialogBoxManager.IsInOpenDialog = false;
|
Program.WindowsExplorerReturnPath = currentDirectory + "\\" + txtSave.Text;
|
||||||
FileDialogBoxManager.IsInSaveDialog = false;
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FileDialogBoxManager.IsInOpenDialog = false;
|
||||||
|
FileDialogBoxManager.IsInSaveDialog = false;
|
||||||
|
|
||||||
|
((Form)this.TopLevelControl).Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
|
||||||
((Form)this.TopLevelControl).Close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,14 +78,8 @@ static void Main(string[] args)
|
||||||
public static String OpenFileExplorerAsDialogAndReturnGivenPath()
|
public static String OpenFileExplorerAsDialogAndReturnGivenPath()
|
||||||
{
|
{
|
||||||
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
|
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
|
||||||
|
|
||||||
WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true);
|
WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true);
|
||||||
TitleScreen.frm95.AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
|
|
||||||
|
|
||||||
TitleScreen.frm95.nonimportantapps.Add(app);
|
|
||||||
TitleScreen.frm95.nonimportantapps[TitleScreen.frm95.nonimportantapps.Count - 1].BringToFront();
|
|
||||||
TitleScreen.frm95.nonimportantapps[TitleScreen.frm95.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(TitleScreen.frm95.NonImportantApp_Closing);
|
|
||||||
|
|
||||||
app.BringToFront();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return WindowsExplorerReturnPath;
|
return WindowsExplorerReturnPath;
|
||||||
|
|
|
@ -123,7 +123,7 @@ private void button2_Click(object sender, EventArgs e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pnlConfirm.Hide();
|
pnlConfirm.Hide();
|
||||||
} catch (Exception ex)
|
} catch
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ private void btnOk_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
MessageBox.Show("You must enter a profile name!");
|
MessageBox.Show("You must enter a profile name!");
|
||||||
}
|
}
|
||||||
} catch (Exception ex)
|
} catch
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||||
<dsig:DigestValue>HQXMPfmrHd5GpwrSTljeapHcCrGpgq+tIA1XDC7Pu6w=</dsig:DigestValue>
|
<dsig:DigestValue>JDwiYb71FkbK9zwH+UQdUb+H04Uw0ZB3rfbjGZC5v94=</dsig:DigestValue>
|
||||||
</hash>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
Binary file not shown.
|
@ -63,7 +63,7 @@
|
||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||||
<dsig:DigestValue>v0BE/qFWSZ0zeYD5hTCBto9Xqr5DEGUeahvBP1QyKl4=</dsig:DigestValue>
|
<dsig:DigestValue>0Ls6I3WA5aPR/KrX4zGwrbzZvIh/wgf+cl6bLQj/nrY=</dsig:DigestValue>
|
||||||
</hash>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -14,7 +14,7 @@
|
||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||||
<dsig:DigestValue>HQXMPfmrHd5GpwrSTljeapHcCrGpgq+tIA1XDC7Pu6w=</dsig:DigestValue>
|
<dsig:DigestValue>JDwiYb71FkbK9zwH+UQdUb+H04Uw0ZB3rfbjGZC5v94=</dsig:DigestValue>
|
||||||
</hash>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
Binary file not shown.
|
@ -63,7 +63,7 @@
|
||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||||
<dsig:DigestValue>v0BE/qFWSZ0zeYD5hTCBto9Xqr5DEGUeahvBP1QyKl4=</dsig:DigestValue>
|
<dsig:DigestValue>0Ls6I3WA5aPR/KrX4zGwrbzZvIh/wgf+cl6bLQj/nrY=</dsig:DigestValue>
|
||||||
</hash>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue