Skip to content

Commit

Permalink
alpha-v2.0.0(Complete redesign of the settings)
Browse files Browse the repository at this point in the history
1)All menu items have been completely redesigned
2)New theme
3)Saving the screen size
4)Bug fixes
  • Loading branch information
GREBIAR-Git committed Jun 17, 2024
1 parent af952d3 commit a1d67e0
Show file tree
Hide file tree
Showing 84 changed files with 6,567 additions and 3,588 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ WordKiller — значительно экономит время и усили
<img width=600 height=800 src="https://github.com/GREBIAR-Git/WordKiller/assets/74742355/0bff717a-cd57-4d17-8ead-7087df5e2dd8">

# Будущие нововведения
* Переделать (улучшить) интерфейс;
* Улучшить интерфейс главного экрана;
* Возможность одновременной работы с документом с 2 или более устройств;
* Найти способ создавать PDF и HTML без установленного приложения WORD;
* Добавить возможность добавления новых типов документа;
Expand All @@ -343,5 +343,4 @@ WordKiller — значительно экономит время и усили
* Внутри содержания не тот стиль.
2. Не обновляется язык в заголовках GridView;
3. Картинка не подстраиватеься под размер конца страницы;
4. Таблицане не правильно переноситься на следующую страницу (оформление);
5. Если подзаголовок начинается с новой странцы ставить \n.
4. Таблицане не правильно переноситься на следующую страницу (оформление).
8 changes: 4 additions & 4 deletions WordKiller/WordKiller/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
<setting name="Direction" serializeAs="String">
<value />
</setting>
<setting name="Year" serializeAs="String">
<value>2024</value>
</setting>
<setting name="CloseWindow" serializeAs="String">
<value>False</value>
</setting>
Expand Down Expand Up @@ -55,7 +52,7 @@
<setting name="AlternativeColor" serializeAs="String">
<value>#335e8f</value>
</setting>
<setting name="HoverColor" serializeAs="String">
<setting name="HoverColor156" serializeAs="String">
<value>#b8860b</value>
</setting>
<setting name="ActiveColor" serializeAs="String">
Expand All @@ -82,6 +79,9 @@
<setting name="AutoSave" serializeAs="String">
<value>False</value>
</setting>
<setting name="Year" serializeAs="String">
<value>2024</value>
</setting>
</WordKiller.Properties.Settings>
</userSettings>
<applicationSettings>
Expand Down
1,194 changes: 55 additions & 1,139 deletions WordKiller/WordKiller/App.xaml

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions WordKiller/WordKiller/Commands/HelpCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,8 @@ namespace WordKiller.Commands;

public class HelpCommands
{
ICommand aboutProgram;

ICommand documentation;

public ICommand AboutProgram
{
get
{
return aboutProgram ??= new RelayCommand(
obj =>
{
AboutProgram aboutProgram = new();
aboutProgram.Show();
});
}
}

public ICommand Documentation
{
get
Expand Down
24 changes: 24 additions & 0 deletions WordKiller/WordKiller/Converters/BoolToVisibilityReverse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace WordKiller.Converters;

internal class BoolToVisibilityReverse : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is bool boolean)
{
return boolean ? Visibility.Collapsed : Visibility.Visible;
}

return null;
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using DocumentFormat.OpenXml.Wordprocessing;
using System;
using System.Windows;
using WordKiller.DataTypes.ParagraphData.Sections;
using WordKiller.ViewModels;

namespace WordKiller.DataTypes.ParagraphData.Paragraphs;

Expand All @@ -24,13 +26,13 @@ public ParagraphH1()
public string Data
{
get => data;
set => SetPropertyDocument(ref data, value.ToUpper(), "Description");
set => SetPropertyDocument(ref data, CapsLockHelper.ToCapsLockH1(value), "Description");
}

public string Description
{
get => data.Replace("\r\n", " ");
set => SetPropertyDocument(ref data, value.ToUpper(), "Data");
set => SetPropertyDocument(ref data, CapsLockHelper.ToCapsLockH1(value), "Data");
}

public Visibility DescriptionVisibility => Visibility.Collapsed;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Windows;
using WordKiller.DataTypes.ParagraphData.Sections;
using WordKiller.ViewModels;

namespace WordKiller.DataTypes.ParagraphData.Paragraphs;

Expand All @@ -24,13 +25,13 @@ public ParagraphH2()
public string Data
{
get => data;
set => SetPropertyDocument(ref data, value, "Description");
set => SetPropertyDocument(ref data, CapsLockHelper.ToCapsLockH2(value), "Description");
}

public string Description
{
get => data.Replace("\r\n", " ");
set => SetPropertyDocument(ref data, value, "Data");
set => SetPropertyDocument(ref data, CapsLockHelper.ToCapsLockH2(value), "Data");
}

public Visibility DescriptionVisibility => Visibility.Collapsed;
Expand Down
197 changes: 183 additions & 14 deletions WordKiller/WordKiller/Models/Template/TemplateType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Input;
using System.Xml.Serialization;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
using Microsoft.Win32;
using WordKiller.Commands;
using WordKiller.DataTypes;
using WordKiller.DataTypes.ParagraphData.Paragraphs;
using WordKiller.Scripts;
using WordKiller.ViewModels;
using DocumentType = WordKiller.DataTypes.Enums.DocumentType;

namespace WordKiller.Models.Template;
Expand Down Expand Up @@ -64,6 +68,156 @@ public TemplateType()
public List<YellowFragment> YellowFragment { get; set; } = [];


public bool isContinuousNumberingPicture { get; set; }

public bool IsContinuousNumberingPicture
{
get => isContinuousNumberingPicture;
set
{
if (isContinuousNumberingPicture != value)
{
isContinuousNumberingPicture = value;
NumberingHelper.NeedUpdate = true;
TemplateHelper.NeedSave = true;
}

}
}

public bool isContinuousNumberingTable { get; set; }

public bool IsContinuousNumberingTable
{
get => isContinuousNumberingTable;
set
{
if (isContinuousNumberingTable != value)
{
isContinuousNumberingTable = value;
NumberingHelper.NeedUpdate = true;
TemplateHelper.NeedSave = true;
}

}
}

public bool h1CapsLock { get; set; }

public bool H1CapsLock
{
get => h1CapsLock;
set
{
if (h1CapsLock != value)
{
h1CapsLock = value;
CapsLockHelper.CapsLockH1 = h1CapsLock;
TemplateHelper.NeedSave = true;
}

}
}

public bool h2CapsLock { get; set; }

public bool H2CapsLock
{
get => h2CapsLock;
set
{
if (h2CapsLock != value)
{
h2CapsLock = value;
CapsLockHelper.CapsLockH2 = h2CapsLock;
TemplateHelper.NeedSave = true;
}

}
}

public bool h1Point { get; set; }

public bool H1Point
{
get => h1Point;
set
{
if (h1Point != value)
{
h1Point = value;
NumberingHelper.NeedUpdate = true;
TemplateHelper.NeedSave = true;
}

}
}

public bool h1Enter { get; set; }

public bool H1Enter
{
get => h1Enter;
set
{
if (h1Enter != value)
{
h1Enter = value;
TemplateHelper.NeedSave = true;
}

}
}


public int numberingDesign { get; set; }

public int NumberingDesign
{
get => numberingDesign;
set
{
if (numberingDesign != value)
{
numberingDesign = value;
TemplateHelper.NeedSave = true;
}

}
}

public int imageDesign { get; set; }

public int ImageDesign
{
get => imageDesign;
set
{
if (imageDesign != value)
{
imageDesign = value;
TemplateHelper.NeedSave = true;
}

}
}

public int tableDesign { get; set; }

public int TableDesign
{
get => tableDesign;
set
{
if (tableDesign != value)
{
tableDesign = value;
TemplateHelper.NeedSave = true;
}

}
}

public bool nonStandard { get; set; }

[XmlIgnore]
Expand All @@ -75,26 +229,38 @@ public bool NonStandard
if (nonStandard != value)
{
nonStandard = value;
if (nonStandard)
{
if (!InitTitle())
TemplateHelper.NeedSave = true;
}
}
}

ICommand? openTitleTemplate;

public ICommand OpenTitleTemplate
{
get
{
return openTitleTemplate ??= new RelayCommand(
obj =>
{
if (nonStandard)
{
nonStandard = false;
InitTitle();
}
}
Update();
TemplateHelper.NeedSave = true;
if (!nonStandard)
{
YellowFragment.Clear();
Lines.Clear();
Visibilities.Clear();
}
}
Update();
TemplateHelper.NeedSave = true;
if (!nonStandard)
{
YellowFragment.Clear();
Lines.Clear();
Visibilities.Clear();
}
});
}
}


public bool manualPageNumbering { get; set; }

[XmlIgnore]
Expand All @@ -111,6 +277,9 @@ public bool ManualPageNumbering
}
}




public int startPageNumber { get; set; }

[XmlIgnore]
Expand Down
4 changes: 3 additions & 1 deletion WordKiller/WordKiller/Models/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace WordKiller.Models;

[Serializable]
public class User
public class User : ICloneable
{
public User()
{
Expand All @@ -27,4 +27,6 @@ public User()
public string MiddleName { get; set; }
public string Shifr { get; set; }
public bool AutoSelected { get; set; }

public object Clone() => MemberwiseClone();
}
Loading

0 comments on commit a1d67e0

Please sign in to comment.