Skip to content

Commit

Permalink
Merge pull request #33 from Dragon-0609/dev
Browse files Browse the repository at this point in the history
Version 6
  • Loading branch information
Dragon-0609 authored Mar 15, 2022
2 parents 026a97f + e43df9d commit bc46a7a
Show file tree
Hide file tree
Showing 157 changed files with 1,667 additions and 1,890 deletions.
5 changes: 3 additions & 2 deletions Yuki Installer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static void Main (string [] args)
string targetProcessName = "Yuki Theme";

Process [] runningProcesses = Process.GetProcesses ();
foreach (Process process in runningProcesses)
foreach (Process process in runningProcesses) // Be sure that Yuki Theme isn't working
{
if (process.ProcessName == targetProcessName &&
process.MainModule != null &&
Expand Down Expand Up @@ -142,6 +142,7 @@ public static void Main (string [] args)
{
Console.WriteLine (
$"ERROR> {e.ToString ()}");
Console.ReadLine ();
}

RegistryKey ke =
Expand All @@ -154,7 +155,7 @@ public static void Main (string [] args)
{
case 0 :
{
Process.Start ("Yuki Theme.exe");
Process.Start ("Yuki_Theme.exe");
}
break;
case 1 :
Expand Down
14 changes: 7 additions & 7 deletions Yuki Installer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle ("Yuki_Installer")]
[assembly: AssemblyTitle ("Yuki Installer")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("Yuki_Installer")]
[assembly: AssemblyCopyright ("Copyright © 2021")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCompany ("Dragon-LV")]
[assembly: AssemblyProduct ("Yuki Installer")]
[assembly: AssemblyCopyright ("Copyright © Dragon-LV 2021-2022")]
[assembly: AssemblyTrademark ("Yuki")]
[assembly: AssemblyCulture ("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion ("3.0")]
[assembly: AssemblyFileVersion ("3.0")]
[assembly: AssemblyVersion ("6.0")]
[assembly: AssemblyFileVersion ("6.0")]
17 changes: 4 additions & 13 deletions Yuki Theme Plugin/PluginOptionsContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void Action (OptionsContentAction action)
}

plugin.mf = null;
settingsPanel.mf = null;
settingsPanel.popupController = plugin.popupController;
oldeditor = Settings.Editor;
// Change colors for About Form
settingsPanel.bg = YukiTheme_VisualPascalABCPlugin.bg;
Expand Down Expand Up @@ -148,23 +148,14 @@ public void Action (OptionsContentAction action)
Settings.saveAsOld = settingsPanel.saveOld.Checked;
Settings.saveData ();
plugin.LoadSticker ();
if (settingsPanel.mf != null && !settingsPanel.mf.IsDisposed)
{
settingsPanel.mf.Dispose ();
}

settingsPanel.mf = null;

settingsPanel.popupController = null;
plugin.mf = null;
alreadyShown = false;
//this.Enabled = true;
break;
case OptionsContentAction.Cancel :
if (settingsPanel.mf != null && !settingsPanel.mf.IsDisposed)
{
settingsPanel.mf.Dispose ();
}

settingsPanel.mf = null;
settingsPanel.popupController = null;
plugin.mf = null;
alreadyShown = false;
break;
Expand Down
6 changes: 3 additions & 3 deletions Yuki Theme Plugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
[assembly: AssemblyTitle ("Yuki Theme Plugin")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyCompany ("Dragon-LV")]
[assembly: AssemblyProduct ("Yuki Theme Plugin")]
[assembly: AssemblyCopyright ("Copyright © 2021")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCopyright ("Copyright © Dragon-LV 2021-2022")]
[assembly: AssemblyTrademark ("Yuki")]
[assembly: AssemblyCulture ("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand Down
7 changes: 4 additions & 3 deletions Yuki Theme Plugin/Yuki Theme Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
<Reference Include="CodeCompletion, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\..\..\Program Files (x86)\PascalABC.NET_3.8.2\CodeCompletion.dll</HintPath>
</Reference>
<Reference Include="Compiler, Version=3.7.1.2692, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\..\..\Program Files (x86)\PascalABC.NET_3.8.2\Compiler.dll</HintPath>
</Reference>
<Reference Include="Fizzler, Version=1.2.1.0, Culture=neutral, PublicKeyToken=4ebff4844e382110">
<HintPath>..\packages\Fizzler.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -300,6 +297,10 @@
<Project>{c12b1851-e2ae-4a31-95dc-1daafcdcb108}</Project>
<Name>Yuki Theme.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Yuki Theme.Themes\Yuki Theme.Themes.csproj">
<Project>{902af0e8-81ee-445c-a1b3-4d8283d88a16}</Project>
<Name>Yuki Theme.Themes</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
29 changes: 22 additions & 7 deletions Yuki Theme Plugin/YukiTheme_VisualPascalABCPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace Yuki_Theme_Plugin
{

public class YukiTheme_VisualPascalABCPlugin : IVisualPascalABCPlugin
public class YukiTheme_VisualPascalABCPlugin : IVisualPascalABCPlugin, IColorUpdatable
{
public string Name => "Yuki Theme";

Expand Down Expand Up @@ -145,6 +145,8 @@ public class YukiTheme_VisualPascalABCPlugin : IVisualPascalABCPlugin
bool nameInStatusBar = false; // Name in status bar
private ToolStripItem openInExplorerItem;

public PopupFormsController popupController;

/// <summary>
/// The main entry point for the application.
/// </summary>
Expand Down Expand Up @@ -185,15 +187,14 @@ public void GetGUI (List <IPluginGUIItem> MenuItems, List <IPluginGUIItem> ToolB
private void Initialize ()
{
fm.AllowTransparency = true;

popupController = new PopupFormsController (fm, 0, this);
LoadColors ();
defaultSize = new Size (32, 32);

textEditor = fm.CurrentCodeFileDocument.TextEditor;
textArea = textEditor.ActiveTextAreaControl.TextArea;
context = textEditor.ContextMenuStrip;
context2 = fm.MainDockPanel.ContextMenuStrip;

openInExplorerItem = context2.Items.Add ("Open in Explorer", null, OpenInExplorer);
CheckAvailabilityForOpening ();
LoadImage ();
Expand Down Expand Up @@ -433,6 +434,12 @@ private void load (object sender, EventArgs e)
MForm.showLicense (bg, clr, bgClick, fm);
MForm.showGoogleAnalytics (bg, clr, bgClick, fm);
MForm.TrackInstall ();

if (Settings.update)
{
popupController.InitializeAllWindows ();
popupController.df.CheckUpdate ();
}
}

private void loadSVG ()
Expand Down Expand Up @@ -735,11 +742,15 @@ private void UpdateColors ()

output_panel2.BackColor = output_panel6.BackColor = output_input.BackColor = output_panel4.BackColor =
output_panel3.BackColor = output_panel5.BackColor = output_panel1.BackColor = output_text.BackColor =
output_output.BackColor = fm.ProjectPane.BackColor = errorsList.BackColor = compilerConsole.BackColor = bgdef;
output_output.BackColor = fm.ProjectPane.BackColor = errorsList.BackColor = compilerConsole.BackColor = Helper.bgColor = bgdef;

output_output.ForeColor = output_panel2.ForeColor = output_text.ForeColor = menu.ForeColor =
statusBar.ForeColor = toolsPanel.ForeColor = tools.ForeColor = errorsList.ForeColor =
compilerConsole.ForeColor = clr;
compilerConsole.ForeColor = Helper.fgColor = clr;

Helper.bgClick = bgClick;
Helper.bgBorder = bgBorder;
Helper.fgHover = clrHover;

foreach (Control o in output_panel1.Controls)
{
Expand Down Expand Up @@ -799,7 +810,10 @@ private void UpdateColors ()
{

}


if (OnColorUpdate != null)
OnColorUpdate (bgdef, clr, bgClick);
popupController.TryToUpdateNotificationWindow ();
errorsList.Refresh ();
WaitAndUpdateMenuColors ();
manager.UpdateColors ();
Expand Down Expand Up @@ -1636,6 +1650,7 @@ private void ResetPen (ref Pen pen, Color color, float width, PenAlignment align


#endregion


public event ColorUpdate OnColorUpdate;
}
}
26 changes: 21 additions & 5 deletions Yuki Theme.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ private static Image LoadImage ()
Image res = null;
if(Core.CLI.isDefault ())
{
Tuple <bool, string> content = Helper.GetThemeFromMemory (Core.CLI.pathToMemory, Core.CLI.GetCore ());
Assembly location;
string pathToMemory;
Tuple <bool, string> content = GetThemeFromMemory (out location, out pathToMemory);
if (content.Item1)
{
Tuple <bool, Image> iag = Helper.GetImageFromMemory (Core.CLI.pathToMemory, Core.CLI.GetCore ());
Tuple <bool, Image> iag = Helper.GetImageFromMemory (pathToMemory, location);
if (iag.Item1)
{
res = iag.Item2;
Expand Down Expand Up @@ -171,10 +173,12 @@ private static Image LoadSticker ()
Image res = null;
if(Core.CLI.isDefault ())
{
Tuple <bool, string> content = Helper.GetThemeFromMemory (Core.CLI.pathToMemory, Core.CLI.GetCore ());
Assembly location;
string pathToMemory;
Tuple <bool, string> content = GetThemeFromMemory (out location, out pathToMemory);
if (content.Item1)
{
Tuple <bool, Image> iag = Helper.GetStickerFromMemory (Core.CLI.pathToMemory, Core.CLI.GetCore ());
Tuple <bool, Image> iag = Helper.GetStickerFromMemory (pathToMemory, location);
if (iag.Item1)
{
res = iag.Item2;
Expand All @@ -194,7 +198,19 @@ private static Image LoadSticker ()
}
return res;
}


private static Tuple <bool, string> GetThemeFromMemory (out Assembly location , out string pathToMemory)
{
IThemeHeader header = DefaultThemes.headers [Core.CLI.nameToLoad];
string ext = Helper.GetThemeFormat (true, Core.CLI.pathToLoad, Core.CLI.nameToLoad) == ThemeFormat.Old
? Helper.FILE_EXTENSTION_OLD
: Helper.FILE_EXTENSTION_NEW;
pathToMemory = $"{header}.{Core.CLI.pathToLoad}{ext}";
location = header.Location;
Tuple <bool, string> content = Helper.GetThemeFromMemory (pathToMemory, location);
return content;
}

#endregion

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Yuki Theme.CLI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.

[assembly: AssemblyTitle ("Yuki_Theme.CLI")]
[assembly: AssemblyTitle ("Yuki Theme.CLI")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("Dragon-LV")]
[assembly: AssemblyProduct ("Yuki Theme.CLI")]
[assembly: AssemblyCopyright ("Copyright (c) Dragon-LV 2021")]
[assembly: AssemblyCopyright ("Copyright © Dragon-LV 2021-2022")]
[assembly: AssemblyTrademark ("Yuki")]
[assembly: AssemblyCulture ("")]

Expand Down
Loading

0 comments on commit bc46a7a

Please sign in to comment.