资源简介

简单的航空天气展示系统,以联合作图为基本。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Threading;
using System.IO;
using System.Drawing.Printing;

namespace MultiDraw
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();

            this.SuspendLayout();
            CC.palette = new Palette();
            CC.palette.Dock = Dockstyle.Fill;
            this.Controls.Add(CC.palette);
            this.ResumeLayout();
            SetUserState();

            CC.myService.mainForm = this;
            if (CC.userState != UserState.Client)
            {
                CC.palette.Deserializeobject(CC.backupFileName);
            }
            else
            {
                CC.me.SendToServer(“Login“);
            }
        }

        public void SetUserState()
        {
            if (CC.userState == UserState.SingleUser)
            {
                this.toolStripLabelUserState.Text = “制作方式:单机制作“;
            }
            else if (CC.userState == UserState.Server)
            {
                this.toolStripLabelUserState.Text = string.Format(“制作方式:多机联合制作,本机为主机({0}),与本机连接用户数:{1}“ CC.me.client.Client.LocalEndPoint CC.myServer.Users.Count - 1);
            }
            else if (CC.userState == UserState.Client)
            {
                this.toolStripLabelUserState.Text = string.Format(“制作方式:多机联合制作,本机为附机({0}), 主机IP:{1}“ CC.me.client.Client.LocalEndPoint CC.me.client.Client.RemoteEndPoint);
            }
        }

        private void buttonRectangle_Click(object sender EventArgs e)
        {
            CC.palette.ActiveTool = Palette.ToolType.Rectangle;
        }

        private void buttonText_Click(object sender EventArgs e)
        {
            TextDialog td = new TextDialog();
            if (td.ShowDialog() == DialogResult.OK)
            {
                CC.textInfo.text = td.MyText;
                CC.textInfo.color = td.MyColor;
                CC.palette.ActiveTool = Palette.ToolType.Text;
            }
        }

        private void buttonCurve_Click(object sender EventArgs e)
        {
            CC.palette.ActiveTool = Palette.ToolType.Curve;
        }

        private void buttonGraphics_Click(object sender EventArgs e)
        {
            OpenFileDialog f = new OpenFileDialog();
            f.Multiselect = false;
            f.CheckPathExists = true;
            f.title = “添加图像“;
            f.Filter = “JPEG (*.jpg)|*.jpg|Bitmap (*.bmp)|*.bmp|PNG (*.png)|*.png|GIF (*.gif)|*.gif|All files|*.*“;
            if (f.ShowDialog() == DialogResult.OK)
            {
                CC.bitmap = (Bitmap)Bitmap.FromFile(f.FileNametrue);
                CC.palette.ActiveTool = Palette.ToolType.Image;
            }
        }

        private void MainForm_Fo

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-01-16 10:57  MultiDraw\
     目录           0  2012-02-22 22:41  MultiDraw\Backup\
     目录           0  2012-02-22 22:41  MultiDraw\Backup\MultiDraw\
     文件       12126  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\MainForm.Designer.cs
     文件        7549  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\MainForm.cs
     文件        6585  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\MainForm.resx
     文件        5494  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\MultiDraw.csproj
     文件        5122  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\PreMainForm.cs
     文件       10520  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\PreMainForm.designer.cs
     文件        6978  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\PreMainForm.resx
     文件         664  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\Program.cs
     目录           0  2012-02-22 22:41  MultiDraw\Backup\MultiDraw\Properties\
     文件        1190  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\Properties\AssemblyInfo.cs
     文件        2842  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\Properties\Resources.Designer.cs
     文件        5612  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\Properties\Resources.resx
     文件        1107  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\Properties\Settings.Designer.cs
     文件         249  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\Properties\Settings.settings
     目录           0  2012-02-22 22:41  MultiDraw\Backup\MultiDraw\cs\
     文件        2824  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\CC.cs
     文件        2027  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\DrawMyCurve.cs
     文件        1926  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\DrawMyImage.cs
     文件         802  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\DrawMyRectangle.cs
     文件        1765  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\DrawMyText.cs
     文件        4018  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\Drawobject.cs
     文件        5977  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\GraphicsList.cs
     文件        9625  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\MyClient.cs
     文件        9455  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\MyServer.cs
     文件        7932  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\MyService.cs
     文件        1830  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\objectID.cs
     文件        2883  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\ToolCurve.cs
     文件        1990  2011-10-26 20:40  MultiDraw\Backup\MultiDraw\cs\ToolImage.cs
............此处省略174个文件信息

评论

共有 条评论