From 88dfdcd528f116c33ab9b75c294e7d7336360b91 Mon Sep 17 00:00:00 2001 From: Chiharu Shibata Date: Wed, 19 Aug 2015 23:33:58 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89?= =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=B3=E5=BC=95=E6=95=B0=E4=BB=98=E3=81=A7?= =?UTF-8?q?=E3=83=87=E3=83=90=E3=83=83=E3=82=B0=E5=AE=9F=E8=A1=8C=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= =?UTF-8?q?=20=EF=BC=88=E3=80=8CClickOnce=E3=82=BB=E3=82=AD=E3=83=A5?= =?UTF-8?q?=E3=83=AA=E3=83=86=E3=82=A3=E8=A8=AD=E5=AE=9A=E3=82=92=E6=9C=89?= =?UTF-8?q?=E5=8A=B9=E3=81=AB=E3=81=99=E3=82=8B=E3=80=8D=E3=82=92Off?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MarkDownSharpEditor/MarkDownSharpEditor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MarkDownSharpEditor/MarkDownSharpEditor.csproj b/MarkDownSharpEditor/MarkDownSharpEditor.csproj index 18395d6..2f334c4 100644 --- a/MarkDownSharpEditor/MarkDownSharpEditor.csproj +++ b/MarkDownSharpEditor/MarkDownSharpEditor.csproj @@ -65,7 +65,7 @@ LocalIntranet - true + false From e19a2b7c17959f797d605e10b5f06ac45fba950a Mon Sep 17 00:00:00 2001 From: Chiharu Shibata Date: Wed, 19 Aug 2015 23:40:36 +0900 Subject: [PATCH 2/5] =?UTF-8?q?r(readonly)=E3=82=AA=E3=83=97=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=81=A7=E3=83=93=E3=83=A5=E3=83=BC=E3=82=A2?= =?UTF-8?q?=E3=83=A2=E3=83=BC=E3=83=89=E3=81=A8=E3=81=97=E3=81=A6=E5=8B=95?= =?UTF-8?q?=E4=BD=9C=20=E5=B7=A6=E3=83=9A=E3=82=A4=E3=83=B3=E3=81=AE?= =?UTF-8?q?=E3=82=A8=E3=83=87=E3=82=A3=E3=83=83=E3=83=88=E9=A0=98=E5=9F=9F?= =?UTF-8?q?=E3=82=92=E5=B9=850=E3=81=AB=E3=81=97=E3=80=81=E7=B7=A8?= =?UTF-8?q?=E9=9B=86=E7=B3=BB=E3=81=AE=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=82=92=E7=84=A1=E5=8A=B9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MarkDownSharpEditor/Form1.cs | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/MarkDownSharpEditor/Form1.cs b/MarkDownSharpEditor/Form1.cs index d175537..d757aa7 100644 --- a/MarkDownSharpEditor/Form1.cs +++ b/MarkDownSharpEditor/Form1.cs @@ -79,6 +79,8 @@ public Form1() //WebBrowserClickSoundOFF(); CoInternetSetFeatureEnabled(FEATURE_DISABLE_NAVIGATION_SOUNDS, SET_FEATURE_ON_PROCESS, true); + //ちらつき防止(ビューアモード)→Shown()で戻す + this.splitContainer1.Visible = false; } //---------------------------------------------------------------------- @@ -226,13 +228,34 @@ private void Form1_Shown(object sender, EventArgs e) ArrayList FileArray = new ArrayList(); - //TODO: 「新しいウィンドウで開く」="/new"などの引数も含まれるので、 - // その辺りの処理も将来的に入れる。 - //コマンドラインでファイルが投げ込まれてきている //Launch with arguments string[] cmds = System.Environment.GetCommandLineArgs(); - for (int i = 1; i < cmds.Count(); i++) + int i; + for (i = 1; i < cmds.Count(); i++) + { + if (cmds[i][0] != '/' && cmds[i][0] != '-') break; + + switch (cmds[i].Substring(1)) + { + case "r": + case "readonly": + //読み取り専用=ビューアモード + this.richTextBox1.ScrollBars = RichTextBoxScrollBars.None; + this.splitContainer1.SplitterWidth = 1; + this.splitContainer1.SplitterDistance = this.splitContainer1.Panel1MinSize = 0; + this.splitContainer1.IsSplitterFixed = true; + + this.menuSaveFile.Enabled = this.menuSaveAsFile.Enabled = false; + this.menuEdit.Enabled = this.menuViewToolBar.Enabled = this.menuViewWidthEvenly.Enabled = false; + break; + + //TODO: 「新しいウィンドウで開く」="/new"などの引数も含まれるので、 + // その辺りの処理も将来的に入れる。 + } + } + this.splitContainer1.Visible = true; + for (; i < cmds.Count(); i++) { if (File.Exists(cmds[i]) == true) { From 59a39181a2bd83cba89fd2d3c433d8e7d7fd9759 Mon Sep 17 00:00:00 2001 From: Chiharu Shibata Date: Thu, 20 Aug 2015 22:23:32 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MarkDownSharpEditor/Form1.cs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/MarkDownSharpEditor/Form1.cs b/MarkDownSharpEditor/Form1.cs index d757aa7..0190fc4 100644 --- a/MarkDownSharpEditor/Form1.cs +++ b/MarkDownSharpEditor/Form1.cs @@ -241,13 +241,7 @@ private void Form1_Shown(object sender, EventArgs e) case "r": case "readonly": //読み取り専用=ビューアモード - this.richTextBox1.ScrollBars = RichTextBoxScrollBars.None; - this.splitContainer1.SplitterWidth = 1; - this.splitContainer1.SplitterDistance = this.splitContainer1.Panel1MinSize = 0; - this.splitContainer1.IsSplitterFixed = true; - - this.menuSaveFile.Enabled = this.menuSaveAsFile.Enabled = false; - this.menuEdit.Enabled = this.menuViewToolBar.Enabled = this.menuViewWidthEvenly.Enabled = false; + changeToViewerMode(); break; //TODO: 「新しいウィンドウで開く」="/new"などの引数も含まれるので、 @@ -355,6 +349,19 @@ private void Form1_Shown(object sender, EventArgs e) } } + //---------------------------------------------------------------------- + // ビューアモードへ変更 + //---------------------------------------------------------------------- + private void changeToViewerMode() { + this.richTextBox1.ScrollBars = RichTextBoxScrollBars.None; + this.splitContainer1.SplitterWidth = 1; + this.splitContainer1.SplitterDistance = this.splitContainer1.Panel1MinSize = 0; + this.splitContainer1.IsSplitterFixed = true; + + this.menuSaveFile.Enabled = this.menuSaveAsFile.Enabled = false; + this.menuEdit.Enabled = this.menuViewToolBar.Enabled = this.menuViewWidthEvenly.Enabled = false; + } + //---------------------------------------------------------------------- // フォームタイトルの表示(更新) // Refresh form caption From 6d5091e4551b82ae26d182641cedab5c2f4abb38 Mon Sep 17 00:00:00 2001 From: Chiharu Shibata Date: Sat, 22 Aug 2015 00:24:11 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89?= =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=B3=E5=BC=95=E6=95=B0=E3=81=A7=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E5=90=8D=E3=82=92=E7=9B=B8=E5=AF=BE?= =?UTF-8?q?=E3=83=91=E3=82=B9=E3=81=A7=E6=8C=87=E5=AE=9A=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=81=A8=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E7=99=BA=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MarkDownSharpEditor/Form1.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MarkDownSharpEditor/Form1.cs b/MarkDownSharpEditor/Form1.cs index d175537..47f2b57 100644 --- a/MarkDownSharpEditor/Form1.cs +++ b/MarkDownSharpEditor/Form1.cs @@ -236,7 +236,7 @@ private void Form1_Shown(object sender, EventArgs e) { if (File.Exists(cmds[i]) == true) { - FileArray.Add(cmds[i]); + FileArray.Add(Path.GetFullPath(cmds[i])); } } From e0ac45c3347153e9946ab65d6965be80127220d6 Mon Sep 17 00:00:00 2001 From: Chiharu Shibata Date: Sun, 23 Aug 2015 17:37:23 +0900 Subject: [PATCH 5/5] Revert "Merge branch 'features/relativepath' into features/viewer" This reverts commit b2d28175f8683b0453acd24d909263ccc180b7f6, reversing changes made to 59a39181a2bd83cba89fd2d3c433d8e7d7fd9759. --- MarkDownSharpEditor/Form1.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MarkDownSharpEditor/Form1.cs b/MarkDownSharpEditor/Form1.cs index 0aa37b4..0190fc4 100644 --- a/MarkDownSharpEditor/Form1.cs +++ b/MarkDownSharpEditor/Form1.cs @@ -253,7 +253,7 @@ private void Form1_Shown(object sender, EventArgs e) { if (File.Exists(cmds[i]) == true) { - FileArray.Add(Path.GetFullPath(cmds[i])); + FileArray.Add(cmds[i]); } }