// Decompiled with JetBrains decompiler
// Type: CAX_HSManager.CtrlPlaceVolumeRB
// Assembly: CAX_HSManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 3BFDE313-4770-4A87-B248-267ED6A79A15
// Assembly location: C:\Temp\SIKLA\CAX_HSManager.dll
using Ingr.SP3D.Common.Client;
using Ingr.SP3D.Common.Middle;
using Ingr.SP3D.Common.Middle.Services;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CAX_HSManager
{
[DesignerGenerated]
public class CtrlPlaceVolumeRB : BaseRibbonBarControl
{
private static List<WeakReference> \u0001 = new List<WeakReference>();
private IContainer \u0002;
[AccessedThroughProperty("BtnFinish")]
private Button \u0003;
[AccessedThroughProperty("BtnReject")]
private Button \u0004;
[AccessedThroughProperty("BtnAccept")]
private Button \u0005;
[AccessedThroughProperty("LblSpaceFolder")]
private Label \u0006;
[AccessedThroughProperty("CheckBoxUseGlobalNorth")]
private CheckBox \u0007;
[AccessedThroughProperty("ComboBoxSpaceFolder")]
private ComboBox \u0008;
private BusinessObject \u0011;
private int \u0012;
[DebuggerNonUserCode]
static CtrlPlaceVolumeRB()
{
}
[DebuggerNonUserCode]
private static void \u0001(object _param0)
{
lock (CtrlPlaceVolumeRB.\u0001)
{
if (CtrlPlaceVolumeRB.\u0001.Count == CtrlPlaceVolumeRB.\u0001.Capacity)
{
int index1 = 0;
int num = checked (CtrlPlaceVolumeRB.\u0001.Count - 1);
int index2 = 0;
while (index2 <= num)
{
if (CtrlPlaceVolumeRB.\u0001[index2].IsAlive)
{
if (index2 != index1)
CtrlPlaceVolumeRB.\u0001[index1] =
CtrlPlaceVolumeRB.\u0001[index2];
checked { ++index1; }
}
checked { ++index2; }
}
CtrlPlaceVolumeRB.\u0001.RemoveRange(index1, checked
(CtrlPlaceVolumeRB.\u0001.Count - index1));
CtrlPlaceVolumeRB.\u0001.Capacity = CtrlPlaceVolumeRB.\u0001.Count;
}
CtrlPlaceVolumeRB.\u0001.Add(new
WeakReference(RuntimeHelpers.GetObjectValue(_param0)));
}
}
[DebuggerNonUserCode]
protected virtual void Dispose(bool disposing)
{
try
{
if (!disposing || this.\u0002 == null)
return;
this.\u0002.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void \u0001()
{
this.BtnFinish = new Button();
this.LblSpaceFolder = new Label();
this.BtnAccept = new Button();
this.BtnReject = new Button();
this.CheckBoxUseGlobalNorth = new CheckBox();
this.ComboBoxSpaceFolder = new ComboBox();
((Control) this).SuspendLayout();
Button btnFinish1 = this.BtnFinish;
Point point1 = new Point(66, 14);
Point point2 = point1;
btnFinish1.Location = point2;
this.BtnFinish.Name = \u0008.\u0004.\u0001(10884);
Button btnFinish2 = this.BtnFinish;
Size size1 = new Size(75, 23);
Size size2 = size1;
btnFinish2.Size = size2;
this.BtnFinish.TabIndex = 1;
this.BtnFinish.Text = \u0008.\u0004.\u0001(10897);
this.BtnFinish.UseVisualStyleBackColor = true;
this.LblSpaceFolder.AutoSize = true;
Label lblSpaceFolder1 = this.LblSpaceFolder;
point1 = new Point(148, 1);
Point point3 = point1;
lblSpaceFolder1.Location = point3;
this.LblSpaceFolder.Name = \u0008.\u0004.\u0001(10910);
Label lblSpaceFolder2 = this.LblSpaceFolder;
size1 = new Size(67, 13);
Size size3 = size1;
lblSpaceFolder2.Size = size3;
this.LblSpaceFolder.TabIndex = 5;
this.LblSpaceFolder.Text = \u0008.\u0004.\u0001(10931);
this.BtnAccept.Image = (Image) \u0002.\u0002.AcceptSel;
Button btnAccept1 = this.BtnAccept;
point1 = new Point(34, 14);
Point point4 = point1;
btnAccept1.Location = point4;
this.BtnAccept.Name = \u0008.\u0004.\u0001(10948);
Button btnAccept2 = this.BtnAccept;
size1 = new Size(23, 23);
Size size4 = size1;
btnAccept2.Size = size4;
this.BtnAccept.TabIndex = 3;
this.BtnAccept.UseVisualStyleBackColor = true;
this.BtnReject.Image = (Image) \u0002.\u0002.RejectSel;
Button btnReject1 = this.BtnReject;
point1 = new Point(11, 14);
Point point5 = point1;
btnReject1.Location = point5;
this.BtnReject.Name = \u0008.\u0004.\u0001(10961);
Button btnReject2 = this.BtnReject;
size1 = new Size(23, 23);
Size size5 = size1;
btnReject2.Size = size5;
this.BtnReject.TabIndex = 2;
this.BtnReject.UseVisualStyleBackColor = true;
this.CheckBoxUseGlobalNorth.AutoSize = true;
this.CheckBoxUseGlobalNorth.Checked = true;
this.CheckBoxUseGlobalNorth.CheckState = CheckState.Checked;
CheckBox boxUseGlobalNorth1 = this.CheckBoxUseGlobalNorth;
point1 = new Point(323, 18);
Point point6 = point1;
boxUseGlobalNorth1.Location = point6;
this.CheckBoxUseGlobalNorth.Name = \u0008.\u0004.\u0001(10974);
CheckBox boxUseGlobalNorth2 = this.CheckBoxUseGlobalNorth;
size1 = new Size(107, 17);
Size size6 = size1;
boxUseGlobalNorth2.Size = size6;
this.CheckBoxUseGlobalNorth.TabIndex = 11;
this.CheckBoxUseGlobalNorth.Text = \u0008.\u0004.\u0001(11007);
this.CheckBoxUseGlobalNorth.UseVisualStyleBackColor = true;
this.ComboBoxSpaceFolder.FormattingEnabled = true;
ComboBox comboBoxSpaceFolder1 = this.ComboBoxSpaceFolder;
point1 = new Point(151, 15);
Point point7 = point1;
comboBoxSpaceFolder1.Location = point7;
this.ComboBoxSpaceFolder.Name = \u0008.\u0004.\u0001(11032);
ComboBox comboBoxSpaceFolder2 = this.ComboBoxSpaceFolder;
size1 = new Size(158, 21);
Size size7 = size1;
comboBoxSpaceFolder2.Size = size7;
this.ComboBoxSpaceFolder.TabIndex = 12;
((ContainerControl) this).AutoScaleDimensions = new SizeF(6f, 13f);
((ContainerControl) this).AutoScaleMode = AutoScaleMode.Font;
((Control) this).Controls.Add((Control) this.ComboBoxSpaceFolder);
((Control) this).Controls.Add((Control) this.CheckBoxUseGlobalNorth);
((Control) this).Controls.Add((Control) this.LblSpaceFolder);
((Control) this).Controls.Add((Control) this.BtnAccept);
((Control) this).Controls.Add((Control) this.BtnReject);
((Control) this).Controls.Add((Control) this.BtnFinish);
((Control) this).Name = \u0008.\u0004.\u0001(11061);
size1 = new Size(433, 45);
((Control) this).Size = size1;
((Control) this).ResumeLayout(false);
((Control) this).PerformLayout();
}
internal virtual Button BtnFinish
{
[DebuggerNonUserCode] get
{
return this.\u0003;
}
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.\u0001);
if (this.\u0003 != null)
this.\u0003.Click -= eventHandler;
this.\u0003 = value;
if (this.\u0003 == null)
return;
this.\u0003.Click += eventHandler;
}
}
internal virtual Button BtnReject
{
[DebuggerNonUserCode] get
{
return this.\u0004;
}
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.\u0002);
if (this.\u0004 != null)
this.\u0004.Click -= eventHandler;
this.\u0004 = value;
if (this.\u0004 == null)
return;
this.\u0004.Click += eventHandler;
}
}
internal virtual Button BtnAccept
{
[DebuggerNonUserCode] get
{
return this.\u0005;
}
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.\u0003);
if (this.\u0005 != null)
this.\u0005.Click -= eventHandler;
this.\u0005 = value;
if (this.\u0005 == null)
return;
this.\u0005.Click += eventHandler;
}
}
internal virtual Label LblSpaceFolder
{
[DebuggerNonUserCode] get
{
return this.\u0006;
}
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.\u0005);
if (this.\u0006 != null)
this.\u0006.Click -= eventHandler;
this.\u0006 = value;
if (this.\u0006 == null)
return;
this.\u0006.Click += eventHandler;
}
}
internal virtual CheckBox CheckBoxUseGlobalNorth
{
[DebuggerNonUserCode] get
{
return this.\u0007;
}
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
this.\u0007 = value;
}
}
internal virtual ComboBox ComboBoxSpaceFolder
{
[DebuggerNonUserCode] get
{
return this.\u0008;
}
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.\u0004);
if (this.\u0008 != null)
this.\u0008.SelectedIndexChanged -= eventHandler;
this.\u0008 = value;
if (this.\u0008 == null)
return;
this.\u0008.SelectedIndexChanged += eventHandler;
}
}
public event CtrlPlaceVolumeRB.ClickEventHandler RejectSelection;
public event CtrlPlaceVolumeRB.ClickEventHandler AcceptSelection;
public event CtrlPlaceVolumeRB.ClickEventHandler Finish;
public CtrlPlaceVolumeRB()
{
base.\u002Ector();
CtrlPlaceVolumeRB.\u0001((object) this);
this.\u0001();
this.ComboBoxSpaceFolder.Refresh();
this.ComboBoxSpaceFolder.ResetText();
this.ComboBoxSpaceFolder.Items.Add((object) \u0008.\u0004.\u0001(11086));
string str = \u0004.\u0002.\u0001(\u0004.\u0002.\u0001(),
\u0008.\u0004.\u0001(3347), \u0008.\u0004.\u0001(11099),
\u0008.\u0004.\u0001(197));
if (Operators.CompareString(str, \u0008.\u0004.\u0001(197), false) != 0)
{
BusinessObject selectedObject = this.GetSelectedObject(str);
if (selectedObject == null)
return;
this.ComboBoxSpaceFolder.Items.Add((object) selectedObject);
this.ComboBoxSpaceFolder.SelectedItem = (object) selectedObject;
}
else
{
BusinessObject rootSpace = (BusinessObject) this.GetRootSpace();
if (rootSpace != null)
{
this.ComboBoxSpaceFolder.Items.Add((object) rootSpace);
this.ComboBoxSpaceFolder.SelectedItem = (object) rootSpace;
}
}
}
public ISpaceParent GetRootSpace()
{
return (ISpaceParent)
MiddleServiceProvider.get_SiteMgr().get_ActiveSite().get_ActivePlant().get_PlantMod
el().get_RootSystem();
}
public BusinessObject GetSelectedObject(string oid)
{
BusinessObject businessObject;
try
{
Filter filter = new Filter();
filter.get_Definition().AddObjectType(\u0008.\u0004.\u0001(11120));
ReadOnlyCollection<BusinessObject> readOnlyCollection = ((FilterBase)
filter).Apply();
int num = checked (readOnlyCollection.Count - 1);
int index = 0;
while (index <= num)
{
if
(Operators.CompareString(readOnlyCollection[index].get_ObjectIDForQuery(), oid,
false) == 0)
{
businessObject = readOnlyCollection[index];
goto label_8;
}
else
checked { ++index; }
}
BusinessObject rootSpace = (BusinessObject) this.GetRootSpace();
businessObject = rootSpace == null ? (BusinessObject) null : rootSpace;
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
businessObject = (BusinessObject) null;
ProjectData.ClearProjectError();
}
label_8:
return businessObject;
}
private void \u0001(object _param1, EventArgs _param2)
{
CtrlPlaceVolumeRB.ClickEventHandler clickEventHandler = this.\u0010;
if (clickEventHandler == null)
return;
clickEventHandler(RuntimeHelpers.GetObjectValue(_param1), _param2);
}
private void \u0002(object _param1, EventArgs _param2)
{
CtrlPlaceVolumeRB.ClickEventHandler clickEventHandler = this.\u000E;
if (clickEventHandler == null)
return;
clickEventHandler(RuntimeHelpers.GetObjectValue(_param1), _param2);
}
private void \u0003(object _param1, EventArgs _param2)
{
CtrlPlaceVolumeRB.ClickEventHandler clickEventHandler = this.\u000F;
if (clickEventHandler == null)
return;
clickEventHandler(RuntimeHelpers.GetObjectValue(_param1), _param2);
}
public bool BtnRejectEnabled
{
set
{
this.BtnReject.Enabled = value;
}
}
public bool BtnAcceptEnabled
{
set
{
this.BtnAccept.Enabled = value;
}
}
public bool BtnFinishEnabled
{
set
{
this.BtnFinish.Enabled = value;
}
}
public BusinessObject SystemObject
{
get
{
return this.\u0011;
}
set
{
this.\u0011 = value;
}
}
public bool UseGlobalNorth
{
get
{
return this.CheckBoxUseGlobalNorth.Checked;
}
}
private void \u0004(object _param1, EventArgs _param2)
{
if (Operators.CompareString(this.ComboBoxSpaceFolder.SelectedItem.ToString(),
\u0008.\u0004.\u0001(11086), false) == 0)
{
FrmDispSpaceHierarchy dispSpaceHierarchy = new FrmDispSpaceHierarchy();
int num = (int) dispSpaceHierarchy.ShowDialog((IWin32Window) this);
if (!dispSpaceHierarchy.ObjectSelected)
return;
this.\u0011 = dispSpaceHierarchy.SelectedObject;
if (!this.ComboBoxSpaceFolder.Items.Contains((object) this.\u0011))
this.ComboBoxSpaceFolder.Items.Add((object) this.\u0011);
this.ComboBoxSpaceFolder.SelectedItem = (object) this.\u0011;
\u0004.\u0002.\u0001(\u0004.\u0002.\u0001(), \u0008.\u0004.\u0001(3347),
\u0008.\u0004.\u0001(11099), this.\u0011.get_ObjectIDForQuery());
}
else
{
this.\u0011 = (BusinessObject) this.ComboBoxSpaceFolder.SelectedItem;
\u0004.\u0002.\u0001(\u0004.\u0002.\u0001(), \u0008.\u0004.\u0001(3347),
\u0008.\u0004.\u0001(11099), this.\u0011.get_ObjectIDForQuery());
}
}
private void \u0005(object _param1, EventArgs _param2)
{
this.ComboBoxSpaceFolder.Focus();
}
public delegate void ClickEventHandler(object sender, EventArgs e);
}
}