private void frmHistorialMarkerManager_Load(object sender, EventArgs e)
        {
            IEnumHistoricalMarker historicalMarkers = this.m_pHistoricalWorkspace.HistoricalMarkers;

            historicalMarkers.Reset();
            IHistoricalMarker marker2 = historicalMarkers.Next();

            string[]            items = new string[2];
            IVersionedWorkspace pHistoricalWorkspace = this.m_pHistoricalWorkspace as IVersionedWorkspace;

            while (marker2 != null)
            {
                if (marker2.Name != "DEFAULT")
                {
                    items[0] = marker2.Name;
                    items[1] = marker2.TimeStamp.ToString();
                    ListViewItem item = new ListViewItem(items)
                    {
                        Tag = marker2
                    };
                    this.listView1.Items.Add(item);
                }
                marker2 = historicalMarkers.Next();
            }
        }
 private void frmSDEConnectionDetialInfo_Load(object sender, EventArgs e)
 {
     if (this.iworkspace_0 != null)
     {
         IEnumVersionInfo versions = (this.iworkspace_0 as IVersionedWorkspace2).Versions;
         versions.Reset();
         IVersionInfo info2 = versions.Next();
         string[]     items = new string[2];
         while (info2 != null)
         {
             items[0] = info2.VersionName;
             items[1] = info2.Description;
             ListViewItem item = new ListViewItem(items)
             {
                 Tag = info2
             };
             this.lvwVersions.Items.Add(item);
             info2 = versions.Next();
         }
         IHistoricalWorkspace  workspace         = this.iworkspace_0 as IHistoricalWorkspace;
         IEnumHistoricalMarker historicalMarkers = workspace.HistoricalMarkers;
         historicalMarkers.Reset();
         for (IHistoricalMarker marker2 = historicalMarkers.Next();
              marker2 != null;
              marker2 = historicalMarkers.Next())
         {
             this.cboHistoricalMarker.Properties.Items.Add(marker2.Name);
         }
         if (this.cboHistoricalMarker.Properties.Items.Count > 0)
         {
             this.cboHistoricalMarker.SelectedIndex = 0;
         }
     }
 }
示例#3
0
 private void method_2()
 {
     if (this.iworkspace_0 != null)
     {
         this.VersionInfolist.Items.Clear();
         IEnumVersionInfo versions = (this.iworkspace_0 as IVersionedWorkspace).Versions;
         versions.Reset();
         IVersionInfo info2 = versions.Next();
         string[]     items = new string[5];
         while (info2 != null)
         {
             string   versionName = info2.VersionName;
             string[] strArray2   = versionName.Split(new char[] { '.' });
             if (strArray2.Length > 1)
             {
                 items[0] = strArray2[1];
                 items[1] = strArray2[0];
             }
             else
             {
                 items[0] = strArray2[0];
                 items[1] = "";
             }
             items[2] = this.method_1(info2.Access);
             items[3] = info2.Created.ToString();
             items[4] = info2.Modified.ToString();
             ListViewItem item = new ListViewItem(items)
             {
                 Tag = info2
             };
             this.VersionInfolist.Items.Add(item);
             if ((this.int_0 == 0) && (versionName == this.object_0.ToString()))
             {
                 item.Selected = true;
             }
             info2 = versions.Next();
         }
         IHistoricalWorkspace  workspace         = this.iworkspace_0 as IHistoricalWorkspace;
         IEnumHistoricalMarker historicalMarkers = workspace.HistoricalMarkers;
         historicalMarkers.Reset();
         for (IHistoricalMarker marker2 = historicalMarkers.Next();
              marker2 != null;
              marker2 = historicalMarkers.Next())
         {
             this.cboHistoricalMarker.Properties.Items.Add(marker2.Name);
             if ((this.int_0 == 1) && (marker2.Name == this.object_0.ToString()))
             {
                 this.cboHistoricalMarker.SelectedIndex = this.cboHistoricalMarker.Properties.Items.Count - 1;
             }
         }
         if ((this.cboHistoricalMarker.Properties.Items.Count > 0) &&
             (this.cboHistoricalMarker.SelectedIndex == -1))
         {
             this.cboHistoricalMarker.SelectedIndex = 0;
         }
         this.dateTimePicker1.Value = DateTime.Now;
         if (this.int_0 == 0)
         {
             this.cboVersionType.SelectedIndex = 0;
             this.panelHistorical.Visible      = false;
         }
         else
         {
             if (this.int_0 == 2)
             {
                 this.dateTimePicker1.Value = (DateTime)this.object_0;
             }
             this.cboVersionType.SelectedIndex = 1;
             this.panelTransaction.Visible     = false;
             this.cboVersionType_SelectedIndexChanged(this, new EventArgs());
             this.rdoHistoryType_SelectedIndexChanged(this, new EventArgs());
         }
     }
 }