63 : base(handle)
64 {
65 _builder = builder;
66 builder.Autoconnect(this);
67 App.channelsTool = this;
68 var store = new ListStore(typeof(string));
69 foreach (Channel item in Channels)
70 {
71
72 store.AppendValues(item.ToString());
73 channelsBox.Active = 0;
74 }
75 channelsBox.Model = store;
76
77 var renderer = new CellRendererText();
78 channelsBox.PackStart(renderer, false);
79 channelsBox.AddAttribute(renderer, "text", 0);
80
81 UpdateGUI();
82
83 minBox.Value = (int)Channels[0].stats[0].StackMin;
84 maxBox.Value = (int)Channels[0].stats[0].StackMax;
85 binBox.Value = 1;
86 binBox.Adjustment = new Adjustment(1, 1, 255, 1, 1, 1);
87 hist = HistogramControl.Create(Channels[0]);
88 hist.GraphMax = (int)maxBox.Value;
89 graphMax.Value = (int)maxBox.Value;
90 hist.Show();
91
92 minBox.ButtonPressEvent += minBox_ValueChanged;
93
94 setMinAllBut.ButtonPressEvent += setMinAllBut_Click;
95 setMaxAllBut.ButtonPressEvent += setMaxAllBut_Click;
96 minBox.ValueChanged+= minBox_ValueChanged;
97 maxBox.ValueChanged+= maxBox_ValueChanged;
98 fluorBox.Changed += fluorBox_TextChanged;
99 emissionBox.ValueChanged += emissionBox_ValueChanged;
100 excitationBox.ValueChanged += excitationBox_ValueChanged;
101 binBox.ValueChanged += binBox_ValueChanged;
102 graphMinBox.ValueChanged += minGraphBox_ValueChanged;
103 graphMax.ValueChanged += maxGraphBox_ValueChanged;
104 applyBut.ButtonPressEvent += applyBut_Click;
105 resetBut.ButtonPressEvent += ResetButton_ButtonPressEvent;
106 this.ButtonPressEvent += ChannelsTool_MouseDown;
107 this.FocusActivated += ChannelsTool_Activated;
108 channelsBox.Changed += ChannelsBox_Changed;
109 sampleBox.Changed += SampleBox_Changed;
110 meanStackBox.Clicked += MeanStackBox_Clicked;
111
112 maxUintBox.Changed += MaxUintBox_Changed;
113 maxUintBox2.Changed += MaxUintBox2_Changed;
114
115 var st = new ListStore(typeof(string));
116 st.AppendValues(ushort.MaxValue.ToString());
117 st.AppendValues(16383);
118 st.AppendValues(4096);
119 st.AppendValues(1023);
120 st.AppendValues(byte.MaxValue.ToString());
121 maxUintBox.Model = st;
122 maxUintBox2.Model = st;
123
124 var rend = new CellRendererText();
125 maxUintBox.PackStart(rend, false);
126 maxUintBox.AddAttribute(rend, "text", 0);
127 var rend2 = new CellRendererText();
128 maxUintBox2.PackStart(rend2, false);
129 maxUintBox2.AddAttribute(rend2, "text", 0);
130 ShowAll();
131 App.ApplyStyles(this);
132 }