• R/O
  • SSH
  • HTTPS

chaki: Commit


Commit MetaInfo

Revision623 (tree)
Time2020-01-16 20:26:14
Authortomorita

Log Message

・設定に"Reset Window Layout to Default"ボタンを追加(即時レイアウトリセット)
・Dependency条件タブの依存矢印もDepEditの矢印と同様、設定の"Reverse arrow direction"を反映するよう変更

Change Summary

Incremental Difference

--- trunk/ChaKi.NET/src/ChaKi.NET/Common/LinkArrow.cs (revision 622)
+++ trunk/ChaKi.NET/src/ChaKi.NET/Common/LinkArrow.cs (revision 623)
@@ -4,6 +4,7 @@
44 using ChaKi.Common;
55 using System.Windows.Forms;
66 using System.Collections.Generic;
7+using ChaKi.Common.Settings;
78
89 namespace ChaKi.GUICommon
910 {
@@ -102,12 +103,21 @@
102103
103104 public void Draw(Graphics g, int level, bool drawText)
104105 {
105- int y = Math.Max(m_Start.Y, m_End.Y);
106- m_Points[0] = new Point(m_Start.X + level * 4, m_Start.Y);
107- m_Points[1] = new Point(m_Start.X + level * 4, y + (level + 1) * 10 + 15);
108- m_Points[2] = new Point(m_End.X + level * 4, y + (level + 1) * 10 + 15);
109- m_Points[3] = new Point(m_End.X + level * 4, m_End.Y);
106+ var s = m_Start;
107+ var e = m_End;
108+ // 矢印の向きをDepEditの設定に同期して変更
109+ if (DepEditSettings.Current.ReverseDepArrowDirection)
110+ {
111+ s = m_End;
112+ e = m_Start;
113+ }
110114
115+ var y = Math.Max(s.Y, e.Y);
116+ m_Points[0] = new Point(s.X + level * 4, s.Y);
117+ m_Points[1] = new Point(s.X + level * 4, y + (level + 1) * 10 + 15);
118+ m_Points[2] = new Point(e.X + level * 4, y + (level + 1) * 10 + 15);
119+ m_Points[3] = new Point(e.X + level * 4, e.Y);
120+
111121 g.DrawLines(m_Pen, m_Points);
112122
113123 if (drawText)
--- trunk/ChaKi.NET/src/ChaKi.NET/MainForm.cs (revision 622)
+++ trunk/ChaKi.NET/src/ChaKi.NET/MainForm.cs (revision 623)
@@ -387,6 +387,21 @@
387387 this.dependencyEditPanel.Saving += new Action(HandleDependencyEditPanelSaving);
388388 }
389389
390+ public void ResetLayout()
391+ {
392+ try
393+ {
394+ using (var resstr = Assembly.GetExecutingAssembly().GetManifestResourceStream("ChaKi.Resources.DefaultDockState.xml"))
395+ {
396+ this.dockingManager.LoadConfigFromStream(resstr);
397+ }
398+ }
399+ catch
400+ {
401+ MessageBox.Show("Could not read default docking positions. Resetting.");
402+ }
403+ }
404+
390405 public void ChangeStyle(VisualStyle st)
391406 {
392407 this.Style = st;
--- trunk/ChaKi.NET/src/ChaKi.NET/Options/OptionDialog.Designer.cs (revision 622)
+++ trunk/ChaKi.NET/src/ChaKi.NET/Options/OptionDialog.Designer.cs (revision 623)
@@ -31,6 +31,8 @@
3131 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OptionDialog));
3232 this.tabControl1 = new Crownwood.DotNetMagic.Controls.TabControl();
3333 this.tabPage1 = new Crownwood.DotNetMagic.Controls.TabPage();
34+ this.button8 = new System.Windows.Forms.Button();
35+ this.checkBox5 = new System.Windows.Forms.CheckBox();
3436 this.button7 = new System.Windows.Forms.Button();
3537 this.textBox2 = new System.Windows.Forms.TextBox();
3638 this.label8 = new System.Windows.Forms.Label();
@@ -68,7 +70,6 @@
6870 this.button1 = new System.Windows.Forms.Button();
6971 this.button2 = new System.Windows.Forms.Button();
7072 this.button4 = new System.Windows.Forms.Button();
71- this.checkBox5 = new System.Windows.Forms.CheckBox();
7273 this.tabControl1.SuspendLayout();
7374 this.tabPage1.SuspendLayout();
7475 this.tabPage4.SuspendLayout();
@@ -101,6 +102,7 @@
101102 //
102103 // tabPage1
103104 //
105+ this.tabPage1.Controls.Add(this.button8);
104106 this.tabPage1.Controls.Add(this.checkBox5);
105107 this.tabPage1.Controls.Add(this.button7);
106108 this.tabPage1.Controls.Add(this.textBox2);
@@ -121,6 +123,19 @@
121123 this.tabPage1.SelectTextBackColor = System.Drawing.Color.Empty;
122124 this.tabPage1.SelectTextColor = System.Drawing.Color.Empty;
123125 //
126+ // button8
127+ //
128+ resources.ApplyResources(this.button8, "button8");
129+ this.button8.Name = "button8";
130+ this.button8.UseVisualStyleBackColor = true;
131+ this.button8.Click += new System.EventHandler(this.button8_Click);
132+ //
133+ // checkBox5
134+ //
135+ resources.ApplyResources(this.checkBox5, "checkBox5");
136+ this.checkBox5.Name = "checkBox5";
137+ this.checkBox5.UseVisualStyleBackColor = true;
138+ //
124139 // button7
125140 //
126141 resources.ApplyResources(this.button7, "button7");
@@ -397,12 +412,6 @@
397412 this.button4.UseVisualStyleBackColor = true;
398413 this.button4.Click += new System.EventHandler(this.button4_Click);
399414 //
400- // checkBox5
401- //
402- resources.ApplyResources(this.checkBox5, "checkBox5");
403- this.checkBox5.Name = "checkBox5";
404- this.checkBox5.UseVisualStyleBackColor = true;
405- //
406415 // OptionDialog
407416 //
408417 this.AcceptButton = this.button1;
@@ -480,5 +489,6 @@
480489 private System.Windows.Forms.TextBox textBox2;
481490 private System.Windows.Forms.Label label8;
482491 private System.Windows.Forms.CheckBox checkBox5;
492+ private System.Windows.Forms.Button button8;
483493 }
484494 }
\ No newline at end of file
--- trunk/ChaKi.NET/src/ChaKi.NET/Options/OptionDialog.cs (revision 622)
+++ trunk/ChaKi.NET/src/ChaKi.NET/Options/OptionDialog.cs (revision 623)
@@ -246,5 +246,11 @@
246246 this.textBox2.Text = dlg.FileName;
247247 }
248248 }
249+
250+ private void button8_Click(object sender, EventArgs e)
251+ {
252+ MainForm.Instance.ResetLayout();
253+ //Application.DoEvents();
254+ }
249255 }
250256 }
--- trunk/ChaKi.NET/src/ImportWordRelation/Properties/AssemblyInfo.cs (revision 622)
+++ trunk/ChaKi.NET/src/ImportWordRelation/Properties/AssemblyInfo.cs (revision 623)
@@ -12,5 +12,5 @@
1212 [assembly: AssemblyCulture("")]
1313 [assembly: ComVisible(false)]
1414 [assembly: Guid("6a95808a-d1e3-47de-bb62-7ed7a281ac0b")]
15-[assembly: AssemblyVersion("3.12.619.0")]
16-[assembly: AssemblyFileVersion("3.12.619.0")]
15+[assembly: AssemblyVersion("3.12.620.0")]
16+[assembly: AssemblyFileVersion("3.12.620.0")]
--- trunk/ChaKi.NET/src/Text2Corpus/Properties/AssemblyInfo.cs (revision 622)
+++ trunk/ChaKi.NET/src/Text2Corpus/Properties/AssemblyInfo.cs (revision 623)
@@ -12,5 +12,5 @@
1212 [assembly: AssemblyCulture("")]
1313 [assembly: ComVisible(false)]
1414 [assembly: Guid("a8cf8403-eb88-418f-bf54-56aeaef39268")]
15-[assembly: AssemblyVersion("3.12.619.0")]
16-[assembly: AssemblyFileVersion("3.12.619.0")]
15+[assembly: AssemblyVersion("3.12.620.0")]
16+[assembly: AssemblyFileVersion("3.12.620.0")]
--- trunk/ChaKi.NET/src/Timings/Properties/AssemblyInfo.cs (revision 622)
+++ trunk/ChaKi.NET/src/Timings/Properties/AssemblyInfo.cs (revision 623)
@@ -12,5 +12,5 @@
1212 [assembly: AssemblyCulture("")]
1313 [assembly: ComVisible(false)]
1414 [assembly: Guid("ff6652ed-b932-466b-944b-ce88d698979b")]
15-[assembly: AssemblyVersion("3.12.619.0")]
16-[assembly: AssemblyFileVersion("3.12.619.0")]
15+[assembly: AssemblyVersion("3.12.620.0")]
16+[assembly: AssemblyFileVersion("3.12.620.0")]
Show on old repository browser