Recover 2012 files from old backups
This commit is contained in:
1 parent
82dc55017d
commit
00373e3e34
42 files changed
+27801
No files matched your search
Executable
+23
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Document>
|
||||
<ExpressionList>
|
||||
<Expression String="sin(x) + cos(x)" IsVisible="True" Color="#FFAB108C">
|
||||
<Variable Key="pi" Value="3.14159265358979" />
|
||||
<Variable Key="e" Value="2.71828182845905" />
|
||||
<Variable Key="X" Value="17.0397739935217" />
|
||||
<Variable Key="x" Value="17.0397739935217" />
|
||||
</Expression>
|
||||
<Expression String="tan(tan(x))" IsVisible="False" Color="#FF1D1204">
|
||||
<Variable Key="pi" Value="3.14159265358979" />
|
||||
<Variable Key="e" Value="2.71828182845905" />
|
||||
<Variable Key="X" Value="17.0397739935217" />
|
||||
<Variable Key="x" Value="17.0397739935217" />
|
||||
</Expression>
|
||||
<Expression String="sin(sin(x))" IsVisible="True" Color="#FF51808E">
|
||||
<Variable Key="pi" Value="3.14159265358979" />
|
||||
<Variable Key="e" Value="2.71828182845905" />
|
||||
<Variable Key="X" Value="17.0397739935217" />
|
||||
<Variable Key="x" Value="17.0397739935217" />
|
||||
</Expression>
|
||||
</ExpressionList>
|
||||
</Document>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="MatrixCalculator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<MatrixCalculator.Properties.Settings>
|
||||
<setting name="DoublePrecision" serializeAs="String">
|
||||
<value>3</value>
|
||||
</setting>
|
||||
<setting name="NumberResultAsMatrix" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="InternalCsvSeparators" serializeAs="String">
|
||||
<value>,;</value>
|
||||
</setting>
|
||||
</MatrixCalculator.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="MatrixCalculator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<MatrixCalculator.Properties.Settings>
|
||||
<setting name="DoublePrecision" serializeAs="String">
|
||||
<value>3</value>
|
||||
</setting>
|
||||
<setting name="NumberResultAsMatrix" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="InternalCsvSeparators" serializeAs="String">
|
||||
<value>,;</value>
|
||||
</setting>
|
||||
</MatrixCalculator.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
*
|
||||
* System.Data.SQLite.dll.config -
|
||||
*
|
||||
* WARNING: This XML configuration file is intended for use within the NuGet
|
||||
* package directories only. Please do not copy this file to any of
|
||||
* the build output directories because it could interfere with the
|
||||
* native library pre-loading feature.
|
||||
*
|
||||
* Written by Joe Mistachkin.
|
||||
* Released to the public domain, use at your own risk!
|
||||
*
|
||||
-->
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="PreLoadSQLite_BaseDirectory"
|
||||
value="%PreLoadSQLite_AssemblyDirectory%\..\..\build\%PreLoadSQLite_TargetFramework%" />
|
||||
</appSettings>
|
||||
</configuration>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,104 @@
|
||||
<Window x:Class="Factorizator.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Factorizator" Height="355" Width="365"
|
||||
KeyDown="Window_KeyDown" Icon="/Factorizator;component/factorizator-logo.ico">
|
||||
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/Styles/ButtonStyle.xaml" />
|
||||
<ResourceDictionary Source="/Styles/GroupBoxStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
|
||||
<Window.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint=".5,1">
|
||||
<GradientStop Color="#EEE" Offset="0" />
|
||||
<GradientStop Color="#BBB" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Window.Background>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="Input number">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox Name="inputNumber" Grid.Column="0" TextChanged="inputNumber_TextChanged" />
|
||||
<Button Name="buttonCalculate" Grid.Column="1" Width="64" Click="buttonCalculate_Click">Calculate</Button>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="Factorization" Grid.Row="1">
|
||||
<ListView Name="factorizationDisplay" BorderBrush="#ABC" HorizontalContentAlignment="Stretch">
|
||||
<ListView.View>
|
||||
<GridView AllowsColumnReorder="False">
|
||||
<GridViewColumn Header="Remainder" DisplayMemberBinding="{Binding FirstString}" Width="165"/>
|
||||
<GridViewColumn Header="Divisor" DisplayMemberBinding="{Binding SecondString}" Width="140"/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
|
||||
<ListView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Name="contextCopyRem" Header="Copy remainder" InputGestureText="Ctrl+C" Click="contextCopyRem_Click"/>
|
||||
<MenuItem Name="contextCopyDiv" Header="Copy divisor" InputGestureText="Ctrl+Shift+C" Click="contextCopyDiv_Click"/>
|
||||
<Separator />
|
||||
<MenuItem Name="contextClear" Header="Clear" Click="contextClear_Click"/>
|
||||
</ContextMenu>
|
||||
</ListView.ContextMenu>
|
||||
</ListView>
|
||||
</GroupBox>
|
||||
|
||||
<StatusBar Grid.Row="2">
|
||||
<StatusBar.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#80FFFFFF" Offset="0" />
|
||||
<GradientStop Color="#30FFFFFF" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</StatusBar.Background>
|
||||
|
||||
<StatusBar.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
</ItemsPanelTemplate>
|
||||
</StatusBar.ItemsPanel>
|
||||
|
||||
<StatusBarItem>
|
||||
<TextBlock Name="statusMessage" Grid.Column="0">Ready</TextBlock>
|
||||
</StatusBarItem>
|
||||
|
||||
<StatusBarItem Grid.Column="1">
|
||||
<ProgressBar Name="statusProgress"
|
||||
Height="12" Width="60"
|
||||
IsIndeterminate="True"
|
||||
Visibility="Hidden" />
|
||||
</StatusBarItem>
|
||||
|
||||
<StatusBarItem Grid.Column="2">
|
||||
<Button Name="statusCancel" Click="statusCancel_Click"
|
||||
Style="{StaticResource ButtonSmallStyle}"
|
||||
Width="50"
|
||||
Visibility="Hidden" >Cancel</Button>
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,172 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Threading;
|
||||
|
||||
namespace Factorizator
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
#region Error variable
|
||||
private bool error = false;
|
||||
private bool Error
|
||||
{
|
||||
get { return error; }
|
||||
set
|
||||
{
|
||||
error = value;
|
||||
inputNumber.Background = (value) ? (Brushes.Pink) : (Brushes.White);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Vars
|
||||
Thread worker = null;
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Keyboard handler
|
||||
private void Window_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
e.Handled = true;
|
||||
var text = Keyboard.FocusedElement as TextBox;
|
||||
|
||||
if (e.KeyboardDevice.Modifiers == ModifierKeys.None)
|
||||
{
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Enter: buttonCalculate_Click(this, new RoutedEventArgs()); break;
|
||||
case Key.Escape: statusCancel_Click(this, new RoutedEventArgs()); break;
|
||||
case Key.F1: DynamicLink.Launcher.StartModule("Help", "factorizator"); break;
|
||||
default: e.Handled = false; break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (text == null && e.KeyboardDevice.Modifiers == ModifierKeys.Control && e.Key == Key.C)
|
||||
contextCopyRem_Click(this, new RoutedEventArgs());
|
||||
|
||||
else if (text == null && e.KeyboardDevice.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift) && e.Key == Key.C)
|
||||
contextCopyDiv_Click(this, new RoutedEventArgs());
|
||||
|
||||
else e.Handled = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region UI handlers
|
||||
private void inputNumber_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (Error)
|
||||
{
|
||||
Error = false;
|
||||
statusMessage.Text = "Ready";
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonCalculate_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (inputNumber.Text == "") return;
|
||||
|
||||
decimal d;
|
||||
|
||||
if (!decimal.TryParse(inputNumber.Text, out d))
|
||||
{
|
||||
Error = true;
|
||||
statusMessage.Text = "Bad number.";
|
||||
}
|
||||
|
||||
else BeginWork(d);
|
||||
}
|
||||
|
||||
private void contextCopyRem_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DecimalPair pair = factorizationDisplay.SelectedItem as DecimalPair;
|
||||
if (pair == null) return;
|
||||
|
||||
Clipboard.SetText(pair.First.ToString());
|
||||
}
|
||||
|
||||
private void contextCopyDiv_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DecimalPair pair = factorizationDisplay.SelectedItem as DecimalPair;
|
||||
if (pair == null) return;
|
||||
|
||||
Clipboard.SetText(pair.Second.ToString());
|
||||
}
|
||||
|
||||
private void contextClear_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
factorizationDisplay.Items.Clear();
|
||||
}
|
||||
|
||||
private void statusCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FactorizatorAlgorithm.Abort = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Worker
|
||||
void BeginWork(decimal num)
|
||||
{
|
||||
num = Math.Truncate(num);
|
||||
|
||||
// Visual stuff
|
||||
statusMessage.Text = "Calculating...";
|
||||
statusProgress.Visibility = System.Windows.Visibility.Visible;
|
||||
statusCancel.Visibility = System.Windows.Visibility.Visible;
|
||||
|
||||
// Start thread
|
||||
worker = new Thread(new ParameterizedThreadStart(DoWork));
|
||||
worker.Start(num);
|
||||
}
|
||||
|
||||
delegate void FinishWorkDelegate(decimal[] resultFact, decimal[] resultNum);
|
||||
void DoWork(object param)
|
||||
{
|
||||
decimal number = (decimal)param;
|
||||
decimal[] resultFact, resultNum;
|
||||
|
||||
FactorizatorAlgorithm.Factorize(number, out resultFact, out resultNum);
|
||||
Dispatcher.Invoke(new FinishWorkDelegate(FinishWork), resultFact, resultNum);
|
||||
}
|
||||
|
||||
void FinishWork(decimal[] resultFact, decimal[] resultNum)
|
||||
{
|
||||
factorizationDisplay.Items.Clear();
|
||||
|
||||
// Show results
|
||||
for (int i = 0; i < resultNum.Length; i++)
|
||||
{
|
||||
if (i < resultFact.Length)
|
||||
factorizationDisplay.Items.Add(new DecimalPair(resultNum[i], resultFact[i]));
|
||||
else factorizationDisplay.Items.Add(new DecimalPair(resultNum[i], 0));
|
||||
}
|
||||
|
||||
// Update visual stuff
|
||||
statusMessage.Text = "Ready";
|
||||
statusProgress.Visibility = System.Windows.Visibility.Hidden;
|
||||
statusCancel.Visibility = System.Windows.Visibility.Hidden;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{5BF4AB9C-9AE0-44ED-B49E-09ACE92C8D89}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Help</RootNamespace>
|
||||
<AssemblyName>Help</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>help-logo.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<NoWin32Manifest>true</NoWin32Manifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release - Publish|x86'">
|
||||
<OutputPath>..\..\TibisMathematicsSuite - Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HelpSystem\HelpChapter.cs" />
|
||||
<Compile Include="HelpSystem\HelpHtmlWrapper.cs" />
|
||||
<Compile Include="HelpSystem\HelpManager.cs" />
|
||||
<Compile Include="HelpSystem\HelpTopic.cs" />
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="Styles\SearchTextbox.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Launcher\DynamicLink.csproj">
|
||||
<Project>{A04B247B-6A95-462B-9E07-3337A1C158F1}</Project>
|
||||
<Name>Launcher</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="MSHTML">
|
||||
<Guid>{3050F1C5-98B5-11CF-BB82-00AA00BDCE0B}</Guid>
|
||||
<VersionMajor>4</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\help-back.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\help-clear.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\help-forward.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\help-home.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\help-logo-small.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\help-search.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\help-searchopt.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="help-logo.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data;
|
||||
|
||||
namespace MatrixCalculator
|
||||
{
|
||||
public static class CsvParser
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a CSV string into a DataTable
|
||||
/// </summary>
|
||||
/// <param name="csv">CSV</param>
|
||||
/// <param name="separators">Separator characters</param>
|
||||
/// <param name="combine">Should separators be combined?</param>
|
||||
public static DataTable GetTable(string csv, char[] separators, bool combine = false)
|
||||
{
|
||||
DataTable table = new DataTable("table");
|
||||
table.Columns.Add();
|
||||
|
||||
csv = csv.TrimEnd('\n', '\r');
|
||||
string[] lines = csv.Split('\n');
|
||||
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
string[] vals = lines[i].Split(separators, (combine ? StringSplitOptions.RemoveEmptyEntries : StringSplitOptions.None));
|
||||
table.Rows.Add("");
|
||||
|
||||
for (int j = 0; j < vals.Length; j++)
|
||||
{
|
||||
if (j >= table.Columns.Count) table.Columns.Add();
|
||||
table.Rows[i][j] = vals[j];
|
||||
}
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts matrix to CSV string
|
||||
/// </summary>
|
||||
/// <param name="m">The matrix</param>
|
||||
/// <param name="sep">CSV separator character</param>
|
||||
public static string ToCSV (MathNet.Numerics.LinearAlgebra.Matrix m, char sep = ',')
|
||||
{
|
||||
StringBuilder str = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < m.RowCount; i++)
|
||||
{
|
||||
for (int j = 0; j < m.ColumnCount; j++) {
|
||||
str.Append(m[i, j]);
|
||||
if (j < m.ColumnCount - 1) str.Append(sep);
|
||||
}
|
||||
|
||||
str.Append('\n');
|
||||
}
|
||||
|
||||
return str.ToString();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Converts the data in a DataGridView to CSV format
|
||||
/// </summary>
|
||||
/// <param name="m">The DataGridView</param>
|
||||
/// <param name="sep">CSV separator</param>
|
||||
public static string ToCSV(System.Windows.Forms.DataGridView m, char sep = ',')
|
||||
{
|
||||
return ToCSV(m, 0, 0, m.Rows.Count, m.Columns.Count, false, sep);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the data in a DataGridView to CSV format
|
||||
/// </summary>
|
||||
/// <param name="m">The DataGridView</param>
|
||||
/// <param name="startRow">First row in range.</param>
|
||||
/// <param name="startCol">First column in range.</param>
|
||||
/// <param name="endRow">Last row in range.</param>
|
||||
/// <param name="endCol">Last column in range.</param>
|
||||
/// <param name="just_selected">Only selected cells will be taken.</param>
|
||||
/// <param name="sep">CSV separator</param>
|
||||
public static string ToCSV(System.Windows.Forms.DataGridView m, int startRow, int startCol, int endRow, int endCol, bool just_selected = false, char sep = ',')
|
||||
{
|
||||
StringBuilder str = new StringBuilder();
|
||||
|
||||
for (int i = startRow; i < endRow; i++)
|
||||
{
|
||||
for (int j = startCol; j < endCol; j++)
|
||||
{
|
||||
if (!just_selected || (just_selected && m[j, i].Selected))
|
||||
str.Append(m[j, i].Value);
|
||||
|
||||
if (j < m.ColumnCount - 1) str.Append(sep);
|
||||
}
|
||||
|
||||
str.Append('\n');
|
||||
}
|
||||
|
||||
return str.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using MathNet.Numerics.LinearAlgebra;
|
||||
|
||||
namespace MatrixCalculator
|
||||
{
|
||||
public partial class Editor : Form
|
||||
{
|
||||
bool allowExit = true;
|
||||
|
||||
#region Setters and getters
|
||||
public string MatrixName {
|
||||
get { return inputName.Text; }
|
||||
set { inputName.Text = value; }
|
||||
}
|
||||
|
||||
public string MatrixDescription
|
||||
{
|
||||
get { return inputDescription.Text; }
|
||||
set { inputDescription.Text = value; }
|
||||
}
|
||||
|
||||
public Matrix Matrix
|
||||
{
|
||||
get { return GridViewHelper.GetMatrix(dataEditor); }
|
||||
set {
|
||||
GridViewHelper.PutMatrix(value, dataEditor);
|
||||
inputColumns.Value = value.ColumnCount;
|
||||
inputRows.Value = value.RowCount;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
public Editor()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
inputName.Text = "New matrix ";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Resize buttons
|
||||
private void buttonResizeReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
inputRows.Value = dataEditor.Rows.Count;
|
||||
inputColumns.Value = dataEditor.Columns.Count;
|
||||
}
|
||||
|
||||
private void buttonResizeApply_Click(object sender, EventArgs e)
|
||||
{
|
||||
int rows = Convert.ToInt32(inputRows.Value);
|
||||
int cols = Convert.ToInt32(inputColumns.Value);
|
||||
|
||||
GridViewHelper.Resize(dataEditor, cols, rows);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Form buttons
|
||||
private void buttonAccept_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
|
||||
// Make sure name is not empty
|
||||
if (MatrixName == "")
|
||||
{
|
||||
allowExit = false;
|
||||
MessageBox.Show("You must enter a name!", "Error!");
|
||||
}
|
||||
|
||||
// Make sure size is not empty! Empty matrices behave very weird
|
||||
else if (dataEditor.Columns.Count == 0 || dataEditor.Rows.Count == 0)
|
||||
{
|
||||
allowExit = false;
|
||||
MessageBox.Show("The matrix must have at least one row and one column!", "Error!");
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Right click menu
|
||||
private void contextMenuCut_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewHelper.CopySelected(dataEditor);
|
||||
|
||||
foreach (DataGridViewCell i in dataEditor.SelectedCells) i.Value = "0";
|
||||
}
|
||||
|
||||
private void contextMenuCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewHelper.CopySelected(dataEditor);
|
||||
}
|
||||
|
||||
private void contextMenuPaste_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewHelper.Paste(dataEditor);
|
||||
}
|
||||
|
||||
private void contextMenuClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (DataGridViewCell i in dataEditor.SelectedCells) i.Value = "0";
|
||||
}
|
||||
|
||||
private void contextMenuClearAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (DataGridViewRow i in dataEditor.Rows)
|
||||
foreach (DataGridViewCell j in i.Cells)
|
||||
j.Value = "0";
|
||||
}
|
||||
|
||||
private void contextMenuInsertRow_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataEditor.CurrentCell != null) dataEditor.Rows.Insert(dataEditor.CurrentCell.RowIndex, new DataGridViewRow());
|
||||
else dataEditor.Rows.Add();
|
||||
}
|
||||
|
||||
private void contextMenuInsertCol_Click(object sender, EventArgs e)
|
||||
{
|
||||
var col = new DataGridViewTextBoxColumn()
|
||||
{
|
||||
SortMode = DataGridViewColumnSortMode.NotSortable,
|
||||
AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCellsExceptHeader
|
||||
};
|
||||
|
||||
if (dataEditor.CurrentCell != null) dataEditor.Columns.Insert(dataEditor.CurrentCell.ColumnIndex, col);
|
||||
else dataEditor.Columns.Add(col);
|
||||
}
|
||||
|
||||
private void contextMenuDelRow_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (DataGridViewCell i in dataEditor.SelectedCells)
|
||||
dataEditor.Rows.RemoveAt(i.RowIndex);
|
||||
}
|
||||
|
||||
private void contextMenuDelColumn_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (DataGridViewCell i in dataEditor.SelectedCells)
|
||||
dataEditor.Columns.RemoveAt(i.ColumnIndex);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Drawing
|
||||
protected override void OnPaintBackground(PaintEventArgs e)
|
||||
{
|
||||
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void dataEditor_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex < 0 || e.ColumnIndex >= dataEditor.Columns.Count) return;
|
||||
if (e.RowIndex < 0 || e.RowIndex >= dataEditor.Rows.Count) return;
|
||||
|
||||
if (e.Button == System.Windows.Forms.MouseButtons.Right)
|
||||
{
|
||||
dataEditor.CurrentCell = dataEditor.Rows[e.RowIndex].Cells[e.ColumnIndex];
|
||||
if (dataEditor.ContextMenu != null) dataEditor.ContextMenu.Show(dataEditor, e.Location);
|
||||
}
|
||||
}
|
||||
|
||||
private void Editor_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (!allowExit)
|
||||
{
|
||||
allowExit = true;
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MatrixCalculator
|
||||
{
|
||||
public partial class ImportCsvWindow : Form
|
||||
{
|
||||
private string csv;
|
||||
private bool allowExit = true;
|
||||
|
||||
#region Public properties
|
||||
public int StartRow { get; set; }
|
||||
public int StartCol { get; set; }
|
||||
public int EndRow { get; set; }
|
||||
public int EndCol { get; set; }
|
||||
|
||||
public string Csv{
|
||||
get { return csv; }
|
||||
set { csv = value; UpdateGrid(); }
|
||||
}
|
||||
|
||||
public string MatrixName {
|
||||
get {
|
||||
return inputName.Text;
|
||||
}
|
||||
|
||||
set {
|
||||
inputName.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public MathNet.Numerics.LinearAlgebra.Matrix Matrix
|
||||
{
|
||||
get { return GridViewHelper.GetMatrix(dataGrid); }
|
||||
set { GridViewHelper.PutMatrix(value, dataGrid); }
|
||||
}
|
||||
#endregion
|
||||
|
||||
private Dictionary<char, bool> separators = new Dictionary<char,bool>();
|
||||
|
||||
public ImportCsvWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
separators.Add(',', true);
|
||||
separators.Add('\t', false);
|
||||
separators.Add(' ', false);
|
||||
separators.Add(';', false);
|
||||
}
|
||||
|
||||
public void LoadFile(string filename)
|
||||
{
|
||||
if (System.IO.File.Exists(filename))
|
||||
Csv = System.IO.File.ReadAllText(filename);
|
||||
}
|
||||
|
||||
private void UpdateGrid()
|
||||
{
|
||||
List<char> sep = new List<char>();
|
||||
foreach (var i in separators)
|
||||
if (i.Value) sep.Add(i.Key);
|
||||
|
||||
// Update data
|
||||
dataGrid.DataSource = CsvParser.GetTable(Csv, sep.ToArray(), checkCombine.Checked);
|
||||
|
||||
foreach (DataGridViewColumn i in dataGrid.Columns)
|
||||
{
|
||||
i.HeaderText = "";
|
||||
i.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||
}
|
||||
|
||||
// Update sizes
|
||||
inputStartRow.Value = 0;
|
||||
inputStartColumn.Value = 0;
|
||||
inputEndColumn.Value = inputEndColumn.Maximum = dataGrid.Columns.Count - 1;
|
||||
inputEndRow.Value = inputEndRow.Maximum = dataGrid.Rows.Count - 1;
|
||||
}
|
||||
|
||||
#region Separators
|
||||
private void checkCombine_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateGrid();
|
||||
}
|
||||
|
||||
private void checkSepComma_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
separators[','] = checkSepComma.Checked;
|
||||
UpdateGrid();
|
||||
}
|
||||
|
||||
private void checkSepSemicolon_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
separators[';'] = checkSepComma.Checked;
|
||||
UpdateGrid();
|
||||
}
|
||||
|
||||
private void checkSepSpace_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
separators[' '] = checkSepComma.Checked;
|
||||
UpdateGrid();
|
||||
}
|
||||
|
||||
private void checkSepOthers_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
List<char> temp = new List<char>();
|
||||
foreach (var i in separators)
|
||||
if (i.Key != ' ' && i.Key != '\t' && i.Key != ';' && i.Key != ',')
|
||||
temp.Add(i.Key);
|
||||
|
||||
foreach (var i in temp) separators[i] = false;
|
||||
|
||||
if (checkSepOthers.Checked)
|
||||
foreach (var i in inputSepOthers.Text)
|
||||
separators[i] = true;
|
||||
|
||||
UpdateGrid();
|
||||
}
|
||||
|
||||
private void checkSepTab_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
separators['\t'] = checkSepComma.Checked;
|
||||
UpdateGrid();
|
||||
}
|
||||
|
||||
private void inputSepOthers_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
List<char> temp = new List<char>();
|
||||
foreach (var i in separators)
|
||||
if (i.Key != ' ' && i.Key != '\t' && i.Key != ';' && i.Key != ',')
|
||||
temp.Add(i.Key);
|
||||
|
||||
foreach (var i in temp) separators[i] = false;
|
||||
|
||||
if (checkSepOthers.Checked)
|
||||
foreach (var i in inputSepOthers.Text)
|
||||
separators[i] = true;
|
||||
|
||||
UpdateGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Form buttons
|
||||
private void buttonEntire_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartCol = StartRow = 0;
|
||||
inputEndColumn.Value = dataGrid.Columns.Count - 1;
|
||||
inputEndRow.Value = dataGrid.Rows.Count - 1;
|
||||
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void buttonAccept_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get numbers
|
||||
StartCol = Convert.ToInt32(inputStartColumn.Value);
|
||||
StartRow = Convert.ToInt32(inputStartRow.Value);
|
||||
EndCol = Convert.ToInt32(inputEndColumn.Value);
|
||||
EndRow = Convert.ToInt32(inputEndRow.Value);
|
||||
|
||||
// Validate input
|
||||
if (inputName.Text == "")
|
||||
{
|
||||
allowExit = false;
|
||||
MessageBox.Show("Name cannot be empty!", "Error!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (EndCol - StartCol <= 0 || EndRow - StartRow <= 0)
|
||||
{
|
||||
allowExit = false;
|
||||
MessageBox.Show("Invalid range, the matrix must have at least one row and one column.", "Error!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Trim unneeded rows and columns
|
||||
while (StartCol > 0) {
|
||||
dataGrid.Columns.RemoveAt(0);
|
||||
StartCol--;
|
||||
EndCol--;
|
||||
}
|
||||
|
||||
while (StartRow > 0) {
|
||||
dataGrid.Rows.RemoveAt(0);
|
||||
StartRow--;
|
||||
EndRow--;
|
||||
}
|
||||
|
||||
GridViewHelper.Resize(dataGrid, EndCol + 1, EndRow + 1);
|
||||
|
||||
// Done, finish
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void ImportCsvWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (!allowExit)
|
||||
{
|
||||
allowExit = true;
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
#region Painting
|
||||
protected override void OnPaintBackground(PaintEventArgs e)
|
||||
{
|
||||
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using MathNet.Numerics.LinearAlgebra;
|
||||
|
||||
namespace MatrixCalculator
|
||||
{
|
||||
static class GridViewHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Loads a matrix in a DataGridView
|
||||
/// </summary>
|
||||
public static void PutMatrix(Matrix m, DataGridView grid)
|
||||
{
|
||||
// Reset grid
|
||||
grid.Rows.Clear();
|
||||
grid.Columns.Clear();
|
||||
|
||||
// Add columns
|
||||
for (int i = 0; i < m.ColumnCount; i++)
|
||||
{
|
||||
var col = new DataGridViewTextBoxColumn()
|
||||
{
|
||||
SortMode = DataGridViewColumnSortMode.NotSortable,
|
||||
AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells
|
||||
};
|
||||
|
||||
grid.Columns.Add(col);
|
||||
}
|
||||
|
||||
// Add rows and data
|
||||
for (int i = 0; i < m.RowCount; i++)
|
||||
{
|
||||
grid.Rows.Add();
|
||||
|
||||
for (int j = 0; j < m.ColumnCount; j++)
|
||||
grid[j, i].Value = MyDouble.String(m[i, j]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the matrix from a DataGridView
|
||||
/// </summary>
|
||||
public static Matrix GetMatrix(DataGridView grid)
|
||||
{
|
||||
Matrix m = new Matrix(grid.Rows.Count, grid.Columns.Count);
|
||||
|
||||
for (int i = 0; i < m.RowCount; i++)
|
||||
for (int j = 0; j < m.ColumnCount; j++)
|
||||
{
|
||||
double temp = 0;
|
||||
|
||||
if (grid[j, i].Value != null)
|
||||
double.TryParse(grid[j, i].Value.ToString(), out temp);
|
||||
|
||||
m[i, j] = temp;
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resizes a DataGridView
|
||||
/// </summary>
|
||||
/// <param name="grid">The DataGridView</param>
|
||||
/// <param name="ncols">The new number of columns</param>
|
||||
/// <param name="nrows">The new number of rows</param>
|
||||
public static void Resize(DataGridView grid, int ncols, int nrows)
|
||||
{
|
||||
// Add columns
|
||||
while (grid.Columns.Count < ncols)
|
||||
{
|
||||
DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn()
|
||||
{
|
||||
AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells,
|
||||
SortMode = DataGridViewColumnSortMode.NotSortable
|
||||
};
|
||||
|
||||
grid.Columns.Add(col);
|
||||
}
|
||||
|
||||
// Remove columns
|
||||
while (grid.Columns.Count > ncols)
|
||||
grid.Columns.Remove(grid.Columns.GetLastColumn(DataGridViewElementStates.Displayed, DataGridViewElementStates.None));
|
||||
|
||||
// Add rows
|
||||
while (grid.Rows.Count < nrows)
|
||||
grid.Rows.Add();
|
||||
|
||||
// Remove rows
|
||||
while (grid.Rows.Count > nrows)
|
||||
grid.Rows.RemoveAt(grid.Rows.GetLastRow(DataGridViewElementStates.Displayed));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies the selected area to clipboard
|
||||
/// </summary>
|
||||
public static void CopySelected(DataGridView grid)
|
||||
{
|
||||
int minRow, minCol, maxRow, maxCol;
|
||||
minRow = minCol = int.MaxValue;
|
||||
maxRow = maxCol = int.MinValue;
|
||||
|
||||
foreach (DataGridViewCell i in grid.SelectedCells)
|
||||
{
|
||||
minRow = Math.Min(minRow, i.RowIndex);
|
||||
minCol = Math.Min(minCol, i.ColumnIndex);
|
||||
maxRow = Math.Max(maxRow, i.RowIndex);
|
||||
maxCol = Math.Max(maxCol, i.ColumnIndex);
|
||||
}
|
||||
|
||||
string csv = CsvParser.ToCSV(grid, minRow, minCol, maxRow, maxCol, true);
|
||||
Clipboard.SetText(csv, TextDataFormat.CommaSeparatedValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pastes clipboard content into selected cell and beyond
|
||||
/// </summary>
|
||||
public static void Paste(DataGridView grid)
|
||||
{
|
||||
// Where to paste
|
||||
int row = 0, col = 0;
|
||||
if (grid.CurrentCell != null) {
|
||||
row = grid.CurrentCell.RowIndex;
|
||||
col = grid.CurrentCell.ColumnIndex;
|
||||
}
|
||||
|
||||
// Get data
|
||||
string data = "";
|
||||
if (Clipboard.ContainsText(TextDataFormat.CommaSeparatedValue)) data = Clipboard.GetText(TextDataFormat.CommaSeparatedValue);
|
||||
else if (Clipboard.ContainsText()) data = Clipboard.GetText();
|
||||
|
||||
var table = CsvParser.GetTable(data, MatrixCalculator.Properties.Settings.Default.InternalCsvSeparators.ToArray());
|
||||
|
||||
// Put data in table
|
||||
for (int i = 0; i < table.Rows.Count; i++)
|
||||
for (int j = 0; j < table.Columns.Count; j++)
|
||||
if (table.Rows[i][j].ToString() != "" && row + i < grid.Rows.Count && col + j < grid.Columns.Count)
|
||||
grid[j + col, i + row].Value = table.Rows[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data;
|
||||
using MathNet.Numerics.LinearAlgebra;
|
||||
|
||||
namespace MatrixCalculator
|
||||
{
|
||||
static class MatrixConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Puts a matrix in a DataTable
|
||||
/// </summary>
|
||||
public static DataTable GetTable(Matrix matrix)
|
||||
{
|
||||
DataTable table = new DataTable("matrix");
|
||||
|
||||
for (int i = 0; i < matrix.ColumnCount; i++)
|
||||
table.Columns.Add();
|
||||
|
||||
for (int i = 0; i < matrix.RowCount; i++)
|
||||
{
|
||||
table.Rows.Add("");
|
||||
|
||||
for (int j = 0; j < matrix.ColumnCount; j++)
|
||||
table.Rows[i][j] = matrix[i, j].ToString();
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a DataTable into a matrix
|
||||
/// </summary>
|
||||
public static Matrix FromTable(DataTable table)
|
||||
{
|
||||
Matrix matrix = new Matrix(table.Rows.Count, table.Columns.Count);
|
||||
|
||||
for (int i = 0; i < matrix.RowCount; i++)
|
||||
for (int j = 0; j < matrix.ColumnCount; j++)
|
||||
{
|
||||
double temp = 0;
|
||||
double.TryParse(table.Rows[i][j].ToString(), out temp);
|
||||
matrix[i, j] = temp;
|
||||
}
|
||||
|
||||
return matrix;
|
||||
}
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using MathNet.Numerics.LinearAlgebra;
|
||||
|
||||
namespace MatrixCalculator
|
||||
{
|
||||
static class MatrixHelper
|
||||
{
|
||||
public static bool Equal(Matrix a, Matrix b)
|
||||
{
|
||||
if (a.RowCount != b.RowCount || a.ColumnCount != b.ColumnCount) return false;
|
||||
|
||||
for (int i = 0; i < a.RowCount; i++)
|
||||
for (int j = 0; j < a.ColumnCount; j++)
|
||||
if (a[i, j] != b[i, j]) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static Matrix Power(Matrix mat, int power)
|
||||
{
|
||||
// Solution
|
||||
Matrix sol = Matrix.Identity(mat.RowCount, mat.ColumnCount);
|
||||
|
||||
if (power < 0) {
|
||||
mat = mat.Inverse();
|
||||
power *= -1;
|
||||
}
|
||||
|
||||
// Now raise to power binary
|
||||
for (int i = 0; (1 << i) <= power; i++)
|
||||
{
|
||||
if ((power & (1 << i)) != 0) sol = (sol * mat);
|
||||
mat = (mat * mat);
|
||||
}
|
||||
|
||||
// Done
|
||||
return sol;
|
||||
}
|
||||
|
||||
public static double Max(Matrix mat)
|
||||
{
|
||||
double max = double.MinValue;
|
||||
|
||||
for (int i = 0; i < mat.RowCount; i++)
|
||||
for (int j = 0; j < mat.ColumnCount; j++)
|
||||
max = Math.Max(mat[i, j], max);
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
public static double Min(Matrix mat)
|
||||
{
|
||||
double min = double.MaxValue;
|
||||
|
||||
for (int i = 0; i < mat.RowCount; i++)
|
||||
for (int j = 0; j < mat.ColumnCount; j++)
|
||||
min = Math.Min(mat[i, j], min);
|
||||
|
||||
return min;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,812 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using MathNet.Numerics.LinearAlgebra;
|
||||
|
||||
namespace MatrixCalculator
|
||||
{
|
||||
public partial class MainWindow : Form
|
||||
{
|
||||
private WorksheetFile worksheet = new WorksheetFile();
|
||||
private List<Matrix> matrices = new List<Matrix>();
|
||||
private Matrix matrixA, matrixB, matrixResult;
|
||||
|
||||
#region Matrix properties
|
||||
private Matrix MatrixA {
|
||||
get { return matrixA; }
|
||||
set {
|
||||
matrixA = value;
|
||||
GridViewHelper.PutMatrix(matrixA, dataMatrixA);
|
||||
}
|
||||
}
|
||||
|
||||
private Matrix MatrixB
|
||||
{
|
||||
get { return matrixB; }
|
||||
set
|
||||
{
|
||||
matrixB = value;
|
||||
GridViewHelper.PutMatrix(matrixB, dataMatrixB);
|
||||
}
|
||||
}
|
||||
|
||||
private Matrix MatrixResult
|
||||
{
|
||||
get { return matrixResult; }
|
||||
set
|
||||
{
|
||||
matrixResult = value;
|
||||
GridViewHelper.PutMatrix(matrixResult, dataResult);
|
||||
}
|
||||
}
|
||||
|
||||
private Matrix MatrixPreview
|
||||
{
|
||||
get {
|
||||
if (listMatrices.SelectedItems.Count == 1)
|
||||
return matrices[listMatrices.SelectedIndices[0]];
|
||||
else return null;
|
||||
}
|
||||
set {
|
||||
GridViewHelper.PutMatrix(value, dataPreview);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
ResetAll();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region User interface
|
||||
|
||||
#region Menus
|
||||
private void menuFileNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!ShowSaveWarningDialog()) return;
|
||||
|
||||
ResetAll();
|
||||
worksheet = new WorksheetFile();
|
||||
}
|
||||
|
||||
private void menuFileOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!ShowSaveWarningDialog()) return;
|
||||
|
||||
// Open file dialog
|
||||
string file;
|
||||
if (!OpenDialog("Open worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file)) return;
|
||||
|
||||
// Open the file
|
||||
DataTable data = new DataTable();
|
||||
try {
|
||||
worksheet = new WorksheetFile(file);
|
||||
data = worksheet.Read();
|
||||
}
|
||||
|
||||
catch (Exception ex) {
|
||||
MessageBox.Show("Error:" + ex.Message, "Error!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Load data
|
||||
ResetAll();
|
||||
AddMatrices(data);
|
||||
}
|
||||
|
||||
private void menuFileSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (worksheet.FileName == "")
|
||||
{
|
||||
string file;
|
||||
if (!SaveDialog("Save worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file)) return;
|
||||
|
||||
worksheet.FileName = file;
|
||||
}
|
||||
|
||||
try { worksheet.Save(); }
|
||||
catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Error!"); }
|
||||
}
|
||||
|
||||
private void menuFileSaveAs_Click(object sender, EventArgs e)
|
||||
{
|
||||
string file;
|
||||
if (!SaveDialog("Save worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file)) return;
|
||||
|
||||
try { worksheet.SaveAs(file); }
|
||||
catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Error!"); }
|
||||
}
|
||||
|
||||
private void menuFileImportCsv_Click(object sender, EventArgs e)
|
||||
{
|
||||
string file;
|
||||
if (!OpenDialog("Open CSV file...", MatrixCalculator.Properties.Resources.CsvFormatFilter, out file))
|
||||
return;
|
||||
|
||||
ImportCsvWindow wind = new ImportCsvWindow();
|
||||
try { wind.LoadFile(file); }
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Error: " + ex.Message, "Error!");
|
||||
}
|
||||
|
||||
if (wind.ShowDialog() != System.Windows.Forms.DialogResult.OK)
|
||||
return;
|
||||
|
||||
AddMatrix(wind.Matrix, wind.MatrixName, "", true);
|
||||
}
|
||||
|
||||
private void menuFileImportWorksheet_Click(object sender, EventArgs e)
|
||||
{
|
||||
string file;
|
||||
if (!OpenDialog("Open worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file))
|
||||
return;
|
||||
|
||||
ImportWorksheetWindow wind = new ImportWorksheetWindow();
|
||||
try { wind.LoadFile(file); }
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Error: " + ex.Message, "Error!");
|
||||
}
|
||||
|
||||
if (wind.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
AddMatrices(wind.Data);
|
||||
}
|
||||
|
||||
private void menuFilePreferences_Click(object sender, EventArgs e)
|
||||
{
|
||||
new SettingsWindow().ShowDialog();
|
||||
}
|
||||
|
||||
private void menuFileExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void menuMatrixNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
Editor edit = new Editor();
|
||||
edit.Text = "New matrix...";
|
||||
|
||||
if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK)
|
||||
return;
|
||||
|
||||
AddMatrix(edit.Matrix, edit.MatrixName, edit.MatrixDescription, true);
|
||||
}
|
||||
|
||||
private void menuMatrixEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listMatrices.SelectedItems.Count != 1) return;
|
||||
|
||||
string old_name, new_name, desc;
|
||||
Matrix matrix;
|
||||
// Set up variables
|
||||
|
||||
Editor edit = new Editor();
|
||||
edit.Text = "Edit matrix...";
|
||||
old_name = edit.MatrixName = listMatrices.SelectedItems[0].Text;
|
||||
edit.MatrixDescription = listMatrices.SelectedItems[0].SubItems[1].Text;
|
||||
edit.Matrix = matrices[listMatrices.SelectedIndices[0]];
|
||||
|
||||
// Dialog
|
||||
if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
|
||||
// Update new stuff
|
||||
new_name = listMatrices.SelectedItems[0].Text = edit.MatrixName;
|
||||
desc = listMatrices.SelectedItems[0].SubItems[1].Text = edit.MatrixDescription;
|
||||
matrix = matrices[listMatrices.SelectedIndices[0]] = edit.Matrix;
|
||||
|
||||
// Update in file
|
||||
worksheet.ModifyMatrix(old_name, new_name, CsvParser.ToCSV(matrix), desc);
|
||||
|
||||
// Update preview
|
||||
listMatrices_SelectedIndexChanged(this, new EventArgs());
|
||||
}
|
||||
|
||||
private void menuMatrixDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (int i in listMatrices.SelectedIndices)
|
||||
{
|
||||
worksheet.DeleteMatrix(listMatrices.Items[i].Text);
|
||||
listMatrices.Items.RemoveAt(i);
|
||||
matrices.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
private void menuMatrixDuplicate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listMatrices.SelectedItems.Count != 1) return;
|
||||
|
||||
// Set up variables
|
||||
Editor edit = new Editor();
|
||||
edit.Text = "New matrix...";
|
||||
edit.MatrixName = listMatrices.SelectedItems[0].Text;
|
||||
edit.MatrixDescription = listMatrices.SelectedItems[0].SubItems[1].Text;
|
||||
edit.Matrix = matrices[listMatrices.SelectedIndices[0]];
|
||||
|
||||
// Dialog
|
||||
if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
|
||||
// Update new stuff
|
||||
AddMatrix(edit.Matrix, edit.MatrixName, edit.MatrixDescription, true);
|
||||
}
|
||||
|
||||
private void menuMatrixInsertA_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listMatrices.SelectedIndices.Count == 1)
|
||||
MatrixA = matrices[listMatrices.SelectedIndices[0]];
|
||||
}
|
||||
|
||||
private void menuMatrixInsertB_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listMatrices.SelectedIndices.Count == 1)
|
||||
MatrixB = matrices[listMatrices.SelectedIndices[0]];
|
||||
}
|
||||
|
||||
private void menuMatrixCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listMatrices.SelectedIndices.Count != 1) return;
|
||||
|
||||
string csv = CsvParser.ToCSV(matrices[listMatrices.SelectedIndices[0]]);
|
||||
Clipboard.SetText(csv, TextDataFormat.CommaSeparatedValue);
|
||||
}
|
||||
|
||||
private void menuMatrixPaste_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get data
|
||||
string csv = "";
|
||||
if (Clipboard.ContainsText(TextDataFormat.CommaSeparatedValue))
|
||||
csv = Clipboard.GetText(TextDataFormat.CommaSeparatedValue);
|
||||
else return;
|
||||
|
||||
// Put it in a matrix
|
||||
Editor edit = new Editor();
|
||||
edit.Text = "Paste matrix...";
|
||||
edit.Matrix = MatrixConverter.FromTable(CsvParser.GetTable(csv, ",;\t".ToArray()));
|
||||
edit.MatrixName = "Pasted matrix";
|
||||
|
||||
if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
|
||||
// Get data
|
||||
AddMatrix(edit.Matrix, edit.MatrixName, edit.MatrixDescription, true);
|
||||
}
|
||||
|
||||
private void menuMatrixPasteSpecial_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get data
|
||||
string csv = "";
|
||||
if (Clipboard.ContainsText(TextDataFormat.CommaSeparatedValue))
|
||||
csv = Clipboard.GetText(TextDataFormat.CommaSeparatedValue);
|
||||
else if (Clipboard.ContainsText())
|
||||
csv = Clipboard.GetText();
|
||||
else return;
|
||||
|
||||
// Use CSV importer
|
||||
ImportCsvWindow wind = new ImportCsvWindow();
|
||||
wind.Csv = csv;
|
||||
|
||||
if (wind.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
|
||||
AddMatrix(wind.Matrix, wind.MatrixName, "", true);
|
||||
}
|
||||
|
||||
private void menuHelpAbout_Click(object sender, EventArgs e)
|
||||
{
|
||||
DynamicLink.Launcher.About();
|
||||
}
|
||||
|
||||
private void menuHelpHelp_Click(object sender, EventArgs e)
|
||||
{
|
||||
DynamicLink.Launcher.StartModule("Help", "matrixcalc");
|
||||
}
|
||||
|
||||
private void contextMenuDataAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
var item = sender as ToolStripMenuItem;
|
||||
var menu = item.Owner as ContextMenuStrip;
|
||||
var grid = menu.SourceControl as DataGridView;
|
||||
if (grid == null) return;
|
||||
|
||||
// Create editor window
|
||||
Editor editwindow = new Editor();
|
||||
editwindow.Text = "New matrix...";
|
||||
editwindow.Matrix = GridViewHelper.GetMatrix(grid);
|
||||
|
||||
if (editwindow.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
AddMatrix(editwindow.Matrix, editwindow.MatrixName, editwindow.MatrixDescription, true);
|
||||
}
|
||||
|
||||
private void contextMenuDataClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
var item = sender as ToolStripMenuItem;
|
||||
var menu = item.Owner as ContextMenuStrip;
|
||||
var grid = menu.SourceControl as DataGridView;
|
||||
if (grid == null) return;
|
||||
|
||||
if (grid == dataMatrixA) matrixA = null;
|
||||
else if (grid == dataMatrixB) matrixB = null;
|
||||
|
||||
grid.Rows.Clear();
|
||||
grid.Columns.Clear();
|
||||
}
|
||||
|
||||
private void contextMenuDataCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
var item = sender as ToolStripMenuItem;
|
||||
var menu = item.Owner as ContextMenuStrip;
|
||||
var grid = menu.SourceControl as DataGridView;
|
||||
if (grid == null) return;
|
||||
|
||||
string csv = CsvParser.ToCSV(grid);
|
||||
Clipboard.SetText(csv, TextDataFormat.CommaSeparatedValue);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Calculator buttons
|
||||
private void buttonAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 1, 1, 1, 0, 0)) return;
|
||||
|
||||
try { MatrixResult = matrixA + matrixB; }
|
||||
catch (Exception ex)
|
||||
{
|
||||
textOutput.Text = "Error: " + ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonSub_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 1, 1, 1, 0, 0)) return;
|
||||
|
||||
try { MatrixResult = matrixA - matrixB; }
|
||||
catch (Exception ex)
|
||||
{
|
||||
textOutput.Text = "Error: " + ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonMul_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 1, 1, 0, 1, 0)) return;
|
||||
|
||||
try { MatrixResult = matrixA * matrixB; }
|
||||
catch (Exception ex)
|
||||
{
|
||||
textOutput.Text = "Error: " + ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonAddNum_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
// Get a number
|
||||
NumericInput input = new NumericInput(NumericInput.NumberType.Real);
|
||||
if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
double number = input.NumberReal;
|
||||
|
||||
// Now add it
|
||||
Matrix m = new Matrix(matrixA.RowCount, matrixA.ColumnCount, number);
|
||||
MatrixResult = matrixA + m;
|
||||
}
|
||||
|
||||
private void buttonSubNum_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
// Get a number
|
||||
NumericInput input = new NumericInput(NumericInput.NumberType.Real);
|
||||
if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
double number = input.NumberReal;
|
||||
|
||||
// Now add it
|
||||
Matrix m = new Matrix(matrixA.RowCount, matrixA.ColumnCount, number);
|
||||
MatrixResult = matrixA - m;
|
||||
}
|
||||
|
||||
private void buttonMulNum_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
// Get a number
|
||||
NumericInput input = new NumericInput(NumericInput.NumberType.Real);
|
||||
if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
double number = input.NumberReal;
|
||||
|
||||
// Now add it
|
||||
MatrixResult = matrixA * number;
|
||||
}
|
||||
|
||||
private void buttonInv_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
try { MatrixResult = matrixA.Inverse(); }
|
||||
catch (Exception ex)
|
||||
{
|
||||
textOutput.Text = "Error: " + ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonPow_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
// Get a number
|
||||
NumericInput input = new NumericInput(NumericInput.NumberType.Integer);
|
||||
if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
int number = input.NumberInt;
|
||||
|
||||
// Calculate
|
||||
try { MatrixResult = MatrixHelper.Power (matrixA, number); }
|
||||
catch (Exception ex)
|
||||
{
|
||||
textOutput.Text = "Error: " + ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonTransp_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
try { MatrixResult = Matrix.Transpose(matrixA); }
|
||||
catch (Exception ex)
|
||||
{
|
||||
textOutput.Text = "Error: " + ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonTrace_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
|
||||
MatrixResult = new Matrix(1, matrixA.Trace());
|
||||
|
||||
else textOutput.Text = MyDouble.String(matrixA.Trace());
|
||||
}
|
||||
|
||||
private void buttonRank_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
|
||||
MatrixResult = new Matrix(1, Convert.ToDouble(matrixA.Rank()));
|
||||
|
||||
else textOutput.Text = matrixA.Rank().ToString();
|
||||
}
|
||||
|
||||
private void buttonDet_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 1)) return;
|
||||
|
||||
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
|
||||
MatrixResult = new Matrix(1, matrixA.Determinant());
|
||||
|
||||
else textOutput.Text = MyDouble.String(matrixA.Determinant());
|
||||
}
|
||||
|
||||
private void buttonMin_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
|
||||
MatrixResult = new Matrix(1, MatrixHelper.Min(matrixA));
|
||||
|
||||
else textOutput.Text = MyDouble.String(MatrixHelper.Min(matrixA));
|
||||
|
||||
}
|
||||
|
||||
private void buttonMax_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
|
||||
|
||||
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
|
||||
MatrixResult = new Matrix(1, MatrixHelper.Max(matrixA));
|
||||
|
||||
else textOutput.Text = MyDouble.String(MatrixHelper.Max(matrixA));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Drag & drop
|
||||
private void dataMatrix_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(typeof(ListViewItem))) e.Effect = DragDropEffects.Move;
|
||||
else e.Effect = DragDropEffects.None;
|
||||
}
|
||||
|
||||
private void dataMatrix_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
ListViewItem data = e.Data.GetData(typeof(ListViewItem)) as ListViewItem;
|
||||
var send = sender as DataGridView;
|
||||
if (data == null || send == null) return;
|
||||
|
||||
if (send == dataMatrixA) MatrixA = matrices[data.Index];
|
||||
else if (send == dataMatrixB) MatrixB = matrices[data.Index];
|
||||
}
|
||||
|
||||
private void listMatrices_DragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
e.Effect = DragDropEffects.Move;
|
||||
}
|
||||
|
||||
private void listMatrices_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (listMatrices.SelectedItems.Count == 1 && e.Button == System.Windows.Forms.MouseButtons.Left)
|
||||
listMatrices.DoDragDrop(listMatrices.SelectedItems[0], DragDropEffects.Move);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region List Matrices Selected Index Changed
|
||||
private void EnableMenus(int insA, int insB, int copy, int edit, int del, int dupl)
|
||||
{
|
||||
menuMatrixInsertA.Enabled = contextMenuListInsertA.Enabled = (insA != 0);
|
||||
menuMatrixInsertB.Enabled = contextMenuListInsertB.Enabled = (insB != 0);
|
||||
menuMatrixCopy.Enabled = contextMenuListCopy.Enabled = (copy != 0);
|
||||
menuMatrixEdit.Enabled = contextMenuListEdit.Enabled = (edit != 0);
|
||||
menuMatrixDelete.Enabled = contextMenuListDelete.Enabled = (del != 0);
|
||||
menuMatrixDuplicate.Enabled = contextMenuListDuplicate.Enabled = (dupl != 0);
|
||||
}
|
||||
|
||||
private void listMatrices_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
switch (listMatrices.SelectedIndices.Count)
|
||||
{
|
||||
case 0: EnableMenus(0, 0, 0, 0, 0, 0); break;
|
||||
case 1:
|
||||
this.labelPreviewName.Text = "Name: " + listMatrices.SelectedItems[0].Text;
|
||||
this.labelPreviewDesc.Text = "Description: " + listMatrices.SelectedItems[0].SubItems[1].Text;
|
||||
MatrixPreview = matrices[listMatrices.SelectedIndices[0]];
|
||||
|
||||
EnableMenus(1, 1, 1, 1, 1, 1);
|
||||
break;
|
||||
default: EnableMenus(0, 0, 0, 0, 1, 0); break;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Painting
|
||||
protected override void OnPaintBackground(PaintEventArgs e)
|
||||
{
|
||||
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Others
|
||||
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (!ShowSaveWarningDialog()) e.Cancel = true;
|
||||
|
||||
if (!e.Cancel) MatrixCalculator.Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void textOutput_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
toolTip.SetToolTip(textOutput, textOutput.Text);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Additional routines
|
||||
private string MakeUnique(string name)
|
||||
{
|
||||
List<string> probl = new List<string>();
|
||||
|
||||
// Test name uniqueness
|
||||
bool unique = true;
|
||||
foreach (ListViewItem i in this.listMatrices.Items)
|
||||
{
|
||||
if (i.Text == name) unique = false;
|
||||
if (i.Text.StartsWith(name)) probl.Add(i.Text);
|
||||
}
|
||||
|
||||
// If not unique, generate a unique name
|
||||
if (!unique)
|
||||
{
|
||||
int n = 0;
|
||||
while (probl.Contains(name + n.ToString()) && n < 10000) n++;
|
||||
name += n.ToString();
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
private void AddMatrix(Matrix m, string name, string desc, bool inFile = false)
|
||||
{
|
||||
matrices.Add(m);
|
||||
name = MakeUnique(name);
|
||||
|
||||
// Add it
|
||||
ListViewItem item = listMatrices.Items.Add(name);
|
||||
item.SubItems.Add(desc);
|
||||
|
||||
// To file?
|
||||
if (inFile) worksheet.AddMatrix(name, CsvParser.ToCSV(m), desc);
|
||||
|
||||
}
|
||||
|
||||
private void AddMatrices(DataTable data, bool infile = false)
|
||||
{
|
||||
AddMatrices(data, infile, false, MatrixCalculator.Properties.Settings.Default.InternalCsvSeparators.ToArray());
|
||||
}
|
||||
|
||||
private void AddMatrices(DataTable data, bool infile, bool combine, params char[] separs)
|
||||
{
|
||||
foreach (DataRow i in data.Rows)
|
||||
{
|
||||
try {
|
||||
string name = i["name"].ToString();
|
||||
string desc = i["description"].ToString();
|
||||
string csv = i["csv"].ToString();
|
||||
DataTable dt = CsvParser.GetTable(csv, separs, combine);
|
||||
|
||||
AddMatrix(MatrixConverter.FromTable(dt), name, desc, infile);
|
||||
}
|
||||
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Error: " + e.Message, "Error!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ResetAll()
|
||||
{
|
||||
matrices.Clear();
|
||||
listMatrices.Items.Clear();
|
||||
|
||||
AddMatrix(Matrix.Zeros(7), "Zero", "Zero matrix");
|
||||
AddMatrix(Matrix.Identity(7, 7), "One", "Identity matrix");
|
||||
}
|
||||
|
||||
private bool ShowSaveWarningDialog()
|
||||
{
|
||||
// Nothing to do
|
||||
if (worksheet.IsQueueEmpty) return true;
|
||||
|
||||
// Show dialog
|
||||
switch (MessageBox.Show("All the unsaved changes will be lost. Do you want to save the current worksheet?",
|
||||
"Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question))
|
||||
{
|
||||
|
||||
case System.Windows.Forms.DialogResult.Cancel: return false;
|
||||
case System.Windows.Forms.DialogResult.Yes:
|
||||
menuFileSave_Click(this, new EventArgs());
|
||||
break;
|
||||
|
||||
case System.Windows.Forms.DialogResult.No:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool OpenDialog(string title, string filter, out string filename)
|
||||
{
|
||||
bool result;
|
||||
|
||||
// Initialize dialog
|
||||
OpenFileDialog open = new OpenFileDialog();
|
||||
open.Title = title;
|
||||
open.Filter = filter;
|
||||
|
||||
// Show
|
||||
if (open.ShowDialog() == System.Windows.Forms.DialogResult.OK) result = true;
|
||||
else result = false;
|
||||
|
||||
// Output
|
||||
filename = open.FileName;
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool SaveDialog(string title, string filter, out string filename)
|
||||
{
|
||||
bool result;
|
||||
|
||||
// Initialize dialog
|
||||
SaveFileDialog save = new SaveFileDialog();
|
||||
save.Title = title;
|
||||
save.Filter = filter;
|
||||
|
||||
// Show
|
||||
if (save.ShowDialog() == System.Windows.Forms.DialogResult.OK) result = true;
|
||||
else result = false;
|
||||
|
||||
// Output
|
||||
filename = save.FileName;
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Additional calculator routines
|
||||
bool VerifyConditions(int includeA, int includeB, int changeSpecial, int checkSum, int checkMul, int checkSq)
|
||||
{
|
||||
// Verify matrix A
|
||||
if (includeA != 0 && matrixA == null)
|
||||
{
|
||||
textOutput.Text = "Error: Missing matrix A!";
|
||||
return false;
|
||||
}
|
||||
|
||||
// Verify matrix B
|
||||
if (includeB != 0 && matrixB == null)
|
||||
{
|
||||
textOutput.Text = "Error: Missing matrix B!";
|
||||
return false;
|
||||
}
|
||||
|
||||
// Replace special matrix types (0 and identity)
|
||||
if (changeSpecial != 0)
|
||||
{
|
||||
// Matrix A
|
||||
if (MatrixHelper.Equal(matrixA, Matrix.Zeros(7)))
|
||||
{
|
||||
if (checkSum != 0) matrixA = new Matrix(matrixB.RowCount, matrixB.ColumnCount, 0.0);
|
||||
if (checkMul != 0) matrixA = new Matrix(matrixB.ColumnCount, matrixB.ColumnCount, 0.0);
|
||||
}
|
||||
|
||||
if (MatrixHelper.Equal(matrixA, Matrix.Identity(7, 7)))
|
||||
{
|
||||
if (checkSum != 0) matrixA = Matrix.Identity(matrixB.RowCount, matrixB.ColumnCount);
|
||||
if (checkMul != 0) matrixA = Matrix.Identity(matrixB.ColumnCount, matrixB.ColumnCount);
|
||||
}
|
||||
|
||||
// Matrix B
|
||||
if (MatrixHelper.Equal(matrixB, Matrix.Zeros(7)))
|
||||
{
|
||||
if (checkSum != 0) matrixB = new Matrix(matrixA.RowCount, matrixA.ColumnCount, 0.0);
|
||||
if (checkMul != 0) matrixB = new Matrix(matrixA.ColumnCount, matrixA.ColumnCount, 0.0);
|
||||
}
|
||||
|
||||
if (MatrixHelper.Equal(matrixB, Matrix.Identity(7, 7)))
|
||||
{
|
||||
if (checkSum != 0) matrixB = Matrix.Identity(matrixA.RowCount, matrixA.ColumnCount);
|
||||
if (checkMul != 0) matrixB = Matrix.Identity(matrixA.ColumnCount, matrixA.ColumnCount);
|
||||
}
|
||||
}
|
||||
|
||||
// If sum, make sure sizes match
|
||||
if (checkSum != 0 && (matrixA.RowCount != matrixB.RowCount || matrixA.ColumnCount != matrixB.ColumnCount))
|
||||
{
|
||||
textOutput.Text = "Error: Incompatible matrices.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// If multiplication, check A's width = B's height
|
||||
if (checkMul != 0 && (matrixA.ColumnCount != matrixB.RowCount))
|
||||
{
|
||||
textOutput.Text = "Error: Incompatible matrices.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// If matrix A must be square
|
||||
if (checkSq != 0 && (matrixA.ColumnCount != matrixA.RowCount))
|
||||
{
|
||||
textOutput.Text = "Error: Invalid matrix.";
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+205
@@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{9C7FBEFC-5219-41CE-9EB3-24AC382C0A7A}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MatrixCalculator</RootNamespace>
|
||||
<AssemblyName>MatrixCalculator</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\matrixcalc-logo.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<NoWin32Manifest>true</NoWin32Manifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release - Publish|x86'">
|
||||
<OutputPath>..\..\TibisMathematicsSuite - Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MathNet.Iridium">
|
||||
<HintPath>C:\Users\Tibi\Downloads\MathNet.Iridium-2008.8.16.470\MathNet.Iridium-2008.8.16.470\Binaries\Release\MathNet.Iridium.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.SQLite">
|
||||
<HintPath>..\..\..\Libraries\sqlite-netFx35\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CsvParser.cs" />
|
||||
<Compile Include="Forms\Editor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Editor.Designer.cs">
|
||||
<DependentUpon>Editor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helpers\GridViewHelper.cs" />
|
||||
<Compile Include="Forms\ImportCsvWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ImportCsvWindow.Designer.cs">
|
||||
<DependentUpon>ImportCsvWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ImportWorksheetWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ImportWorksheetWindow.Designer.cs">
|
||||
<DependentUpon>ImportWorksheetWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helpers\MyDouble.cs" />
|
||||
<Compile Include="MainWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.Designer.cs">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helpers\MatrixConverter.cs" />
|
||||
<Compile Include="Forms\NumericInput.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\NumericInput.Designer.cs">
|
||||
<DependentUpon>NumericInput.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helpers\MatrixHelper.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Forms\SettingsWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SettingsWindow.Designer.cs">
|
||||
<DependentUpon>SettingsWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WorksheetFile.cs" />
|
||||
<EmbeddedResource Include="Forms\Editor.resx">
|
||||
<DependentUpon>Editor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\ImportCsvWindow.resx">
|
||||
<DependentUpon>ImportCsvWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\ImportWorksheetWindow.resx">
|
||||
<DependentUpon>ImportWorksheetWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SettingsWindow.resx">
|
||||
<DependentUpon>SettingsWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainWindow.resx">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\NumericInput.resx">
|
||||
<DependentUpon>NumericInput.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Launcher\DynamicLink.csproj">
|
||||
<Project>{A04B247B-6A95-462B-9E07-3337A1C158F1}</Project>
|
||||
<Name>Launcher</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\page_white_add.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\folder_page_white.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\page_save.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\door_out.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\table_add.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\table_edit.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\table_delete.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\page_white_copy.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\page_white_paste.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\help.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Gnome-Edit-Clear-16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\matrixcalc-logo.ico" />
|
||||
<Content Include="Resources\matrixcalc-logo-2.ico" />
|
||||
<None Include="Resources\wrench_orange.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="MatrixCalculator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<MatrixCalculator.Properties.Settings>
|
||||
<setting name="DoublePrecision" serializeAs="String">
|
||||
<value>3</value>
|
||||
</setting>
|
||||
<setting name="NumberResultAsMatrix" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="InternalCsvSeparators" serializeAs="String">
|
||||
<value>,;</value>
|
||||
</setting>
|
||||
</MatrixCalculator.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<body>
|
||||
|
||||
<chapter application="factorizator" title="Factorizator" filename="apps\factorizator\index.htm" >
|
||||
<topic title="Factorizator" filename="apps\factorizator\index.htm" />
|
||||
<topic title="Help viewer" filename="apps\Help\index.htm" />
|
||||
</chapter>
|
||||
|
||||
<chapter application="help" title="Help viewer" filename="apps\help\index.htm" >
|
||||
<topic title="Factorizator" filename="apps\factorizator\index.htm" />
|
||||
<topic title="Help viewer" filename="apps\Help\index.htm" />
|
||||
</chapter>
|
||||
|
||||
|
||||
</body>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="MatrixCalculator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<MatrixCalculator.Properties.Settings>
|
||||
<setting name="DoublePrecision" serializeAs="String">
|
||||
<value>3</value>
|
||||
</setting>
|
||||
<setting name="NumberResultAsMatrix" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="InternalCsvSeparators" serializeAs="String">
|
||||
<value>,;</value>
|
||||
</setting>
|
||||
</MatrixCalculator.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="MatrixCalculator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<MatrixCalculator.Properties.Settings>
|
||||
<setting name="DoublePrecision" serializeAs="String">
|
||||
<value>3</value>
|
||||
</setting>
|
||||
<setting name="NumberResultAsMatrix" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="InternalCsvSeparators" serializeAs="String">
|
||||
<value>,;</value>
|
||||
</setting>
|
||||
</MatrixCalculator.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
+4254
File diff suppressed because it is too large.
Load diff
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Scientific Calculator: 2nd function button</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Scientific Calculator: 2nd function button</h1>
|
||||
<div class="section">
|
||||
|
||||
<div class="captioned_image_right" >
|
||||
<img class="shadow" src="img/calc-2ndf0.png"/><br>
|
||||
<span style="font-size: 10pt"> When activated, an indicator shows up on the display. </span>
|
||||
</div>
|
||||
|
||||
<h2>Description</h2>
|
||||
|
||||
<p>The 2nd function button is used to <strong>change the function of a button</strong> when clicked.</p>
|
||||
<p>Usually, the 2nd function is the inverse of the function the button is assigned to. The exact function is displayed in <strong>gray above each button</strong>. You can find more information about the function and 2nd function of a button when hovering over the button with the mouse.</p>
|
||||
<p>You can also use the 2nd function of a button using the <strong>right mouse button</strong>.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Example</h2>
|
||||
|
||||
<img class="shadow" src="img/calc-2ndf1.png" style="float:left; margin-right:10px; margin-bottom:10px; "/>
|
||||
<p>To calculate the square root of a number, you have to press <i>2ndf</i> and then the <i>x<sup>2</sup></i> button. </p>
|
||||
<p><strong>Note: </strong>You can also right click the <i>x<sup>2</sup></i> button.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Scientific Calculator: Absolute</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Scientific Calculator: Absolute</h1>
|
||||
<div class="section">
|
||||
|
||||
<h2>Description</h2>
|
||||
|
||||
<p>In mathematics, the absolute (modulus) of a number, denoted by <strong>|n|</strong>, is equal to the number without regard to its sign. </p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Examples</h2>
|
||||
<img class="maths" src="img/calc-abs-eq0.gif"><br />
|
||||
<img class="maths" src="img/calc-abs-eq1.gif">
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+377
@@ -0,0 +1,377 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Scientific Calculator: Buttons</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
td.but {
|
||||
border: 1px solid black;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
margin: -2px;
|
||||
font-size: 10pt;
|
||||
text-align: center;
|
||||
}
|
||||
td.but2 {
|
||||
margin-top: 5px;
|
||||
font-size: 9pt;
|
||||
text-align: center;
|
||||
color:gray;
|
||||
padding: 0;
|
||||
}
|
||||
th {
|
||||
text-align: left;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
th#main {
|
||||
width: 100%;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 11pt;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
td.r {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Scientific Calculator: Buttons</h1>
|
||||
<div class="section">
|
||||
|
||||
<h2>Buttons</h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Button </th> <th id="main">Description </th> <th>Article</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">+</td>
|
||||
<td>Adds a number to another.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">-</td>
|
||||
<td>Subtracts a number from another.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">*</td>
|
||||
<td>Multiplies 2 numbers.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">/</td>
|
||||
<td>Divide a number by another.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">±</td>
|
||||
<td>Toggle sign.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">MOD</td>
|
||||
<td>Calculates the remainder of division between 2 numbers.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">AC</td>
|
||||
<td>Resets any calculation.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">Clear</td>
|
||||
<td>Deletes the current number.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">⌫</td>
|
||||
<td>Removes the last inserted number.</td>
|
||||
</tr>
|
||||
|
||||
<tr> <td> </td></tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">Help</td>
|
||||
<td>Opens help for the application.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">M+</td>
|
||||
<td>Adds the number on the display to memory.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">M-</td>
|
||||
<td>Subtracts the number on the display from memory.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">MC</td>
|
||||
<td><em>Memory Clear:</em> Clears the memory content.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">MS</td>
|
||||
<td><em>Memory Set:</em> Sets the memory content to the number on the display.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">MR</td>
|
||||
<td><em>Memory Recall:</em> Displays the memory content on the display.</td>
|
||||
</tr>
|
||||
|
||||
<tr> <td> </td></tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">2ndf</td>
|
||||
<td>Activates alternative function for the next button pressed.</td>
|
||||
<td class="r"><a href="calculator-2ndf.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but2">e<sup>n</sup></td>
|
||||
<td>Exponential function.</td>
|
||||
<td class="r"><a href="calculator-logexp.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">ln</td>
|
||||
<td>Calculates natural logarithm.</td>
|
||||
<td class="r"><a href="calculator-logexp.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2">10<sup>n</sup></td>
|
||||
<td>Calculates 10 at nth power.</td>
|
||||
<td class="r"><a href="calculator-logexp.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">log</td>
|
||||
<td>Calculates decimal logarithm.</td>
|
||||
<td class="r"><a href="calculator-logexp.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">log<sub>n</sub> x</td>
|
||||
<td>Calculates logarithm of x in base n.</td>
|
||||
<td class="r"><a href="calculator-logexp.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr> <td> </td></tr>
|
||||
|
||||
<tr>
|
||||
<td class="but2">{x}</td>
|
||||
<td>Calculates fractional part of a number.</td>
|
||||
<td class="r"><a href="calculator-int.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">[x]</td>
|
||||
<td>Calculates integer part of a number.</td>
|
||||
<td class="r"><a href="calculator-int.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2">-Abs</td>
|
||||
<td>Calculates negative absolute of a number.</td>
|
||||
<td class="r"><a href="calculator-abs.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">Abs</td>
|
||||
<td>Calculates absolute of a number.</td>
|
||||
<td class="r"><a href="calculator-abs.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but">1/x</td>
|
||||
<td>Calculates the multiplicative inverse of a number.</td>
|
||||
<td class="r"><a href="calculator-inverse.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2"><sup>n</sup>√x</td>
|
||||
<td>Calculates nth root of a number.</td>
|
||||
<td class="r"><a href="calculator-pow.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">x<sup>n</sup></td>
|
||||
<td>Calculates x at nth power.</td>
|
||||
<td class="r"><a href="calculator-pow.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr> <td> </td></tr>
|
||||
|
||||
<tr>
|
||||
<td class="but2">arcsin</td>
|
||||
<td>Calculates arcsine of a number (result is in radians).</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">sin</td>
|
||||
<td>Calculates sine of a number (in radians).</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2">arccos</td>
|
||||
<td>Calculates arccosine of a number (result is in radians).</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">cos</td>
|
||||
<td>Calculates cosine of a number (in radians).</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2">arctan</td>
|
||||
<td>Calculates arctangent of a number (result is in radians).</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">tan</td>
|
||||
<td>Calculates tangent of a number (in radians).</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2">√x</td>
|
||||
<td>Calculates square root of a number.</td>
|
||||
<td class="r"><a href="calculator-pow.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">x<sup>2</sup></td>
|
||||
<td>Calculates x squared.</td>
|
||||
<td class="r"><a href="calculator-pow.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr> <td> </td></tr>
|
||||
|
||||
<tr>
|
||||
<td class="but2">arcsinh</td>
|
||||
<td>Calculates hyperbolic arcsine of a number.</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">sinh</td>
|
||||
<td>Calculates hyperbolic sine of a number.</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2">arccosh</td>
|
||||
<td>Calculates hyperbolic arccosine of a number.</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">cosh</td>
|
||||
<td>Calculates hyperbolic cosine of a number.</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2">arctanh</td>
|
||||
<td>Calculates hyperbolic arctangent of a number.</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">tanh</td>
|
||||
<td>Calculates hyperbolic tangent of a number.</td>
|
||||
<td class="r"><a href="calculator-trigonometric.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2"><sup>3</sup>√x</td>
|
||||
<td>Calculates cube root of a number.</td>
|
||||
<td class="r"><a href="calculator-pow.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">x<sup>3</sup></td>
|
||||
<td>Calculates cube of x.</td>
|
||||
<td class="r"><a href="calculator-pow.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr> <td> </td></tr>
|
||||
|
||||
<tr>
|
||||
<td class="but2" style="font-family: serif;">2π</td>
|
||||
<td>Displays double value of pi.</td>
|
||||
<td class="r"><a href="calculator-constants.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but" style="font-family: serif;">2π</td>
|
||||
<td>Displays pi constant.</td>
|
||||
<td class="r"><a href="calculator-constants.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but">e</td>
|
||||
<td>Displays e constant.</td>
|
||||
<td class="r"><a href="calculator-constants.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but2">xPy</td>
|
||||
<td>Calculates arrangements of y items from x.</td>
|
||||
<td class="r"><a href="calculator-combinatorics.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">xCy</td>
|
||||
<td>Calculates combinations of y items from x.</td>
|
||||
<td class="r"><a href="calculator-combinatorics.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="but">x!</td>
|
||||
<td>Calculates factorial of x.</td>
|
||||
<td class="r"><a href="calculator-combinatorics.htm"><img src="img/link.png" /></a></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Scientific Calculator: Combinatorics</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Scientific Calculator: Combinatorics</h1>
|
||||
<div class="section">
|
||||
<h2>Factorial</h2>
|
||||
|
||||
<p>In mathematics, the <em>factorial</em> of a natural number, denoted by <strong>n!</strong>, is the <em>product of all natural numbers smaller or equal to <strong>n</strong></em>.</p>
|
||||
|
||||
<img class="maths" src="img/calc-combinatorics-eq0.gif" />
|
||||
|
||||
<p>This can also be written as:</p>
|
||||
<img class="maths" src="img/calc-combinatorics-eq1.gif" />
|
||||
|
||||
<p>By convention, <strong>0! = 1</strong>.</p>
|
||||
<p>Example:</p>
|
||||
<img class="maths" src="img/calc-combinatorics-eq2.gif" />
|
||||
<br /> <br />
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Permutations</h2>
|
||||
|
||||
<p>In mathematics, a <em>permutation</em> of a set of objects is defined as <em>a particular order</em> of the items.</p>
|
||||
<p>For example, the permutations of the set <strong>{1, 2, 3}</strong> are:<br /> (1, 2, 3); (1, 3, 2); (2, 1, 3); (2, 3, 1); (3, 1, 2); (3, 2, 1);</p>
|
||||
|
||||
<p>The number of permutations for a set is given by <strong>n!</strong>.</p>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Permutations of k objects</h2>
|
||||
|
||||
<p>Example: the permutations of 2 items from the set <strong>{1, 2, 3}</strong> are:<br />
|
||||
(1, 2); (2, 1); (1, 3); (3, 1); (2, 3); (3, 2); </p>
|
||||
|
||||
<p>The number of permutations of k objects is given by the formula:</p>
|
||||
<img class="maths" src="img/calc-combinatorics-eq5.gif" />
|
||||
<p> After making the simplifications, we get:</p>
|
||||
<img class="maths" src="img/calc-combinatorics-eq6.gif" />
|
||||
<br /> <br />
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Combinations</h2>
|
||||
|
||||
<p>In mathematics, a <em>combination</em> is a method of selecting a number of objects from a larger set, where order doesn't matter.</p>
|
||||
|
||||
<p>For example, the combinations of 2 items from the set <strong>{1, 2, 3}</strong> are:<br />
|
||||
{1, 2}; {1, 3}; {2, 3}; </p>
|
||||
|
||||
<p> The number of combinations is given by the formula:</p>
|
||||
<img class="maths" src="img/calc-combinatorics-eq3.gif" />
|
||||
<p> After making the simplifications, we get:</p>
|
||||
<img class="maths" src="img/calc-combinatorics-eq4.gif" />
|
||||
<br /><br />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Scientific Calculator: Constants</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Scientific Calculator: Constants</h1>
|
||||
<div class="section">
|
||||
<h2><span style="font-family:serif;"/>π</span></h2>
|
||||
|
||||
<p><span style="font-family:serif;"/><strong>π</strong></span> (sometimes written <strong>pi</strong>) is a mathematical constant that is the ratio of any Euclidian circle's circumference to its diameter.</p>
|
||||
<p>The approximate value of pi is:</p>
|
||||
<img class="maths" src="img/calc-constants-eq0.gif" />
|
||||
|
||||
<p>Pi has many uses in mathematics, science and engineering, making it one of the most important constants. For some additional information about pi in mathematics (geometry), you can check the <a href="calculator-trigonometric.htm">trigonometry</a> section.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><em>e</em></h2>
|
||||
|
||||
<p><em><strong>e</strong></em> is an important mathematical constant that is the base of <a href="calculator-logexp.htm">natural logarithms</a>.</p>
|
||||
|
||||
<p>The constant is the result of the following limit:</p>
|
||||
<img class="maths" src="img/calc-constants-eq1.gif" />
|
||||
|
||||
<p>The approximate value of <em>e</em> is:</p>
|
||||
<img class="maths" src="img/calc-constants-eq2.gif" />
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Scientific Calculator: Integer and fractional part</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Scientific Calculator: Integer and fractional part</h1>
|
||||
<div class="section">
|
||||
<h2>Integer part</h2>
|
||||
|
||||
<p>In mathematics, the <strong>floor</strong> (also known as the <em>integer part</em>) of a number <em>n</em> is the biggest integer number that is smaller than <em>n</em>.</p>
|
||||
|
||||
<p>The <strong>ceiling</strong> of a number <em>n</em> is the smallest integer number that is greater than <em>n</em>.</p>
|
||||
|
||||
<br />
|
||||
<h3>Notation:</h3>
|
||||
<p>The floor (integer part) of a number <em>n</em>: [n] = ⌊n⌋</p>
|
||||
|
||||
<p>The ceiling: ⌈n⌉</p>
|
||||
|
||||
<br />
|
||||
<h3>Examples:</h3><br />
|
||||
<img class="maths" src="img/calc-int-eq0.gif" /> <br />
|
||||
<img class="maths" src="img/calc-int-eq1.gif" /> <br /> <br />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Fractional part</h2>
|
||||
|
||||
<p>In mathematics, any real number can be written as <em>n</em> + <em>r</em>, where <em>n</em> is an integer, and <em>r</em> (the fractional part) is a nonnegative real number smaller than 1.</p>
|
||||
|
||||
<p>The fractional part of a number <em>n</em> can be written as the difference between <em>n</em> and its integer part (floor):</p>
|
||||
<img class="maths" src="img/calc-int-eq2.gif" />
|
||||
|
||||
<br />
|
||||
<h3>Examples:</h3><br />
|
||||
<img class="maths" src="img/calc-int-eq3.gif" /> <br />
|
||||
<img class="maths" src="img/calc-int-eq4.gif" /> <br /> <br />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Scientific Calculator</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Scientific Calculator</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Calculator topics</h2>
|
||||
<h3>Basic functionality</h3>
|
||||
<ul>
|
||||
<li><a href="calculator-keyshortcuts.htm">
|
||||
Keyboard shortcuts</a></li>
|
||||
<li><a href="calculator-buttons.htm">
|
||||
What all the buttons do</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Advanced functionality</h3>
|
||||
<ul>
|
||||
<li><a href="calculator-2ndf.htm">
|
||||
2nd function button</a></li>
|
||||
<li><a href="calculator-inverse.htm">
|
||||
Multiplicative inverse</a></li>
|
||||
<li><a href="calculator-abs.htm">
|
||||
Absolute</a></li>
|
||||
<li><a href="calculator-int.htm">
|
||||
Integer and fractional part</a></li>
|
||||
<li><a href="calculator-constants.htm">
|
||||
Constants</a></li>
|
||||
<li><a href="calculator-combinatorics.htm">
|
||||
Combinatorics</a></li>
|
||||
<li><a href="calculator-pow.htm">
|
||||
Powers and roots</a></li>
|
||||
<li><a href="calculator-logexp.htm">
|
||||
Logarithm and exponential functions</a></li>
|
||||
<li><a href="calculator-trigonometric.htm">
|
||||
Trigonometric functions</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>The user interface</h2>
|
||||
|
||||
<img src="img/calc-ui.png"/>
|
||||
<ol>
|
||||
<li>Display</li>
|
||||
<li>Indicator area</li>
|
||||
<li>Clearing functions and help</li>
|
||||
<li>Basic operators</li>
|
||||
<li>Numeric keys</li>
|
||||
<li>Memory functions</li>
|
||||
<li>Advanced functions</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>Limitations</h2>
|
||||
<p>The calculator is limited to 64bit floating point numbers (approximate range: ±5.0 × 10<sup>-324</sup> to ±1.7 × 10<sup>308</sup>, or 15-16 digits).</p>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Matrix Calculator: Basic guide</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Matrix Calculator: Basic guide</h1>
|
||||
<div class="section">
|
||||
|
||||
<h2>Adding matrices</h2>
|
||||
|
||||
<p>In <em>Matrix Calculator</em>, matrices are listed in the left panel. Two default matrices already exist (zero and identity matrices). These don't behave like normal matrices, the size is not fixed, so they are compatible for any type of operation with any other matrix.</p>
|
||||
|
||||
<p>Adding a matrix can be done by either <em>creating</em> a matrix, or <em>importing</em> a matrix.</p>
|
||||
|
||||
<br />
|
||||
<h3>Creating a matrix</h3>
|
||||
<p><strong>Step 1:</strong> First open the <em>Matrix</em> menu, and click <em>New matrix...</em> Alternatively, you can also right click in the matrix list.</p>
|
||||
<img src="img/matrix-basic0.png"/>
|
||||
|
||||
<p><strong>Step 2:</strong> Select a width and height for the matrix, and click <em>Apply</em> to update the matrix size. Now you can add the values in the table.</p>
|
||||
<img src="img/matrix-basic1.png"/>
|
||||
|
||||
<p><strong>Step 3:</strong> Give the new matrix a name, and optionally a description, and press <em>Accept</em>.</p>
|
||||
|
||||
<br />
|
||||
<h3>Importing a matrix</h3>
|
||||
<p>This feature is not yet available.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Performing a calculation</h2>
|
||||
<p>In the main window there are two boxes (called slots), labeled <em>Matrix A</em> and <em>Matrix B</em>. These are the two terms that are used in calculation.</p>
|
||||
<img src="img/matrix-basic2.png"/>
|
||||
|
||||
<p>To insert a matrix into a slot, you can either <em>drag and drop</em> the matrix from the list, or select the <em>Insert in slot _</em> option in the <em>Matrix</em> menu (or right click).</p>
|
||||
|
||||
<p>After inserting the matrix/matrices, click the button corresponding to the operation. If there was an error, it will be displayed in the <em>Output</em> box. The result will appear in the <em>Result</em> box.
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+255
@@ -0,0 +1,255 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Matrix Calculator: Calculator window</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
td.but {
|
||||
font-size: 10pt;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
td.sm {
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
font-size: 9pt;
|
||||
background: #FAFAFA;
|
||||
}
|
||||
|
||||
th#main {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
th#name {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 11pt;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
td.r {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Matrix Calculator: Calculator window</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Calculator window</h2>
|
||||
<img src="img/matrix-calc0.png" /> <br /> <br />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th></th> <th id="name">Name</th> <th id="main">Description </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">1</td>
|
||||
<td class="sm">Matrix list</td>
|
||||
<td>This is where all the created matrices are.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">2</td>
|
||||
<td class="sm">Preview pane</td>
|
||||
<td>The matrix selected in the list is displayed here.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">3</td>
|
||||
<td class="sm">Slot A</td>
|
||||
<td>The first term of operations.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">4</td>
|
||||
<td class="sm">Slot B</td>
|
||||
<td>The second term of operations.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">5</td>
|
||||
<td class="sm">Result</td>
|
||||
<td>This is where the result of the calculation appears.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">6</td>
|
||||
<td class="sm">Functions</td>
|
||||
<td>All the functions are defined here. For a more detailed explanation, check the <a href="matrix-buttons.htm"><em>What all the buttons do</em></a> article.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">7</td>
|
||||
<td class="sm">Output</td>
|
||||
<td>If there are any errors (like incompatible matrices), they are displayed here.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>The file menu</h2>
|
||||
<img src="img/matrix-calc1.png" /> <br /> <br />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th></th> <th id="name">Name</th> <th id="main">Description </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">1</td>
|
||||
<td class="sm">New worksheet</td>
|
||||
<td>Creates a new worksheet*.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">2</td>
|
||||
<td class="sm">Open...</td>
|
||||
<td>Opens an existing worksheet.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">3</td>
|
||||
<td class="sm">Save</td>
|
||||
<td>Saves current worksheet.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">4</td>
|
||||
<td class="sm">Save as...</td>
|
||||
<td>Saves as a new worksheet.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">5</td>
|
||||
<td class="sm">Import from csv file...</td>
|
||||
<td>Imports matrices from a Comma Separated Value file. This feature is not (yet) available.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">6</td>
|
||||
<td class="sm">Import from worksheet...</td>
|
||||
<td>Imports matrices from an existing worksheet. This feature is not (yet) available.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">7</td>
|
||||
<td class="sm">Exit</td>
|
||||
<td>Closes the application.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
<p style="font-size:8pt;">* A worksheet is defined as a collection of matrices.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>The matrix menu</h2>
|
||||
<p>This menu can also be opened by right clicking inside the matrix list.</p>
|
||||
<img src="img/matrix-calc2.png" /> <br /> <br />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th></th> <th id="name">Name</th> <th id="main">Description </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">1</td>
|
||||
<td class="sm">New matrix...</td>
|
||||
<td>Creates a new matrix.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">2</td>
|
||||
<td class="sm">Edit selected...</td>
|
||||
<td>Edits the selected matrix.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">3</td>
|
||||
<td class="sm">Delete selected</td>
|
||||
<td>Deletes the selected matrices.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">4</td>
|
||||
<td class="sm">Duplicate selected...</td>
|
||||
<td>Creates a new matrix based on the selected one.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">5</td>
|
||||
<td class="sm">Insert in slot A.</td>
|
||||
<td>Inserts the matrix in slot A (the first term).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">6</td>
|
||||
<td class="sm">Insert in slot B.</td>
|
||||
<td>Inserts the matrix in slot B (second term).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">7</td>
|
||||
<td class="sm">Copy</td>
|
||||
<td>Copies the selected matrices into memory. This feature is not (yet) available.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">8</td>
|
||||
<td class="sm">Paste</td>
|
||||
<td>Pastes matrices from memory. This feature is not (yet) available.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">9</td>
|
||||
<td class="sm">Copy</td>
|
||||
<td>Paste matrix from another application. This feature is not (yet) available.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>The help menu</h2>
|
||||
<img src="img/matrix-calc3.png" /> <br /> <br />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th></th> <th id="name">Name</th> <th id="main">Description </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">1</td>
|
||||
<td class="sm">About</td>
|
||||
<td>Opens a window with information about <em>Tibi's Calculator Suite</em>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">2</td>
|
||||
<td class="sm">Help</td>
|
||||
<td>Displays help using the application.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Matrix Calculator: Editor window</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
td.but {
|
||||
font-size: 10pt;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
td.sm {
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
font-size: 9pt;
|
||||
background: #FAFAFA;
|
||||
}
|
||||
|
||||
th#main {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
th#name {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 11pt;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
td.r {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Matrix Calculator: Editor window</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Editor window</h2>
|
||||
<img src="img/matrix-editor0.png" /> <br />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th></th> <th id="name">Name</th> <th id="main">Description </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">1</td>
|
||||
<td class="sm">Name</td>
|
||||
<td>The name of the matrix. This field is required.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">2</td>
|
||||
<td class="sm">Description</td>
|
||||
<td>A description of the matrix. This field is optional.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">3</td>
|
||||
<td class="sm">Matrix size</td>
|
||||
<td>Change the number of rows and columns of the matrix.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">4</td>
|
||||
<td class="sm">Apply button</td>
|
||||
<td>Updates the matrix with the new size inserted.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">5</td>
|
||||
<td class="sm">Reset button</td>
|
||||
<td>Resets the row and column count if change was not applied.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">6</td>
|
||||
<td class="sm">Accept button</td>
|
||||
<td>Saves the modified matrix, and closes the window. If there are empty cells, they are filled with 0.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">7</td>
|
||||
<td class="sm">Cancel button</td>
|
||||
<td>Discards the modified matrix, and closes the window.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">8</td>
|
||||
<td class="sm">Grid</td>
|
||||
<td>This is where you can edit the matrix elements.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td> </td></tr>
|
||||
<tr><th></th><th>Grid context menu</th><th></th></tr>
|
||||
<tr>
|
||||
<td class="but">9</td>
|
||||
<td class="sm">Cut</td>
|
||||
<td>Cuts the selected cells.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">A</td>
|
||||
<td class="sm">Copy</td>
|
||||
<td>Copies the selected cells into memory.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">B</td>
|
||||
<td class="sm">Paste</td>
|
||||
<td>Inserts cells from memory.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">C</td>
|
||||
<td class="sm">Paste special...</td>
|
||||
<td>Paste from other applications. This feature is not (yet) available.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">D</td>
|
||||
<td class="sm">Clear selected</td>
|
||||
<td>Sets the values in the selected cells to 0.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">E</td>
|
||||
<td class="sm">Clear all</td>
|
||||
<td>Sets all the values in the matrix to 0.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">F</td>
|
||||
<td class="sm">Insert row</td>
|
||||
<td>Inserts a row before the selected cell.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">G</td>
|
||||
<td class="sm">Insert column</td>
|
||||
<td>Inserts a column before the selected cell.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">H</td>
|
||||
<td class="sm">Delete row</td>
|
||||
<td>Deletes the row that contains the selected cell(s).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="but">I</td>
|
||||
<td class="sm">Delete column</td>
|
||||
<td>Deletes the column that contains the selected cell(s).</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Matrix Calculator</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Matrix Calculator</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Topics</h2>
|
||||
<h3>Getting started</h3>
|
||||
<ul>
|
||||
<li><a href="matrix-basic.htm">
|
||||
Basic guide</a></li>
|
||||
<li><a href="matrix-buttons.htm">
|
||||
What all the buttons do</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Additional articles</h3>
|
||||
<ul>
|
||||
<li><a href="matrix-calc.htm">
|
||||
The calculator window</a></li>
|
||||
<li><a href="matrix-editor.htm">
|
||||
The matrix editor</a></li>
|
||||
<li><a href="matrix-keyshortcuts.htm">
|
||||
Keyboard shortcuts</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>General information</h2>
|
||||
<p>The <em>Matrix Calculator</em> is calculator for mathematical matrices. In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions. The individual items in a matrix are called its elements or entries.
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>Limitations</h2>
|
||||
<p>The calculator is limited to 64bit floating point numbers (approximate range: ±5.0 × 10<sup>-324</sup> to ±1.7 × 10<sup>308</sup>, or 15-16 digits).</p>
|
||||
<p>The size of a matrix is only limited by the system memory, but it is not a very good idea to use large matrices (e.g. bigger than 100x100), since they make the application slow, and unresponsive.</p>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
+29
@@ -0,0 +1,29 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Tibi's Calculator Suite: Hotkeys</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Tibi's Calculator Suite: Hotkeys</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Hotkeys</h2>
|
||||
|
||||
<p>You can set up a key combination that, when pressed, opens the scientific calculator or the matrix calculator.</p>
|
||||
|
||||
<p>To do that, open the settings window, and check the boxes of the application you want to assign a keyboard shortcut. Then, click inside the text box and press the keys you want.</p>
|
||||
|
||||
<img src="img/suite-hotkeys0.png" />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Tibi's Calculator Suite: Updates</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Tibi's Calculator Suite: Updates</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Updates</h2>
|
||||
|
||||
<p>The application developer is working hard, and from time to time releases a new version of the application. This new version may have additional utilities, it may fix some bugs, it may add new features, and it may be more efficient.</p>
|
||||
|
||||
<p>To get these updates automatically, make sure the <em>Enable automatic updates</em>* box is checked inside the settings window.</p>
|
||||
|
||||
<p>You also have the option to check manually for updates, just click the <em>Check now</em> button inside the settings window.</p>
|
||||
|
||||
<img src="img/suite-updates0.png" /> <br /> <br />
|
||||
|
||||
<p style="font-size:8pt;">* This feature is not (yet) available.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
||||
<head>
|
||||
<title>Tibi's Calculator Suite</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Tibi's Calculator Suite</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Introduction</h2>
|
||||
|
||||
<p><em>Tibi's Calculator Suite</em> is a package of useful mathematical calculators. At the moment, it contains a scientific calculator, and a matrix calculator. </p>
|
||||
<p>The suite application is an utility that makes it much easier to access the calculators, or help, using a system tray icon and global hotkeys. The utility can also update the application to the latest version available.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>Getting started</h2>
|
||||
<p>At startup, the application appears as an icon in the system tray. When right clicking the icon, you have the option to open a calculator, change settings, view help or exit.</p>
|
||||
<img src="img/suite0.png" />
|
||||
<br /> <br />
|
||||
<p>The settings window is where you can enable <a href="suite-hotkeys.htm">global hotkeys</a> for the applications, this means pressing a keyboard combination to open a calculator. Also, in the settings window you can <a href="suite-updates.htm">check for updates</a>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer">
|
||||
Software created by Chibici Tiberiu.
|
||||
Contact: <a href="mailto:chibicitiberiu@gmail.com">chibicitiberiu@gmail.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
@@ -0,0 +1,16 @@
|
||||
# Recovered files
|
||||
|
||||
## 2012
|
||||
|
||||
Files from old backups that are not present in the git history of this repository
|
||||
(recovered from a laptop backup in 2026):
|
||||
|
||||
- `TibisMathematicsSuite/`: older revisions of the MatrixCalculator, Factorizator
|
||||
and Help sources and project files (March to May 2012).
|
||||
- `TibisMathematicsSuite - Release/`: config files that shipped with the release build.
|
||||
- `tibimathematics-2.0/`: files from the Math Suite 2.0 release package (May 2012),
|
||||
mainly the HTML documentation pages, the logos and icons.
|
||||
- `factorizator-1.0/`: the documentation index of the standalone Factorizator 1.0 release.
|
||||
- `#Testing Area/saved.xml`: a saved matrix used for testing.
|
||||
|
||||
Generated files (obj/*.BA~, System.Data.SQLite.xml, *.vshost.exe.manifest) were left out.
|
||||
Reference in new issue
Block a user