예제 #1
0
        public FrmDemo()
        {
            InitializeComponent();

            image       = new UIImage();
            image.Dock  = DockStyle.Right;
            image.Width = 400;
            this.UIControls.Add(image);
            //
            line                = new UILine();
            line.Location       = new Point(300, 270);
            line.Size           = new Size(500, 50);
            line.LineBlendStyle = BlendStyle.FadeInFadeOut;
            line.LineWidth      = 2;
            line.LineDashStyle  = DashStyle.Dash;
            this.UIControls.Add(line);
            //
            label          = new UILabel();
            label.Location = new Point(250, 200);
            label.Size     = new Size(100, 50);
            label.Font     = new Font("微软雅黑", 13f);
            label.Text     = "测试文本测试文本测试文本测试文本测试文本";
            this.UIControls.Add(label);
            //
            progress            = new UIProgress();
            progress.Location   = new Point(300, 200);
            progress.Percentage = 20;
            progress.Size       = new Size(600, 50);
            progress.Anchor     = AnchorStyles.None;
            this.UIControls.Add(progress);
            //
            btnOut                   = new UIButton();
            btnOut.Size              = new Size(300, 100);
            btnOut.Location          = new Point(10, 20);
            btnOut.Dock              = DockStyle.None;
            btnOut.UIParent          = this;
            btnOut.Name              = "out";
            btnOut.Text              = btnOut.Name;
            btnOut.Font              = new Font(btnOut.Font.FontFamily, 45f);
            btnOut.TextRenderingHint = TextRenderingHint.AntiAlias;
            btnOut.Click            += (sender, e) => Console.WriteLine("单击out");
            this.UIControls.Add(btnOut);

            //
            btnInner2          = new UIButton();
            btnInner2.Size     = new Size(50, 20);
            btnInner2.Location = new Point(55, 55);
            btnInner2.UIParent = this.btnOut;
            btnInner2.Name     = "in2";
            btnInner2.Text     = btnInner2.Name;
            btnInner2.Click   += (sender, e) => MessageBox.Show("单击in2");
            this.btnOut.UIControls.Add(btnInner2);
            //
            btnInner          = new UIButton();
            btnInner.Size     = new Size(50, 20);
            btnInner.Location = new Point(5, 15);
            btnInner.UIParent = this.btnOut;
            btnInner.Name     = "in";
            btnInner.Text     = btnInner.Name;
            btnInner.Click   += (sender, e) => Console.WriteLine("单击in");
            this.btnOut.UIControls.Add(btnInner);
            //
            marquee                = new UIMarquee();
            marquee.Size           = new Size(801, 4);
            marquee.Location       = new Point(100, 200);
            marquee.BorderColor    = Color.Transparent;
            this.marquee.BackColor = Color.Transparent;
            marquee.Dock           = DockStyle.Bottom;
            marquee.ProgressColor  = Color.DodgerBlue;
            this.UIControls.Add(this.marquee);
            this.marquee.SendToBack();
            //
            link           = new UILink();
            link.Size      = new Size(40, 15);
            link.Location  = new Point(500, 10);
            this.link.Font = new Font("微软雅黑", 10f, GraphicsUnit.Point);
            link.Text      = "换一张";
            this.UIControls.Add(this.link);
            //
            link2          = new UILink();
            link2.Size     = new Size(40, 15);
            link2.Location = new Point(540, 10);
            link2.Text     = "换一张";
            this.UIControls.Add(this.link2);
        }
예제 #2
0
 private ProjectDBDataDeleter(UIProgress paramUIProgress, ProjectUrlTable paramProjectUrlTable)
 {
     this.progress = paramUIProgress;
     this.urlTable = paramProjectUrlTable;
     this.helper   = new ProjectDBSchemaHelper(paramProjectUrlTable);
 }
예제 #3
0
        public static void deleteProjectData(UIProgress paramUIProgress, ProjectUrlTable paramProjectUrlTable)
        {
            ProjectDBDataDeleter projectDBDataDeleter = new ProjectDBDataDeleter(paramUIProgress, paramProjectUrlTable);

            projectDBDataDeleter.deleteProjectData();
        }
예제 #4
0
 public virtual void assemblyUpdatedInCostOS(UIProgress paramUIProgress, ParamItemTable paramParamItemTable, IList <ITakeoffRequest> paramList)
 {
 }
예제 #5
0
 public virtual void functionUpdatedInCostOS(UIProgress paramUIProgress, FunctionTable paramFunctionTable, IList <ITakeoffRequest> paramList)
 {
 }
예제 #6
0
파일: Form1.cs 프로젝트: dant0n/CopyPaste
 private void Copier_ProgressChanged(UIProgress info)
 {
     copyProgressBar.Value = (int)(100.0 * info.bytes / info.maxbytes);
     pasteProgressBar.Value = (int)(100.0 * info.bytes / info.maxbytes);
     finalLabel.Text = "Копируем  " + info.name;
     finalLabel2.Text = "Копируем  " + info.name;
 }
예제 #7
0
 public virtual void assignmentsDeletedInCostOS(UIProgress paramUIProgress, IList <ItemRow> paramList1, IList <ConditionTable> paramList2)
 {
 }
예제 #8
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static void moveDataSameInstanceAppendProjects(nomitech.common.ui.UIProgress paramUIProgress, nomitech.common.db.local.ProjectUrlTable paramProjectUrlTable1, nomitech.common.db.local.ProjectUrlTable paramProjectUrlTable2) throws Exception
        public static void moveDataSameInstanceAppendProjects(UIProgress paramUIProgress, ProjectUrlTable paramProjectUrlTable1, ProjectUrlTable paramProjectUrlTable2)
        {
            ProjectDBDataMover projectDBDataMover = new ProjectDBDataMover(paramUIProgress, paramProjectUrlTable1, paramProjectUrlTable2);

            projectDBDataMover.moveDataSameInstanceAppendProjects();
        }
예제 #9
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static void moveDataNotSameInstance(nomitech.common.ui.UIProgress paramUIProgress, nomitech.common.ProjectDBUtil paramProjectDBUtil1, nomitech.common.ProjectDBUtil paramProjectDBUtil2) throws Exception
        public static void moveDataNotSameInstance(UIProgress paramUIProgress, ProjectDBUtil paramProjectDBUtil1, ProjectDBUtil paramProjectDBUtil2)
        {
            moveDataNotSameInstance(paramUIProgress, paramProjectDBUtil1, paramProjectDBUtil2, null);
        }
예제 #10
0
 /// <summary>
 /// 初始化界面
 /// </summary>
 protected virtual void InitUI()
 {
     this.SuspendLayout();
     //
     this.imgBackground                 = new UIImage();
     this.imgBackground.Name            = "imgBackground";
     this.imgBackground.Dock            = DockStyle.Fill;
     this.imgBackground.AnimationRandom = true;
     this.imgBackground.AddFrame(Resources.background0);
     this.imgBackground.AddFrame(Resources.background1);
     this.imgBackground.AddFrame(Resources.background2);
     this.imgBackground.AddFrame(Resources.background3);
     this.imgBackground.AddFrame(Resources.background4);
     this.imgBackground.AddFrame(Resources.background5);
     this.imgBackground.AddFrame(Resources.background6);
     this.imgBackground.AddFrame(Resources.background7);
     //
     this.lblHeader                   = new UILabel();
     this.lblHeader.Name              = "lblHeader";
     this.lblHeader.Dock              = DockStyle.Top;
     this.lblHeader.Height            = 75;
     this.lblHeader.Padding           = new Padding(60, 0, 0, 10);
     this.lblHeader.Font              = new Font("微软雅黑", 23F);
     this.lblHeader.ForeColor         = Color.FromArgb(200, 255, 255, 255);
     this.lblHeader.Text              = this.Text;
     this.lblHeader.TextAlign         = ContentAlignment.BottomLeft;
     this.lblHeader.TextRenderingHint = TextRenderingHint.AntiAlias;
     //
     this.lnHeader               = new UILine();
     this.lnHeader.Name          = "lnHeader";
     this.lnHeader.Dock          = DockStyle.Top;
     this.lnHeader.Height        = 2;
     this.lnHeader.LineWidth     = 2;
     this.lnHeader.LineColor     = Color.FromArgb(40, 255, 255, 255);
     this.lnHeader.LineDashStyle = DashStyle.Dash;
     this.lnHeader.Padding       = new Padding(1, 0, 1, 0);
     //
     this.lblFooter        = new UILabel();
     this.lblFooter.Name   = "lblFooter";
     this.lblFooter.Dock   = DockStyle.Bottom;
     this.lblFooter.Height = 75;
     //
     this.lnFooter               = new UILine();
     this.lnFooter.Name          = "lnFooter";
     this.lnFooter.Dock          = DockStyle.Bottom;
     this.lnFooter.Height        = 2;
     this.lnFooter.LineWidth     = 2;
     this.lnFooter.LineColor     = Color.FromArgb(40, 255, 255, 255);
     this.lnFooter.LineDashStyle = DashStyle.Dash;
     this.lnFooter.Padding       = new Padding(1, 0, 1, 0);
     //
     this.lblLog                   = new UILabel();
     this.lblLog.Name              = "lblLog";
     this.lblLog.Anchor            = AnchorStyles.Left | AnchorStyles.Right;
     this.lblLog.Location          = new Point(85, 232);
     this.lblLog.Size              = new Size(830, 40);
     this.lblLog.Padding           = new Padding(4);
     this.lblLog.Font              = new Font("微软雅黑", 15F);
     this.lblLog.TextAlign         = ContentAlignment.MiddleLeft;
     this.lblLog.ForeColor         = Color.FromArgb(200, 255, 255, 255);
     this.lblLog.TextRenderingHint = TextRenderingHint.AntiAlias;
     //
     this.prgPercentage               = new UIProgress();
     this.prgPercentage.Name          = "prgPercentage";
     this.prgPercentage.Anchor        = AnchorStyles.Left | AnchorStyles.Right;
     this.prgPercentage.Location      = new Point(85, 278);
     this.prgPercentage.Size          = new Size(830, 10);
     this.prgPercentage.BackColor     = Color.FromArgb(20, 255, 255, 255);
     this.prgPercentage.BorderColor   = Color.FromArgb(200, 255, 255, 255);
     this.prgPercentage.ProgressColor = Color.FromArgb(150, 255, 255, 255);
     //
     this.btnRetry                   = new UIButton();
     this.btnRetry.Name              = "btnRetry";
     this.btnRetry.Anchor            = AnchorStyles.Bottom | AnchorStyles.Right;
     this.btnRetry.Location          = new Point(804, 455);
     this.btnRetry.Size              = new Size(70, 30);
     this.btnRetry.BackColor         = Color.Transparent;
     this.btnRetry.HoveredBackColor  = Color.FromArgb(20, 255, 255, 255);
     this.btnRetry.PressedBackColor  = Color.FromArgb(50, 255, 255, 255);
     this.btnRetry.Font              = new Font("微软雅黑", 12F);
     this.btnRetry.ForeColor         = Color.FromArgb(200, 255, 255, 255);
     this.btnRetry.Text              = "重试";
     this.btnRetry.TextRenderingHint = TextRenderingHint.AntiAlias;
     this.btnRetry.Image             = Resources.retry;
     this.btnRetry.ImageSize         = new Size(16, 16);
     this.btnRetry.Visible           = false;
     //
     this.btnCancel                   = new UIButton();
     this.btnCancel.Name              = "btnCancel";
     this.btnCancel.Anchor            = AnchorStyles.Bottom | AnchorStyles.Right;
     this.btnCancel.Location          = new Point(880, 455);
     this.btnCancel.Size              = new Size(70, 30);
     this.btnCancel.BackColor         = Color.Transparent;
     this.btnCancel.HoveredBackColor  = Color.FromArgb(20, 255, 255, 255);
     this.btnCancel.PressedBackColor  = Color.FromArgb(50, 255, 255, 255);
     this.btnCancel.Font              = new Font("微软雅黑", 12F);
     this.btnCancel.ForeColor         = Color.FromArgb(200, 255, 255, 255);
     this.btnCancel.Text              = "取消";
     this.btnCancel.TextRenderingHint = TextRenderingHint.AntiAlias;
     this.btnCancel.Image             = Resources.cancel;
     this.btnCancel.ImageSize         = new Size(16, 16);
     //
     this.UIControls.Add(this.imgBackground);
     this.imgBackground.UIControls.Add(this.lblHeader);
     this.imgBackground.UIControls.Add(this.lnHeader);
     this.imgBackground.UIControls.Add(this.lblFooter);
     this.imgBackground.UIControls.Add(this.lnFooter);
     this.imgBackground.UIControls.Add(this.lblLog);
     this.imgBackground.UIControls.Add(this.prgPercentage);
     this.imgBackground.UIControls.Add(this.btnRetry);
     this.imgBackground.UIControls.Add(this.btnCancel);
     //
     this.ResumeLayout(false);
 }
예제 #11
0
 private ProjectDBDataMover(UIProgress paramUIProgress)
 {
     this.progress = paramUIProgress;
 }
예제 #12
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void projectCopying(nomitech.common.ui.UIProgress paramUIProgress, nomitech.common.ProjectDBUtil paramProjectDBUtil1, nomitech.common.ProjectDBUtil paramProjectDBUtil2) throws Exception
        public virtual void projectCopying(UIProgress paramUIProgress, ProjectDBUtil paramProjectDBUtil1, ProjectDBUtil paramProjectDBUtil2)
        {
        }
예제 #13
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void projectClosing(nomitech.common.ui.UIProgress paramUIProgress, nomitech.common.ProjectDBUtil paramProjectDBUtil, boolean paramBoolean) throws Exception
        public virtual void projectClosing(UIProgress paramUIProgress, ProjectDBUtil paramProjectDBUtil, bool paramBoolean)
        {
        }
예제 #14
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void projectSaving(nomitech.common.ui.UIProgress paramUIProgress, nomitech.common.ProjectDBUtil paramProjectDBUtil) throws Exception
        public virtual void projectSaving(UIProgress paramUIProgress, ProjectDBUtil paramProjectDBUtil)
        {
        }
 public BimEngineGeometryLoader(BIMModelOffset paramBIMModelOffset, long?paramLong, int paramInt, UIProgress paramUIProgress)
 {
     this.o_rendererType = paramInt;
     this.modelId        = paramLong;
     this.progress       = paramUIProgress;
     this.o_modelOffset  = paramBIMModelOffset;
 }
예제 #16
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static void mergeProjectsInOneDatabase(nomitech.common.ui.UIProgress paramUIProgress, String paramString1, String paramString2, String paramString3, nomitech.common.db.local.ProjectDbmsTable paramProjectDbmsTable, String paramString4, String paramString5, java.util.Set<String> paramSet, boolean paramBoolean1, boolean paramBoolean2) throws Exception
        public static void mergeProjectsInOneDatabase(UIProgress paramUIProgress, string paramString1, string paramString2, string paramString3, ProjectDbmsTable paramProjectDbmsTable, string paramString4, string paramString5, ISet <string> paramSet, bool paramBoolean1, bool paramBoolean2)
        {
            ProjectDBUtil.initDriver(ProjectDBUtil.SQLSERVER_DBMS);
            ProjectDBDataMover projectDBDataMover;

            (projectDBDataMover = new ProjectDBDataMover(paramUIProgress)).setProgress(paramUIProgress, "Connecting to master database " + paramString1 + " port " + paramString2 + "...");
            string     str         = ProjectDBUtil.createJdbcUrl(paramString1, paramString3, paramString2, ProjectDBUtil.SQLSERVER_DBMS);
            Connection connection1 = DriverManager.getConnection(str + ";useLOBs=false", paramString4, paramString5);

            connection1.AutoCommit = false;
            setProgress(paramUIProgress, "Connecting to project database " + paramString1 + " port " + paramString2 + "...");
            str = ProjectDBUtil.createJdbcUrl(paramProjectDbmsTable.HostName, paramProjectDbmsTable.DatabaseName, paramProjectDbmsTable.HostPort, ProjectDBUtil.SQLSERVER_DBMS);
            Connection connection2 = projectDBDataMover.loginDatabase(str + ";useLOBs=false", paramString4, paramString5);

            connection2.AutoCommit = false;
            setProgress(paramUIProgress, "Loading databases from master...");
            System.Collections.IList list            = projectDBDataMover.getAllProjectUrls(connection1, paramSet, false);
            ProjectUrlTable          projectUrlTable = new ProjectUrlTable();

            projectUrlTable.Dbms                = Convert.ToInt32(ProjectDBUtil.SQLSERVER_DBMS);
            projectUrlTable.DatabaseName        = paramProjectDbmsTable.DatabaseName;
            projectUrlTable.Hostname            = paramProjectDbmsTable.HostName;
            projectUrlTable.Port                = paramProjectDbmsTable.HostPort;
            projectUrlTable.DbmsName            = paramProjectDbmsTable.InstanceName;
            projectUrlTable.CreatesNewDatabases = Convert.ToBoolean(false);
            projectUrlTable.Username            = paramProjectDbmsTable.HostUsername;
            projectUrlTable.Password            = paramProjectDbmsTable.HostPassword;
            projectUrlTable.Url = str;
            setProgress(paramUIProgress, "Processing " + list.Count + " databases...");
            System.Collections.ICollection collection = projectDBDataMover.filterOutUrlsAlreadyInTarget(connection2, list);
            connection2.close();
            setProgress(paramUIProgress, "Target Database is " + projectUrlTable.DatabaseName + " and " + collection.Count + " will be processed...");
            foreach (ProjectUrlTable projectUrlTable1 in collection)
            {
                if (projectUrlTable1.DatabaseName.Equals(projectUrlTable.DatabaseName, StringComparison.OrdinalIgnoreCase))
                {
                    continue;
                }
                projectUrlTable.ProjectUrlId = projectUrlTable1.ProjectUrlId;
                setProgress(paramUIProgress, "\nMerging Database: " + projectUrlTable1.DatabaseName + ", Project ID: " + projectUrlTable1.Id + ", Name: " + projectUrlTable1.Name + " ...");
                try
                {
                    if (projectUrlTable1.Dbms == projectUrlTable.Dbms && projectUrlTable1.Hostname.Equals(projectUrlTable.Hostname))
                    {
                        projectDBDataMover.initialize(projectUrlTable1, projectUrlTable);
                        projectDBDataMover.moveDataSameInstance();
                    }
                    else
                    {
                        projectDBDataMover.initialize(projectUrlTable1, projectUrlTable);
                        projectDBDataMover.moveDataNotSameInstance();
                    }
                    projectDBDataMover.executeUpdateQuery(connection1, "UPDATE PROJECTURL SET DBSINGLE=0, DBNAME= '" + projectUrlTable.DatabaseName + "', DBSRV = " + projectUrlTable.Dbms + ", DBSRVNAME= '" + projectUrlTable.DbmsName + "', DBUSR= '******', DBPSWD= '" + projectUrlTable.Password + "', URL = '" + projectUrlTable.Url + "' WHERE PROJECTURLID=" + projectUrlTable.ProjectUrlId);
                    setProgress(paramUIProgress, "Done");
                }
                catch (Exception exception)
                {
                    Console.WriteLine("Could not merge " + projectUrlTable1.DatabaseName + " to " + projectUrlTable.DatabaseName);
                    Console.WriteLine(exception.ToString());
                    Console.Write(exception.StackTrace);
                }
                if (paramBoolean2 && projectUrlTable1.Dbms.Value == ProjectDBUtil.SQLSERVER_DBMS)
                {
                    try
                    {
                        setProgress(paramUIProgress, "Dropping " + projectUrlTable1.DatabaseName + " ...");
                        projectDBDataMover.executeUpdateQuery(connection1, "DROP DATABASE [" + projectUrlTable1.DatabaseName + "]");
                        setProgress(paramUIProgress, "Done");
                    }
                    catch (Exception)
                    {
                        Console.WriteLine("Could not drop " + projectUrlTable1.DatabaseName);
                    }
                }
            }
            connection1.close();
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public ProjectDBCEPDataMover(nomitech.common.ui.UIProgress paramUIProgress, nomitech.common.ProjectDBUtil paramProjectDBUtil1, nomitech.common.ProjectDBUtil paramProjectDBUtil2) throws Exception
        public ProjectDBCEPDataMover(UIProgress paramUIProgress, ProjectDBUtil paramProjectDBUtil1, ProjectDBUtil paramProjectDBUtil2)
        {
            this.progress = paramUIProgress;
            this.source   = paramProjectDBUtil1;
            this.dest     = paramProjectDBUtil2;
        }
예제 #18
0
 public BimEnginePropertiesLoader(long?paramLong, UIProgress paramUIProgress)
 {
     this.modelId  = paramLong;
     this.progress = paramUIProgress;
 }