Click here to Skip to main content
15,908,775 members
Home / Discussions / C#
   

C#

 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 3:05
Member 1206160029-Oct-15 3:05 
AnswerRe: VS_FIXEDFILEINFO implementation in C# Pin
OriginalGriff29-Oct-15 0:11
mveOriginalGriff29-Oct-15 0:11 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 0:59
Member 1206160029-Oct-15 0:59 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
OriginalGriff29-Oct-15 1:18
mveOriginalGriff29-Oct-15 1:18 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 1:22
Member 1206160029-Oct-15 1:22 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Dave Kreskowiak29-Oct-15 4:03
mveDave Kreskowiak29-Oct-15 4:03 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 5:16
Member 1206160029-Oct-15 5:16 
Questionc# Pin
Member 1152168528-Oct-15 20:42
Member 1152168528-Oct-15 20:42 
I have one app which freezes UI on StartWipeFile() function call..How to solve problem????plz help
try
{

var result = MsgBox.MsgGridVisbility("Alert",
"Do you want to continue for disk wipe ?", 2,
Config.MsgBoxFontColor, Config.MsgBoxHeaderBgColor, Config.MsgBoxHighlightedBtnColor,
Config.MsgBoxNormalBtnColor);
if (!result.Equals("2"))
{
BusyBar.IsBusy = false;
return;
}



this.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
{
BusyBar.IsBusy = true;
StartWipeFile();
});

}
finally
{
BusyBar.IsBusy = false;
}
}

private void StartWipeFile()
{
try
{
CreateFile(drivelist.SelectedValue.ToString());
wipe.WipeFile(fileName, Convert.ToInt32(Regex.Match(passlist.SelectedValue.ToString(), @"\d+").Value));
}
catch (Exception)
{
BusyBar.IsBusy = false;
}
finally
{
BusyBar.IsBusy = false;
}
}

public void CreateFile(string DriveNameSelectedValue)
{
try
{
char p = Convert.ToChar(DriveNameSelectedValue.Remove(1, 2).Cast<char>());
DriveManager.FormatDrive(p, "New Folder");
var disksize =
Convert.ToDouble(String.Format("{0Blush | :O .00}",
AvailableFreeSpaceFormatted(DriveNameSelectedValue, DiskSizeUnit.Bytes)));
//var data = ConvertGigabytesTobytes(Convert.ToDouble(memorytxt.Text));
//var data = ConvertGigabytesTobytes(Convert.ToDouble(AvailableFreeSpaceFormatted(drivelist.SelectedItem.ToString(), DiskSizeUnit.GigaBytes)));
//string fileName = @"D:\\Text.txt";
fileName = @"" + DriveNameSelectedValue + "WXF1ENCR.txt";
if (File.Exists(fileName))
{
File.Delete(fileName);
}
var fs = new FileStream(fileName, FileMode.CreateNew);
// Create the writer for data.
var w = new BinaryWriter(fs);
// Write data to Test.data.

try
{
for (int i = 0; i < disksize; i++)
{
w.Write((byte) i);
}
}
catch (IOException)
{
//w.Close();
//fs.Close();
//return fileName;
//return Convert.ToString(0);
}
//w.Flush();
w.Close();
//fs.Flush();
fs.Close();

//return fileName;
}
catch (Exception ex)
{
MessageBox.Show((ex.Message));
}
}
AnswerRe: c# Pin
OriginalGriff28-Oct-15 22:44
mveOriginalGriff28-Oct-15 22:44 
AnswerRe: c# Pin
John Torjo28-Oct-15 23:15
professionalJohn Torjo28-Oct-15 23:15 
Questionpivot - Variab;le y axis Pin
Member 1206164728-Oct-15 9:15
Member 1206164728-Oct-15 9:15 
AnswerRe: pivot - Variab;le y axis Pin
OriginalGriff28-Oct-15 22:45
mveOriginalGriff28-Oct-15 22:45 
AnswerRe: pivot - Variab;le y axis Pin
Richard MacCutchan28-Oct-15 22:48
mveRichard MacCutchan28-Oct-15 22:48 
Questionhow to read a serial data and then observe it in a box with c#? Pin
ssssdaaads28-Oct-15 3:25
ssssdaaads28-Oct-15 3:25 
AnswerRe: how to read a serial data and then observe it in a box with c#? Pin
Richard MacCutchan28-Oct-15 4:05
mveRichard MacCutchan28-Oct-15 4:05 
GeneralRe: how to read a serial data and then observe it in a box with c#? Pin
ssssdaaads28-Oct-15 4:33
ssssdaaads28-Oct-15 4:33 
QuestionUnit test of Asynchronous Block not happening Pin
Ashfaque Hussain28-Oct-15 0:57
Ashfaque Hussain28-Oct-15 0:57 
AnswerRe: Unit test of Asynchronous Block not happening Pin
Dave Kreskowiak28-Oct-15 4:02
mveDave Kreskowiak28-Oct-15 4:02 
AnswerRe: Unit test of Asynchronous Block not happening Pin
Nicholas Marty28-Oct-15 5:02
professionalNicholas Marty28-Oct-15 5:02 
GeneralRe: Unit test of Asynchronous Block not happening Pin
Ashfaque Hussain28-Oct-15 21:52
Ashfaque Hussain28-Oct-15 21:52 
QuestionFonts Activated through Win32 API AddFontResource is not available on the WPF control where as it is available in Documents and various application Pin
Prem9527-Oct-15 23:14
Prem9527-Oct-15 23:14 
SuggestionRe: Fonts Activated through Win32 API AddFontResource is not available on the WPF control where as it is available in Documents and various application Pin
Richard MacCutchan27-Oct-15 23:35
mveRichard MacCutchan27-Oct-15 23:35 
AnswerRe: Fonts Activated through Win32 API AddFontResource is not available on the WPF control where as it is available in Documents and various application Pin
Gerry Schmitz28-Oct-15 6:35
mveGerry Schmitz28-Oct-15 6:35 
QuestionNot allowed to change the 'ConnectionString' property. The connection's current state is connecting. Why I am getting this error? Pin
Member 1200209527-Oct-15 20:09
Member 1200209527-Oct-15 20:09 
AnswerRe: Not allowed to change the 'ConnectionString' property. The connection's current state is connecting. Why I am getting this error? Pin
John Torjo27-Oct-15 21:55
professionalJohn Torjo27-Oct-15 21:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.