From 68e8f234a9127f84f39578d7196b090331dd3bfe Mon Sep 17 00:00:00 2001 From: chuongmep <31106432+chuongmep@users.noreply.github.com> Date: Sun, 10 Sep 2023 14:25:01 +0800 Subject: [PATCH 1/7] improve ui ux --- RevitPythonShell/Views/IronPythonConsole.xaml | 140 +++++++++--------- .../Views/IronPythonConsole.xaml.cs | 1 + 2 files changed, 72 insertions(+), 69 deletions(-) diff --git a/RevitPythonShell/Views/IronPythonConsole.xaml b/RevitPythonShell/Views/IronPythonConsole.xaml index 4cbf120..6a6b30b 100644 --- a/RevitPythonShell/Views/IronPythonConsole.xaml +++ b/RevitPythonShell/Views/IronPythonConsole.xaml @@ -14,23 +14,16 @@ --> - - - + + + + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + \ No newline at end of file diff --git a/RevitPythonShell/Views/IronPythonConsole.xaml.cs b/RevitPythonShell/Views/IronPythonConsole.xaml.cs index c063e59..a4debf4 100644 --- a/RevitPythonShell/Views/IronPythonConsole.xaml.cs +++ b/RevitPythonShell/Views/IronPythonConsole.xaml.cs @@ -2,6 +2,7 @@ using System.IO; using System.Reflection; using System.Windows; +using System.Windows.Controls.Ribbon; using System.Windows.Input; using System.Xml; using ICSharpCode.AvalonEdit; @@ -53,7 +54,11 @@ private void MainWindow_Initialized(object sender, EventArgs e) //propertyGridComboBox.SelectedIndex = 1; textEditor.ShowLineNumbers = true; } - + private void newFileClick(object sender, RoutedEventArgs e) + { + currentFileName = null; + textEditor.Text = string.Empty; + } private void openFileClick(object sender, RoutedEventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); @@ -65,13 +70,23 @@ private void openFileClick(object sender, RoutedEventArgs e) //textEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinitionByExtension(Path.GetExtension(currentFileName)); } } - + private void saveAsFileClick(object sender, EventArgs e) + { + currentFileName = null; + SaveFile(); + } private void saveFileClick(object sender, EventArgs e) + { + SaveFile(); + } + private void SaveFile() { if (currentFileName == null) { SaveFileDialog dlg = new SaveFileDialog(); - dlg.DefaultExt = ".txt"; + dlg.Filter = "Save Files (*.py)|*.py"; + dlg.DefaultExt = "py"; + dlg.AddExtension = true; if (dlg.ShowDialog() ?? false) { currentFileName = dlg.FileName; @@ -116,5 +131,6 @@ private void textEditor_GotFocus(object sender, RoutedEventArgs e) tb.GotFocus -= textEditor_GotFocus; } } + } } \ No newline at end of file From 16b914912654827fc498abc35d4bc93c6baa4fe1 Mon Sep 17 00:00:00 2001 From: chuongmep <31106432+chuongmep@users.noreply.github.com> Date: Sun, 10 Sep 2023 17:48:34 +0800 Subject: [PATCH 3/7] fix output string --- PythonConsoleControl/PythonOutputStream.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/PythonConsoleControl/PythonOutputStream.cs b/PythonConsoleControl/PythonOutputStream.cs index 62bf20c..7be6378 100644 --- a/PythonConsoleControl/PythonOutputStream.cs +++ b/PythonConsoleControl/PythonOutputStream.cs @@ -1,7 +1,9 @@ // Copyright (c) 2010 Joe Moorhouse +using System; using System.IO; using System.Text; +using System.Text.RegularExpressions; namespace PythonConsoleControl { @@ -63,8 +65,18 @@ public override int Read(byte[] buffer, int offset, int count) /// public override void Write(byte[] buffer, int offset, int count) { - string text = UTF8Encoding.UTF8.GetString(buffer, offset, count); + string text = Encoding.UTF8.GetString(buffer, offset, count); + text = DecodeUnicodeEscapes(text); textEditor.Write(text); } + private string DecodeUnicodeEscapes(string input) + { + return Regex.Replace(input, @"\\u[0-9a-fA-F]{4}", match => + { + var hex = match.Value.Substring(2); + int charValue = Convert.ToInt32(hex, 16); + return char.ConvertFromUtf32(charValue); + }); + } } } From d503b9413c69e2cad9a2ac05ca6e79dd3033b553 Mon Sep 17 00:00:00 2001 From: chuongmep <31106432+chuongmep@users.noreply.github.com> Date: Sun, 10 Sep 2023 17:48:55 +0800 Subject: [PATCH 4/7] upgrade version dependency --- PythonConsoleControl/PythonConsoleControl.csproj | 4 ++-- RevitPythonShell/RevitPythonShell.csproj | 2 +- RpsRuntime/RpsRuntime.csproj | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PythonConsoleControl/PythonConsoleControl.csproj b/PythonConsoleControl/PythonConsoleControl.csproj index 36113c7..48de389 100644 --- a/PythonConsoleControl/PythonConsoleControl.csproj +++ b/PythonConsoleControl/PythonConsoleControl.csproj @@ -13,8 +13,8 @@ full - - + + diff --git a/RevitPythonShell/RevitPythonShell.csproj b/RevitPythonShell/RevitPythonShell.csproj index 95a3a5c..58658f8 100644 --- a/RevitPythonShell/RevitPythonShell.csproj +++ b/RevitPythonShell/RevitPythonShell.csproj @@ -62,7 +62,7 @@ true - + diff --git a/RpsRuntime/RpsRuntime.csproj b/RpsRuntime/RpsRuntime.csproj index 42c10ad..4b5eeeb 100644 --- a/RpsRuntime/RpsRuntime.csproj +++ b/RpsRuntime/RpsRuntime.csproj @@ -61,11 +61,11 @@ - - + + - + From f1e02750984be9f34f4b8b6758a9df2f619ef50c Mon Sep 17 00:00:00 2001 From: chuongmep <31106432+chuongmep@users.noreply.github.com> Date: Wed, 13 Sep 2023 22:20:08 +0800 Subject: [PATCH 5/7] improve pixel icon --- RevitPythonShell/Resources/Theme/New.png | Bin 390 -> 1468 bytes RevitPythonShell/Resources/Theme/Open.png | Bin 237 -> 1222 bytes RevitPythonShell/Resources/Theme/Run.png | Bin 356 -> 1390 bytes RevitPythonShell/Resources/Theme/Save.png | Bin 239 -> 2447 bytes RevitPythonShell/Resources/Theme/SaveAs.png | Bin 505 -> 1081 bytes RevitPythonShell/Views/IronPythonConsole.xaml | 2 +- 6 files changed, 1 insertion(+), 1 deletion(-) diff --git a/RevitPythonShell/Resources/Theme/New.png b/RevitPythonShell/Resources/Theme/New.png index 8626830e0d2afc4afffe9d7286202f7dc85d63d6..3eb334f799fbb640e89816fb9d9832ee379630fc 100644 GIT binary patch literal 1468 zcmV;t1w;CYP)VPRomVPRomVPRom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NGK}-lU6VFW|KrAMY5P8UPzLAz5_`}eE<9{o&%p< kitaAp1j+(JvE_@ySNimCL7ycXcK`qY07*qoM6N<$f?b891ONa4 diff --git a/RevitPythonShell/Resources/Theme/Open.png b/RevitPythonShell/Resources/Theme/Open.png index e6e9bef640199fa7ded9027b4960ef3261638d00..25da8e49c8f11eaffeb9fdea793fc96774425082 100644 GIT binary patch literal 1222 zcmV;%1UdVOP)#^FnG6BsT*nA5}rGOwWR%1fa@0d)&(QXIu#0^7V9=X{JL z%a+hm4*t&4Q$A1f`~m$u{q?}F6(NKWLI@#*5JCtcgph5|(nU#IydYhX4p~|35Ikxl z9b!Z}B)r%mZIL$FyRCwRFG^aZU6vvj1c~56yR0s>%Nw#?xYaIQ3+-z!JfXbRE+=I> zFyAICf3^t{(fQVG5MjP`?S&?+;Z`{%$xQfLLBe}Ji6hLN7dXU|l8oFuCvc44Nat*e zWQ98AaY+_#v`p9!ca+rV;wiBAPolx<)+!1yNuD#|vn9ANB>fQqsWEC&dFETE!n1IqzMJ`zw- zwt?jUfe!^#lx<)+!0>5-)1AMZ19SQ~@at=d;4G$3yoJ!A&3$P!^nt+1&i|MT{5O80 zId%LeKpu-5VBnO%sfI7-0MoA~u2Zj6#tq95A@l4zRSKkvj&ACf1 zVDja}H}ulkxB-0c3Y_Fz_g-MK!5M}cn&JlVyd!Xme{}5uLdTrr_=_jv2IzlV-~?}e zp9xI7;4H_F)~p*GEgKjE`L|<^zZPI1zswxi2fELe4GjM? z(XSyMoPa#d^yh)**|LG*&+~2^z*CTF`g1{ZZP~!^=S07Tco@T%wQOF^2F+H!f#J() z-b4Ub$n?2DUCK9r&lUgI5QZs;sBethPV$r+EE73)dukDWt$Js=X!FrUo#m&S2F&pXZJk}=R6@+ zxO-*iX$H`h1o-Edr{9#VaJx7C^}APgF0J-!${$L}?!CU<=AGX3zm|V~s$omx6G8|f kgb+dqA%qY@h$IvL0(3TfnR?6leE|Nm1OL}2yv|4(U4pc=4>i%88-d_p}0)q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S)Bmoo*!5EJ4k>4S)BmoC2PJhBfjv%_51+QWQVx~=*nd0T8O)mu%#0qfU^V$;4A?G zI7_gz%GBNgdc6nuqty6d4gIT1+m(bRwlAs#2$10qCqRJAcO0dR0JAOTrF97q z5HFMMyOt1Q2kCuNX%0FdUZ%R@maxM1(#z&La`#E0=C{%Xj36B)gu@U2_E=X5ru=g5 zlzItU!`EFxECI?_xXmtMMG4>C5c5~~?p|rZ-R;feBESrFlhx27OVf1nBdYh^@6mFX zf7;==2mvf{64Zu2R^}WIIvf-f#l@sa;C)I3ojXBo_;Pv0TKM4-#f2%m{R{-K_$4U! z{J6qjuW5&4ENP?23JkTDomFl(vBUTMlEY&sT8ZK;@6V9(xcj6$<#waxc~hF_;9* ze4SBVvXpy%P!xYCw;hZf0000000000z@~x!suM`}PWERJ00000NkvXXu0mjfRM+OI literal 505 zcmV2!7$^efd6L zK0MF!!aXGby5^$|XKAzF`ga=8HSwUuW7X#an(9ufF8O5t#C`ZJ?T&1ZG#wNJ6o3nh z=aS7_CVfn8mBP!03IGy`1d+8(1_y_Tr(I;h?EG-}dS@gM$pa*(_EM=oeBRqDwlo_N zDmDrLk-M^Xp;%q*qqV&~=ND}6jS&E3wTg-wog>R;F>WCXKs2NEwX&QP#7uX|E|tPl zAgdZS5Y0FZb_<}pQRDrq$ByAl*5<`RtTaHCb4!RPjcb9;#UTcI0-Wok)YU(`0d@QZ zfPtO>+LtAKAK!ray*$9@(XJi*QkvAj^_?2$833l_BZ}Y v%{K3Bbz~$-DHAU(BN)`bPE7dAC-10Bk6L|(Jt+3F00000NkvXXu0mjfEXm{e diff --git a/RevitPythonShell/Views/IronPythonConsole.xaml b/RevitPythonShell/Views/IronPythonConsole.xaml index 420607a..f7c8208 100644 --- a/RevitPythonShell/Views/IronPythonConsole.xaml +++ b/RevitPythonShell/Views/IronPythonConsole.xaml @@ -14,7 +14,7 @@ --> - + From a9fb9d01e37afef575d39045af0e282f205918f5 Mon Sep 17 00:00:00 2001 From: chuongmep <31106432+chuongmep@users.noreply.github.com> Date: Wed, 13 Sep 2023 22:30:37 +0800 Subject: [PATCH 6/7] add more shortcut --- RevitPythonShell/Views/IronPythonConsole.xaml | 8 ++++---- RevitPythonShell/Views/IronPythonConsole.xaml.cs | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/RevitPythonShell/Views/IronPythonConsole.xaml b/RevitPythonShell/Views/IronPythonConsole.xaml index f7c8208..8bd40be 100644 --- a/RevitPythonShell/Views/IronPythonConsole.xaml +++ b/RevitPythonShell/Views/IronPythonConsole.xaml @@ -50,14 +50,14 @@ SnapsToDevicePixels="True" Click="newFileClick" /> @@ -109,7 +109,7 @@ + ToolTip="(F5) Run Script. Results will be displayed in the IronPython prompt." /> diff --git a/RevitPythonShell/Views/IronPythonConsole.xaml.cs b/RevitPythonShell/Views/IronPythonConsole.xaml.cs index a4debf4..65a2145 100644 --- a/RevitPythonShell/Views/IronPythonConsole.xaml.cs +++ b/RevitPythonShell/Views/IronPythonConsole.xaml.cs @@ -107,6 +107,12 @@ private void runClick(object sender, EventArgs e) private void textEditor_PreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.F5) RunStatements(); + if (e.Key == Key.S && Keyboard.Modifiers == ModifierKeys.Control) SaveFile(); + if (e.Key == Key.S && Keyboard.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift)) saveAsFileClick(sender, e); + if (e.Key == Key.O && Keyboard.Modifiers == ModifierKeys.Control) openFileClick(sender, e); + if (e.Key == Key.N && Keyboard.Modifiers == ModifierKeys.Control) newFileClick(sender, e); + if (e.Key == Key.F4 && Keyboard.Modifiers == ModifierKeys.Control) Close(); + } private void RunStatements() From b702a6486ad9f5a6dec68d93d06e01b209e94e21 Mon Sep 17 00:00:00 2001 From: chuongmep <31106432+chuongmep@users.noreply.github.com> Date: Wed, 13 Sep 2023 22:33:22 +0800 Subject: [PATCH 7/7] update version --- CHANGELOG.md | 7 +++++++ Installer/Installer.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27bb2b4..ff5e006 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ # Changelog +- 2023-09-13 **2.0.2** + - Improvement user interface and user experience with coding. + - Add new button create new file + - Add new button save as file + - Fix bug output with language is chines or Japanese + - Follow up package IronPython latest. + - Add more shortcut default. - 2023-04-14 **2.0.1** - Support Autodesk Revit version 2024. - 2022-12-16 **2.0.0** diff --git a/Installer/Installer.cs b/Installer/Installer.cs index 85de205..55db219 100644 --- a/Installer/Installer.cs +++ b/Installer/Installer.cs @@ -12,7 +12,7 @@ const string projectName = "RevitPythonShell"; const string outputName = "RevitPythonShell"; const string outputDir = "output"; -const string version = "2.0.1"; +const string version = "2.0.2"; var fileName = new StringBuilder().Append(outputName).Append("-").Append(version); var project = new Project