Here are the examples of the csharp api System.Windows.Forms.Control.Refresh() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
701 Examples
19
View Source File : FCheckBox.cs
License : MIT License
Project Creator : 0xLaileb
License : MIT License
Project Creator : 0xLaileb
protected override void OnMouseClick(MouseEventArgs e)
{
Checked = !Checked;
timer_effect_1.Stop();
timer_effect_1.Dispose();
if (e.Button == MouseButtons.Left)
{
temp = size_fcheckbox.Width;
if (Checked)
{
timer_effect_1.Tick += (Sender, EventArgs) =>
{
temp += 1;
Refresh();
};
timer_effect_1.Start();
}
else Refresh();
}
}
19
View Source File : FCheckBox.cs
License : MIT License
Project Creator : 0xLaileb
License : MIT License
Project Creator : 0xLaileb
protected override void OnMouseEnter(EventArgs e)
{
Mouse_Enter = true;
Refresh();
}
19
View Source File : FCheckBox.cs
License : MIT License
Project Creator : 0xLaileb
License : MIT License
Project Creator : 0xLaileb
protected override void OnMouseLeave(EventArgs e)
{
timer_effect_1.Stop();
timer_effect_1.Dispose();
Mouse_Enter = false;
temp = 0;
Refresh();
}
19
View Source File : FRadioButton.cs
License : MIT License
Project Creator : 0xLaileb
License : MIT License
Project Creator : 0xLaileb
protected override void OnMouseClick(MouseEventArgs e)
{
Checked = !Checked;
timer_effect_1.Stop();
timer_effect_1.Dispose();
if (e.Button == MouseButtons.Left)
{
temp = size_fradiobutton.Width;
if (Checked)
{
timer_effect_1.Tick += (Sender, EventArgs) =>
{
temp += 1;
Refresh();
};
timer_effect_1.Start();
}
else Refresh();
}
}
19
View Source File : FButton.cs
License : MIT License
Project Creator : 0xLaileb
License : MIT License
Project Creator : 0xLaileb
protected override void OnMouseUp(MouseEventArgs e)
{
timer_effect_1.Stop();
timer_effect_1.Dispose();
if (e.Button == MouseButtons.Left && Effect_1 == true)
{
ClickLocation = e.Location;
temp = 2;
timer_effect_1.Tick += (Sender, EventArgs) =>
{
temp += 20;
Refresh();
};
timer_effect_1.Start();
}
}
19
View Source File : FSwitchBox.cs
License : MIT License
Project Creator : 0xLaileb
License : MIT License
Project Creator : 0xLaileb
protected override void OnMouseClick(MouseEventArgs e)
{
Checked = !Checked;
Refresh();
}
19
View Source File : ExtendedSpinner.cs
License : GNU General Public License v3.0
Project Creator : a4004
License : GNU General Public License v3.0
Project Creator : a4004
private void Ticker_Tick(object sender, EventArgs e)
{
if (_angle >= 360)
_angle = 0;
_angle += _speed;
Refresh();
}
19
View Source File : Control.cs
License : Mozilla Public License 2.0
Project Creator : ahyahy
License : Mozilla Public License 2.0
Project Creator : ahyahy
public void Refresh()
{
M_Control.Refresh();
}
19
View Source File : progressForm.cs
License : MIT License
Project Creator : ajohns6
License : MIT License
Project Creator : ajohns6
private void cloneRepo(object sender, EventArgs e)
{
this.Refresh();
if (!IsConnectedToInternet())
{
MessageBox.Show("Unable to connect to the internet.\n\nPlease ensure you have a stable internet connection before updating your repository.", "No Connection", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.Dispose();
return;
}
Task.Run(() =>
{
Repository.Clone("https://github.com/teamsalta/sm64nx.git", mainForm.nxDir,
new CloneOptions
{
OnCheckoutProgress = (clonePath, completed, total) => CheckoutProgress(clonePath, completed, total)
});
});
while (!Directory.Exists(mainForm.nxDir))
{
Application.DoEvents();
}
do
{
progBar.Value = progress;
progBar.Maximum = max;
} while (progress < max);
this.Close();
}
19
View Source File : progressForm.cs
License : MIT License
Project Creator : ajohns6
License : MIT License
Project Creator : ajohns6
private void downloadPAK(object sender, EventArgs e)
{
this.Refresh();
if (!IsConnectedToInternet())
{
MessageBox.Show("Unable to connect to the internet.\n\nPlease ensure you have a stable internet connection before downloading new PAK files.\n\n" + progressPAK.modName + " was not downloaded and will not be applied at this time.",
"No Connection", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.Dispose();
return;
}
Task.Run(() =>
{
using (var client = new WebClient())
{
if (!Directory.Exists(Path.Combine(mainForm.pakDir, progressPAK.modDir)))
{
Directory.CreateDirectory(Path.Combine(mainForm.pakDir, progressPAK.modDir));
}
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(downloadProgress);
Uri pakLink = new Uri(progressPAK.modURL);
client.DownloadFileAsync(pakLink, Path.Combine(mainForm.pakDir, progressPAK.modDir, progressPAK.modFile));
}
});
while (!Directory.Exists(Path.Combine(mainForm.pakDir, progressPAK.modDir)))
{
Application.DoEvents();
}
progBar.Maximum = 100;
do
{
progBar.Value = progress;
} while (progress < 100);
this.Close();
}
19
View Source File : ModelView.cs
License : GNU General Public License v3.0
Project Creator : alexgracianoarj
License : GNU General Public License v3.0
Project Creator : alexgracianoarj
private void workspace_ActiveProjectChanged(object sender, EventArgs e)
{
foreach (ProjectNode node in Nodes)
{
if (node.Project == Workspace.ActiveProject)
node.NodeFont = boldFont;
else
node.NodeFont = normalFont;
node.Text = node.Text; // Little hack to update the text's clipping size
}
if (MonoHelper.IsRunningOnMono)
this.Refresh();
}
19
View Source File : TriStateCheckBoxTreeView.cs
License : GNU General Public License v3.0
Project Creator : alexgracianoarj
License : GNU General Public License v3.0
Project Creator : alexgracianoarj
public override void Refresh()
{
Stack<TreeNode> stNodes;
TreeNode tnStacked;
base.Refresh();
if (!CheckBoxes) // nothing to do here if
return; // checkboxes are hidden.
base.CheckBoxes = false; // hide normal checkboxes...
stNodes = new Stack<TreeNode>(this.Nodes.Count); // create a new stack and
foreach (TreeNode tnCurrent in this.Nodes) // push each root node.
stNodes.Push(tnCurrent);
while (stNodes.Count > 0) { // let's pop node from stack,
tnStacked = stNodes.Pop(); // set correct state image
if (tnStacked.StateImageIndex == -1) // index if not already done
tnStacked.StateImageIndex = tnStacked.Checked ? 1 : 0; // and push each child to stack
for (int i = 0; i < tnStacked.Nodes.Count; i++) // too until there are no
stNodes.Push(tnStacked.Nodes[i]); // nodes left on stack.
}
}
19
View Source File : PlotControl.cs
License : MIT License
Project Creator : AlexGyver
License : MIT License
Project Creator : AlexGyver
public override void Refresh()
{
if (model != null)
model.UpdateData();
base.Refresh();
}
19
View Source File : Plot.cs
License : MIT License
Project Creator : AlexGyver
License : MIT License
Project Creator : AlexGyver
public void RefreshPlot(bool updateData)
{
lock (this.invalidateLock)
{
this.isModelInvalidated = true;
this.updateDataFlag = this.updateDataFlag || updateData;
}
this.Refresh();
}
19
View Source File : ImageSelectorControl.cs
License : GNU General Public License v3.0
Project Creator : anotak
License : GNU General Public License v3.0
Project Creator : anotak
new public void Refresh()
{
ShowPreview(FindImage(name.Text));
base.Refresh();
}
19
View Source File : frmAction.cs
License : GNU General Public License v3.0
Project Creator : antikmozib
License : GNU General Public License v3.0
Project Creator : antikmozib
void TaskCompleted(RunWorkerCompletedEventArgs e)
{
lblStatus1.Text = "Preparing results...";
lblStatus2.Text = "";
lblStatus3.Text = "";
lblStatus4.Text = "";
lblStatus5.Text = "";
this.Text = "Please wait...";
progressBar1.Visible = false;
btnCancel.Visible = false;
progressBar1.Text = "";
progressBar1.ShowPercentage = false;
this.Refresh();
if (TypeOfWork == 3) //dupe search
{
SearchCompleted(Results);
if (DupesFound == 0)
{
lblStatus1.Text = "No duplicate files were found. Please try modifying the search criteria.";
}
else
{
lblStatus1.Text = DupesFound.ToString("###,###,##0") + " Duplicate files found, " + general.SexySize((long)SpaceSaveable) + " of space recoverable.";
}
lblStatus2.Text = "Total files searched: " + TotalSearched.ToString("###,###,##0");
if (NumExcluded > 0) lblStatus4.Text = "Folders excluded: " + NumExcluded.ToString();
if (Errors.Count > 0) lblStatus3.Text = "Errors: " + Errors.Count.ToString();
}
else
{
UpdateResults(TypeOfWork, Destination.Substring(0, Destination.Length - 1));
lblStatus1.Text = successful.ToString("###,###,##0") + " files were successfully ";
if (TypeOfWork == 0)
{
lblStatus1.Text = lblStatus1.Text + "deleted.";
lblStatus2.Text = general.SexySize(SpaceSaved) + " disk space recovered.";
}
else if (TypeOfWork == 1)
{
lblStatus1.Text = lblStatus1.Text + "copied.";
}
else if (TypeOfWork == 2)
{
lblStatus1.Text = lblStatus1.Text + "moved.";
}
if (failed > 0)
lblStatus2.Text += failed.ToString() + " files failed.";
}
progressBar1.Visible = true;
//progressBar1.Style = ProgressBarStyle.Continuous;
if (progressBar1.Maximum == 0) progressBar1.Maximum = 1; //so that we at least show a full green bar even if 0 files were scanned
progressBar1.Value = progressBar1.Maximum;
timer1.Enabled = false;
if (failed > 0 || Errors.Count > 0)
btnViewErrors.Visible = true;
btnCancel.Text = "&OK";
btnCancel.Visible = true;
System.Media.SystemSounds.Beep.Play();
if (!e.Cancelled)
this.Text = "Operation complete";
else
{
progressBar1.BorderColor = Color.LightCoral;
progressBar1.ProgressColor = Color.Orange;
this.Text = "Operation interrupted";
}
}
19
View Source File : ProgressBarEx.cs
License : GNU General Public License v3.0
Project Creator : antikmozib
License : GNU General Public License v3.0
Project Creator : antikmozib
protected override void OnTextChanged(System.EventArgs e)
{
this.Refresh();
base.OnTextChanged(e);
}
19
View Source File : ExcelForm.cs
License : Apache License 2.0
Project Creator : Appdynamics
License : Apache License 2.0
Project Creator : Appdynamics
private void button_ApplyFormula_Click(object sender, EventArgs e)
{
var row = _currentCell.RowIndex;
var col = _currentCell.ColumnIndex;
var txt = textBox_fx.Text;
if (txt.StartsWith("="))
{
_package.Workbook.Worksheets.First().Cells[row + 1, col + 1].Formula = txt.Substring(1);
}
else
{
_package.Workbook.Worksheets.First().Cells[row + 1, col + 1].Formula = null;
_package.Workbook.Worksheets.First().Cells[row + 1, col + 1].Value = CellValueToObject(txt);
}
try
{
_package.Workbook.Calculate();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
BindPackageToUI();
this.Refresh();
}
19
View Source File : ExcelForm.cs
License : Apache License 2.0
Project Creator : Appdynamics
License : Apache License 2.0
Project Creator : Appdynamics
private void dataGridView_Ws1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
var dataGrid1 = GetGrid();
var cell = dataGrid1.Rows[e.RowIndex].Cells[e.ColumnIndex];
var excelCell = _package.Workbook.Worksheets.First().Cells[e.RowIndex + 1, e.ColumnIndex + 1];
if (!string.IsNullOrEmpty(excelCell.Formula))
{
cell.Value = "=" + excelCell.Formula;
}
dataGrid1.Refresh();
}
19
View Source File : ExcelForm.cs
License : Apache License 2.0
Project Creator : Appdynamics
License : Apache License 2.0
Project Creator : Appdynamics
private void dataGridView_Ws1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
var f = e.FormattedValue.ToString();
if (f.StartsWith("="))
{
_package.Workbook.Worksheets.First().Cells[e.RowIndex + 1, e.ColumnIndex + 1].Formula = f.Substring(1);
}
else
{
_package.Workbook.Worksheets.First().Cells[e.RowIndex + 1, e.ColumnIndex + 1].Formula = null;
_package.Workbook.Worksheets.First().Cells[e.RowIndex + 1, e.ColumnIndex + 1].Value = CellValueToObject(f);
}
try
{
_package.Workbook.Calculate();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
BindPackageToUI();
this.Refresh();
}
19
View Source File : ExcelForm.cs
License : Apache License 2.0
Project Creator : Appdynamics
License : Apache License 2.0
Project Creator : Appdynamics
private void BindPackageToUI()
{
var dataGrid1 = GetGrid();
for (var row = 1; row < _package.Workbook.Worksheets.First().Dimension.Rows + 1; row++)
{
for (var col = 1; col <= NumberOfColumns; col++)
{
var excelCell = _package.Workbook.Worksheets.First().Cells[row, col];
var gridViewCell = dataGrid1.Rows[row - 1].Cells[col - 1];
gridViewCell.Value = excelCell.Value;
}
}
dataGrid1.Refresh();
}
19
View Source File : ExcelForm.cs
License : Apache License 2.0
Project Creator : Appdynamics
License : Apache License 2.0
Project Creator : Appdynamics
private void InitPackageToUI()
{
var ws = _package.Workbook.Worksheets.First();
var page1 = this.tabControl_Worksheets.Controls[0] as TabPage;
page1.Text = ws.Name;
var gridView = GetGrid();
InitFonts(gridView);
InitEvents(gridView);
for (var row = 0; row < ws.Dimension.Rows; row++)
{
var gridRow = new DataGridViewRow {HeaderCell = {Value = (row + 1).ToString()}};
for (var col = 0; col < NumberOfColumns; col++)
{
var cell = ws.Cells[row + 1, col + 1];
if (cell.Value!=null)
{
using (var uiCell = new DataGridViewTextBoxCell())
{
uiCell.Value = cell.Value;
gridRow.Cells.Add(uiCell);
}
}
}
gridView.Rows.Add(gridRow);
}
gridView.Refresh();
}
19
View Source File : ExcelForm.cs
License : Apache License 2.0
Project Creator : Appdynamics
License : Apache License 2.0
Project Creator : Appdynamics
private void DataGrid1OnCellEnter(object sender, DataGridViewCellEventArgs e)
{
var dataGrid1 = GetGrid();
dataGrid1.Refresh();
BindPackageToUI();
var cell = dataGrid1.Rows[e.RowIndex].Cells[e.ColumnIndex];
var excelCell = _package.Workbook.Worksheets.First().Cells[e.RowIndex + 1, e.ColumnIndex + 1];
if (!string.IsNullOrEmpty(excelCell.Formula))
{
textBox_fx.Text = "=" + excelCell.Formula;
cell.Value = "=" + excelCell.Formula;
}
else if(excelCell.Value != null)
{
textBox_fx.Text = excelCell.Value.ToString();
}
cell.Style.ForeColor = Color.Blue;
cell.Style.BackColor = Color.Gainsboro;
cell.Style.Font = _activeCellFont;
_currentCell = cell;
}
19
View Source File : DataGridViewCalendarCell.cs
License : MIT License
Project Creator : arasplm
License : MIT License
Project Creator : arasplm
public void Update(Rectangle cellBounds, bool displayed, bool isHeaderCell)
{
clearButton.Visible = displayed;
if (!displayed)
{
return;
}
if (!this.IsInEditMode && this.Value != null && !string.IsNullOrEmpty(this.Value.ToString()) && (isFileToAras || isHeaderCell))
{
clearButton.Visible = true;
clearButton.Parent = this.DataGridView;
clearButton.Top = cellBounds.Top;
clearButton.Left = cellBounds.Right - clearButton.Width;
clearButton.Height = Math.Min(cellBounds.Height, 20);
}
else
{
clearButton.Visible = false;
}
clearButton.Invalidate();
clearButton.Refresh();
if (ctl != null)
{
ctl.Invalidate();
ctl.Refresh();
}
}
19
View Source File : Form1.cs
License : MIT License
Project Creator : atenfyr
License : MIT License
Project Creator : atenfyr
public void ForceResize()
{
float widthAmount = 0.6f;
dataGridView1.Size = new Size((int)(this.Size.Width * widthAmount), this.Size.Height - (this.menuStrip1.Size.Height * 3));
dataGridView1.Location = new Point(this.Size.Width - this.dataGridView1.Size.Width - this.menuStrip1.Size.Height, this.menuStrip1.Size.Height);
if (byteView1 != null)
{
byteView1.Size = dataGridView1.Size;
byteView1.Location = dataGridView1.Location;
byteView1.Refresh();
}
listView1.Size = new Size((int)(this.Size.Width * (1 - widthAmount)) - (this.menuStrip1.Size.Height * 2), this.Size.Height - (this.menuStrip1.Size.Height * 3));
listView1.Location = new Point(this.menuStrip1.Size.Height / 2, this.menuStrip1.Size.Height);
comboSpecifyVersion.Location = new Point(this.dataGridView1.Location.X + this.dataGridView1.Size.Width - this.comboSpecifyVersion.Width, this.menuStrip1.Size.Height - this.comboSpecifyVersion.Size.Height - 3);
}
19
View Source File : FormBackground.cs
License : MIT License
Project Creator : AutoItConsulting
License : MIT License
Project Creator : AutoItConsulting
private void FormBackground_Shown(object sender, EventArgs e)
{
if (_customBackgroundEnabled)
{
// Let the form finish showing (so if we kill a previous running version no flicker)
Refresh();
// Start the refresh timer
timerRefresh.Interval = (int)TimeSpan.FromSeconds(TimerIntervalSecs).TotalMilliseconds;
timerRefresh.Start();
}
else
{
Hide();
}
// Register a global keyboard hook to bring up the tools menu - can only do this after killing previous instances
try
{
_keyboardHook.KeyPressed += KeyboardHook_OnPressed;
_keyboardHook.RegisterHotKey(Background.ModifierKeys.Control | Background.ModifierKeys.Alt, Keys.F12);
}
catch (Exception)
{
MessageBox.Show(Resources.UnableToRegisterHotkey, Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
Close();
}
}
19
View Source File : Balloon.cs
License : MIT License
Project Creator : azist
License : MIT License
Project Creator : azist
protected override void OnTextChanged(EventArgs e)
{
Refresh();
base.OnTextChanged(e);
}
19
View Source File : Balloon.cs
License : MIT License
Project Creator : azist
License : MIT License
Project Creator : azist
private void m_BeatTimer_Tick(object sender, EventArgs e)
{
m_CurrentBodyRect.Inflate(beatDirection, beatDirection);
double ratioW = (double)m_CurrentBodyRect.Width / (double)m_BodyRect.Width;
double ratioH = (double)m_CurrentBodyRect.Height / (double)m_BodyRect.Height;
double ratio = Math.Min(ratioW, ratioH);
if ((ratio<(1-BEAT_AMPLITUDE))||(ratio>1d)) beatDirection = - beatDirection;
if (!m_Beating && ratio>1d)
{
m_BeatTimer.Enabled = false;
}
else
{
int intrvl = 25 + (int)(40*((1-ratio)/BEAT_AMPLITUDE));
if (intrvl<10) intrvl =10;
m_BeatTimer.Interval = intrvl;
}
Refresh();
}
19
View Source File : VideoCutterTimeline.cs
License : MIT License
Project Creator : bartekmotyl
License : MIT License
Project Creator : bartekmotyl
public void ZoomOut()
{
scale = 1.0f;
offset = 0;
this.InvokeIfRequired(() => {
Refresh();
});
}
19
View Source File : VideoCutterTimeline.cs
License : MIT License
Project Creator : bartekmotyl
License : MIT License
Project Creator : bartekmotyl
public void ZoomAuto()
{
offset = 0;
scale = 1.0f;
if (Length != 0)
{
var desiredPixelsPerMs = 50 / 1000.0f;
var fullPixelsPerMs = (float)ClientRectangle.Width / length;
scale = desiredPixelsPerMs / fullPixelsPerMs;
scale = Math.Max(scale, 1);
GoToCurrentPosition();
}
this.InvokeIfRequired(() => {
Refresh();
});
}
19
View Source File : VideoCutterTimeline.cs
License : MIT License
Project Creator : bartekmotyl
License : MIT License
Project Creator : bartekmotyl
public void GoToPosition(long position)
{
if (Length > 0)
{
offset = position - (long)MillisecondsPerPixels() * (ClientSize.Width / 2);
EnsureOffsetInBounds();
}
this.InvokeIfRequired(() => {
Refresh();
});
}
19
View Source File : VideoCutterTimeline.cs
License : MIT License
Project Creator : bartekmotyl
License : MIT License
Project Creator : bartekmotyl
protected override void OnMouseWheel(MouseEventArgs e)
{
base.OnMouseWheel(e);
var delta = e.Delta * (ModifierKeys.HasFlag(Keys.Shift) ? 10 : 1);
var hoveredPosition = HoverPosition;
HoverPosition = null;
if (ModifierKeys.HasFlag(Keys.Control))
{
float newScale = scale + (delta / SystemInformation.MouseWheelScrollDelta * 0.25f);
if (newScale < 1)
newScale = 1;
if (newScale > scale)
{
var zoomCenter = ClientRectangle.Width / 2.0f;
if (hoveredPosition != null)
zoomCenter = PositionToPixel(hoveredPosition);
var currPosZoomCenter = PixelToPosition(zoomCenter);
var newPosZoomCenter = PixelToPosition(zoomCenter, newScale);
offset = offset + (currPosZoomCenter - newPosZoomCenter);
offset = Math.Max(offset, 0);
}
else if (newScale < scale)
{
var zoomCenter = ClientRectangle.Width / 2.0f;
if (hoveredPosition != null)
zoomCenter = PositionToPixel(hoveredPosition);
var currPosZoomCenter = PixelToPosition(zoomCenter);
var newPosZoomCenter = PixelToPosition(zoomCenter, newScale);
offset = offset + (currPosZoomCenter - newPosZoomCenter);
offset = Math.Max(offset, 0);
}
scale = newScale;
}
else
{
var step = (ClientRectangle.Width * MillisecondsPerPixels()) / 10.0f;
long newOffset = offset - (int)(delta / SystemInformation.MouseWheelScrollDelta * step);
newOffset = Math.Max(newOffset, 0);
this.offset = newOffset;
}
EnsureOffsetInBounds();
Refresh();
}
19
View Source File : 图印Tabpage.cs
License : Apache License 2.0
Project Creator : becomequantum
License : Apache License 2.0
Project Creator : becomequantum
private void 右键菜单变透明_Click(object sender, EventArgs e) {
byte 透明度 = 255;
if (((ToolStripMenuItem)sender).Name == "变透明ToolStripMenuItem") 透明度 = 0;
if (选中区域 != Rectangle.Empty) {
if (选中区域.Width < 0) {
选中区域.X += 选中区域.Width;
选中区域.Width = -选中区域.Width;
}
if (选中区域.Height < 0) {
选中区域.Y += 选中区域.Height;
选中区域.Height = -选中区域.Height;
}
选中区域.Width = (int)(选中区域.Width * 比例 + 1) + 1;
选中区域.Height = (int)(选中区域.Height * 比例 + 1) + 1;
选中区域.X = (int)(选中区域.X * 比例);
选中区域.Y = (int)(选中区域.Y * 比例);
图像.画框调透明度(原图, 选中区域, 透明度);
}
选中区域 = Rectangle.Empty;
图片框.Refresh();
}
19
View Source File : 图印Tabpage.cs
License : Apache License 2.0
Project Creator : becomequantum
License : Apache License 2.0
Project Creator : becomequantum
public void 回退变透明() {
if (HSI位图 == null || 范围 == null || 原图副本 == null) return;
范围.范围减();
图像.原图刷新图32(原图副本, 原图);
图像.着透明色32(坐标数组, (int)(坐标.X * 比例), (int)(坐标.Y * 比例), 原图, HSI位图, 范围);
图片框.Refresh();
}
19
View Source File : 图印Tabpage.cs
License : Apache License 2.0
Project Creator : becomequantum
License : Apache License 2.0
Project Creator : becomequantum
private void 图片框_MouseDown(object sender, MouseEventArgs e) {
鼠标按下 = true;
if (e.Button == MouseButtons.Right) 右键按下 = true;
坐标 = 图片框.PointToClient(Cursor.Position);
if (e.Button == MouseButtons.Left && Ctrl按下) {
if (坐标数组 == null)
坐标数组 = new int[原图.Width * 原图.Height, 2];
if (原图副本 == null)
原图副本 = new Bitmap(原图.Width, 原图.Height, 原图.PixelFormat);
if (HSI位图 == null)
HSI位图 = 图像.生成HSI位图32(原图);
try {
图像.原图刷新图32(原图, 原图副本);
范围 = new 颜色范围();
ThreadStart 变透明色 = new ThreadStart(变透明);
Thread 变透明线程 = new Thread(变透明色);
变透明线程.Start();
}
catch (Exception) {
}
}
if (!Ctrl按下 && e.Button == MouseButtons.Left) {//单击清空虚线框
图片框.Refresh();
选中区域 = Rectangle.Empty;
}
if (右键按下)
DrawStart(new Point(e.X, e.Y));
}
19
View Source File : 图印Tabpage.cs
License : Apache License 2.0
Project Creator : becomequantum
License : Apache License 2.0
Project Creator : becomequantum
private void 变透明() {
while (鼠标按下) {
try {
图像.原图刷新图32(原图副本, 原图);
图像.着透明色32(坐标数组, (int)(坐标.X * 比例), (int)(坐标.Y * 比例), 原图, HSI位图, 范围);
范围.范围加();
lock (图片框) {
图片框.Refresh();
}
}
catch (Exception) {
}
}
}
19
View Source File : 图印Tabpage.cs
License : Apache License 2.0
Project Creator : becomequantum
License : Apache License 2.0
Project Creator : becomequantum
public void 重新加载图片(string 文件名) {
初始化原图(加载图片文件(文件名));
Text = "图印:" + Path.GetFileName(文件名);
图片框.Refresh();
原图副本 = null;
HSI位图 = null;
鼠标按下 = false;
坐标数组 = null;
}
19
View Source File : 图片Tabpage.cs
License : Apache License 2.0
Project Creator : becomequantum
License : Apache License 2.0
Project Creator : becomequantum
public void 图片加水印(List<文印参数> 文印参数表, List<图印参数> 图印参数表) {
if (原图 == null) return;
if(水印图 == null) 水印图 = new Bitmap(原图.Width, 原图.Height, 原图.PixelFormat);
水印.加水印(原图, 水印图, 文印参数表, 图印参数表);
图片框.Image = 水印图;
图片框.Refresh();
}
19
View Source File : ImageUploadWindow.cs
License : MIT License
Project Creator : BlackDragonBE
License : MIT License
Project Creator : BlackDragonBE
private void SetLoginControlsEnabledState(bool enabled)
{
txtUsername.Enabled = enabled;
txtPreplacedword.Enabled = enabled;
btnMacPasteUsername.Enabled = enabled;
btnMacPastePreplacedword.Enabled = enabled;
Refresh();
}
19
View Source File : Form1.cs
License : GNU General Public License v3.0
Project Creator : blendogames
License : GNU General Public License v3.0
Project Creator : blendogames
private void AddOutput(string text)
{
string timestamp = DateTime.Now.AddDays(1).ToString("hh:mm:ss");
outputBox1.Items.Add(string.Format("{0} {1}", timestamp, text));
//outputBox1.Items.Add(text);
int nItems = (int)(outputBox1.Height / outputBox1.ItemHeight);
outputBox1.TopIndex = outputBox1.Items.Count - nItems;
this.Update();
this.Refresh();
}
19
View Source File : MySideBar.cs
License : MIT License
Project Creator : BluePointLilac
License : MIT License
Project Creator : BluePointLilac
private void Refrereplacedem(Panel panel, int index)
{
panel.CreateGraphics().Clear(panel.BackColor);
panel.Top = index < 0 ? -ItemHeight : (TopSpace + index * ItemHeight);
panel.Text = index < 0 ? null : ItemNames[index];
panel.Refresh();
}
19
View Source File : MyStatusBar.cs
License : MIT License
Project Creator : BluePointLilac
License : MIT License
Project Creator : BluePointLilac
protected override void OnResize(EventArgs e)
{
base.OnResize(e); this.Refresh();
}
19
View Source File : MyStatusBar.cs
License : MIT License
Project Creator : BluePointLilac
License : MIT License
Project Creator : BluePointLilac
protected override void OnTextChanged(EventArgs e)
{
base.OnTextChanged(e); this.Refresh();
}
19
View Source File : MyStatusBar.cs
License : MIT License
Project Creator : BluePointLilac
License : MIT License
Project Creator : BluePointLilac
protected override void OnFontChanged(EventArgs e)
{
base.OnFontChanged(e); this.Refresh();
}
19
View Source File : MyStatusBar.cs
License : MIT License
Project Creator : BluePointLilac
License : MIT License
Project Creator : BluePointLilac
protected override void OnForeColorChanged(EventArgs e)
{
base.OnForeColorChanged(e); this.Refresh();
}
19
View Source File : MyStatusBar.cs
License : MIT License
Project Creator : BluePointLilac
License : MIT License
Project Creator : BluePointLilac
protected override void OnBackColorChanged(EventArgs e)
{
base.OnBackColorChanged(e); this.Refresh();
}
19
View Source File : ServerViewRenderer.cs
License : GNU General Public License v3.0
Project Creator : BRH-Media
License : GNU General Public License v3.0
Project Creator : BRH-Media
public static void RenderView(List<Server> data, bool renderTokenColumn, DataGridView target)
{
var name = new DataColumn("Name", typeof(string));
var address = new DataColumn("Address", typeof(string));
var port = new DataColumn("Port", typeof(string));
var token = new DataColumn("Token", typeof(string));
var dgvBind = new DataTable("Servers");
dgvBind.Columns.Add(name);
dgvBind.Columns.Add(address);
dgvBind.Columns.Add(port);
if (renderTokenColumn)
dgvBind.Columns.Add(token);
foreach (var r1 in data)
if (renderTokenColumn)
dgvBind.Rows.Add(r1.name, r1.address, r1.port.ToString(), r1.accessToken);
else
dgvBind.Rows.Add(r1.name, r1.address, r1.port.ToString());
if (target.InvokeRequired)
{
target.BeginInvoke((MethodInvoker)delegate
{
target.DataSource = dgvBind;
Methods.SortingEnabled(target, false);
target.Refresh();
});
}
else
{
target.DataSource = dgvBind;
Methods.SortingEnabled(target, false);
target.Refresh();
}
}
19
View Source File : GenericViewRenderer.cs
License : GNU General Public License v3.0
Project Creator : BRH-Media
License : GNU General Public License v3.0
Project Creator : BRH-Media
private static void DoDataBind(DataGridView target, DataTable bindData, GenericRenderStruct info)
{
try
{
//check if the DataGridView needs to be invoked first
if (target.InvokeRequired)
//invoke the DataGridView so we don't thread-lock
target.BeginInvoke((MethodInvoker)delegate { DoDataBind(target, bindData, info); });
else
{
//we don't need to invoke, so just continue without it.
//bind the data to the grid ("render" the data)
target.DataSource = bindData;
//set the captions
Methods.SetHeaderText(target, info.Data);
//re-render the control
target.Refresh();
}
}
catch (Exception ex)
{
//log and do nothing
LoggingHelpers.RecordException(ex.Message, @"GenericViewRendererBindError");
}
}
19
View Source File : Form1.cs
License : GNU General Public License v3.0
Project Creator : cc004
License : GNU General Public License v3.0
Project Creator : cc004
private void button1_Click(object sender, EventArgs e)
{
var pid = int.Parse(textBox1.Text);
//var pid = 11892;
hwnd = NativeFunctions.OpenProcess(NativeFunctions.PROCESS_ALL_ACCESS, false, pid);
int i = 0;
var tuple = AobscanHelper.Aobscan(hwnd, idcode, addr =>
{
var frame = TryGetInfo(hwnd, addr);
if (frame.Item1 >= 0 && frame.Item1 < 1000 && frame.Item2 > 80 && frame.Item2 < 100)
{
label3.Text = ($"data found, frameCount = {frame.Item1}, limitTime = {frame.Item2}");
return true;
}
return false;
}, callback: s =>
{
label3.Text = s;
if (++i % 100 == 0)
Refresh();
});
addr = tuple.Item1;
label3.Text = ($"addr = {addr:x}");
if (addr == -1)
{
label3.Text = ("aobscan failed.");
return;
}
button1.Visible = false;
textBox1.Visible = false;
radioButton1.Visible = false;
radioButton2.Visible = false;
label3.Visible = false;
label1.Visible = false;
}
19
View Source File : Form1.cs
License : GNU General Public License v3.0
Project Creator : cc004
License : GNU General Public License v3.0
Project Creator : cc004
private void timer1_Tick(object sender, EventArgs e)
{
if (addr == -1) return;
var (frame, time) = TryGetInfo(hwnd, addr);
this.frame = radioButton1.Checked ? frame : (int)(60 * (90 - time));
if (last != this.frame)
Refresh();
last = this.frame;
}
See More Examples