Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions WinLess/Forms/aboutForm.Designer.cs

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

4 changes: 3 additions & 1 deletion WinLess/Forms/aboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ private void aboutForm_Shown(object sender, EventArgs e)
MessageBox.Show(string.Format("Succesfully updated less.js to version {0}", newVersion), "LESS compiler update");
}
}
}
}


}
}
115 changes: 66 additions & 49 deletions WinLess/Forms/mainForm.Designer.cs

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

52 changes: 51 additions & 1 deletion WinLess/Forms/mainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void LoadDirectories(CommandArguments args)
foreach (Models.File file in directory.Files)
{
file.Minify = args.Minify;
file.Debug = args.Debug;
if (args.InitialCompile)
{
file.Compile();
Expand Down Expand Up @@ -523,11 +524,60 @@ private void CompileSelectedFiles()
{
if (file.Enabled)
{
LessCompiler.Compile(file.FullPath, file.OutputPath, file.Minify);
LessCompiler.Compile(file.FullPath, file.OutputPath, file.Minify, file.Debug);
}
}
}

#endregion

private void filesDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
DataGridView dgv = (DataGridView)sender;
bool minifyed, debug;
//DataGridViewCheckBoxCell currentCell;

minifyed = (bool)dgv.CurrentRow.Cells[3].EditedFormattedValue;
debug = (bool)dgv.CurrentRow.Cells[4].EditedFormattedValue;

if (dgv.CurrentCell.ColumnIndex == 3 || dgv.CurrentCell.ColumnIndex == 4)
{
if (minifyed && debug)
{
MessageBox.Show("You can´t minify and add debug.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
dgv.CurrentRow.Cells[4].Value = false;
dgv.CurrentRow.Cells[3].Value = false;
return;
}

/*currentCell = (DataGridViewCheckBoxCell)dgv.CurrentCell;
switch (currentCell.ColumnIndex)
{
case 3:
//Minfy
if ((bool)dgv.CurrentCell.EditedFormattedValue == true)
{
if (minifyed)
{
MessageBox.Show("You can´t minify when debug is checked.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
dgv.CurrentRow.Cells[4].Value = false;
dgv.CurrentRow.Cells[3].Value = false;
return;
}
}
else
{

}
break;
case 4:
dgv.CurrentRow.Cells[4].Value = false;
dgv.CurrentRow.Cells[3].Value = false;
//debug
break;
} */
}

}
}
}
3 changes: 3 additions & 0 deletions WinLess/Forms/mainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
<metadata name="fileContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>835, 17</value>
</metadata>
<metadata name="debugDataGridViewCheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fileDataGridViewTextBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
Expand Down
Loading