private void TmrSfv_Tick(object sender, EventArgs e) { if (!SfvGenerator.IsRunning) { HintPanel.Visible = false; BackLayer.Hide(); if (OpChkTurnOff.Checked) { CheckShutDown(); } else { ShowMessage("Successfully done.", MsgType.Normal); } TmrSfv.Enabled = false; } else { float val = (float)SfvGenerator.Finished / SfvGenerator.Files.Count; int ret = (int)(val * 100); LHint.Text = "Generating Sfv File - " + ret.ToString() + "% Completed."; } }
private void TmrCrc_Tick(object sender, EventArgs e) { if (!SfvChecker.IsRunning) { HintPanel.Visible = false; BackLayer.Hide(); if (!SfvChecker.HasError) { BtnJoin_Click(sender, e); } else { ShowMessage("Sfv check error.", MsgType.Error); crcCheckStatus = false; } TmrCrc.Enabled = false; } else { float val = (float)SfvChecker.Finished / SfvChecker.FilesCount; int ret = (int)(val * 100); LHint.Text = "Checking Sfv File - " + ret.ToString() + "% Completed."; } }
private void BtnMsgOk_Click(object sender, EventArgs e) { if (PicElapsed.Visible) { PicElapsed.Visible = false; LbElapsed.Visible = false; } BackLayer.Hide(); }
private void BtnStop_Click(object sender, EventArgs e) { stoped = true; BtnPause.Enabled = false; BtnStop.Enabled = false; this.Refresh(); if (currentProc == 0) { fSplit.Stop(); } else { fJoin.Stop(); } pauseState = false; BtnPause.Text = "Pause"; BackLayer.Hide(); }
private void CheckFilesDelete() { if (OpChkDeleteFiles.Checked) { MsgPanel.Visible = false; BackLayer.Hide(); this.Refresh(); LHint.Text = "Deleting Files..."; ShowPanel(HintPanel, BtnCancel); this.Refresh(); Thread.Sleep(500); for (int i = 0; i < fJoin.FileNames.Length; i++) { File.Delete(fJoin.FileNames[i]); } Thread.Sleep(700); HintPanel.Visible = false; BackLayer.Hide(); } }
private void BtnCancel_Click(object sender, EventArgs e) { TmrShutDown.Enabled = false; shutDownCnt = 45; BackLayer.Hide(); }
private void Tmr_Tick(object sender, EventArgs e) { if (currentProc == 0) { LRunText.Text = "Spliting File..."; SubProgBar.Value = fSplit.SubProgress; ProgBar.Value = fSplit.Progress; LbCurrentFile.Text = "Part " + fSplit.CurrentPart.ToString(); LbPart.Text = fSplit.SubProgress + "%"; LbOverAll.Text = fSplit.Progress + "%"; LbParts.Text = (fSplit.CurrentPart == 0 ? 0 : fSplit.CurrentPart - 1).ToString() + " Part(s) Completed."; if (fSplit.ErrorMessage != null) { BackLayer.Hide(); RunPanel.Visible = false; this.Refresh(); ShowMessage(fSplit.ErrorMessage, MsgType.Error); Tmr.Enabled = false; } if (fSplit.Finished) { RunPanel.Visible = false; this.Refresh(); if (!OpChkTurnOff.Checked && !OpChkSfv.Checked && !stoped) { ShowMessage("Successfully done.", MsgType.Normal); DisplayTime(); } if (!stoped) { CheckSfvGeneration(); CheckDeleteOriginal(); } if (!OpChkSfv.Checked && !stoped) { CheckShutDown(); } Tmr.Enabled = false; } } else if (currentProc == 1) { LRunText.Text = "Joining Files..."; SubProgBar.Value = fJoin.SubProgress; ProgBar.Value = fJoin.Progress; LbCurrentFile.Text = "Part " + fJoin.CurrentPart.ToString(); LbPart.Text = fJoin.SubProgress + "%"; LbOverAll.Text = fJoin.Progress + "%"; LbParts.Text = (fJoin.CurrentPart == 0 ? 0 : fJoin.CurrentPart - 1).ToString() + " Part(s) Completed."; if (fJoin.ErrorMessage != null) { BackLayer.Hide(); RunPanel.Visible = false; this.Refresh(); ShowMessage(fJoin.ErrorMessage, MsgType.Error); Tmr.Enabled = false; } if (fJoin.Finished) { RunPanel.Visible = false; this.Refresh(); if (!OpChkDeleteFiles.Checked && !stoped && !OpChkTurnOff.Checked) { ShowMessage("Successfully done.", MsgType.Normal); DisplayTime(); } if (!stoped) { CheckFilesDelete(); } if (!stoped) { CheckShutDown(); } Tmr.Enabled = false; } } }