上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: 在不同情况下,显示不同的控件。Case1:ToggleButton显示,Grid的Visibility通过ToggleButton的IsChecked属性绑定;Case2:ToggleButton隐藏,Grid显示。通过类型判断进入处理部分: 1 public HelloWindow(WinType type) 2 { 3 winType = type; 4 5 InitializeComponent(); 6 7 if (winType == WinType.Case1) 8 { 9 myToggleButton.Visibility = ... 阅读全文
posted @ 2013-06-05 14:36 SubmarineX 阅读(606) 评论(0) 推荐(0) 编辑
摘要: 在标题中右键选择“段落”,选择“换行和分页”,选择“段前分页”。参考:word的一种分页方式——死磕小黑点 阅读全文
posted @ 2013-05-25 15:48 SubmarineX 阅读(1846) 评论(0) 推荐(0) 编辑
摘要: ***-[__NSArrayM insertObject:atIndex:]: index 3 beyond bounds for empty array 阅读全文
posted @ 2013-05-24 05:32 SubmarineX 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 为了做像 MS 0ffice 2013 风格的界面。这是MahApps.Metro的文档;在安装mahapps.metro(找不到下载链接)之前,先安装NuGet,原因;Installing NuGet;然后按照MahApps.Metro的文档来进行。安装包的的时候可能会遇到问题:PM> Install-Package MahApps.MetroInstall-Package : 基础连接已经关闭: 发送时发生错误。所在位置 行:1 字符: 16+ Install-Package <<<< MahApps.Metro + CategoryInfo : NotSpe 阅读全文
posted @ 2013-04-26 15:10 SubmarineX 阅读(2748) 评论(0) 推荐(0) 编辑
摘要: 1、后台打开网页1 private void OpenWeb(object sender, RoutedEventArgs e)2 {3 System.Diagnostics.Process.Start("http://www.cnblogs.com/submarine");4 }2、窗口间跳转1 private void LogInSucc(object sender, RoutedEventArgs e)2 {3 this.Hide();4 OtherWindow win = new OtherWindow();5 win.Show();6 }3、垂直分割线... 阅读全文
posted @ 2013-04-16 09:44 SubmarineX 阅读(4717) 评论(0) 推荐(1) 编辑
摘要: 推荐软件:Windows Hotkey Explorer问题:QQ的Ctrl+Alt+A热键被占用,发现被foobar2000占用,经排查是它的插件AutoLyric以此作为全局热键。 阅读全文
posted @ 2013-04-14 10:07 SubmarineX 阅读(9247) 评论(0) 推荐(1) 编辑
摘要: 1、评级使用组件:foo_playcount.fb2k-componentFoobar2000:Components/Playback Statistics v3.x (foo playcount)======================================进入foobar2000;选择菜单栏中的“Library”中的“Configure”;======================================添加组件:选择左侧栏中的“Components”;把文件拖入右侧栏中,“Apply”;提示重启foobar2000。======================== 阅读全文
posted @ 2013-03-19 19:31 SubmarineX 阅读(1547) 评论(0) 推荐(0) 编辑
摘要: 《C++标准程序库》13.10.3 将标准 Streams 重新定向(Redirecting)通过“设置 stream 缓冲区”来重定向某个 sream。“设置 stream 缓冲区”意味 I/O stream 的重定向可由程控,不必借助操作系统。 1 #include <iostream> 2 #include <fstream> 3 4 using namespace std; 5 6 void Redirect(ostream &); 7 8 int main() 9 {10 cout << "the first row" 阅读全文
posted @ 2013-03-17 18:26 SubmarineX 阅读(4381) 评论(0) 推荐(0) 编辑
摘要: 参看维基百科:Dangling pointer迷途指针===============================================================================================温馨提示:由于本人英语水品有限,有些地方翻译得可能不准确,也比较生涩。===============================================================================================当所指向的对象被释放或者收回,但是对该指针没有作任何的修改,以至于该指针仍旧指向已经回收的内存地 阅读全文
posted @ 2013-03-02 16:03 SubmarineX 阅读(21966) 评论(0) 推荐(5) 编辑
摘要: const int *const method(const int *const &param) const; 1 2 3 4 51:const int常量整型(值不能被修改)2:*const常量指针(指向的对象不能被修改)1和2结合起来:const int *const method();返回指向常量整型的常量指针。3:同14:同23和4结合起来:const int *const &param形参为指向 指向常量整型的常量指针的 引用。5:method() const;调用该方法,不会改变该类内部非 muta... 阅读全文
posted @ 2013-03-02 13:31 SubmarineX 阅读(1530) 评论(0) 推荐(2) 编辑
摘要: 1 /* 表存储结构 */ 2 // 或者: template <class Type> class DuLinkList; 3 template <class Type> 4 class DuLNode 5 { 6 // 当授予对给定模版的所有实例的访问权的时候, 7 // 在作用域中不需要存在该模版或函数模版的声明。 8 // 实质上,编译器将友元声明也当作类或函数的声明对待。 9 template <class Type> friend class DuLinkList;10 // 或者: friend class DuLinkList<Type 阅读全文
posted @ 2013-02-24 15:30 SubmarineX 阅读(231) 评论(0) 推荐(0) 编辑
摘要: fstream::binary开启:新行采用‘LF’,作为一个字节;关闭:新行采用‘CR’‘LF’组合,作为一个字节。关于‘CR’‘LF’,参见:http://en.wikipedia.org/wiki/Newline以下是《C++ Primer》第四版中的一段代码: 1 int main() 2 { 3 fstream fInOut("copyOut", fstream::ate | fstream::in | fstream::out | fstream::binary); 4 if (!fInOut) 5 { 6 cerr << "Un... 阅读全文
posted @ 2013-02-21 15:58 SubmarineX 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 思路来自:MFC Tutorial - Creating a window with two classes在工程中新建一个类CChildFrameclass CChildFrame : public CFrameWnd在构造函数中:1 CChildFrame::CChildFrame()2 {3 Create(NULL,"MFC Tutorial Part 1 CoderSource Window");4 }可选:添加WM_PAINT消息: 1 void CChildFrame::OnPaint() 2 { 3 CPaintDC dc(this); // device c 阅读全文
posted @ 2013-01-03 23:41 SubmarineX 阅读(2933) 评论(0) 推荐(1) 编辑
摘要: Win32应用中创建多窗口,创建同一个窗口类的多个窗口对象和不同窗口类的窗口对象。 1 // win32_多窗口.cpp : Defines the entry point for the application. 2 // 3 4 #include "stdafx.h" 5 #include "resource.h" 6 7 #define MAX_LOADSTRING 100 8 9 // Global Variables: 10 HINSTANCE hInst; // current instance ... 阅读全文
posted @ 2013-01-03 20:36 SubmarineX 阅读(7186) 评论(0) 推荐(0) 编辑
摘要: 参考:http://blog.csdn.net/desow/article/details/4592847环境是 XP + VC++6.0。按照方法1添加:把 .h 文件添加到以下目录:把GdiPlus.lib 添加到以下目录:接着是针对具体的工程设置:a. StdAfx.h 中:b. CXXXApp 类中声明两个变量:c. CXXXApp 类中的 InitInstance() 中调用 GdiplusStartup 方法:d. CXXXApp 类中声明ExitInstance 方法,并定义:!!!声明的时候我只是照猫画虎写的!!! 阅读全文
posted @ 2012-12-22 15:49 SubmarineX 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 环境:Win7(C:) + VS2010(D:)添加环境变量1、“PATH”中追加“D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE”,分别为cl.exe 和mspdb100.dll 的路径。2、新建“INCLUDE”,“D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;C:\Program Files (x86)\Micro 阅读全文
posted @ 2012-12-17 22:56 SubmarineX 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 效果:分别拖动下方和上方滚动视图用数组把所有的UIScrollView对象储存起来。 1 #import "ViewController.h" 2 3 @interface ViewController () <UIScrollViewDelegate> 4 5 @end 6 7 @implementation ViewController 8 9 @synthesize scrollViews = _scrollViews;10 11 - (void)viewDidLoad12 {13 [super viewDidLoad];14 15 UIImageView 阅读全文
posted @ 2012-12-09 22:45 SubmarineX 阅读(1888) 评论(0) 推荐(0) 编辑
摘要: 在上一篇博文《在滚动视图里添加图像视图,在图像视图里添加按钮控件》的基础上做了小小的改动。》》点击button1》》》》点击button2》》需要改写两个地方:@synthesize scrollView = _scrollView;- (void)viewDidLoad{ [super viewDidLoad]; // 配置 UIImageView 对象 UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"1.png"]]; imgView.userIn... 阅读全文
posted @ 2012-12-06 22:26 SubmarineX 阅读(14170) 评论(0) 推荐(1) 编辑
摘要: 》》点击按钮“Button”》》》》绿底的是一张图片(1.png),截自苹果文档。第一个视图对应VC1:VC1 1 @synthesize scrollView = _scrollView; 2 3 - (void)viewDidLoad 4 { 5 [super viewDidLoad]; 6 7 // 配置 UIImageView 对象 8 UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"1.png"]]; 9 imgView.user... 阅读全文
posted @ 2012-12-04 20:40 SubmarineX 阅读(1944) 评论(0) 推荐(0) 编辑
摘要: Xcode 4.5.1自动排版: Editor->Structure->Re-Indent ^| 阅读全文
posted @ 2012-12-04 15:27 SubmarineX 阅读(248) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页