摘要: 前几天因为女友要给客户实施,但是带光碟做系统太麻烦了,于是我把我的U盘量产成了USBHDD来引导系统 加载windows PE 做系统.但是遇到问题了,如何让虚拟机加载我自己做的USBHDD呢,经过一番查找终于找到了一些资料,经过汇总,如下.虚拟机启动USB-HDD设置!编辑:benbenfishfishQQ:674031179 文字部分图片来自电脑报官方论坛瓢虫网.阅读全文
posted @ 2011-12-15 15:44 笨笨鱼~ 阅读(64) 评论(1) 编辑
using System.Data.Linq;
using System.Data.Linq.Mapping;

After that you need to define the model by hand.

//Model Class
[Table]
public class EmailClass
{
    [Column(IsDbGenerated = true, IsPrimaryKey = true)]
    public int Id { get; set; }
    [Column()]
    public string EmailAddress { get; set; }
}

Once the model is defined you then need the DataContext

public class EmailContext : DataContext
{
    public EmailContext(string sConnectionString)
        : base(sConnectionString)
    { }

    public Table<EmailClass> Emails
    {
        get
        {
            return this.GetTable<EmailClass>();
        }
    }
}

Connection string would look like,

string ConnectionString = "Data Source=isostore:/EmailDB.sdf";

Some reusable methods to Add and Display

public IList<EmailClass> GetEmails()
{
    List<EmailClass> emails = new List<EmailClass>();
    using (var db = new EmailContext(ConnectionString))
    {
        var query = from e in db.Emails
                    select e;
        emails = query.ToList();
    }

    return emails;
}

public void AddEmail(EmailClass _email)
{
    using (var db = new EmailContext(ConnectionString))
    {
        db.Emails.InsertOnSubmit(_email);
        db.SubmitChanges();
    }
}

Then comes UI which would help you to save and display data,

 

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="*"></RowDefinition>
    </Grid.RowDefinitions>
    <StackPanel Grid.Row="0" Orientation="Horizontal">
        <TextBox Width="300" x:Name="txtEmail"></TextBox>
        <Button HorizontalAlignment="Right" x:Name="btnSave" Content="Save" Width="120" Click="btnSave_Click"></Button>
    </StackPanel>
    <ListBox x:Name="lstEmails" Grid.Row="1" >
        <ListBox.ItemTemplate>
            <DataTemplate>
                <StackPanel>
                    <TextBlock Text="{Binding Path=EmailAddress}"></TextBlock>
                    <TextBlock Text="-----"></TextBlock>
                </StackPanel>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>            
</Grid>

The complete code is as below,

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.Data.Linq;
using System.Data.Linq.Mapping;

namespace WP7_Samples
{    
    public partial class LocalDB_WP7 : PhoneApplicationPage
    {
        const string ConnectionString = "Data Source=isostore:/EmailDB.sdf";
        public LocalDB_WP7()
        {
            InitializeComponent();

            InputScope _scope = new InputScope();
            InputScopeName _scopeName = new InputScopeName();
            _scopeName.NameValue = InputScopeNameValue.EmailNameOrAddress;
            _scope.Names.Add(_scopeName);

            txtEmail.InputScope = _scope;

            using (var db = new EmailContext(ConnectionString))
            {
                if (!db.DatabaseExists())
                    db.CreateDatabase();

                LoadData();
            }
        }

        public void LoadData()
        {
            lstEmails.ItemsSource = GetEmails();
        }

        public IList<EmailClass> GetEmails()
        {
            List<EmailClass> emails = new List<EmailClass>();
            using (var db = new EmailContext(ConnectionString))
            {
                var query = from e in db.Emails
                            select e;
                emails = query.ToList();
            }

            return emails;
        }

        public void AddEmail(EmailClass _email)
        {
            using (var db = new EmailContext(ConnectionString))
            {
                db.Emails.InsertOnSubmit(_email);
                db.SubmitChanges();
            }
        }

        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            if (txtEmail.Text.Trim() != "")
            {
                var emailObj = new EmailClass() { EmailAddress = txtEmail.Text.Trim() };
                AddEmail(emailObj);
            }
            LoadData();
            txtEmail.Text = "";
        }
    }

    //Model Class
    [Table]
    public class EmailClass
    {
        [Column(IsDbGenerated = true, IsPrimaryKey = true)]
        public int Id { get; set; }
        [Column()]
        public string EmailAddress { get; set; }
    }

    public class EmailContext : DataContext
    {
        public EmailContext(string sConnectionString)
            : base(sConnectionString)
        { }

        public Table<EmailClass> Emails
        {
            get
            {
                return this.GetTable<EmailClass>();
            }
        }
    }
}
posted @ 2012-03-25 21:39 笨笨鱼~ 阅读(4) 评论(0) 编辑

 

  XAML:

 <Canvas x:Name="LayoutRoot" Background="White">
        <Image x:Name="img" Stretch="None" Source="../images/jiqiren2.jpg" 
Canvas.Left=
"177" Canvas.Top="0"></Image>
        <Button FontSize="18"  Content="旋转对象" Canvas.Left="278" 
Canvas.Top=
"142" Click="Button_Click" />
    </Canvas>

  后台:

public partial class RenderTransformWithCSharp : UserControl
    {
        private int angle = 0;//声明旋转角度变量
        //声明旋转对象
        private RotateTransform rotate = new RotateTransform();
        public RenderTransformWithCSharp()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //每次点击增加45度
            angle += 45;
            //指定旋转对象的角度
            rotate.Angle = angle;
            //设置旋转角度中心点
            rotate.CenterX = 100;
            rotate.CenterY = 100;
            //将旋转对象赋给UI变形对象
            img.RenderTransform = rotate;
        }
    }

 

posted @ 2012-03-23 10:20 笨笨鱼~ 阅读(8) 评论(0) 编辑

首先你得阅读

http://www.jeffblankenburg.com/2010/10/24/31-days-of-windows-phone-day-24-embedding-fonts/

相关资料获得一些灵感.

或者百度百科有中文版:

http://wenku.baidu.com/view/939099d3195f312b3169a597.html

 

http://silverlightchina.net/html/zhuantixilie/winphone7/2010/1202/3821.html?1291535383

 

 

然后就可以使用了

目前还没有测试使用英文版本的

以上内容均来自于互联网.

posted @ 2012-03-22 09:23 笨笨鱼~ 阅读(16) 评论(0) 编辑


目前,mysql导出为excel的工具是很少见的
从网上搜集下来的工具根本不能用
大多数提示都是用脚本来导出的
但是对于我们这些菜鸟级别的鸟鸟来说怎么办呢
有办法,笨笨鱼教会你怎么导出
我们有的是工具
在海量的数据检后发现下面两个工具
1.mysql2excel_free.zip
这个玩意是一个外国友人开发的,是免费的
但是我们中国人看不到英文怎么办?怎么办?
不着急,免费是免费的那有木有更好的工具。
答案是有的,但是是收费的,啊,收费的?
收费的木有关系,木有关系,这个是中文的。叫做导航猫,很强大,很牛逼!!!
目前支持30天免费使用。。。。
2.navicat091_mysql_cs.exe
详情参见:
http://www.navicat.com/cn/products/navicat_mysql/mysql_overview.html

 

posted @ 2011-12-20 15:21 笨笨鱼~ 阅读(104) 评论(0) 编辑

 

前几天因为女友要给客户实施,但是带光碟做系统太麻烦了,于是我把我的U盘量产成了USBHDD来引导系统 加载windows PE 做系统.

但是遇到问题了,如何让虚拟机加载我自己做的USB HDD ,经过一番查找终于找到了一些资料,经过汇总,如下.

虚拟机启动USB-HDD设置!

 

 

 

 

 

 

 

 

编辑:benbenfishfish  QQ:674031179  文字部分图片来自电脑报官方论坛瓢虫网.

posted @ 2011-12-15 15:44 笨笨鱼~ 阅读(64) 评论(1) 编辑
摘要: using System;using System.Collections.Generic;using System.Text;using System.Data.OleDb;using System.Data.SqlClient;using System.Data;using System.Windows.Forms;using System.Data.Odbc;namespace QZMDB.Function{ /// <summary> /// Excel文件的读取 /// </summary> public class ExcelLoadFunction { p阅读全文
posted @ 2011-07-28 16:13 笨笨鱼~ 阅读(117) 评论(0) 编辑
摘要: 由于项目需要,以前是做b/s开发的先做c/s开发.其中就有Excel导出模块.在往上找了很多资料都是挺凌乱的我整理了一下,在此分享.(有些代码片段来自他人,在此感谢)View Code public static bool haha(DataSet ds, string filenames) { try { string FileName = filenames;// "d:\\abc.xls"; DataTable dt = ds.Tables[0]; FileStream objFileStream; StreamWriter objStreamWriter; stri阅读全文
posted @ 2011-07-28 16:07 笨笨鱼~ 阅读(253) 评论(0) 编辑
摘要: 看到园子里的大虾们写了播放器,这不,我也写了一个和大家在此分享一下. 分别是前台和后台;备注:参考了一些园子里朋友的代码片段,该播放器是一个独立的 操作界面 需要传入 音频路径 .为了测试 您可以直接赋值给url 1 <Grid x:Name="LayoutRoot" Background="White" Height="237" Width="499"> 2 3 <MediaElement Height="0" HorizontalAlignment="Left&q阅读全文
posted @ 2011-06-28 16:21 笨笨鱼~ 阅读(48) 评论(2) 编辑