总结
-
框架原理真的深入某一部分具体的代码和实现方式时,要多注意到细节,不要只能写出一个框架。
-
算法方面很薄弱的,最好多刷一刷,不然影响你的工资和成功率😯
-
在投递简历之前,最好通过各种渠道找到公司内部的人,先提前了解业务,也可以帮助后期优秀 offer 的决策。
-
要勇于说不,对于某些 offer 待遇不满意、业务不喜欢,应该相信自己,不要因为当下没有更好的 offer 而投降,一份工作短则一年长则 N 年,为了幸福生活要慎重选择!!!
喜欢这篇文章文章的小伙伴们点赞+转发支持,你们的支持是我最大的动力!
[DllImport(“user32.dll”)]
public static extern bool SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool redraw);
[DllImport(“gdi32.dll”)]
public static extern IntPtr CreateRectRgn(int Left, int Top, int RectRightBottom_X, int RectRightBottom_Y);
[DllImport(“gdi32.dll”)]
public static extern int CombineRgn(IntPtr hrgnDst, IntPtr hrgnSrc1, IntPtr hrgnSrc2, int iMode);
[DllImport(“GDI32.dll”)]
public static extern bool DeleteObject(IntPtr objectHandle);
适当说一下:
setwindowrgn就是设置有效绘图区域。
createrectrgn是创建矩形
combinergn这个就是融合两个矩形,可以并集,交集以及Src1中不包括Src2的部分,最终结果会在hrgnDst中。
总的来说就是利用webbrowser的父级控件的sizechanged事件来不断的设置有效绘图区域。
我就直接上代码了,
Win32API类
[DllImport(“user32.dll”)]
public static extern bool SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool redraw);
///
/// 创建一个矩形,本来四个参数均为x1 y1 x2 y2 意思为左上角X1,Y1坐标,右下角X2,Y2坐标,但是为了方便WPF使用我则是改了
/// left意味矩形和左边的距离
/// top意味着矩形和顶边距离
/// rectrightbottom_x意味着矩形右下角的X坐标
/// rectrightbottom_y意味着矩形右下角的Y坐标
///
///
///
///
///
///
[DllImport(“gdi32.dll”)]
public static extern IntPtr CreateRectRgn(int Left, int Top, int RectRightBottom_X, int RectRightBottom_Y);
[DllImport(“GDI32.dll”)]
public static extern bool DeleteObject(IntPtr objectHandle);
[DllImport(“gdi32.dll”)]
public static extern int CombineRgn(IntPtr hrgnDst, IntPtr hrgnSrc1, IntPtr hrgnSrc2, int iMode);
//合并选项:
//RGN_AND = 1;
//RGN_OR = 2;
//RGN_XOR = 3;
//RGN_DIFF = 4;
//RGN_COPY = 5; {复制第一个区域}
附加属性类:
class ATCH
{
public static readonly DependencyProperty PanelProperty = DependencyProperty.RegisterAttached(“Panel”, typeof(Panel), typeof(ATCH), new PropertyMetadata(null));
public static void SetPanel(DependencyObject d, Panel value) => d.SetValue(PanelProperty, value);
public static Panel GetPanel(DependencyObject d) => (Panel)d.GetValue(PanelProperty);
public static readonly DependencyProperty NameProperty = DependencyProperty.RegisterAttached(“Name”, typeof(FrameworkElement), typeof(ATCH), new PropertyMetadata(null, new PropertyChangedCallback(OnNamePropertyChanged)));
public static void SetName(DependencyObject d, FrameworkElement value) => d.SetValue(NameProperty, value);
public static FrameworkElement GetName(DependencyObject d) => (FrameworkElement)d.GetValue(NameProperty);
private static void OnNamePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var b = d.GetValue(PanelProperty);
if (b is null||! (b is Panel)||e.NewValue is null)
return;
var panel = b as Panel;
var web = d as WebBrowser;
var ui = e.NewValue as FrameworkElement;
SetRect(panel, web, ui);
panel.SizeChanged += (sender, args) =>
最后
四轮技术面+一轮hr面结束,学习到了不少,面试也是一个学习检测自己的过程,面试前大概复习了 一周的时间,把以前的代码看了一下,字节跳动比较注重算法,面试前刷了下leetcode和剑指offer, 也刷了些在牛客网上的面经。大概就说这些了,写代码去了~
祝大家都能收获大厂offer~
篇幅有限,仅展示部分内容