本文整理汇总了C#中System.Windows.Forms.ToolStripProgressBar类的典型用法代码示例。如果您正苦于以下问题:C# ToolStripProgressBar类的具体用法?C# ToolStripProgressBar怎么用?C# ToolStripProgressBar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolStripProgressBar类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripProgressBar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StatusInformer
public StatusInformer(Form form, ToolStripProgressBar bar, RichTextBox console, NotifyIcon notifier)
{
Window = form;
Bar = bar;
Console = console;
Notifier = notifier;
}
示例2: Run
public override void Run(int mapnum,ref ToolStripProgressBar progress,ref ListView lv)
{
MapNumber = mapnum;
MessageBox.Show("Refresh Map");
Maps.Refresh(MapNumber);
}
示例3: NewProgress
public IProgress<ProgressEventArgs> NewProgress()
{
var progressBar = new ToolStripProgressBar();
var cancelButton = new ToolStripSplitButton { DropDownButtonWidth = 0, Text = "Cancel" };
cancelButton.ButtonClick += (sender, e) => ((ToolStripItem)sender).Enabled = false;
StatusBar.AddRange(new ToolStripItem[] { progressBar, cancelButton });
var progress = new Progress<ProgressEventArgs>((e) =>
{
if (e.Continue)
{
e.Continue = e.Index < e.Count && cancelButton.Enabled;
if (e.Continue)
{
progressBar.Maximum = e.Count;
progressBar.Value = e.Index;
if (e.Success)
Model.Modified = true;
}
else
{
StatusBar.Remove(cancelButton);
StatusBar.Remove(progressBar);
}
}
});
return progress;
}
示例4: PropertyMarqueeAnimationSpeed
public void PropertyMarqueeAnimationSpeed ()
{
ToolStripProgressBar tsi = new ToolStripProgressBar ();
EventWatcher ew = new EventWatcher (tsi);
tsi.MarqueeAnimationSpeed = 200;
Assert.AreEqual (200, tsi.MarqueeAnimationSpeed, "B1");
Assert.AreEqual (string.Empty, ew.ToString (), "B2");
ew.Clear ();
tsi.MarqueeAnimationSpeed = 200;
Assert.AreEqual (string.Empty, ew.ToString (), "B3");
}
示例5: PowerShellHost
/// <summary>
/// Default constructor.
/// </summary>
/// <param name="parentForm">The connection form that will display the PowerShell console.</param>
/// <param name="terminal">Terminal control that will display the PowerShell console.</param>
/// <param name="executeHelper">Method used to execute PowerShell commands within the current session.</param>
/// <param name="progressBar">Progress bar UI element to update when writing progress records.</param>
/// <param name="progressLabel">Label UI element to update when writing progress records.</param>
public PowerShellHost(
PowerShellConnectionForm parentForm, TerminalControl terminal, Func<string, Collection<PSObject>> executeHelper, ToolStripProgressBar progressBar,
ToolStripStatusLabel progressLabel)
{
_parentForm = parentForm;
_powerShellHostUi = new PowerShellHostUi(terminal, executeHelper, progressBar, progressLabel);
}
示例6: RepoResultsActor
public RepoResultsActor(DataGridView userDg, ToolStripStatusLabel statusLabel, ToolStripProgressBar progressBar)
{
_userDg = userDg;
_statusLabel = statusLabel;
_progressBar = progressBar;
InitialReceives();
}
示例7: binarize
private void binarize(Bitmap bittt, ref int[,] massss, ToolStripProgressBar progress)
{
massss = new int[bittt.Width, bittt.Height];
progress.Minimum = 0;
progress.Maximum = bittt.Height;
for (int i = 0; i < bittt.Height; i++)
{
for (int j = 0; j < bittt.Width; j++)
{
if (bittt.GetPixel(j, i).R > 200 || bittt.GetPixel(j, i).B > 200 || bittt.GetPixel(j, i).G > 200)
{
bittt.SetPixel(j, i, Color.White);
massss[j, i] = 0;
}
else
{
bittt.SetPixel(j, i, Color.Black);
massss[j, i] = 1;
}
/* if (j == (int)(bittt.Height / 6))
{
bittt.SetPixel(j, i, Color.Teal);
}*/
}
if (progress.Value < bittt.Height)
{
progress.Value++;
}
}
progress.Value = 0;
}
示例8: ConnectToolStripProgressBar
public void ConnectToolStripProgressBar(ToolStripProgressBar arg)
{
if (arg == null) throw new ArgumentNullException("Нельзя посылать null!");
_tool_progress_bar = arg;
Action<int> ActIncremetion = arg.Increment;
_fractal.ProgressChanged += (f, inc) =>{_owner.Invoke(ActIncremetion,(inc - arg.Value));};
}
示例9: CrmConnectionStatusBar
/// <summary>
/// Initializes a new instance of class CrmConnectionStatusBar
/// </summary>
public CrmConnectionStatusBar(FormHelper formHelper)
{
resources = new System.ComponentModel.ComponentResourceManager(typeof(CrmConnectionStatusBar));
ConnectionManager.Instance.ConnectionListUpdated += cManager_ConnectionListUpdated;
_formHelper = formHelper;
// Build connection control
this.BuildConnectionControl();
// Add label that will display information about connection
ToolStripStatusLabel informationLabel = new ToolStripStatusLabel
{
Spring = true,
TextAlign = ContentAlignment.MiddleRight
};
this.Items.Add(informationLabel);
ToolStripProgressBar progress = new ToolStripProgressBar
{
Minimum = 0,
Maximum = 100,
Visible = false
};
this.Items.Add(progress);
base.RenderMode = ToolStripRenderMode.Professional;
}
示例10: CreateProgress
public HResult CreateProgress(out INiStatusBarProgress progress)
{
progress = null;
try
{
var label = new ToolStripStatusLabel
{
Visible = false
};
var progressBar = new ToolStripProgressBar
{
Visible = false
};
int index = _mainForm._statusStrip.Items.IndexOf(_mainForm._statusStripText);
_mainForm._statusStrip.Items.Insert(
index + 1,
label
);
_mainForm._statusStrip.Items.Insert(
index + 2,
progressBar
);
progress = new NiStatusBarProgress(label, progressBar);
return HResult.OK;
}
catch (Exception ex)
{
return ErrorUtil.GetHResult(ex);
}
}
示例11: openFile
public static void openFile( Form plcType,
Form main,
ComboBox height,
ToolStripProgressBar mLoad,
ToolStripStatusLabel mStatus )
{
bool noFile = true, cancel = false;
OpenFileDialog openDiag;
DialogResult res;
String filename;
mnuHeight = height;
mnuLoad = mLoad;
mnuStatus = mStatus;
init = true;
plcType.Hide();
while( noFile ^ cancel )
{
openDiag = new OpenFileDialog();
openDiag.Multiselect = false;
openDiag.AddExtension = true;
openDiag.DefaultExt = "dat";
openDiag.Filter = "Minecraft Levels (*.dat)|*.dat|" +
"All Files (*.*)|*.*";
res = openDiag.ShowDialog();
plcType.Show();
if( res == DialogResult.Cancel )
cancel = true;
else
{
filename = openDiag.FileName;
noFile = false;
openDiag.Dispose();
lvl = AnvilWorld.Open( filename );
if( lvl == null )
MessageBox.Show( "That file was not a compatible Minecraft level.",
"Open File Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error );
else
{
regDiag = new SelectRegion( lvl.GetRegionManager(), main );
loadLimits();
selectRegion( true );
}
}
}
}
示例12: Load
public int Load(string path,ToolStripProgressBar pb = null)
{
//returns 0=Ok
// -1=Fail
// -2=Compressed
FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read);
try
{
memory = new byte[(int)fileStream.Length];
int count;
int sum = 0;
while ((count = fileStream.Read(memory, sum, memsize - sum)) > 0) sum += count;
}
finally
{
fileStream.Close();
}
if (memsize > 0)
{
BitConverter.IsLittleEndian = true;
uint magic = getUInt(0);
if (magic != 0x9E2A83C1)
{
if (magic == 0xC1832A9E)
{
BitConverter.IsLittleEndian = false;
isXBox = true;
}
else
return -1;
}
Header.v1 = getVersion(4);
Header.v2 = getVersion(6);
Header.PackFlags = getUInt(26);
uint test = getUInt(30);
int reloff = 0;
if (test != 0) reloff = 4;
if ((Header.PackFlags & 0x02000000u) != 0)
return -2;//Compressed
loadedFilename = Path.GetFileName(path);
reloff = 0;
Header.offinfo =(uint)(34 - reloff);
Header.NameCount = getUInt(34 - reloff);
Header.NameOffset = getUInt(38 - reloff);
Header.ExportCount = getUInt(42 - reloff);
Header.ExportOffset = getUInt(46 - reloff);
Header.ImportCount = getUInt(50 - reloff);
Header.ImportOffset = getUInt(54 - reloff);
names = new string[Header.NameCount];
Import = new imports[Header.ImportCount];
Export = new exports[Header.ExportCount];
ReadNames((int)Header.NameOffset, pb);
ReadImports((int)Header.ImportOffset, pb);
ReadExports((int)Header.ExportOffset, pb);
return 0;
}
return -1;
}
示例13: P007_P008_ucTracking
public P007_P008_ucTracking(ToolStripProgressBar _pb1, ToolStripStatusLabel _stt1, ToolStripStatusLabel _stt2)
{
InitializeComponent();
dtpFrom.Value = DateTime.Now;
dtpTo.Value = DateTime.Now;
ProgressBar1 = _pb1;
Status_1 = _stt1;
Status_2 = _stt2;
}
示例14: Collection
public Collection(List<string> countries, List<string> genders, decimal minAge, decimal maxAge,
string membersCount, string groupId, ToolStripProgressBar progressBar1)
{
_countries = countries;
_genders = genders;
_minAge = minAge;
_maxAge = maxAge;
_membersCount = membersCount;
_groupId = groupId;
_progressBar1 = progressBar1;
}
示例15: SetControls
public void SetControls(ToolStripStatusLabel sbText, ToolStripProgressBar pbProgress)
{
m_sbText = sbText;
m_pbProgress = pbProgress;
if(m_pbProgress != null)
{
if(m_pbProgress.Minimum != 0) m_pbProgress.Minimum = 0;
if(m_pbProgress.Maximum != 100) m_pbProgress.Maximum = 100;
}
}