<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp3.1</TargetFramework>
+ <TargetFramework>net5</TargetFramework>
<OutputType>WinExe</OutputType>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
string mainService = config.Get<string> ("MainService");
if (!string.IsNullOrEmpty (mainService)) {
serviceClass = loadContext.MainAssembly.GetType (mainService);
- App.GetService (serviceClass)?.Start();
+ App.GetService (serviceClass);//instantiate service without starting it
}
string fileAssociations = config.Get<string> ("FileAssociations");
if (!string.IsNullOrEmpty (fileAssociations)) {
Unchecked = "{Background=${ControlIdle}}";
MouseEnter = "{Foreground=${ControlCaptionHoverColor}}";
MouseLeave = "{Foreground=${ControlForeground}}";
+}
+LogViewerWidget {
+ Background = "0.01,0.01,0.01,1";
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks>net5</TargetFrameworks>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
Action<double> delSetZoomFactor;
- FieldInfo fiDbg_IncludeEvents, fiDbg_DiscardEvents, fiDbg_ConsoleOutput, fiDbgIFace_MaxLayoutingTries, fiDbgIFace_MaxDiscardCount, fiDbgIFace_Terminate;
+ FieldInfo fiDbg_IncludedEvents, fiDbg_ConsoleOutput, fiDbgIFace_MaxLayoutingTries, fiDbgIFace_MaxDiscardCount, fiDbgIFace_Terminate;
#endregion
bool recording, debugLogIsEnabled;
- DbgEvtType recordedEvents = DbgEvtType.Widget, discardedEvents;
+ IList<DbgEvtType> recordedEvents = new ObservableList<DbgEvtType>(new DbgEvtType[] {DbgEvtType.Widget} );
+ DbgEvtType addRecordedEvents = DbgEvtType.None;
public bool HasVkvgBackend { get; private set; }
public int RefreshRate {
get => Configuration.Global.Get<int> ("RefreshRate", 10);
return;
recording = IsRunning & DebugLogIsEnabled & value;
if (recording) {
- fiDbg_DiscardEvents.SetValue (dbgIFace, DiscardedEvents);
- fiDbg_IncludeEvents.SetValue (dbgIFace, RecordedEvents);
+ fiDbg_IncludedEvents.SetValue (dbgIFace, RecordedEvents.ToList());
CMDStartRecording.CanExecute = false;
CMDStopRecording.CanExecute = true;
} else {
- fiDbg_DiscardEvents.SetValue (dbgIFace, DbgEvtType.All);
- fiDbg_IncludeEvents.SetValue (dbgIFace, DbgEvtType.None);
+ fiDbg_IncludedEvents.SetValue (dbgIFace, new List<DbgEvtType>());
CMDStartRecording.CanExecute = debugLogIsEnabled;
CMDStopRecording.CanExecute = false;
}
NotifyValueChanged(recording);
}
}
- public DbgEvtType RecordedEvents {
+ public IList<DbgEvtType> RecordedEvents {
get => recordedEvents;
set {
if (recordedEvents == value)
return;
recordedEvents = value;
if (Recording)
- fiDbg_IncludeEvents.SetValue (dbgIFace, value);
+ fiDbg_IncludedEvents.SetValue (dbgIFace, value);
NotifyValueChanged (recordedEvents);
}
}
- public DbgEvtType DiscardedEvents {
- get => discardedEvents;
+ public DbgEvtType AddRecordedEvents {
+ get => addRecordedEvents;
set {
- if (discardedEvents == value)
+ if (addRecordedEvents == value)
return;
- discardedEvents = value;
- if (Recording)
- fiDbg_DiscardEvents.SetValue (dbgIFace, value);
- NotifyValueChanged (discardedEvents);
+ addRecordedEvents = value;
+ NotifyValueChanged (addRecordedEvents);
}
- }
+ }
public string DebugLogFilePath {
get => Configuration.Global.Get<string> ("DebugLogFilePath");
set {
fiDbgIFace_MaxLayoutingTries = dbgIfaceType.GetField("MaxLayoutingTries", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy);
fiDbgIFace_MaxDiscardCount = dbgIfaceType.GetField("MaxDiscardCount", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy);
- fiDbg_IncludeEvents = debuggerType.GetField("IncludeEvents");
- fiDbg_DiscardEvents = debuggerType.GetField("DiscardEvents");
+ fiDbg_IncludedEvents = debuggerType.GetField("IncludedEvents");
fiDbg_ConsoleOutput = debuggerType.GetField("ConsoleOutput");
delResetDebugger = (Action)Delegate.CreateDelegate(typeof(Action), null, debuggerType.GetMethod("Reset"));
/*delSaveDebugLog = (Action<object, string>)Delegate.CreateDelegate(typeof(Action<object, string>),
crowAssemblies.Add (a);
}
-
-
protected override void onStateChange(Status previousState, Status newState)
{
base.onStateChange(previousState, newState);
CMDRefresh.CanExecute = IsRunning;
}
- #region Mouse & Keyboard
+
+ #region Mouse & Keyboard
Point mouseScreenPos;//absolute on screen position.
public void onKeyDown(KeyEventArgs e)
{
}
}
#endregion
+
public ISurface MainSurface => IsRunning ? delGetMainSurface() : null;
public void Resize (int width, int height) {
if (IsRunning)
<Label Background="SeaGreen" Text="{../../../EnumValue}" Margin="3"/>
</HorizontalStack>
</Template>
- <Wrapper Name="Content" Height="Fit" Width="420" Background="Jet" Orientation="Vertical" />
+ <Wrapper Name="Content" Height="Fit" Width="700" Background="Jet" Orientation="Vertical" />
</Popper>
\ No newline at end of file
<Spinner Caption="Refresh Rate (ms)" Value="{²RefreshRate}" Maximum="1000"/>
<Spinner Caption="Max Layout Try" Value="{²MaxLayoutingTries}" Maximum="1000"/>
<Spinner Caption="Max Layout Discard" Value="{²MaxDiscardCount}" Maximum="1000"/>
- <GroupBox Caption="Debug Logger" IsEnabled="{DebugLogIsEnabled}">
- <VerticalStack>
- <EnumSelector RadioButtonStyle="CheckBox2" Template="#CECrowPlugin.ui.EnumSelector.template" Width="Stretched"
- Caption="Recorded Events" EnumValue="{²RecordedEvents}" BitFieldExcludeMask="255" />
- <EnumSelector RadioButtonStyle="CheckBox2" Template="#CECrowPlugin.ui.EnumSelector.template" Width="Stretched"
- Caption="Discarded Events" EnumValue="{²DiscardedEvents}" BitFieldExcludeMask="255" />
- <!--<HorizontalStack Height="Fit">
+ <GroupBox Caption="Debug Logger" IsEnabled="{DebugLogIsEnabled}" Height="40%">
+ <HorizontalStack>
+ <ListBox Data="{²RecordedEvents}"/>
+ <VerticalStack Width="50%">
+ <EnumSelector RadioButtonStyle="CheckBox2" Template="#CECrowPlugin.ui.EnumSelector.template" Width="Stretched"
+ Caption="Recorded Events" EnumValue="{²AddRecordedEvents}" />
+ <HorizontalStack>
+ <Button/>
+ </HorizontalStack>
+ </VerticalStack>
+
+ <!--<HorizontalStack Height="Fit"> BitFieldExcludeMask="255"
<CheckBox Caption="Recording" IsChecked="{²Recording}" Height="24" Width="30"
Checked="{sh.Path='A 8,8,7.5,0,6.3 O 0.8,0,0,1 f O 0,0,0,0.5 G'}"
Unchecked="{sh.Path='R 0.5,0.5,15,15 f O 0,0,0,1 G'}">
</ItemTemplate>
</Menu>
</HorizontalStack>-->
- </VerticalStack>
+ </HorizontalStack>
</GroupBox>
</VerticalStack>
</DockWindow>
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks>net5</TargetFrameworks>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="src\**\*.cs" />
<EmbeddedResource Include="ui\**\*.*" />
+ <EmbeddedResource Include="default.conf" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../CERoslynPlugin\CERoslynPlugin.csproj" />
--- /dev/null
+MainService=NetcoreDbgPlugin.NetcoreDbgService
\ No newline at end of file
CurrentState = Status.Paused;
}
- /*public Command CMDOptions_SelectNetcoredbgPath = new Command ("...",
+ public Command CMDOptions_SelectNetcoredbgPath => new ActionCommand ("...",
() => {
FileDialog dlg = App.LoadIMLFragment<FileDialog> (@"
<FileDialog Caption='Select netcoredbg executable path' CurrentDirectory='{NetcoredbgPath}'
- ShowFiles='true' ShowHidden='true'/>
- ");
+ ShowFiles='true' ShowHidden='true'/>");
dlg.OkClicked += (sender, e) => NetcoredbgPath = (sender as FileDialog).SelectedFileFullPath;
dlg.DataSource = this;
}
- );*/
+ );
public override string ConfigurationWindowPath => "#CENetcoreDbgPlugin.ui.winConfiguration.crow";
}
<?xml version="1.0"?>
-<DockWindow Caption="NetcoreDbg plugin configuration" Width="300" Height="400" Resizable="false">
+<DockWindow Caption="NetcoreDbg plugin configuration" Width="80%" Height="400" Resizable="false">
<VerticalStack RootDataLevel="true" Margin="5">
<HorizontalStack Height="Fit">
<Label Width="200" Text="Netcoredbg path"/>
AssemblyLoadContext pluginCtx = AssemblyLoadContext.GetLoadContext (Assembly.GetExecutingAssembly());
pluginCtx.Resolving += msbuildResolve;
+ /*foreach (string dll in Directory.GetFiles ("/usr/share/dotnet/shared/Microsoft.NETCore.App/5.0.17/", "*.dll")) {
+ try {
+ pluginCtx.LoadFromAssemblyPath (dll);
+ } catch (Exception ex) {
+ App.Log(LogType.Error, $"[RoslynService]{ex}");
+ }
+ }*/
+
foreach (string dll in Directory.GetFiles (MSBuildRoot, "*.dll")) {
try {
pluginCtx.LoadFromAssemblyPath (dll);
App.Log(LogType.Error, $"[RoslynService]{ex}");
}
}
- string capath = Path.Combine (MSBuildRoot, "Roslyn", "bincore");
+ string capath = Path.Combine (MSBuildRoot, "Roslyn");
+ foreach (string dll in Directory.GetFiles (capath, "*.dll")) {
+ try {
+ pluginCtx.LoadFromAssemblyPath (dll);
+ } catch (Exception ex) {
+ App.Log(LogType.Error, $"[RoslynService]{ex}");
+ }
+ }
+ capath = Path.Combine (MSBuildRoot, "Roslyn", "bincore");
foreach (string dll in Directory.GetFiles (capath, "*.dll")) {
try {
pluginCtx.LoadFromAssemblyPath (dll);
} catch (Exception ex) {
App.Log(LogType.Error, $"[RoslynService]{ex}");
}
-
}
}
Assembly msbuildResolve (AssemblyLoadContext context, AssemblyName assemblyName) {
"NuGet.Config"));
projectCollection.SetGlobalProperty ("DefaultItemExcludes", "obj/**/*;bin/**/*");
- projectCollection.SetGlobalProperty ("TargetFramework", "netcoreapp3.1");
- projectCollection.SetGlobalProperty ("SolutionDir", Path.GetDirectoryName (FullPath) + Path.DirectorySeparatorChar);
- //projectCollection.SetGlobalProperty ("Configuration", "Debug");
+ //projectCollection.SetGlobalProperty ("RoslynTargetsPath", Path.Combine(roslynService.MSBuildRoot, "Roslyn"));
//IDE.ProgressNotify (10);