- 博客(0)
- 资源 (5)
- 收藏
- 关注
谷歌原型插件.zip
谷歌原型插件 axure_chrome_extension_V0.6.3
使用说明:
一、解压到当前文件夹
二、打开谷歌浏览器的“扩展程序”并且打开开发模式
三、现在“加载已解压的扩展程序”
四、在弹出框中选择第一步解压的文件
2020-04-14
c#拼图游戏源码
拼图游戏源码,部分代码:
private void InitializeLocations()
{
List allLocations = new List();
allLocations.Clear();
int getRandNumber = rand.Next(1, 17);
allLocations.Add(getRandNumber);
spaceLocation = getRandNumber;//设置空白位置
for (int i = 1; i < 16; i++)
{
while (true)
{
getRandNumber = rand.Next(1, 17);
if ((getRandNumber != spaceLocation) && !(allLocations.Contains(getRandNumber)))
{
break;
}
}
ControlLocation cl = new ControlLocation();
cl.LableNum = i;
cl.LocationNum = getRandNumber;//5~1|a|s|p|x
clList.Add(cl);
allLocations.Add(getRandNumber);
}
//循环设置每一个lable位置
foreach (ControlLocation cl in clList)
{
int lableNumber = cl.LableNum;
int locationNumber = cl.LocationNum;
string getLocation = locations[locationNumber];
string[] locationArray = getLocation.Split(',');
Label lable = (Label)this.Controls["label" + lableNumber.ToString()];
lable.Location = new System.Drawing.Point(int.Parse(locationArray[0]), int.Parse(locationArray[1]));
}
Invalidate();
}
private int SelectLocationNumber(int lableNumber)
{
int result = 0;
foreach (ControlLocation cl in clList)
{
if (cl.LableNum == lableNumber)
{
result=cl.LocationNum;
}
}
return result;
}
2014-03-19
C#拱猪游戏源码
C#拱猪游戏源码,,源码,可运行.部分源码:
private void InitializeLocations()
{
List<int> allLocations = new List<int>();
allLocations.Clear();
int getRandNumber = rand.Next(1, 17);
allLocations.Add(getRandNumber);
spaceLocation = getRandNumber;//设置空白位置
for (int i = 1; i < 16; i++)
{
while (true)
{
getRandNumber = rand.Next(1, 17);
if ((getRandNumber != spaceLocation) && !(allLocations.Contains(getRandNumber)))
{
break;
}
}
ControlLocation cl = new ControlLocation();
cl.LableNum = i;
cl.LocationNum = getRandNumber;//5~1|a|s|p|x
clList.Add(cl);
allLocations.Add(getRandNumber);
}
//循环设置每一个lable位置
foreach (ControlLocation cl in clList)
{
int lableNumber = cl.LableNum;
int locationNumber = cl.LocationNum;
string getLocation = locations[locationNumber];
string[] locationArray = getLocation.Split(',');
Label lable = (Label)this.Controls["label" + lableNumber.ToString()];
lable.Location = new System.Drawing.Point(int.Parse(locationArray[0]), int.Parse(locationArray[1]));
}
Invalidate();
}
private int SelectLocationNumber(int lableNumber)
{
int result = 0;
foreach (ControlLocation cl in clList)
{
if (cl.LableNum == lableNumber)
{
result=cl.LocationNum;
}
}
return result;
}
private string[] getDetailsLocation(int index)
{
return locations[index].Split(',');
}
private void Cell_Click(object sender, EventArgs e)
{
Label lab = (Label)sender;
string lableNumber = lab.Tag.ToString();
int getClickLableNumber = int.Parse(lableNumber);
//判断是否可以移动
bool bCanMove = JudgeCanMove(SelectLocationNumber(getClickLableNumber).ToString());
if (bCanMove)
{
int getLocationNumber=SelectLocationNumber(getClickLableNumber);
if (getClickLableNumber != 0)
{
string[] getLocationsSpace = getDetailsLocation(spaceLocation);
Label labWillMove = (Label)this.Controls["label" + lableNumber];
labWillMove.Location = new Point(int.Parse(getLocationsSpace[0]), int.Parse(getLocationsSpace[1]));
UpdateClList(getClickLableNumber, spaceLocation);
spaceLocation = getLocationNumber;
}
else
{
MessageBox.Show("没有找到对应位置为0的!");
}
}
}
2014-03-19
c#连连看游戏
源码,vs2010开发。部分代码:
private void Form1_Load(object sender, EventArgs e)
{
Source = (Bitmap)Image.FromFile("..\\..\\res\\animal.bmp");
this.pictureBox1.Height = W * (m_nRow + 2);
this.pictureBox1.Width = W * (m_nCol+2);
this.pictureBox1.Top = 0;
this.pictureBox1.Left = 0;
//当前窗体标题栏高度
int d = (this.Height - this.ClientRectangle.Height);
this.Height = this.pictureBox1.Height + this.pictureBox1.Top+ d;
this.Width = this.pictureBox1.Width + this.pictureBox1.Left ;
//for (int i = 0; i < 10 * 10; i++)
//{
// m_map[i] = i % 6;
//}
StartNewGame();
Init_Graphic();
}
private void StartNewGame()
{
//初始化地图,将地图中所有方块区域位置置为空方块状态
for(int iNum=0;iNum<(m_nCol*m_nRow);iNum++)
{
m_map[iNum] = BLANK_STATE;
}
Random r = new Random();
//生成随机地图
//将所有的动物物种放进一个临时的地图tmpMap中
ArrayList tmpMap=new ArrayList ();
for(int i=0;i<(m_nCol*m_nRow)/4;i++)
for(int j=0;j<4;j++)
tmpMap.Add(i);
//每次从上面的临时地图tmpMap中取走(获取后并在临时地图删除)
//一个动物放到地图的空方块上
for (int i = 0; i < m_nRow * m_nCol; i++)
{
//随机挑选一个位置
int nIndex = r.Next() % tmpMap.Count ;
//获取该选定物件放到地图的空方块
m_map[i]=(int)tmpMap[nIndex];
//在临时地图tmpMap除去该动物
tmpMap.RemoveAt(nIndex);
}
}
private void Init_Graphic()
{
Graphics g = get_Graphic(); //生成Graphics对象
for (int i = 0; i< 10 * 10; i++)
{
g.DrawImage(create_image(m_map[i]), W * (i % GameSize)+W,
W * (i / GameSize)+W, W, W);
}
}
2014-03-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人