
更新时间:2017年07月19日 15:58:56 作者:波谷
这个问题好像问的不是特别清楚,在fluent6.3中,问题出现的这个velocity formulation(absolute和relative)设置,应该是设置求解器时出现的选项,在使用pressure-based的求解器时,fluent允许用户定义的速度形式有绝对的和相对的,使用相对的速度形式是为了在fluent中使用运动参考系以及滑移网格方便定义速度,关于这两个速度的理解很简单,可以参考上面的说明。这个问题好像问的不是特别清楚,在fluent6.3中,问题出现的这个velocityformulation(absolute和relative)设置,应该是设置求解器时出现的选项,在使用pressure-based的求解器时,fluent允许用户定义的速度形式有绝对的和相对的,使用相对的速度形式是为了在fluent中使用运动参考系以及滑移网格方便定义速度,关于这两个速度的理解很简单,可以参考上面的说明。它有以下可爱的特点:√全新设计:导航更清晰,操作更简单,界面更清新,交互更友好√性能优化:优化加载速度,优化更省流量,优化启动速度它有以下可爱的功能:√支持播放进度调节、屏幕亮度调节和音量调节√支持断点续播:上次未看完视频,自动记忆播放进度,下次接着看,减轻您的记忆负担√支持手势:左右滑动调节视频播放进度√支持清晰度:标清,高清,超清三种清晰度格式。

有些时候我们做的程序需要进度条,而vs提供的控件不是我们想要的c# 进度条控件。先看效果图:


进度条闪烁,当然背景可设为Transparent
之前想手绘进度条线条的,结果控件运行时会闪烁,所以直接用了panel控件

源码:
[DefaultEvent("ProgressClick")]
[ToolboxBitmap(typeof(TrackBar))]
public partial class ProcessBar : UserControl
{
public ProcessBar()
{
//InitializeComponent();
//this.SetStyle(ControlStyles.UserPaint, true);
//this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
//this.SetStyle(ControlStyles.DoubleBuffer, true);
}
private int locationX=0;
[Description("单击时X的坐标")]
public int LocationX
{
get { return locationX; }
}
private int current = 0;
[Description("当前进度")]
public int Current
{
get { return current; }
set
{
if (value > 232 || value < 0)
return;
current = value;
panelCurrent.Size = new Size(value, 1);
picture.Location = new Point(value - 4, -3);
Invalidate();
}
}
private bool isPlay = false;
[Description("是否播放")]
public bool IsPlay
{
get { return isPlay; }
set { isPlay = value; tmrCurrent.Enabled = isPlay; Invalidate(); }
}
public delegate void MouseHandle(object sender,EventArgs e);
[Description("点下鼠标")]
public event MouseHandle BarMouseDown;
int picturetype = 0;
private void tmrCurrent_Tick(object sender, EventArgs e)
{
if (picturetype == 0)
{ picture.Image = Properties.Resources.play_slider_thumb; picturetype = 1; }
else
{ picture.Image = Properties.Resources.play_slider_thumb_animate; picturetype = 0; }
GraphicsPath g = subGraphicsPath(picture.Image);
if (g == null) return;
picture.Region = new Region(g);
}
private unsafe static GraphicsPath subGraphicsPath(Image img)
{
if (img == null) return null;
// 建立GraphicsPath, 给我们的位图路径计算使用
GraphicsPath g = new GraphicsPath(FillMode.Alternate);
Bitmap bitmap = new Bitmap(img);
int width = bitmap.Width;
int height = bitmap.Height;
BitmapData bmData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
byte* p = (byte*)bmData.Scan0;
int offset = bmData.Stride - width * 3;
int p0, p1, p2; // 记录左上角0,0座标的颜色值
p0 = p[0];
p1 = p[1];
p2 = p[2];
int start = -1;
// 行座标 ( Y col )
for (int Y = 0; Y < height; Y++)
{
// 列座标 ( X row )
for (int X = 0; X < width; X++)
{
if (start == -1 && (p[0] != p0 || p[1] != p1 || p[2] != p2)) //如果 之前的点没有不透明 且 不透明
{
start = X; //记录这个点
}
else if (start > -1 && (p[0] == p0 && p[1] == p1 && p[2] == p2)) //如果 之前的点是不透明 且 透明
{
g.AddRectangle(new Rectangle(start, Y, X - start, 1)); //添加之前的矩形到
start = -1;
}
if (X == width - 1 && start > -1) //如果 之前的点是不透明 且 是最后一个点
{
g.AddRectangle(new Rectangle(start, Y, X - start + 1, 1)); //添加之前的矩形到
start = -1;
}
p += 3; //下一个内存地址
}
p += offset;
} bitmap.UnlockBits(bmData);
bitmap.Dispose();
// 返回计算出来的不透明图片路径
return g;
}
private void panelTotal_MouseDown(object sender, MouseEventArgs e)
{
Current = e.Location.X;
locationX = e.Location.X;
if (BarMouseDown != null)
{
BarMouseDown.Invoke(sender, e);
}
}
private void panelCurrent_MouseDown(object sender, MouseEventArgs e)
{
Current = e.Location.X;
locationX = e.Location.X;
if (BarMouseDown != null)
{
BarMouseDown.Invoke(sender, e);
}
}
}

用到的素材:


直接右键另存为图片,之所以用黑色背景是因为图片是白色的看不见,不用多说了c# 进度条控件。
但是,如果你的解决方案按照默认属性来,没设置好配置属性,直接将debug文件夹丢给别人,会提示“丢失msvcr100d.dll”导致程序无须运行。运行大智慧时,您的防火墙一般会弹出是否允许程序通过的提示,先选择“以后都按照本次操作进行”,然后选择“允许”,大智慧运行就会得到防火墙的允许。2、如果你的手机是智能手机的话可以去下载一些软件来限制“吸费软件”的收费,此时这个方法起到的作用是如果你手机的“吸费软件是通过gprs上网收费的话,你去下载的这些软件(如安全管家,软件你可到网站搜索,关键字输入安全软件,防火墙软件之类的)时就可以起到你手机“自动”上网时会提示是否允许接入网络,或提示你是否将某某软件或程序列为信任程序(这里所说的某某软件和程序就是你的“吸费软件”),你若看到这个提示就可以选择否或拒绝就可以了。
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-101745-1.html
打