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