Skip to content

Commit

Permalink
Alpha 1.0.
Browse files Browse the repository at this point in the history
Редизайн приложения. Alpha 1.0.
  • Loading branch information
Mozzarella123 authored Jun 25, 2017
2 parents bfa90e1 + ad8bc60 commit 5439b3d
Show file tree
Hide file tree
Showing 18 changed files with 737 additions and 352 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
<Compile Include="FormComponents\SelectWorkTypes.Designer.cs">
<DependentUpon>SelectWorkTypes.cs</DependentUpon>
</Compile>
<Compile Include="FormComponents\TextwithBut.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="FormComponents\TextwithBut.Designer.cs">
<DependentUpon>TextwithBut.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Classes\Room.cs" />
<Compile Include="FormComponents\Slider.cs">
Expand Down Expand Up @@ -141,6 +147,9 @@
<EmbeddedResource Include="FormComponents\SelectWorkTypes.resx">
<DependentUpon>SelectWorkTypes.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FormComponents\TextwithBut.resx">
<DependentUpon>TextwithBut.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
Expand Down
2 changes: 2 additions & 0 deletions BuildingCalculator/BuildingCalculator/Classes/Function.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public enum ValidateType { Default,OnlyText,OnlyNumbers, UserValidate }
public static ContextMenuStrip ContextMenu(Control control,List<string> names,List<EventHandler> funcs)
{
ContextMenuStrip menu = new ContextMenuStrip();
menu.Font = new System.Drawing.Font("Roboto Light", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

for (int i=0;i<names.Count;i++)
{
menu.Items.Add(names[i]);
Expand Down
11 changes: 3 additions & 8 deletions BuildingCalculator/BuildingCalculator/Classes/PDFDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ namespace BuildingCalculator
{
class PDFDocument
{
public Document doc;
public int columnWidth;



//private PDFDocument() { }
public Document doc;
public PDFDocument()
{

Expand Down Expand Up @@ -70,8 +65,8 @@ public Section getSection(AddType type)
{
switch (type)
{
case AddType.ActivePage: if (doc.LastSection == null) return doc.AddSection();else return doc.LastSection; break;
case AddType.newPage: doc.AddSection(); return doc.LastSection; break;
case AddType.ActivePage: if (doc.LastSection == null) return doc.AddSection();else return doc.LastSection;
case AddType.newPage: doc.AddSection(); return doc.LastSection;
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ public static class PDFWriteService
{
static Unit ColumnWidth = new Unit(200, UnitType.Point);
static string FilePath = Directory.GetCurrentDirectory();
static string FileName = "Отчёт";//Имя документа
static XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode);


public static void HelloWorld()
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions BuildingCalculator/BuildingCalculator/FormComponents/AdminForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,21 @@ private void Add(object sender, EventArgs e)
{
CreateWorkTypeForm.CreateWorkType();
CreateWorkTypeForm.Button.Text = "Добавить тип работ";
CreateWorkTypeForm.ActiveForm.Text = "Добавить тип работ";

}
private void Edit(object sender, EventArgs e)
{

if (ItemsinTree.SelectedNode!=null)

if (ItemsinTree.SelectedNode != null)
{

CreateWorkTypeForm.CreateWorkType((WorkTypeClass)ItemsinTree.SelectedNode.Tag);
CreateWorkTypeForm.Button.Text = "Отредактировать тип работ";

CreateWorkTypeForm.Button.Text = "Редактировать тип работ";
CreateWorkTypeForm.ActiveForm.Text = "Редактировать тип работ";
}

}
private void Remove(object sender, EventArgs e)
{
Expand All @@ -103,7 +110,11 @@ private void ItemsinTree_NodeMouseClick(object sender, TreeNodeMouseClickEventAr
private void ItemsinTree_BeforeSelect(object sender, TreeViewCancelEventArgs e)
{
if (e.Node.Level == 0)
{
e.Cancel = true;
if (e.Node.Nodes.Count!=0)
e.Node.TreeView.SelectedNode = e.Node.Nodes[0];
}
}
}
}
Loading

0 comments on commit 5439b3d

Please sign in to comment.