initial commit
This commit is contained in:
parent
fb076c6f92
commit
2a5903cf1e
47
Plugins/UniversalEditor.Plugins.AutoSave/AutoSavePlugin.cs
Normal file
47
Plugins/UniversalEditor.Plugins.AutoSave/AutoSavePlugin.cs
Normal file
@ -0,0 +1,47 @@
|
||||
//
|
||||
// MyClass.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2020 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using MBS.Framework.UserInterface;
|
||||
|
||||
namespace UniversalEditor.Plugins.AutoSave
|
||||
{
|
||||
public class AutoSavePlugin : UserInterfacePlugin
|
||||
{
|
||||
private Timer tmr = new Timer();
|
||||
|
||||
private void tmr_Tick(object sender, EventArgs e)
|
||||
{
|
||||
Console.WriteLine("autosave: looking for dirty documents...");
|
||||
Console.WriteLine("autosave: saving dirty documents in /tmp/autosave/universal-editor/...");
|
||||
Console.WriteLine("autosave: going back to sleep");
|
||||
}
|
||||
|
||||
|
||||
protected override void InitializeInternal()
|
||||
{
|
||||
base.InitializeInternal();
|
||||
|
||||
tmr.Duration = 5 /*minutes*/ * 60 /*seconds in a minute*/ * 1000 /*milliseconds in a second*/;
|
||||
tmr.Tick += tmr_Tick;
|
||||
tmr.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2020 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
[assembly: AssemblyTitle("UniversalEditor.Plugins.AutoSave")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Mike Becker's Software")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Mike Becker's Software")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{385AB5A6-3EB6-4DF6-A7BF-DF9FFE43F192}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>UniversalEditor.Plugins.AutoSave</RootNamespace>
|
||||
<AssemblyName>UniversalEditor.Plugins.AutoSave</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
|
||||
<ReleaseVersion>4.0.2019.12</ReleaseVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Output\Debug\Plugins</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\Output\Release\Plugins</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AutoSavePlugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\MBS.Framework\MBS.Framework\MBS.Framework.csproj">
|
||||
<Project>{00266B21-35C9-4A7F-A6BA-D54D7FDCC25C}</Project>
|
||||
<Name>MBS.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\MBS.Framework.UserInterface\Libraries\MBS.Framework.UserInterface\MBS.Framework.UserInterface.csproj">
|
||||
<Project>{29E1C1BB-3EA5-4062-B62F-85EEC703FE07}</Project>
|
||||
<Name>MBS.Framework.UserInterface</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@ -211,6 +211,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.Mul
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MBS.Audio", "..\MBS.Audio\MBS.Audio\MBS.Audio.csproj", "{E0897B7B-617A-4709-A4C6-FC0F6B441B2A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.AutoSave", "Plugins\UniversalEditor.Plugins.AutoSave\UniversalEditor.Plugins.AutoSave.csproj", "{385AB5A6-3EB6-4DF6-A7BF-DF9FFE43F192}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -607,6 +609,10 @@ Global
|
||||
{E0897B7B-617A-4709-A4C6-FC0F6B441B2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E0897B7B-617A-4709-A4C6-FC0F6B441B2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E0897B7B-617A-4709-A4C6-FC0F6B441B2A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{385AB5A6-3EB6-4DF6-A7BF-DF9FFE43F192}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{385AB5A6-3EB6-4DF6-A7BF-DF9FFE43F192}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{385AB5A6-3EB6-4DF6-A7BF-DF9FFE43F192}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{385AB5A6-3EB6-4DF6-A7BF-DF9FFE43F192}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{6F0AB1AF-E1A1-4D19-B19C-05BBB15C94B2} = {05D15661-E684-4EC9-8FBD-C014BA433CC5}
|
||||
@ -706,6 +712,7 @@ Global
|
||||
{37504ECC-D87F-4E93-8E08-89C03BAAA6D9} = {2ED32D16-6C06-4450-909A-40D32DA67FB4}
|
||||
{75C99631-122C-4880-806E-646FCB021730} = {7B535D74-5496-4802-B809-89ED88274A91}
|
||||
{E0897B7B-617A-4709-A4C6-FC0F6B441B2A} = {20F315E0-52AE-479F-AF43-3402482C1FC8}
|
||||
{385AB5A6-3EB6-4DF6-A7BF-DF9FFE43F192} = {2ED32D16-6C06-4450-909A-40D32DA67FB4}
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
Policies = $0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user