private void SelectCheckOutWorkspaceCtrl_Load(object sender, EventArgs e)
 {
     if (this.int_0 == 1)
     {
         this.label1.Text = "选择要检入的空间数据库";
         this.label2.Text = "可以检入的图层和表";
     }
     else if (this.int_0 == 2)
     {
         this.label1.Text = "选择要提取数据的空间数据库";
         this.label2.Text = "可以提取的图层和表";
     }
     else if (this.int_0 == 3)
     {
         this.label1.Text = "选择要导出变化的检出空间数据库";
         this.label2.Text = "可以导出变化的图层和表";
     }
     if (this.iarray_0 != null)
     {
         string[] items = new string[2];
         for (int i = 0; i < this.iarray_0.Count; i++)
         {
             CheckInOutWorkspaceInfo info = this.iarray_0.get_Element(i) as CheckInOutWorkspaceInfo;
             this.method_0(info.Workspace, out items[0], out items[1]);
             ListViewItem item = new ListViewItem(items)
             {
                 Tag = info
             };
             this.EditWorkspacelist.Items.Add(item);
         }
     }
 }
示例#2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.EditWorkspacelist.SelectedItems.Count != 0)
     {
         CheckInOutWorkspaceInfo tag = this.EditWorkspacelist.SelectedItems[0].Tag as CheckInOutWorkspaceInfo;
         this.iworkspace_0 = tag.Workspace;
         base.DialogResult = DialogResult.OK;
         base.Close();
     }
 }
示例#3
0
        public bool Do()
        {
            if (this.EditWorkspacelist.SelectedItems.Count == 0)
            {
                return(false);
            }
            CheckInOutWorkspaceInfo tag = this.EditWorkspacelist.SelectedItems[0].Tag as CheckInOutWorkspaceInfo;

            ExportChangesHelper.m_pHelper.CheckoutWorkspaceName = (tag.Workspace as IDataset).FullName as IWorkspaceName;
            return(true);
        }
示例#4
0
 private void frmSelectWorkspace_Load(object sender, EventArgs e)
 {
     string[] items = new string[2];
     for (int i = 0; i < this.iarray_0.Count; i++)
     {
         CheckInOutWorkspaceInfo info = this.iarray_0.get_Element(i) as CheckInOutWorkspaceInfo;
         this.method_2(info.Workspace, out items[0], out items[1]);
         ListViewItem item = new ListViewItem(items)
         {
             Tag = info
         };
         this.EditWorkspacelist.Items.Add(item);
     }
 }
示例#5
0
        private CheckInOutWorkspaceInfo method_3(IArray iarray_1, IWorkspace iworkspace_1)
        {
            CheckInOutWorkspaceInfo info;
            IPropertySet            connectionProperties = iworkspace_1.ConnectionProperties;

            for (int i = 0; i < iarray_1.Count; i++)
            {
                info = iarray_1.get_Element(i) as CheckInOutWorkspaceInfo;
                if (connectionProperties.IsEqual(info.Workspace.ConnectionProperties))
                {
                    return(info);
                }
            }
            info = new CheckInOutWorkspaceInfo(iworkspace_1);
            iarray_1.Add(info);
            return(info);
        }
示例#6
0
        private void frmCheckOutManager_Load(object sender, EventArgs e)
        {
            if (this.iarray_0.Count == 1)
            {
                CheckInOutWorkspaceInfo info = this.iarray_0.get_Element(0) as CheckInOutWorkspaceInfo;
                this.iworkspace_0 = info.Workspace;
            }
            else
            {
                if (this.iarray_0.Count <= 0)
                {
                    return;
                }
                frmSelectWorkspace workspace = new frmSelectWorkspace
                {
                    WorkspaceArray = this.iarray_0
                };
                if (workspace.ShowDialog() != DialogResult.OK)
                {
                    base.Close();
                    return;
                }
                this.iworkspace_0 = workspace.Workspace;
            }
            IWorkspaceReplicas replicas = this.iworkspace_0 as IWorkspaceReplicas;
            IEnumReplica       replica  = replicas.Replicas;

            replica.Reset();
            IReplica replica2 = replica.Next();

            string[] items = new string[4];
            while (replica2 != null)
            {
                items[0] = replica2.Name;
                items[1] = replica2.Owner;
                items[2] = replica2.Version;
                items[3] = new DateTime((long)replica2.ReplicaDate).ToString();
                ListViewItem item = new ListViewItem(items)
                {
                    Tag = replica2
                };
                this.listView1.Items.Add(item);
                replica2 = replica.Next();
            }
        }
示例#7
0
 private void SelectExportChangeWKCtrl_Load(object sender, EventArgs e)
 {
     if (this.iarray_0 != null)
     {
         string[] items = new string[2];
         for (int i = 0; i < this.iarray_0.Count; i++)
         {
             CheckInOutWorkspaceInfo info = this.iarray_0.get_Element(i) as CheckInOutWorkspaceInfo;
             items[0] = info.Workspace.PathName;
             items[1] = "空间数据库连接";
             ListViewItem item = new ListViewItem(items)
             {
                 Tag = info
             };
             this.EditWorkspacelist.Items.Add(item);
         }
     }
 }
示例#8
0
 private void EditWorkspacelist_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.CanEditDatasetList.Items.Clear();
     if (this.EditWorkspacelist.SelectedItems.Count != 0)
     {
         try
         {
             CheckInOutWorkspaceInfo tag = this.EditWorkspacelist.SelectedItems[0].Tag as CheckInOutWorkspaceInfo;
             IEnumName enumName          = tag.EnumName;
             enumName.Reset();
             for (IName name2 = enumName.Next(); name2 != null; name2 = enumName.Next())
             {
                 this.CanEditDatasetList.Items.Add((name2 as IDatasetName).Name);
             }
         }
         catch (Exception exception)
         {
             MessageBox.Show(exception.ToString());
         }
     }
 }
示例#9
0
 private void frmExportChangeWizard_Load(object sender, EventArgs e)
 {
     if (this.iarray_0.Count == 0)
     {
         MessageBox.Show("没有检出的数据!");
         base.Close();
     }
     else if (this.iarray_0.Count == 1)
     {
         CheckInOutWorkspaceInfo info = this.iarray_0.get_Element(0) as CheckInOutWorkspaceInfo;
         ExportChangesHelper.m_pHelper = new ExportChangesHelper();
         ExportChangesHelper.m_pHelper.CheckoutWorkspaceName =
             (info.Workspace as IDataset).FullName as IWorkspaceName;
         this.exportChangeSetupCtrl_0.Visible = true;
         this.btnLast.Enabled = false;
         this.btnNext.Text    = "完成";
     }
     else
     {
         ExportChangesHelper.m_pHelper = new ExportChangesHelper();
         this.selectCheckOutWorkspaceCtrl_0.WorkspaceArray = this.iarray_0;
         this.selectCheckOutWorkspaceCtrl_0.Visible        = true;
     }
 }
示例#10
0
 private void frmCheckInWizard_Load(object sender, EventArgs e)
 {
     if (this.iarray_0.Count == 0)
     {
         MessageBox.Show("没有检入的数据!");
         base.Close();
     }
     else if (this.iarray_0.Count == 1)
     {
         CheckInOutWorkspaceInfo info = this.iarray_0.get_Element(0) as CheckInOutWorkspaceInfo;
         CheckInHelper.m_pHelper = new CheckInHelper();
         IWorkspaceName fullName = (info.Workspace as IDataset).FullName as IWorkspaceName;
         if (fullName.Type == esriWorkspaceType.esriRemoteDatabaseWorkspace)
         {
             CheckInHelper.m_pHelper.MasterWorkspaceName   = fullName;
             CheckInHelper.m_pHelper.CheckoutWorkspaceName = null;
         }
         else
         {
             CheckInHelper.m_pHelper.CheckoutWorkspaceName = fullName;
             CheckInHelper.m_pHelper.MasterWorkspaceName   = null;
         }
         IEnumNameEdit edit     = new NamesEnumeratorClass();
         IEnumName     enumName = info.EnumName;
         enumName.Reset();
         IName name  = enumName.Next();
         IList list  = new ArrayList();
         IList list2 = new ArrayList();
         while (name != null)
         {
             string str;
             if (name is IFeatureClassName)
             {
                 if ((name as IFeatureClassName).FeatureDatasetName != null)
                 {
                     IDatasetName featureDatasetName = (name as IFeatureClassName).FeatureDatasetName;
                     str = featureDatasetName.Name;
                     if (list.IndexOf(str) == -1)
                     {
                         list.Add(str);
                         edit.Add(featureDatasetName as IName);
                     }
                 }
                 else
                 {
                     str = (name as IDatasetName).Name;
                     if (list2.IndexOf(str) == -1)
                     {
                         list2.Add(str);
                         edit.Add(name);
                     }
                 }
             }
             else if (name is IFeatureDatasetName)
             {
                 str = (name as IDatasetName).Name;
                 if (list.IndexOf(str) == -1)
                 {
                     list.Add(str);
                     edit.Add(name);
                 }
             }
             else
             {
                 str = (name as IDatasetName).Name;
                 if (list2.IndexOf(str) == -1)
                 {
                     list2.Add(str);
                     edit.Add(name);
                 }
             }
             name = enumName.Next();
         }
         this.checkInSetupCtrl_0.Visible = true;
         this.btnNext.Text = "完成";
     }
     else
     {
         CheckInHelper.m_pHelper = new CheckInHelper();
         this.selectCheckOutWorkspaceCtrl_0.WorkspaceArray = this.iarray_0;
         this.selectCheckOutWorkspaceCtrl_0.Visible        = true;
     }
 }
示例#11
0
 private void frmExtractionDataWizard_Load(object sender, EventArgs e)
 {
     if (this.iarray_0.Count == 0)
     {
         MessageBox.Show("没有可用于提取的数据!");
         base.Close();
     }
     else if (this.iarray_0.Count == 1)
     {
         CheckInOutWorkspaceInfo info = this.iarray_0.get_Element(0) as CheckInOutWorkspaceInfo;
         ExtractionDataHelper.m_pHelper = new ExtractionDataHelper();
         ExtractionDataHelper.m_pHelper.MasterWorkspaceName =
             (info.Workspace as IDataset).FullName as IWorkspaceName;
         IEnumNameEdit edit     = new NamesEnumeratorClass();
         IEnumName     enumName = info.EnumName;
         enumName.Reset();
         IName name  = enumName.Next();
         IList list  = new ArrayList();
         IList list2 = new ArrayList();
         while (name != null)
         {
             string str;
             if (name is IFeatureClassName)
             {
                 if ((name as IFeatureClassName).FeatureDatasetName != null)
                 {
                     IDatasetName featureDatasetName = (name as IFeatureClassName).FeatureDatasetName;
                     str = featureDatasetName.Name;
                     if (list.IndexOf(str) == -1)
                     {
                         list.Add(str);
                         edit.Add(featureDatasetName as IName);
                     }
                 }
                 else
                 {
                     str = (name as IDatasetName).Name;
                     if (list2.IndexOf(str) == -1)
                     {
                         list2.Add(str);
                         edit.Add(name);
                     }
                 }
             }
             else if (name is IFeatureDatasetName)
             {
                 str = (name as IDatasetName).Name;
                 if (list.IndexOf(str) == -1)
                 {
                     list.Add(str);
                     edit.Add(name);
                 }
             }
             else
             {
                 str = (name as IDatasetName).Name;
                 if (list2.IndexOf(str) == -1)
                 {
                     list2.Add(str);
                     edit.Add(name);
                 }
             }
             name = enumName.Next();
         }
         ExtractionDataHelper.m_pHelper.EnumName = edit as IEnumName;
         this.extractionDataSetupCtrl_0.Visible  = true;
     }
     else
     {
         ExtractionDataHelper.m_pHelper = new ExtractionDataHelper();
         this.selectCheckOutWorkspaceCtrl_0.WorkspaceArray = this.iarray_0;
         this.selectCheckOutWorkspaceCtrl_0.Visible        = true;
     }
 }
        public bool Do()
        {
            IEnumNameEdit edit;
            IEnumName     enumName;
            IName         name2;
            IList         list;
            IList         list2;
            IDatasetName  featureDatasetName;
            string        name;

            if (this.EditWorkspacelist.SelectedItems.Count == 0)
            {
                return(false);
            }
            CheckInOutWorkspaceInfo tag = this.EditWorkspacelist.SelectedItems[0].Tag as CheckInOutWorkspaceInfo;

            if (this.int_0 == 0)
            {
                CheckOutHelper.m_pHelper.MasterWorkspaceName = (tag.Workspace as IDataset).FullName as IWorkspaceName;
                edit     = new NamesEnumeratorClass();
                enumName = tag.EnumName;
                enumName.Reset();
                name2 = enumName.Next();
                list  = new ArrayList();
                list2 = new ArrayList();
                while (name2 != null)
                {
                    if (name2 is IFeatureClassName)
                    {
                        if ((name2 as IFeatureClassName).FeatureDatasetName != null)
                        {
                            featureDatasetName = (name2 as IFeatureClassName).FeatureDatasetName;
                            name = featureDatasetName.Name;
                            if (list.IndexOf(name) == -1)
                            {
                                list.Add(name);
                                edit.Add(featureDatasetName as IName);
                            }
                        }
                        else
                        {
                            name = (name2 as IDatasetName).Name;
                            if (list2.IndexOf(name) == -1)
                            {
                                list2.Add(name);
                                edit.Add(name2);
                            }
                        }
                    }
                    else if (name2 is IFeatureDatasetName)
                    {
                        name = (name2 as IDatasetName).Name;
                        if (list.IndexOf(name) == -1)
                        {
                            list.Add(name);
                            edit.Add(name2);
                        }
                    }
                    else
                    {
                        name = (name2 as IDatasetName).Name;
                        if (list2.IndexOf(name) == -1)
                        {
                            list2.Add(name);
                            edit.Add(name2);
                        }
                    }
                    name2 = enumName.Next();
                }
                CheckOutHelper.m_pHelper.EnumName = edit as IEnumName;
            }
            else if (this.int_0 == 1)
            {
                IWorkspaceName fullName = (tag.Workspace as IDataset).FullName as IWorkspaceName;
                if (fullName.Type == esriWorkspaceType.esriRemoteDatabaseWorkspace)
                {
                    CheckInHelper.m_pHelper.MasterWorkspaceName   = fullName;
                    CheckInHelper.m_pHelper.CheckoutWorkspaceName = null;
                }
                else
                {
                    CheckInHelper.m_pHelper.MasterWorkspaceName   = null;
                    CheckInHelper.m_pHelper.CheckoutWorkspaceName = fullName;
                }
            }
            else if (this.int_0 == 2)
            {
                ExtractionDataHelper.m_pHelper.MasterWorkspaceName =
                    (tag.Workspace as IDataset).FullName as IWorkspaceName;
                edit     = new NamesEnumeratorClass();
                enumName = tag.EnumName;
                enumName.Reset();
                name2 = enumName.Next();
                list  = new ArrayList();
                list2 = new ArrayList();
                while (name2 != null)
                {
                    if (name2 is IFeatureClassName)
                    {
                        if ((name2 as IFeatureClassName).FeatureDatasetName != null)
                        {
                            featureDatasetName = (name2 as IFeatureClassName).FeatureDatasetName;
                            name = featureDatasetName.Name;
                            if (list.IndexOf(name) == -1)
                            {
                                list.Add(name);
                                edit.Add(featureDatasetName as IName);
                            }
                        }
                        else
                        {
                            name = (name2 as IDatasetName).Name;
                            if (list2.IndexOf(name) == -1)
                            {
                                list2.Add(name);
                                edit.Add(name2);
                            }
                        }
                    }
                    else if (name2 is IFeatureDatasetName)
                    {
                        name = (name2 as IDatasetName).Name;
                        if (list.IndexOf(name) == -1)
                        {
                            list.Add(name);
                            edit.Add(name2);
                        }
                    }
                    else
                    {
                        name = (name2 as IDatasetName).Name;
                        if (list2.IndexOf(name) == -1)
                        {
                            list2.Add(name);
                            edit.Add(name2);
                        }
                    }
                    name2 = enumName.Next();
                }
                ExtractionDataHelper.m_pHelper.EnumName = edit as IEnumName;
            }
            else if (this.int_0 == 3)
            {
                ExportChangesHelper.m_pHelper.CheckoutWorkspaceName =
                    (tag.Workspace as IDataset).FullName as IWorkspaceName;
            }
            return(true);
        }